1 package antlr;
2
3 * <b>SOFTWARE RIGHTS</b>
5 * <p>
6 * ANTLR 2.5.0 MageLang Institute, 1998
7 * <p>
8 * We reserve no legal rights to the ANTLR--it is fully in the
9 * public domain. An individual or company may do whatever
10 * they wish with source code distributed with ANTLR or the
11 * code generated by ANTLR, including the incorporation of
12 * ANTLR, or its output, into commerical software.
13 * <p>
14 * We encourage users to develop software with ANTLR. However,
15 * we do ask that credit is given to us for developing
16 * ANTLR. By "credit", we mean that if you use ANTLR or
17 * incorporate any source code into one of your programs
18 * (commercial product, research project, or otherwise) that
19 * you acknowledge this fact somewhere in the documentation,
20 * research report, etc... If you like ANTLR and have
21 * developed a nice tool with the output, please mention that
22 * you developed it using ANTLR. In addition, we ask that the
23 * headers remain intact in our source code. As long as these
24 * guidelines are kept, we expect to continue enhancing this
25 * system and expect to make other tools available as they are
26 * completed.
27 * <p>
28 * The ANTLR gang:
29 * @version ANTLR 2.5.0 MageLang Institute, 1998
30 * @author Terence Parr, <a href=http://www.MageLang.com>MageLang Institute</a>
31 * @author <br>John Lilley, <a href=http://www.Empathy.com>Empathy Software</a>
32 */
33 import antlr.collections.impl.BitSet;
34
35 public interface ANTLRGrammarParseBehavior {
36
37
38 public void abortGrammar();
39 public void beginAlt(boolean doAST_);
40 public void beginChildList();
41 public void beginExceptionGroup();
43 public void beginExceptionSpec(Token label);
44 public void beginSubRule(Token label, int line, boolean not);
45 public void beginTree(int line) throws SemanticException ;
47 public void defineRuleName(Token r, String access, boolean ruleAST, String docComment) throws SemanticException;
48 public void endAlt();
49 public void endChildList();
50 public void endExceptionGroup();
51 public void endExceptionSpec();
52 public void endGrammar();
53 public void endOptions();
54 public void endRule(String r);
55 public void endSubRule();
56 public void endTree();
57 public void hasError();
58 public void noASTSubRule();
59 public void oneOrMoreSubRule();
60 public void optionalSubRule();
61 public void refAction(Token action);
62 public void refArgAction(Token action);
63 public void refCharLiteral(Token lit, Token label, boolean inverted, int autoGenType, boolean lastInRule);
64 public void refCharRange(Token t1, Token t2, Token label, int autoGenType, boolean lastInRule);
65 public void refExceptionHandler(Token exTypeAndName, String action);
66 public void refHeaderAction(Token act);
67 public void refInitAction(Token action);
68 public void refMemberAction(Token act);
69 public void refPreambleAction(Token act);
70 public void refReturnAction(Token returnAction);
71 public void refRule(Token idAssign, Token r, Token label, Token arg, int autoGenType);
72 public void refSemPred(Token pred);
73 public void refStringLiteral(Token lit, Token label, int autoGenType, boolean lastInRule);
74 public void refToken(Token assignId, Token t, Token label, Token args,
75 boolean inverted, int autoGenType, boolean lastInRule);
76 public void refTokenRange(Token t1, Token t2, Token label, int autoGenType, boolean lastInRule);
77 public void refTreeSpecifier(Token treeSpec);
79 public void refWildcard(Token t, Token label, int autoGenType);
80 public void setArgOfRuleRef(Token argaction);
81 public void setCharVocabulary(BitSet b);
82 public void setFileOption(Token key, Token value);
84 public void setGrammarOption(Token key, Token value);
85 public void setRuleOption(Token key, Token value);
86 public void setSubruleOption(Token key, Token value);
87 public void startLexer(Token name, String superClass, String doc);
88 public void startParser(Token name, String superClass, String doc);
90 public void startTreeWalker(Token name, String superClass, String doc);
91 public void synPred();
92 public void zeroOrMoreSubRule();
93 }
94