antlr

Class ANTLRParser

Implemented Interfaces:
ANTLRTokenTypes

public class ANTLRParser
extends LLkParser
implements ANTLRTokenTypes

Field Summary

static 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.LLkParser

k

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_Lexer, LITERAL_Parser, LITERAL_TreeParser, LITERAL_catch, LITERAL_charVocabulary, LITERAL_class, LITERAL_exception, LITERAL_extends, LITERAL_header, LITERAL_lexclass, LITERAL_options, LITERAL_private, LITERAL_protected, LITERAL_public, LITERAL_returns, LITERAL_throws, LITERAL_tokens, 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, TOKENS, TOKEN_REF, TREE_BEGIN, WILDCARD, WS, WS_LOOP, WS_OPT, XDIGIT

Constructor Summary

ANTLRParser(ParserSharedInputState state)
ANTLRParser(TokenBuffer tokenBuf)
ANTLRParser(TokenBuffer tokenBuf, ANTLRGrammarParseBehavior behavior_, Tool tool_)
ANTLRParser(TokenBuffer tokenBuf, int k)
ANTLRParser(TokenStream lexer)
ANTLRParser(TokenStream lexer, int k)

Method Summary

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(String doc)
void
notTerminal(Token label)
Token
optionValue()
void
parserOptionsSpec()
void
parserSpec(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(String s)
Parser error-reporting function can be overridden in subclass
void
reportError(RecognitionException e)
Parser error-reporting function can be overridden in subclass
void
reportError(RecognitionException e, String s)
void
reportWarning(String s)
Parser warning-reporting function can be overridden in subclass
void
rootNode()
void
rule()
void
ruleOptionsSpec()
void
rules()
BitSet
setBlockElement()
void
subruleOptionsSpec()
String
superClass()
void
terminal(Token label)
void
throwsSpec()
void
tokensSpec()
void
tokensSpecOptions(Token t)
void
tree()
void
treeParserOptionsSpec()
void
treeParserSpec(String doc)

Methods inherited from class antlr.LLkParser

LA, LT, consume, traceIn, traceOut

Methods inherited from class antlr.Parser

LA, LT, addMessageListener, addParserListener, addParserMatchListener, addParserTokenListener, addSemanticPredicateListener, addSyntacticPredicateListener, addTraceListener, consume, consumeUntil, consumeUntil, defaultDebuggingSetup, getAST, getASTFactory, getFilename, getInputState, getTokenName, getTokenNames, getTokenTypeToASTClassMap, isDebugMode, mark, match, match, matchNot, panic, removeMessageListener, removeParserListener, removeParserMatchListener, removeParserTokenListener, removeSemanticPredicateListener, removeSyntacticPredicateListener, removeTraceListener, reportError, reportError, reportWarning, rewind, setASTFactory, setASTNodeClass, setASTNodeType, setDebugMode, setFilename, setIgnoreInvalidDebugCalls, setInputState, setTokenBuffer, traceIn, traceIndent, traceOut

Field Details

_tokenNames

public static final String[] _tokenNames

_tokenSet_0

public static final BitSet _tokenSet_0

_tokenSet_1

public static final BitSet _tokenSet_1

_tokenSet_10

public static final BitSet _tokenSet_10

_tokenSet_11

public static final BitSet _tokenSet_11

_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

antlrTool

(package private)  Tool antlrTool

behavior

(package private)  ANTLRGrammarParseBehavior behavior

blockNesting

protected int blockNesting

Constructor Details

ANTLRParser

public ANTLRParser(ParserSharedInputState state)

ANTLRParser

public ANTLRParser(TokenBuffer tokenBuf)

ANTLRParser

public ANTLRParser(TokenBuffer tokenBuf,
                   ANTLRGrammarParseBehavior behavior_,
                   Tool tool_)

ANTLRParser

protected ANTLRParser(TokenBuffer tokenBuf,
                      int k)

ANTLRParser

public ANTLRParser(TokenStream lexer)

ANTLRParser

protected ANTLRParser(TokenStream lexer,
                      int k)

Method Details

alternative

public final void alternative()
            throws RecognitionException,
                   TokenStreamException

ast_type_spec

public final int ast_type_spec()
            throws RecognitionException,
                   TokenStreamException

block

public final void block()
            throws RecognitionException,
                   TokenStreamException

charSet

public final BitSet charSet()
            throws RecognitionException,
                   TokenStreamException

classDef

public final void classDef()
            throws RecognitionException,
                   TokenStreamException

ebnf

public final void ebnf(Token label,
                       boolean not)
            throws RecognitionException,
                   TokenStreamException

element

public final void element()
            throws RecognitionException,
                   TokenStreamException

elementNoOptionSpec

public final void elementNoOptionSpec()
            throws RecognitionException,
                   TokenStreamException

elementOptionSpec

public final void elementOptionSpec()
            throws RecognitionException,
                   TokenStreamException

exceptionGroup

public final void exceptionGroup()
            throws RecognitionException,
                   TokenStreamException

exceptionHandler

public final void exceptionHandler()
            throws RecognitionException,
                   TokenStreamException

exceptionSpec

public final void exceptionSpec()
            throws RecognitionException,
                   TokenStreamException

exceptionSpecNoLabel

public final void exceptionSpecNoLabel()
            throws RecognitionException,
                   TokenStreamException

fileOptionsSpec

public final void fileOptionsSpec()
            throws RecognitionException,
                   TokenStreamException

grammar

public final void grammar()
            throws RecognitionException,
                   TokenStreamException

id

public final Token id()
            throws RecognitionException,
                   TokenStreamException

lexerOptionsSpec

public final void lexerOptionsSpec()
            throws RecognitionException,
                   TokenStreamException

lexerSpec

public final void lexerSpec(String doc)
            throws RecognitionException,
                   TokenStreamException

notTerminal

public final void notTerminal(Token label)
            throws RecognitionException,
                   TokenStreamException

optionValue

public final Token optionValue()
            throws RecognitionException,
                   TokenStreamException

parserOptionsSpec

public final void parserOptionsSpec()
            throws RecognitionException,
                   TokenStreamException

parserSpec

public final void parserSpec(String doc)
            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.

range

public final void range(Token label)
            throws RecognitionException,
                   TokenStreamException

reportError

public void reportError(String s)
Parser error-reporting function can be overridden in subclass
Overrides:
reportError in interface Parser

reportError

public void reportError(RecognitionException e)
Parser error-reporting function can be overridden in subclass
Overrides:
reportError in interface Parser

reportError

public void reportError(RecognitionException e,
                        String s)

reportWarning

public void reportWarning(String s)
Parser warning-reporting function can be overridden in subclass
Overrides:
reportWarning in interface Parser

rootNode

public final void rootNode()
            throws RecognitionException,
                   TokenStreamException

rule

public final void rule()
            throws RecognitionException,
                   TokenStreamException

ruleOptionsSpec

public final void ruleOptionsSpec()
            throws RecognitionException,
                   TokenStreamException

rules

public final void rules()
            throws RecognitionException,
                   TokenStreamException

setBlockElement

public final BitSet setBlockElement()
            throws RecognitionException,
                   TokenStreamException

subruleOptionsSpec

public final void subruleOptionsSpec()
            throws RecognitionException,
                   TokenStreamException

superClass

public final String superClass()
            throws RecognitionException,
                   TokenStreamException

terminal

public final void terminal(Token label)
            throws RecognitionException,
                   TokenStreamException

throwsSpec

public final void throwsSpec()
            throws RecognitionException,
                   TokenStreamException

tokensSpec

public final void tokensSpec()
            throws RecognitionException,
                   TokenStreamException

tokensSpecOptions

public final void tokensSpecOptions(Token t)
            throws RecognitionException,
                   TokenStreamException

tree

public final void tree()
            throws RecognitionException,
                   TokenStreamException

treeParserOptionsSpec

public final void treeParserOptionsSpec()
            throws RecognitionException,
                   TokenStreamException

treeParserSpec

public final void treeParserSpec(String doc)
            throws RecognitionException,
                   TokenStreamException