Package antlr
Class ANTLRParser
- java.lang.Object
-
- antlr.Parser
-
- antlr.LLkParser
-
- antlr.ANTLRParser
-
- All Implemented Interfaces:
ANTLRTokenTypes
public class ANTLRParser extends LLkParser implements ANTLRTokenTypes
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String[]_tokenNamesstatic BitSet_tokenSet_0static BitSet_tokenSet_1static BitSet_tokenSet_10static BitSet_tokenSet_11static BitSet_tokenSet_2static BitSet_tokenSet_3static BitSet_tokenSet_4static BitSet_tokenSet_5static BitSet_tokenSet_6static BitSet_tokenSet_7static BitSet_tokenSet_8static BitSet_tokenSet_9(package private) ToolantlrTool(package private) ANTLRGrammarParseBehaviorbehaviorprotected intblockNesting-
Fields inherited from class antlr.Parser
astFactory, inputState, returnAST, tokenNames, tokenTypeToASTClassMap, traceDepth
-
Fields inherited from interface antlr.ANTLRTokenTypes
ACTION, ARG_ACTION, ASSIGN, BANG, CARET, CHAR_LITERAL, CLOSE_ELEMENT_OPTION, COLON, COMMA, COMMENT, DIGIT, DOC_COMMENT, EOF, ESC, IMPLIES, INT, INTERNAL_RULE_REF, LITERAL_catch, LITERAL_charVocabulary, LITERAL_class, LITERAL_exception, LITERAL_extends, LITERAL_header, LITERAL_lexclass, LITERAL_Lexer, LITERAL_options, LITERAL_Parser, LITERAL_private, LITERAL_protected, LITERAL_public, LITERAL_returns, LITERAL_throws, LITERAL_tokens, LITERAL_TreeParser, LPAREN, ML_COMMENT, NESTED_ACTION, NESTED_ARG_ACTION, NOT_OP, NULL_TREE_LOOKAHEAD, OPEN_ELEMENT_OPTION, OPTIONS, OR, PLUS, QUESTION, RANGE, RCURLY, RPAREN, RULE_REF, SEMI, SEMPRED, SL_COMMENT, STAR, STRING_LITERAL, TOKEN_REF, TOKENS, TREE_BEGIN, WILDCARD, WS, WS_LOOP, WS_OPT, XDIGIT
-
-
Constructor Summary
Constructors Modifier Constructor Description ANTLRParser(ParserSharedInputState state)ANTLRParser(TokenBuffer tokenBuf)protectedANTLRParser(TokenBuffer tokenBuf, int k)ANTLRParser(TokenBuffer tokenBuf, ANTLRGrammarParseBehavior behavior_, Tool tool_)ANTLRParser(TokenStream lexer)protectedANTLRParser(TokenStream lexer, int k)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidalternative()intast_type_spec()voidblock()BitSetcharSet()voidclassDef()voidebnf(Token label, boolean not)voidelement()voidelementNoOptionSpec()voidelementOptionSpec()voidexceptionGroup()voidexceptionHandler()voidexceptionSpec()voidexceptionSpecNoLabel()voidfileOptionsSpec()voidgrammar()Tokenid()voidlexerOptionsSpec()voidlexerSpec(java.lang.String doc)voidnotTerminal(Token label)TokenoptionValue()voidparserOptionsSpec()voidparserSpec(java.lang.String doc)TokenqualifiedID()Match a.b.c.d qualified ids; WILDCARD here is overloaded as id separator; that is, I need a reference to the '.' token.voidrange(Token label)voidreportError(RecognitionException e)Parser error-reporting function can be overridden in subclassvoidreportError(RecognitionException e, java.lang.String s)voidreportError(java.lang.String s)Parser error-reporting function can be overridden in subclassvoidreportWarning(java.lang.String s)Parser warning-reporting function can be overridden in subclassvoidrootNode()voidrule()voidruleOptionsSpec()voidrules()BitSetsetBlockElement()voidsubruleOptionsSpec()java.lang.StringsuperClass()voidterminal(Token label)voidthrowsSpec()voidtokensSpec()voidtokensSpecOptions(Token t)voidtree()voidtreeParserOptionsSpec()voidtreeParserSpec(java.lang.String doc)-
Methods inherited from class antlr.Parser
addMessageListener, addParserListener, addParserMatchListener, addParserTokenListener, addSemanticPredicateListener, addSyntacticPredicateListener, addTraceListener, consumeUntil, consumeUntil, defaultDebuggingSetup, getAST, getASTFactory, getFilename, getInputState, getTokenName, getTokenNames, getTokenTypeToASTClassMap, isDebugMode, mark, match, match, matchNot, panic, recover, removeMessageListener, removeParserListener, removeParserMatchListener, removeParserTokenListener, removeSemanticPredicateListener, removeSyntacticPredicateListener, removeTraceListener, rewind, setASTFactory, setASTNodeClass, setASTNodeType, setDebugMode, setFilename, setIgnoreInvalidDebugCalls, setInputState, setTokenBuffer, traceIndent
-
-
-
-
Field Detail
-
behavior
ANTLRGrammarParseBehavior behavior
-
antlrTool
Tool antlrTool
-
blockNesting
protected int blockNesting
-
_tokenNames
public static final java.lang.String[] _tokenNames
-
_tokenSet_0
public static final BitSet _tokenSet_0
-
_tokenSet_1
public static final BitSet _tokenSet_1
-
_tokenSet_2
public static final BitSet _tokenSet_2
-
_tokenSet_3
public static final BitSet _tokenSet_3
-
_tokenSet_4
public static final BitSet _tokenSet_4
-
_tokenSet_5
public static final BitSet _tokenSet_5
-
_tokenSet_6
public static final BitSet _tokenSet_6
-
_tokenSet_7
public static final BitSet _tokenSet_7
-
_tokenSet_8
public static final BitSet _tokenSet_8
-
_tokenSet_9
public static final BitSet _tokenSet_9
-
_tokenSet_10
public static final BitSet _tokenSet_10
-
_tokenSet_11
public static final BitSet _tokenSet_11
-
-
Constructor Detail
-
ANTLRParser
public ANTLRParser(TokenBuffer tokenBuf, ANTLRGrammarParseBehavior behavior_, Tool tool_)
-
ANTLRParser
protected ANTLRParser(TokenBuffer tokenBuf, int k)
-
ANTLRParser
public ANTLRParser(TokenBuffer tokenBuf)
-
ANTLRParser
protected ANTLRParser(TokenStream lexer, int k)
-
ANTLRParser
public ANTLRParser(TokenStream lexer)
-
ANTLRParser
public ANTLRParser(ParserSharedInputState state)
-
-
Method Detail
-
reportError
public void reportError(java.lang.String s)
Description copied from class:ParserParser error-reporting function can be overridden in subclass- Overrides:
reportErrorin classParser
-
reportError
public void reportError(RecognitionException e)
Description copied from class:ParserParser error-reporting function can be overridden in subclass- Overrides:
reportErrorin classParser
-
reportError
public void reportError(RecognitionException e, java.lang.String s)
-
reportWarning
public void reportWarning(java.lang.String s)
Description copied from class:ParserParser warning-reporting function can be overridden in subclass- Overrides:
reportWarningin classParser
-
grammar
public final void grammar() throws RecognitionException, TokenStreamException
-
fileOptionsSpec
public final void fileOptionsSpec() throws RecognitionException, TokenStreamException
-
classDef
public final void classDef() throws RecognitionException, TokenStreamException
-
id
public final Token id() throws RecognitionException, TokenStreamException
-
lexerSpec
public final void lexerSpec(java.lang.String doc) throws RecognitionException, TokenStreamException
-
treeParserSpec
public final void treeParserSpec(java.lang.String doc) throws RecognitionException, TokenStreamException
-
parserSpec
public final void parserSpec(java.lang.String doc) throws RecognitionException, TokenStreamException
-
rules
public final void rules() throws RecognitionException, TokenStreamException
-
optionValue
public final Token optionValue() throws RecognitionException, TokenStreamException
-
parserOptionsSpec
public final void parserOptionsSpec() throws RecognitionException, TokenStreamException
-
treeParserOptionsSpec
public final void treeParserOptionsSpec() throws RecognitionException, TokenStreamException
-
lexerOptionsSpec
public final void lexerOptionsSpec() throws RecognitionException, TokenStreamException
-
charSet
public final BitSet charSet() throws RecognitionException, TokenStreamException
-
subruleOptionsSpec
public final void subruleOptionsSpec() throws RecognitionException, TokenStreamException
-
qualifiedID
public final Token qualifiedID() throws RecognitionException, TokenStreamException
Match a.b.c.d qualified ids; WILDCARD here is overloaded as id separator; that is, I need a reference to the '.' token.
-
setBlockElement
public final BitSet setBlockElement() throws RecognitionException, TokenStreamException
-
tokensSpec
public final void tokensSpec() throws RecognitionException, TokenStreamException
-
tokensSpecOptions
public final void tokensSpecOptions(Token t) throws RecognitionException, TokenStreamException
-
superClass
public final java.lang.String superClass() throws RecognitionException, TokenStreamException
-
rule
public final void rule() throws RecognitionException, TokenStreamException
-
throwsSpec
public final void throwsSpec() throws RecognitionException, TokenStreamException
-
ruleOptionsSpec
public final void ruleOptionsSpec() throws RecognitionException, TokenStreamException
-
block
public final void block() throws RecognitionException, TokenStreamException
-
exceptionGroup
public final void exceptionGroup() throws RecognitionException, TokenStreamException
-
alternative
public final void alternative() throws RecognitionException, TokenStreamException
-
element
public final void element() throws RecognitionException, TokenStreamException
-
exceptionSpecNoLabel
public final void exceptionSpecNoLabel() throws RecognitionException, TokenStreamException
-
exceptionSpec
public final void exceptionSpec() throws RecognitionException, TokenStreamException
-
exceptionHandler
public final void exceptionHandler() throws RecognitionException, TokenStreamException
-
elementNoOptionSpec
public final void elementNoOptionSpec() throws RecognitionException, TokenStreamException
-
elementOptionSpec
public final void elementOptionSpec() throws RecognitionException, TokenStreamException
-
range
public final void range(Token label) throws RecognitionException, TokenStreamException
-
terminal
public final void terminal(Token label) throws RecognitionException, TokenStreamException
-
notTerminal
public final void notTerminal(Token label) throws RecognitionException, TokenStreamException
-
ebnf
public final void ebnf(Token label, boolean not) throws RecognitionException, TokenStreamException
-
tree
public final void tree() throws RecognitionException, TokenStreamException
-
rootNode
public final void rootNode() throws RecognitionException, TokenStreamException
-
ast_type_spec
public final int ast_type_spec() throws RecognitionException, TokenStreamException
-
-