1 ///////////////////////////////////////////////////////////////////////////////
2 // Copyright (c) 2000-2014 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
7 ///////////////////////////////////////////////////////////////////////////////
13 // =================================
15 // =================================
17 void Iterator::visitGrammar(Grammar
*p_grammar
)
21 size_t n
=grammar
->get_nof_groupings();
22 for(size_t i
=0; i
<n
; i
++)
23 visitGrouping(grammar
->get_grouping_byIndex(i
));
26 void Iterator::visitGrouping(Grouping
*p_grouping
)
29 lhs
=p_grouping
->get_lhs();
31 size_t n
=grouping
->get_nof_rules();
32 for(size_t i
=0; i
<n
; i
++)
33 visitRule(grouping
->get_rule_byIndex(i
));
36 void Iterator::visitRule(Rule
*p_rule
)
40 size_t n
=rule
->get_nof_ss();
41 for(size_t i
=0; i
<n
; i
++)
42 visitSymbol(rule
->get_s_byIndex(i
));
45 void Iterator::visitSymbol(Symbol
*p_symbol
)
51 // =================================
53 // =================================
55 void ItRefBuild::actionSymbol()
58 symbol
->set_is_recursive();
60 symbol
->add_refd_by(lhs
);
61 lhs
->add_refs(symbol
);
This page took 0.03719 seconds and 5 git commands to generate.