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[]
_tokenNames
static BitSet
_tokenSet_0
static BitSet
_tokenSet_1
static BitSet
_tokenSet_10
static BitSet
_tokenSet_11
static BitSet
_tokenSet_2
static BitSet
_tokenSet_3
static BitSet
_tokenSet_4
static BitSet
_tokenSet_5
static BitSet
_tokenSet_6
static BitSet
_tokenSet_7
static BitSet
_tokenSet_8
static BitSet
_tokenSet_9
(package private) Tool
antlrTool
(package private) ANTLRGrammarParseBehavior
behavior
protected int
blockNesting
-
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)
protected
ANTLRParser(TokenBuffer tokenBuf, int k)
ANTLRParser(TokenBuffer tokenBuf, ANTLRGrammarParseBehavior behavior_, Tool tool_)
ANTLRParser(TokenStream lexer)
protected
ANTLRParser(TokenStream lexer, int k)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
alternative()
int
ast_type_spec()
void
block()
BitSet
charSet()
void
classDef()
void
ebnf(Token label, boolean not)
void
element()
void
elementNoOptionSpec()
void
elementOptionSpec()
void
exceptionGroup()
void
exceptionHandler()
void
exceptionSpec()
void
exceptionSpecNoLabel()
void
fileOptionsSpec()
void
grammar()
Token
id()
void
lexerOptionsSpec()
void
lexerSpec(java.lang.String doc)
void
notTerminal(Token label)
Token
optionValue()
void
parserOptionsSpec()
void
parserSpec(java.lang.String doc)
Token
qualifiedID()
Match a.b.c.d qualified ids; WILDCARD here is overloaded as id separator; that is, I need a reference to the '.' token.void
range(Token label)
void
reportError(RecognitionException e)
Parser error-reporting function can be overridden in subclassvoid
reportError(RecognitionException e, java.lang.String s)
void
reportError(java.lang.String s)
Parser error-reporting function can be overridden in subclassvoid
reportWarning(java.lang.String s)
Parser warning-reporting function can be overridden in subclassvoid
rootNode()
void
rule()
void
ruleOptionsSpec()
void
rules()
BitSet
setBlockElement()
void
subruleOptionsSpec()
java.lang.String
superClass()
void
terminal(Token label)
void
throwsSpec()
void
tokensSpec()
void
tokensSpecOptions(Token t)
void
tree()
void
treeParserOptionsSpec()
void
treeParserSpec(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:Parser
Parser error-reporting function can be overridden in subclass- Overrides:
reportError
in classParser
-
reportError
public void reportError(RecognitionException e)
Description copied from class:Parser
Parser error-reporting function can be overridden in subclass- Overrides:
reportError
in classParser
-
reportError
public void reportError(RecognitionException e, java.lang.String s)
-
reportWarning
public void reportWarning(java.lang.String s)
Description copied from class:Parser
Parser warning-reporting function can be overridden in subclass- Overrides:
reportWarning
in 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
-
-