1 /******************************************************************************
2 * Copyright (c) 2000-2016 Ericsson Telecom AB
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
12 ******************************************************************************/
13 #include "Iterator.hh"
18 // =================================
20 // =================================
22 void Iterator::visitGrammar(Grammar
*p_grammar
)
26 size_t n
=grammar
->get_nof_groupings();
27 for(size_t i
=0; i
<n
; i
++)
28 visitGrouping(grammar
->get_grouping_byIndex(i
));
31 void Iterator::visitGrouping(Grouping
*p_grouping
)
34 lhs
=p_grouping
->get_lhs();
36 size_t n
=grouping
->get_nof_rules();
37 for(size_t i
=0; i
<n
; i
++)
38 visitRule(grouping
->get_rule_byIndex(i
));
41 void Iterator::visitRule(Rule
*p_rule
)
45 size_t n
=rule
->get_nof_ss();
46 for(size_t i
=0; i
<n
; i
++)
47 visitSymbol(rule
->get_s_byIndex(i
));
50 void Iterator::visitSymbol(Symbol
*p_symbol
)
56 // =================================
58 // =================================
60 void ItRefBuild::actionSymbol()
63 symbol
->set_is_recursive();
65 symbol
->add_refd_by(lhs
);
66 lhs
->add_refs(symbol
);
This page took 0.031348 seconds and 5 git commands to generate.