Package antlr.preprocessor
Class Preprocessor
java.lang.Object
antlr.Parser
antlr.LLkParser
antlr.preprocessor.Preprocessor
- All Implemented Interfaces:
PreprocessorTokenTypes
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String[]static final BitSetstatic final BitSetstatic final BitSetstatic final BitSetstatic final BitSetstatic final BitSetstatic final BitSetstatic final BitSetstatic final BitSetFields inherited from class antlr.Parser
astFactory, inputState, returnAST, tokenNames, tokenTypeToASTClassMap, traceDepthFields inherited from interface antlr.preprocessor.PreprocessorTokenTypes
ACTION, ALT, ARG_ACTION, ASSIGN_RHS, BANG, CHAR_LITERAL, COMMA, COMMENT, CURLY_BLOCK_SCARF, DIGIT, ELEMENT, EOF, ESC, HEADER_ACTION, ID, ID_OR_KEYWORD, LITERAL_catch, LITERAL_class, LITERAL_exception, LITERAL_extends, LITERAL_private, LITERAL_protected, LITERAL_public, LITERAL_returns, LITERAL_throws, LITERAL_tokens, LPAREN, ML_COMMENT, NEWLINE, NULL_TREE_LOOKAHEAD, OPTIONS_START, RCURLY, RPAREN, RULE_BLOCK, SEMI, SL_COMMENT, STRING_LITERAL, SUBRULE_BLOCK, TOKENS_SPEC, WS, XDIGIT -
Constructor Summary
ConstructorsModifierConstructorDescriptionPreprocessor(TokenBuffer tokenBuf) protectedPreprocessor(TokenBuffer tokenBuf, int k) Preprocessor(TokenStream lexer) protectedPreprocessor(TokenStream lexer, int k) -
Method Summary
Modifier and TypeMethodDescriptionfinal Grammarfinal Stringfinal Stringfinal Stringprotected ToolgetTool()final voidgrammarFile(Hierarchy hier, String file) final IndexedVectoroptionSpec(Grammar gr) voidDelegates the error message to the tool if any was registered viainvalid reference
#initTool(antlr.Tool)voidDelegates the error message to the tool if any was registered viainvalid reference
#initTool(antlr.Tool)voidDelegates the warning message to the tool if any was registered viainvalid reference
#initTool(antlr.Tool)final voidvoidIn order to make it so existing subclasses don't break, we won't require that the antlr.Tool instance be passed as a constructor element.final Stringfinal StringMethods 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 Details
-
_tokenNames
-
_tokenSet_0
-
_tokenSet_1
-
_tokenSet_2
-
_tokenSet_3
-
_tokenSet_4
-
_tokenSet_5
-
_tokenSet_6
-
_tokenSet_7
-
_tokenSet_8
-
-
Constructor Details
-
Preprocessor
-
Preprocessor
-
Preprocessor
-
Preprocessor
-
-
Method Details
-
setTool
In order to make it so existing subclasses don't break, we won't require that the antlr.Tool instance be passed as a constructor element. Instead, the antlr.Tool instance should register itself viainvalid reference
#initTool(antlr.Tool)- Throws:
IllegalStateException- if a tool has already been registered- Since:
- 2.7.2
-
getTool
- Since:
- 2.7.2
-
reportError
Delegates the error message to the tool if any was registered viainvalid reference
#initTool(antlr.Tool)- Overrides:
reportErrorin classParser- Since:
- 2.7.2
-
reportError
Delegates the error message to the tool if any was registered viainvalid reference
#initTool(antlr.Tool)- Overrides:
reportErrorin classParser- Since:
- 2.7.2
-
reportWarning
Delegates the warning message to the tool if any was registered viainvalid reference
#initTool(antlr.Tool)- Overrides:
reportWarningin classParser- Since:
- 2.7.2
-
grammarFile
public final void grammarFile(Hierarchy hier, String file) throws RecognitionException, TokenStreamException -
optionSpec
-
class_def
public final Grammar class_def(String file, Hierarchy hier) throws RecognitionException, TokenStreamException -
superClass
-
rule
-
throwsSpec
-
exceptionGroup
-
exceptionSpec
-
exceptionHandler
-