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[]
_tokenNames
static 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)
protected
PtalonRecognizer(antlr.TokenBuffer tokenBuf, int k)
PtalonRecognizer(antlr.TokenStream lexer)
protected
PtalonRecognizer(antlr.TokenStream lexer, int k)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actor_declaration()
Parse statements of one of form:void
actor_definition()
void
actor_id()
void
assignment()
Parse statements of one of form:void
atomic_statement()
void
attachDanglingPorts()
protected void
buildTokenTypeASTClassMap()
void
conditional_statement()
void
danglingPortsOkay()
void
enableGTExtension(boolean enable)
void
expression()
Parse anything inside XML-like blockvoid
iterative_statement()
void
keyword_or_identifier()
void
parameter_declaration()
Parse for one of:void
port_declaration()
Parse for statement:void
qualified_identifier()
Parse qualified identifier:void
relation_declaration()
Parse relation declaration:void
transformation()
void
transformation_declaration()
void
transparent_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.TokenStreamException
Parse for statement:portType ID
where portType is either "port", "inport", or "outport". Generate corresponding tree #(PORT ID), #(INPORT ID), or #(OUTPORT ID).
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
expression
public final void expression() throws antlr.RecognitionException, antlr.TokenStreamException
Parse 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.RecognitionException
antlr.TokenStreamException
-
parameter_declaration
public final void parameter_declaration() throws antlr.RecognitionException, antlr.TokenStreamException
Parse 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.RecognitionException
antlr.TokenStreamException
-
qualified_identifier
public final void qualified_identifier() throws antlr.RecognitionException, antlr.TokenStreamException
Parse qualified identifier:ID
or
ID.qualified_identifier
Generate tree #(QUALID)
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
relation_declaration
public final void relation_declaration() throws antlr.RecognitionException, antlr.TokenStreamException
Parse relation declaration:relation ID
Generate tree #(RELATION ID)
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
transparent_relation_declaration
public final void transparent_relation_declaration() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
keyword_or_identifier
public final void keyword_or_identifier() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
assignment
public final void assignment() throws antlr.RecognitionException, antlr.TokenStreamException
Parse 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.RecognitionException
antlr.TokenStreamException
-
actor_declaration
public final void actor_declaration() throws antlr.RecognitionException, antlr.TokenStreamException
Parse 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.RecognitionException
antlr.TokenStreamException
-
actor_id
public final void actor_id() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
atomic_statement
public final void atomic_statement() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
transformation_declaration
public final void transformation_declaration() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
conditional_statement
public final void conditional_statement() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
iterative_statement
public final void iterative_statement() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
actor_definition
public final void actor_definition() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
danglingPortsOkay
public final void danglingPortsOkay() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
attachDanglingPorts
public final void attachDanglingPorts() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
transformation
public final void transformation() throws antlr.RecognitionException, antlr.TokenStreamException
- Throws:
antlr.RecognitionException
antlr.TokenStreamException
-
buildTokenTypeASTClassMap
protected void buildTokenTypeASTClassMap()
-
-