ptolemy.actor.ptalon
Class PtalonRecognizer

java.lang.Object
  extended by antlr.Parser
      extended by antlr.LLkParser
          extended by 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: PtalonRecognizer.java 54721 2009-06-26 22:32:23Z cxh $
Author:
Adam Cataldo, Elaine Cheong, Thomas Huining Feng
Accepted Rating:
Red (celaine)
Proposed Rating:
Red (celaine)

Field Summary
private  boolean _gtExtension
           
private  boolean _isInTransformation
           
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
  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
 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()
           
private static long[] mk_tokenSet_0()
           
 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()
           
 
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, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_gtExtension

private boolean _gtExtension

_isInTransformation

private boolean _isInTransformation

_tokenNames

public static final java.lang.String[] _tokenNames

_tokenSet_0

public static final antlr.collections.impl.BitSet _tokenSet_0
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()

mk_tokenSet_0

private static final long[] mk_tokenSet_0()