org.antlr.stringtemplate.language
Class GroupParser

java.lang.Object
  extended byantlr.Parser
      extended byantlr.LLkParser
          extended byorg.antlr.stringtemplate.language.GroupParser
All Implemented Interfaces:
GroupParserTokenTypes

public class GroupParser
extends antlr.LLkParser
implements GroupParserTokenTypes

Match a group of template definitions beginning with a group name declaration. Templates are enclosed in double-quotes or <<...>> quotes for multi-line templates. Template names have arg lists that indicate the cardinality of the attribute: present, optional, zero-or-more, one-or-more. Here is a sample group file: group nfa; // an NFA has edges and states nfa(states,edges) ::= << digraph NFA { rankdir=LR; } >> state(name) ::= "node [shape = circle]; ;"


Field Summary
static java.lang.String[] _tokenNames
           
static antlr.collections.impl.BitSet _tokenSet_0
           
static antlr.collections.impl.BitSet _tokenSet_1
           
static antlr.collections.impl.BitSet _tokenSet_2
           
 
Fields inherited from interface org.antlr.stringtemplate.language.GroupParserTokenTypes
COMMA, DEFINED_TO_BE, EOF, ID, LITERAL_group, LPAREN, ML_COMMENT, NULL_TREE_LOOKAHEAD, OPTIONAL, PLUS, RPAREN, SEMI, SL_COMMENT, STAR, TEMPLATE, WS
 
Constructor Summary
GroupParser(antlr.ParserSharedInputState state)
           
GroupParser(antlr.TokenBuffer tokenBuf)
           
GroupParser(antlr.TokenStream lexer)
           
 
Method Summary
 void args(StringTemplate st)
           
 void group(StringTemplateGroup g)
           
 void reportError(antlr.RecognitionException e)
           
 void template(StringTemplateGroup g)
           
 
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, recover, removeMessageListener, removeParserListener, removeParserMatchListener, removeParserTokenListener, removeSemanticPredicateListener, removeSyntacticPredicateListener, removeTraceListener, reportError, reportWarning, 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 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 Detail

GroupParser

public GroupParser(antlr.TokenBuffer tokenBuf)

GroupParser

public GroupParser(antlr.TokenStream lexer)

GroupParser

public GroupParser(antlr.ParserSharedInputState state)
Method Detail

reportError

public void reportError(antlr.RecognitionException e)

group

public final void group(StringTemplateGroup g)
                 throws antlr.RecognitionException,
                        antlr.TokenStreamException
Throws:
antlr.RecognitionException
antlr.TokenStreamException

template

public final void template(StringTemplateGroup g)
                    throws antlr.RecognitionException,
                           antlr.TokenStreamException
Throws:
antlr.RecognitionException
antlr.TokenStreamException

args

public final void args(StringTemplate st)
                throws antlr.RecognitionException,
                       antlr.TokenStreamException
Throws:
antlr.RecognitionException
antlr.TokenStreamException