Class InterfaceParser
java.lang.Object
antlr.Parser
antlr.LLkParser
org.antlr.stringtemplate.language.InterfaceParser
- All Implemented Interfaces:
InterfaceParserTokenTypes
Match an ST group interface. Just a list of template names with args.
Here is a sample interface file:
interface nfa;
nfa(states,edges);
optional state(name);
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String[]static final antlr.collections.impl.BitSetstatic final antlr.collections.impl.BitSetstatic final antlr.collections.impl.BitSetprotected StringTemplateGroupInterfaceFields inherited from class antlr.Parser
astFactory, inputState, returnAST, tokenNames, tokenTypeToASTClassMap, traceDepthFields inherited from interface InterfaceParserTokenTypes
COLON, COMMA, EOF, ID, LITERAL_interface, LITERAL_optional, LPAREN, ML_COMMENT, NULL_TREE_LOOKAHEAD, RPAREN, SEMI, SL_COMMENT, WS -
Constructor Summary
ConstructorsModifierConstructorDescriptionInterfaceParser(antlr.ParserSharedInputState state) InterfaceParser(antlr.TokenBuffer tokenBuf) protectedInterfaceParser(antlr.TokenBuffer tokenBuf, int k) InterfaceParser(antlr.TokenStream lexer) protectedInterfaceParser(antlr.TokenStream lexer, int k) -
Method Summary
Modifier and TypeMethodDescriptionfinal LinkedHashMapargs()final voidvoidreportError(antlr.RecognitionException e) final voidtemplate(StringTemplateGroupInterface groupI) Methods inherited from class antlr.LLkParser
consume, LA, LT, traceIn, traceOutMethods 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, reportError, reportWarning, rewind, setASTFactory, setASTNodeClass, setASTNodeType, setDebugMode, setFilename, setIgnoreInvalidDebugCalls, setInputState, setTokenBuffer, traceIndent
-
Field Details
-
groupI
-
_tokenNames
-
_tokenSet_0
public static final antlr.collections.impl.BitSet _tokenSet_0 -
_tokenSet_1
public static final antlr.collections.impl.BitSet _tokenSet_1 -
_tokenSet_2
public static final antlr.collections.impl.BitSet _tokenSet_2
-
-
Constructor Details
-
InterfaceParser
protected InterfaceParser(antlr.TokenBuffer tokenBuf, int k) -
InterfaceParser
public InterfaceParser(antlr.TokenBuffer tokenBuf) -
InterfaceParser
protected InterfaceParser(antlr.TokenStream lexer, int k) -
InterfaceParser
public InterfaceParser(antlr.TokenStream lexer)
-
-
Method Details
-
reportError
public void reportError(antlr.RecognitionException e) - Overrides:
reportErrorin classantlr.Parser
-
groupInterface
public final void groupInterface(StringTemplateGroupInterface groupI) throws antlr.RecognitionException, antlr.TokenStreamException - Throws:
antlr.RecognitionExceptionantlr.TokenStreamException
-
template
public final void template(StringTemplateGroupInterface groupI) throws antlr.RecognitionException, antlr.TokenStreamException - Throws:
antlr.RecognitionExceptionantlr.TokenStreamException
-
args
- Throws:
antlr.RecognitionExceptionantlr.TokenStreamException
-