Class PtalonRecognizer
- java.lang.Object
-
- antlr.Parser
-
- antlr.LLkParser
-
- ptolemy.actor.ptalon.PtalonRecognizer
-
- All Implemented Interfaces:
PtalonTokenTypes
public class PtalonRecognizer extends antlr.LLkParser implements PtalonTokenTypes
PtalonRecognizer.java generated from populator.g by ANTLR.- Since:
- Ptolemy II 7.0
- Version:
- $Id$
- Author:
- Adam Cataldo, Elaine Cheong, Thomas Huining Feng
- Pt.AcceptedRating:
- Red (celaine)
- Pt.ProposedRating:
- Red (celaine)
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String[]_tokenNamesstatic antlr.collections.impl.BitSet_tokenSet_0-
Fields inherited from class antlr.Parser
astFactory, inputState, returnAST, tokenNames, tokenTypeToASTClassMap, traceDepth
-
Fields inherited from interface ptolemy.actor.ptalon.PtalonTokenTypes
ACTOR, ACTOR_DECLARATION, ACTOR_DEFINITION, ACTOR_EQUALS, ACTOR_ID, ACTOR_LABEL, ACTORPARAM, ARITHMETIC_EXPRESSION, ARITHMETIC_FACTOR, ASSIGN, ATTACH_DANGLING_PORTS, ATTRIBUTE, BOOLEAN_EXPRESSION, BOOLEAN_FACTOR, COLON, COMMA, COMMENT, DANGLING_PORTS_OKAY, DOT, DYNAMIC_NAME, ELSE, EOF, EQUALS, ESC, EXPRESSION, FALSE, FALSEBRANCH, FOR, ID, IF, IMPORT, INITIALLY, INPORT, IS, LBRACKET, LCURLY, LINE_COMMENT, LOGICAL_BUFFER, LPAREN, MULTIINPORT, MULTIOUTPORT, MULTIPORT, NEGATE, NEGATIVE_SIGN, NEXT, NULL_TREE_LOOKAHEAD, NUMBER_LITERAL, OPTIONAL, OUTPORT, PARAM_EQUALS, PARAMETER, PLUS, PORT, POSITIVE_SIGN, PRESERVE, QUALID, QUALIFIED_PORT, RBRACKET, RCURLY, REFERENCE, RELATION, REMOVE, RPAREN, SATISFIES, SEMI, STRING_LITERAL, TRANSFORM, TRANSFORMATION, TRANSPARENT, TRUE, TRUEBRANCH, VARIABLE, WHITE_SPACE
-
-
Constructor Summary
Constructors Modifier Constructor Description PtalonRecognizer(antlr.ParserSharedInputState state)PtalonRecognizer(antlr.TokenBuffer tokenBuf)protectedPtalonRecognizer(antlr.TokenBuffer tokenBuf, int k)PtalonRecognizer(antlr.TokenStream lexer)protectedPtalonRecognizer(antlr.TokenStream lexer, int k)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactor_declaration()Parse statements of one of form:voidactor_definition()voidactor_id()voidassignment()Parse statements of one of form:voidatomic_statement()voidattachDanglingPorts()protected voidbuildTokenTypeASTClassMap()voidconditional_statement()voiddanglingPortsOkay()voidenableGTExtension(boolean enable)voidexpression()Parse anything inside XML-like blockvoiditerative_statement()voidkeyword_or_identifier()voidparameter_declaration()Parse for one of:voidport_declaration()Parse for statement:voidqualified_identifier()Parse qualified identifier:voidrelation_declaration()Parse relation declaration:voidtransformation()voidtransformation_declaration()voidtransparent_relation_declaration()-
Methods 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, reportError, reportWarning, rewind, setASTFactory, setASTNodeClass, setASTNodeType, setDebugMode, setFilename, setIgnoreInvalidDebugCalls, setInputState, setTokenBuffer, traceIndent
-
-
-
-
Constructor Detail
-
PtalonRecognizer
protected PtalonRecognizer(antlr.TokenBuffer tokenBuf, int k)
-
PtalonRecognizer
public PtalonRecognizer(antlr.TokenBuffer tokenBuf)
-
PtalonRecognizer
protected PtalonRecognizer(antlr.TokenStream lexer, int k)
-
PtalonRecognizer
public PtalonRecognizer(antlr.TokenStream lexer)
-
PtalonRecognizer
public PtalonRecognizer(antlr.ParserSharedInputState state)
-
-
Method Detail
-
enableGTExtension
public void enableGTExtension(boolean enable)
-
port_declaration
public final void port_declaration() throws antlr.RecognitionException, antlr.TokenStreamExceptionParse for statement:portType ID
where portType is either "port", "inport", or "outport". Generate corresponding tree #(PORT ID), #(INPORT ID), or #(OUTPORT ID).
- Throws:
antlr.RecognitionExceptionantlr.TokenStreamException
-
expression
public final void expression() throws antlr.RecognitionException, antlr.TokenStreamExceptionParse anything inside XML-like block< />
Generate the tree
#(EXPRESSION)
where the text of the token EXPRESSION is the expression inside the XML-like block.
- Throws:
antlr.RecognitionExceptionantlr.TokenStreamException
-
parameter_declaration
public final void parameter_declaration() throws antlr.RecognitionException, antlr.TokenStreamExceptionParse for one of:parameter ID
actor ID
where parameterType is either "parameter", "intparameter", or "outparameter". Generate corresponding tree #(PARAMETER ID), #(INTPARAMETER ID), or #(BOOLPARAMETER ID).
- Throws:
antlr.RecognitionExceptionantlr.TokenStreamException
-
qualified_identifier
public final void qualified_identifier() throws antlr.RecognitionException, antlr.TokenStreamExceptionParse qualified identifier:ID
or
ID.qualified_identifier
Generate tree #(QUALID)
- Throws:
antlr.RecognitionExceptionantlr.TokenStreamException
-
relation_declaration
public final void relation_declaration() throws antlr.RecognitionException, antlr.TokenStreamExceptionParse relation declaration:relation ID
Generate tree #(RELATION ID)
- Throws:
antlr.RecognitionExceptionantlr.TokenStreamException
-
transparent_relation_declaration
public final void transparent_relation_declaration() throws antlr.RecognitionException, antlr.TokenStreamException- Throws:
antlr.RecognitionExceptionantlr.TokenStreamException
-
keyword_or_identifier
public final void keyword_or_identifier() throws antlr.RecognitionException, antlr.TokenStreamException- Throws:
antlr.RecognitionExceptionantlr.TokenStreamException
-
assignment
public final void assignment() throws antlr.RecognitionException, antlr.TokenStreamExceptionParse statements of one of form:ID := ID
ID := actor_declaration
ID := arithmetic_expression
ID := boolean_expression
with preference given in that order. Generate corresponding tree:
#(ASSIGN ID ID)
#(ASSIGN ID actor_declaration)
#(ASSIGN ID expression)
- Throws:
antlr.RecognitionExceptionantlr.TokenStreamException
-
actor_declaration
public final void actor_declaration() throws antlr.RecognitionException, antlr.TokenStreamExceptionParse statements of one of form:ID(assignment, assignment, ...)
Generate tree:
#(ACTOR_DECLARATION assignment assignment ...)
where the text for token ACTOR_DECLARATION is the leftmost ID in the statement, or the name of the declared actor.
- Throws:
antlr.RecognitionExceptionantlr.TokenStreamException
-
actor_id
public final void actor_id() throws antlr.RecognitionException, antlr.TokenStreamException- Throws:
antlr.RecognitionExceptionantlr.TokenStreamException
-
atomic_statement
public final void atomic_statement() throws antlr.RecognitionException, antlr.TokenStreamException- Throws:
antlr.RecognitionExceptionantlr.TokenStreamException
-
transformation_declaration
public final void transformation_declaration() throws antlr.RecognitionException, antlr.TokenStreamException- Throws:
antlr.RecognitionExceptionantlr.TokenStreamException
-
conditional_statement
public final void conditional_statement() throws antlr.RecognitionException, antlr.TokenStreamException- Throws:
antlr.RecognitionExceptionantlr.TokenStreamException
-
iterative_statement
public final void iterative_statement() throws antlr.RecognitionException, antlr.TokenStreamException- Throws:
antlr.RecognitionExceptionantlr.TokenStreamException
-
actor_definition
public final void actor_definition() throws antlr.RecognitionException, antlr.TokenStreamException- Throws:
antlr.RecognitionExceptionantlr.TokenStreamException
-
danglingPortsOkay
public final void danglingPortsOkay() throws antlr.RecognitionException, antlr.TokenStreamException- Throws:
antlr.RecognitionExceptionantlr.TokenStreamException
-
attachDanglingPorts
public final void attachDanglingPorts() throws antlr.RecognitionException, antlr.TokenStreamException- Throws:
antlr.RecognitionExceptionantlr.TokenStreamException
-
transformation
public final void transformation() throws antlr.RecognitionException, antlr.TokenStreamException- Throws:
antlr.RecognitionExceptionantlr.TokenStreamException
-
buildTokenTypeASTClassMap
protected void buildTokenTypeASTClassMap()
-
-