public class PtalonRecognizer extends antlr.LLkParser implements PtalonTokenTypes
Modifier and Type | Field and Description |
---|---|
static java.lang.String[] |
_tokenNames |
static antlr.collections.impl.BitSet |
_tokenSet_0 |
astFactory, inputState, returnAST, tokenNames, tokenTypeToASTClassMap, traceDepth
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
Modifier | Constructor and 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) |
Modifier and Type | Method and Description |
---|---|
void |
actor_declaration()
Parse statements of one of form:
ID(assignment, assignment, ...)
|
void |
actor_definition() |
void |
actor_id() |
void |
assignment()
Parse statements of one of form:
ID := ID
ID := actor_declaration
ID := arithmetic_expression
ID := boolean_expression
with preference given in that order.
|
void |
atomic_statement() |
void |
attachDanglingPorts() |
protected void |
buildTokenTypeASTClassMap() |
void |
conditional_statement() |
void |
danglingPortsOkay() |
void |
enableGTExtension(boolean enable) |
void |
expression()
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.
|
void |
iterative_statement() |
void |
keyword_or_identifier() |
void |
parameter_declaration()
Parse for one of:
parameter ID
actor ID
where parameterType is either "parameter", "intparameter", or
"outparameter".
|
void |
port_declaration()
Parse for statement:
portType ID
where portType is either "port", "inport", or "outport".
|
void |
qualified_identifier()
Parse qualified identifier:
ID
or
ID.qualified_identifier
Generate tree #(QUALID)
|
void |
relation_declaration()
Parse relation declaration:
relation ID
Generate tree #(RELATION ID)
|
void |
transformation_declaration() |
void |
transformation() |
void |
transparent_relation_declaration() |
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
public static final java.lang.String[] _tokenNames
public static final antlr.collections.impl.BitSet _tokenSet_0
protected PtalonRecognizer(antlr.TokenBuffer tokenBuf, int k)
public PtalonRecognizer(antlr.TokenBuffer tokenBuf)
protected PtalonRecognizer(antlr.TokenStream lexer, int k)
public PtalonRecognizer(antlr.TokenStream lexer)
public PtalonRecognizer(antlr.ParserSharedInputState state)
public void enableGTExtension(boolean enable)
public final void port_declaration() throws antlr.RecognitionException, antlr.TokenStreamException
portType ID
where portType is either "port", "inport", or "outport". Generate corresponding tree #(PORT ID), #(INPORT ID), or #(OUTPORT ID).
antlr.RecognitionException
antlr.TokenStreamException
public final void expression() throws antlr.RecognitionException, antlr.TokenStreamException
< />
Generate the tree
#(EXPRESSION)
where the text of the token EXPRESSION is the expression inside the XML-like block.
antlr.RecognitionException
antlr.TokenStreamException
public final void parameter_declaration() throws antlr.RecognitionException, antlr.TokenStreamException
parameter ID
actor ID
where parameterType is either "parameter", "intparameter", or "outparameter". Generate corresponding tree #(PARAMETER ID), #(INTPARAMETER ID), or #(BOOLPARAMETER ID).
antlr.RecognitionException
antlr.TokenStreamException
public final void qualified_identifier() throws antlr.RecognitionException, antlr.TokenStreamException
ID
or
ID.qualified_identifier
Generate tree #(QUALID)
antlr.RecognitionException
antlr.TokenStreamException
public final void relation_declaration() throws antlr.RecognitionException, antlr.TokenStreamException
relation ID
Generate tree #(RELATION ID)
antlr.RecognitionException
antlr.TokenStreamException
public final void transparent_relation_declaration() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void keyword_or_identifier() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void assignment() throws antlr.RecognitionException, antlr.TokenStreamException
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)
antlr.RecognitionException
antlr.TokenStreamException
public final void actor_declaration() throws antlr.RecognitionException, antlr.TokenStreamException
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void actor_id() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void atomic_statement() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void transformation_declaration() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void conditional_statement() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void iterative_statement() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void actor_definition() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void danglingPortsOkay() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void attachDanglingPorts() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void transformation() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
protected void buildTokenTypeASTClassMap()