antlr
Class ANTLRTokdefParser

java.lang.Object
  extended byantlr.Parser
      extended byantlr.LLkParser
          extended byantlr.ANTLRTokdefParser
All Implemented Interfaces:
ANTLRTokdefParserTokenTypes

public class ANTLRTokdefParser
extends LLkParser
implements ANTLRTokdefParserTokenTypes

Simple lexer/parser for reading token definition files in support of the import/export vocab option for grammars.


Field Summary
static java.lang.String[] _tokenNames
           
static BitSet _tokenSet_0
           
static BitSet _tokenSet_1
           
 
Fields inherited from interface antlr.ANTLRTokdefParserTokenTypes
ASSIGN, DIGIT, EOF, ESC, ID, INT, LPAREN, ML_COMMENT, NULL_TREE_LOOKAHEAD, RPAREN, SL_COMMENT, STRING, WS, XDIGIT
 
Constructor Summary
ANTLRTokdefParser(ParserSharedInputState state)
           
ANTLRTokdefParser(TokenBuffer tokenBuf)
           
ANTLRTokdefParser(TokenStream lexer)
           
 
Method Summary
 void file(antlr.ImportVocabTokenManager tm)
           
 void line(antlr.ImportVocabTokenManager tm)
           
 void reportError(RecognitionException e)
          Delegates the error message to the tool if any was registered via #initTool(antlr.Tool)
 void reportError(java.lang.String s)
          Delegates the error message to the tool if any was registered via #initTool(antlr.Tool)
 void reportWarning(java.lang.String s)
          Delegates the warning message to the tool if any was registered via #initTool(antlr.Tool)
 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.
 
Methods inherited from class antlr.LLkParser
consume, LA, LT, traceIn, traceOut
 
Methods inherited from class antlr.Parser
addMessageListener, addParserListener, addParserMatchListener, addParserTokenListener, addSemanticPredicateListener, addSyntacticPredicateListener, addTraceListener, consumeUntil, consumeUntil, getAST, getASTFactory, getFilename, getInputState, getTokenName, getTokenNames, getTokenTypeToASTClassMap, isDebugMode, mark, match, match, matchNot, panic, removeMessageListener, removeParserListener, removeParserMatchListener, removeParserTokenListener, removeSemanticPredicateListener, removeSyntacticPredicateListener, removeTraceListener, rewind, setASTFactory, setASTNodeClass, setASTNodeType, setDebugMode, setFilename, setIgnoreInvalidDebugCalls, setInputState, setTokenBuffer, traceIndent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_tokenNames

public static final java.lang.String[] _tokenNames

_tokenSet_0

public static final BitSet _tokenSet_0

_tokenSet_1

public static final BitSet _tokenSet_1
Constructor Detail

ANTLRTokdefParser

public ANTLRTokdefParser(TokenBuffer tokenBuf)

ANTLRTokdefParser

public ANTLRTokdefParser(TokenStream lexer)

ANTLRTokdefParser

public ANTLRTokdefParser(ParserSharedInputState state)
Method Detail

setTool

public 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. Instead, the antlr.Tool instance should register itself via #initTool(antlr.Tool)

Throws:
java.lang.IllegalStateException - if a tool has already been registered
Since:
2.7.2

reportError

public void reportError(java.lang.String s)
Delegates the error message to the tool if any was registered via #initTool(antlr.Tool)

Overrides:
reportError in class Parser
Since:
2.7.2

reportError

public void reportError(RecognitionException e)
Delegates the error message to the tool if any was registered via #initTool(antlr.Tool)

Overrides:
reportError in class Parser
Since:
2.7.2

reportWarning

public void reportWarning(java.lang.String s)
Delegates the warning message to the tool if any was registered via #initTool(antlr.Tool)

Overrides:
reportWarning in class Parser
Since:
2.7.2

file

public final void file(antlr.ImportVocabTokenManager tm)
                throws RecognitionException,
                       TokenStreamException
Throws:
RecognitionException
TokenStreamException

line

public final void line(antlr.ImportVocabTokenManager tm)
                throws RecognitionException,
                       TokenStreamException
Throws:
RecognitionException
TokenStreamException