Class 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 Detail

      • _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()