Commit | Line | Data |
---|---|---|
970ed795 | 1 | /////////////////////////////////////////////////////////////////////////////// |
3abe9331 | 2 | // Copyright (c) 2000-2015 Ericsson Telecom AB |
970ed795 EL |
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 | /////////////////////////////////////////////////////////////////////////////// | |
8 | #ifndef _langviz_Iterator_HH | |
9 | #define _langviz_Iterator_HH | |
10 | ||
11 | class Grammar; | |
12 | class Grouping; | |
13 | class Rule; | |
14 | class Symbol; | |
15 | ||
16 | class Iterator { | |
17 | protected: | |
18 | Grammar *grammar; | |
19 | Grouping *grouping; | |
20 | Symbol *lhs; | |
21 | Rule *rule; | |
22 | Symbol *symbol; | |
23 | ||
24 | public: | |
25 | virtual ~Iterator() {} | |
26 | virtual void visitGrammar(Grammar *p_grammar); | |
27 | virtual void visitGrouping(Grouping *p_grouping); | |
28 | virtual void visitRule(Rule *p_rule); | |
29 | virtual void visitSymbol(Symbol *p_symbol); | |
30 | virtual void actionGrammar() {} | |
31 | virtual void actionGrouping() {} | |
32 | virtual void actionRule() {} | |
33 | virtual void actionSymbol() {} | |
34 | }; | |
35 | ||
36 | /** | |
37 | * Used to build the references/referenced by structure of symbols | |
38 | */ | |
39 | class ItRefBuild : public Iterator { | |
40 | virtual void actionSymbol(); | |
41 | }; | |
42 | ||
43 | #endif // _langviz_Iterator_HH |