public class Preprocessor extends LLkParser implements PreprocessorTokenTypes
Modifier and Type | Field and Description |
---|---|
static String[] |
_tokenNames |
static BitSet |
_tokenSet_0 |
static BitSet |
_tokenSet_1 |
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 |
astFactory, inputState, returnAST, tokenNames, tokenTypeToASTClassMap, traceDepth
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
Modifier | Constructor and Description |
---|---|
|
Preprocessor(ParserSharedInputState state) |
|
Preprocessor(TokenBuffer tokenBuf) |
protected |
Preprocessor(TokenBuffer tokenBuf,
int k) |
|
Preprocessor(TokenStream lexer) |
protected |
Preprocessor(TokenStream lexer,
int k) |
Modifier and Type | Method and Description |
---|---|
Grammar |
class_def(String file,
Hierarchy hier) |
String |
exceptionGroup() |
String |
exceptionHandler() |
String |
exceptionSpec() |
protected Tool |
getTool() |
void |
grammarFile(Hierarchy hier,
String file) |
IndexedVector |
optionSpec(Grammar gr) |
void |
reportError(RecognitionException e)
Delegates the error message to the tool if any was registered via
#initTool(antlr.Tool) |
void |
reportError(String s)
Delegates the error message to the tool if any was registered via
#initTool(antlr.Tool) |
void |
reportWarning(String s)
Delegates the warning message to the tool if any was registered via
#initTool(antlr.Tool) |
void |
rule(Grammar gr) |
void |
setTool(Tool tool)
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.
|
String |
superClass() |
String |
throwsSpec() |
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
public static final String[] _tokenNames
public static final BitSet _tokenSet_0
public static final BitSet _tokenSet_1
public static final BitSet _tokenSet_2
public static final BitSet _tokenSet_3
public static final BitSet _tokenSet_4
public static final BitSet _tokenSet_5
public static final BitSet _tokenSet_6
public static final BitSet _tokenSet_7
public static final BitSet _tokenSet_8
protected Preprocessor(TokenBuffer tokenBuf, int k)
public Preprocessor(TokenBuffer tokenBuf)
protected Preprocessor(TokenStream lexer, int k)
public Preprocessor(TokenStream lexer)
public Preprocessor(ParserSharedInputState state)
public void setTool(Tool tool)
#initTool(antlr.Tool)
IllegalStateException
- if a tool has already been registeredprotected Tool getTool()
public void reportError(String s)
#initTool(antlr.Tool)
reportError
in class Parser
public void reportError(RecognitionException e)
#initTool(antlr.Tool)
reportError
in class Parser
public void reportWarning(String s)
#initTool(antlr.Tool)
reportWarning
in class Parser
public final void grammarFile(Hierarchy hier, String file) throws RecognitionException, TokenStreamException
public final IndexedVector optionSpec(Grammar gr) throws RecognitionException, TokenStreamException
public final Grammar class_def(String file, Hierarchy hier) throws RecognitionException, TokenStreamException
public final String superClass() throws RecognitionException, TokenStreamException
public final void rule(Grammar gr) throws RecognitionException, TokenStreamException
public final String throwsSpec() throws RecognitionException, TokenStreamException
public final String exceptionGroup() throws RecognitionException, TokenStreamException
public final String exceptionSpec() throws RecognitionException, TokenStreamException
public final String exceptionHandler() throws RecognitionException, TokenStreamException