# $ANTLR 3.0 orangescape/model/engine/util/enginegrammar.g 2011-04-01 18:30:42

from antlr_python_runtime import *
from antlrExceptions import *


# for convenience in actions
HIDDEN = BaseRecognizer.HIDDEN

# token types
STR_CONST=8
T29=29
INT=5
FLOAT=6
T28=28
T27=27
T26=26
AREA_REF=12
T25=25
Tokens=32
T24=24
EOF=-1
T23=23
T22=22
T21=21
T20=20
WS=4
PUB_CELL=13
CELL_REF_3D_PUBLIC=9
NEWLINE=14
CELL_REF=11
CELL_REF_3D_SUGAR=10
FNNAME=15
BOOLEAN_CONST=7
T16=16
T17=17
T18=18
T30=30
T19=19
T31=31

class enginegrammarLexer(Lexer):

    grammarFileName = "orangescape/model/engine/util/enginegrammar.g"

    def __init__(self, input=None):
        Lexer.__init__(self, input)
        self.dfa16 = self.DFA16(
            self, 16,
            eot = self.DFA16_eot,
            eof = self.DFA16_eof,
            min = self.DFA16_min,
            max = self.DFA16_max,
            accept = self.DFA16_accept,
            special = self.DFA16_special,
            transition = self.DFA16_transition
            )






    # $ANTLR start T16
    def mT16(self, ):

        try:
            self.type = T16

            # orangescape/model/engine/util/enginegrammar.g:7:7: ( '=' )
            # orangescape/model/engine/util/enginegrammar.g:7:7: '='
            self.match(u'=')





        finally:

            pass

    # $ANTLR end T16



    # $ANTLR start T17
    def mT17(self, ):

        try:
            self.type = T17

            # orangescape/model/engine/util/enginegrammar.g:8:7: ( '<>' )
            # orangescape/model/engine/util/enginegrammar.g:8:7: '<>'
            self.match("<>")






        finally:

            pass

    # $ANTLR end T17



    # $ANTLR start T18
    def mT18(self, ):

        try:
            self.type = T18

            # orangescape/model/engine/util/enginegrammar.g:9:7: ( '>' )
            # orangescape/model/engine/util/enginegrammar.g:9:7: '>'
            self.match(u'>')





        finally:

            pass

    # $ANTLR end T18



    # $ANTLR start T19
    def mT19(self, ):

        try:
            self.type = T19

            # orangescape/model/engine/util/enginegrammar.g:10:7: ( '<' )
            # orangescape/model/engine/util/enginegrammar.g:10:7: '<'
            self.match(u'<')





        finally:

            pass

    # $ANTLR end T19



    # $ANTLR start T20
    def mT20(self, ):

        try:
            self.type = T20

            # orangescape/model/engine/util/enginegrammar.g:11:7: ( '>=' )
            # orangescape/model/engine/util/enginegrammar.g:11:7: '>='
            self.match(">=")






        finally:

            pass

    # $ANTLR end T20



    # $ANTLR start T21
    def mT21(self, ):

        try:
            self.type = T21

            # orangescape/model/engine/util/enginegrammar.g:12:7: ( '<=' )
            # orangescape/model/engine/util/enginegrammar.g:12:7: '<='
            self.match("<=")






        finally:

            pass

    # $ANTLR end T21



    # $ANTLR start T22
    def mT22(self, ):

        try:
            self.type = T22

            # orangescape/model/engine/util/enginegrammar.g:13:7: ( '&' )
            # orangescape/model/engine/util/enginegrammar.g:13:7: '&'
            self.match(u'&')





        finally:

            pass

    # $ANTLR end T22



    # $ANTLR start T23
    def mT23(self, ):

        try:
            self.type = T23

            # orangescape/model/engine/util/enginegrammar.g:14:7: ( '+' )
            # orangescape/model/engine/util/enginegrammar.g:14:7: '+'
            self.match(u'+')





        finally:

            pass

    # $ANTLR end T23



    # $ANTLR start T24
    def mT24(self, ):

        try:
            self.type = T24

            # orangescape/model/engine/util/enginegrammar.g:15:7: ( '-' )
            # orangescape/model/engine/util/enginegrammar.g:15:7: '-'
            self.match(u'-')





        finally:

            pass

    # $ANTLR end T24



    # $ANTLR start T25
    def mT25(self, ):

        try:
            self.type = T25

            # orangescape/model/engine/util/enginegrammar.g:16:7: ( '*' )
            # orangescape/model/engine/util/enginegrammar.g:16:7: '*'
            self.match(u'*')





        finally:

            pass

    # $ANTLR end T25



    # $ANTLR start T26
    def mT26(self, ):

        try:
            self.type = T26

            # orangescape/model/engine/util/enginegrammar.g:17:7: ( '/' )
            # orangescape/model/engine/util/enginegrammar.g:17:7: '/'
            self.match(u'/')





        finally:

            pass

    # $ANTLR end T26



    # $ANTLR start T27
    def mT27(self, ):

        try:
            self.type = T27

            # orangescape/model/engine/util/enginegrammar.g:18:7: ( '^' )
            # orangescape/model/engine/util/enginegrammar.g:18:7: '^'
            self.match(u'^')





        finally:

            pass

    # $ANTLR end T27



    # $ANTLR start T28
    def mT28(self, ):

        try:
            self.type = T28

            # orangescape/model/engine/util/enginegrammar.g:19:7: ( '%' )
            # orangescape/model/engine/util/enginegrammar.g:19:7: '%'
            self.match(u'%')





        finally:

            pass

    # $ANTLR end T28



    # $ANTLR start T29
    def mT29(self, ):

        try:
            self.type = T29

            # orangescape/model/engine/util/enginegrammar.g:20:7: ( '(' )
            # orangescape/model/engine/util/enginegrammar.g:20:7: '('
            self.match(u'(')





        finally:

            pass

    # $ANTLR end T29



    # $ANTLR start T30
    def mT30(self, ):

        try:
            self.type = T30

            # orangescape/model/engine/util/enginegrammar.g:21:7: ( ')' )
            # orangescape/model/engine/util/enginegrammar.g:21:7: ')'
            self.match(u')')





        finally:

            pass

    # $ANTLR end T30



    # $ANTLR start T31
    def mT31(self, ):

        try:
            self.type = T31

            # orangescape/model/engine/util/enginegrammar.g:22:7: ( ',' )
            # orangescape/model/engine/util/enginegrammar.g:22:7: ','
            self.match(u',')





        finally:

            pass

    # $ANTLR end T31



    # $ANTLR start WS
    def mWS(self, ):

        try:
            self.type = WS

            # orangescape/model/engine/util/enginegrammar.g:134:5: ( ' ' )
            # orangescape/model/engine/util/enginegrammar.g:134:5: ' '
            self.match(u' ')





        finally:

            pass

    # $ANTLR end WS



    # $ANTLR start CELL_REF_3D_SUGAR
    def mCELL_REF_3D_SUGAR(self, ):

        try:
            self.type = CELL_REF_3D_SUGAR

            # orangescape/model/engine/util/enginegrammar.g:219:20: ( ( 'a' .. 'z' | 'A' .. 'Z' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )* '[' ( 'a' .. 'z' | 'A' .. 'Z' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )* '].' ( 'a' .. 'z' | 'A' .. 'Z' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )* )
            # orangescape/model/engine/util/enginegrammar.g:219:20: ( 'a' .. 'z' | 'A' .. 'Z' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )* '[' ( 'a' .. 'z' | 'A' .. 'Z' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )* '].' ( 'a' .. 'z' | 'A' .. 'Z' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )*
            if (self.input.LA(1) >= u'A' and self.input.LA(1) <= u'Z') or (self.input.LA(1) >= u'a' and self.input.LA(1) <= u'z'):
                self.input.consume();

            else:
                mse = MismatchedSetException(None, self.input)
                self.recover(mse)
                raise mse


            # orangescape/model/engine/util/enginegrammar.g:219:39: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )*
            while True: #loop1
                alt1 = 2
                LA1_0 = self.input.LA(1)

                if ((LA1_0 >= u'0' and LA1_0 <= u'9') or (LA1_0 >= u'A' and LA1_0 <= u'Z') or LA1_0 == u'_' or (LA1_0 >= u'a' and LA1_0 <= u'z')) :
                    alt1 = 1


                if alt1 == 1:
                    # orangescape/model/engine/util/enginegrammar.g:
                    if (self.input.LA(1) >= u'0' and self.input.LA(1) <= u'9') or (self.input.LA(1) >= u'A' and self.input.LA(1) <= u'Z') or self.input.LA(1) == u'_' or (self.input.LA(1) >= u'a' and self.input.LA(1) <= u'z'):
                        self.input.consume();

                    else:
                        mse = MismatchedSetException(None, self.input)
                        self.recover(mse)
                        raise mse




                else:
                    break #loop1


            self.match(u'[')

            if (self.input.LA(1) >= u'A' and self.input.LA(1) <= u'Z') or (self.input.LA(1) >= u'a' and self.input.LA(1) <= u'z'):
                self.input.consume();

            else:
                mse = MismatchedSetException(None, self.input)
                self.recover(mse)
                raise mse


            # orangescape/model/engine/util/enginegrammar.g:219:95: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )*
            while True: #loop2
                alt2 = 2
                LA2_0 = self.input.LA(1)

                if ((LA2_0 >= u'0' and LA2_0 <= u'9') or (LA2_0 >= u'A' and LA2_0 <= u'Z') or LA2_0 == u'_' or (LA2_0 >= u'a' and LA2_0 <= u'z')) :
                    alt2 = 1


                if alt2 == 1:
                    # orangescape/model/engine/util/enginegrammar.g:
                    if (self.input.LA(1) >= u'0' and self.input.LA(1) <= u'9') or (self.input.LA(1) >= u'A' and self.input.LA(1) <= u'Z') or self.input.LA(1) == u'_' or (self.input.LA(1) >= u'a' and self.input.LA(1) <= u'z'):
                        self.input.consume();

                    else:
                        mse = MismatchedSetException(None, self.input)
                        self.recover(mse)
                        raise mse




                else:
                    break #loop2


            self.match("].")


            if (self.input.LA(1) >= u'A' and self.input.LA(1) <= u'Z') or (self.input.LA(1) >= u'a' and self.input.LA(1) <= u'z'):
                self.input.consume();

            else:
                mse = MismatchedSetException(None, self.input)
                self.recover(mse)
                raise mse


            # orangescape/model/engine/util/enginegrammar.g:219:152: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )*
            while True: #loop3
                alt3 = 2
                LA3_0 = self.input.LA(1)

                if ((LA3_0 >= u'0' and LA3_0 <= u'9') or (LA3_0 >= u'A' and LA3_0 <= u'Z') or LA3_0 == u'_' or (LA3_0 >= u'a' and LA3_0 <= u'z')) :
                    alt3 = 1


                if alt3 == 1:
                    # orangescape/model/engine/util/enginegrammar.g:
                    if (self.input.LA(1) >= u'0' and self.input.LA(1) <= u'9') or (self.input.LA(1) >= u'A' and self.input.LA(1) <= u'Z') or self.input.LA(1) == u'_' or (self.input.LA(1) >= u'a' and self.input.LA(1) <= u'z'):
                        self.input.consume();

                    else:
                        mse = MismatchedSetException(None, self.input)
                        self.recover(mse)
                        raise mse




                else:
                    break #loop3






        finally:

            pass

    # $ANTLR end CELL_REF_3D_SUGAR



    # $ANTLR start AREA_REF
    def mAREA_REF(self, ):

        try:
            self.type = AREA_REF

            # orangescape/model/engine/util/enginegrammar.g:220:12: ( CELL_REF ':' CELL_REF )
            # orangescape/model/engine/util/enginegrammar.g:220:12: CELL_REF ':' CELL_REF
            self.mCELL_REF()

            self.match(u':')

            self.mCELL_REF()





        finally:

            pass

    # $ANTLR end AREA_REF



    # $ANTLR start CELL_REF
    def mCELL_REF(self, ):

        try:
            self.type = CELL_REF

            # orangescape/model/engine/util/enginegrammar.g:221:12: ( ( 'a' .. 'z' | 'A' .. 'Z' ) ( 'a' .. 'z' | 'A' .. 'Z' )? ( '0' .. '9' ) ( '0' .. '9' )? ( '0' .. '9' )? )
            # orangescape/model/engine/util/enginegrammar.g:221:12: ( 'a' .. 'z' | 'A' .. 'Z' ) ( 'a' .. 'z' | 'A' .. 'Z' )? ( '0' .. '9' ) ( '0' .. '9' )? ( '0' .. '9' )?
            if (self.input.LA(1) >= u'A' and self.input.LA(1) <= u'Z') or (self.input.LA(1) >= u'a' and self.input.LA(1) <= u'z'):
                self.input.consume();

            else:
                mse = MismatchedSetException(None, self.input)
                self.recover(mse)
                raise mse


            # orangescape/model/engine/util/enginegrammar.g:221:31: ( 'a' .. 'z' | 'A' .. 'Z' )?
            alt4 = 2
            LA4_0 = self.input.LA(1)

            if ((LA4_0 >= u'A' and LA4_0 <= u'Z') or (LA4_0 >= u'a' and LA4_0 <= u'z')) :
                alt4 = 1
            if alt4 == 1:
                # orangescape/model/engine/util/enginegrammar.g:
                if (self.input.LA(1) >= u'A' and self.input.LA(1) <= u'Z') or (self.input.LA(1) >= u'a' and self.input.LA(1) <= u'z'):
                    self.input.consume();

                else:
                    mse = MismatchedSetException(None, self.input)
                    self.recover(mse)
                    raise mse





            # orangescape/model/engine/util/enginegrammar.g:221:51: ( '0' .. '9' )
            # orangescape/model/engine/util/enginegrammar.g:221:52: '0' .. '9'
            self.matchRange(u'0', u'9')




            # orangescape/model/engine/util/enginegrammar.g:221:61: ( '0' .. '9' )?
            alt5 = 2
            LA5_0 = self.input.LA(1)

            if ((LA5_0 >= u'0' and LA5_0 <= u'9')) :
                alt5 = 1
            if alt5 == 1:
                # orangescape/model/engine/util/enginegrammar.g:221:62: '0' .. '9'
                self.matchRange(u'0', u'9')




            # orangescape/model/engine/util/enginegrammar.g:221:72: ( '0' .. '9' )?
            alt6 = 2
            LA6_0 = self.input.LA(1)

            if ((LA6_0 >= u'0' and LA6_0 <= u'9')) :
                alt6 = 1
            if alt6 == 1:
                # orangescape/model/engine/util/enginegrammar.g:221:73: '0' .. '9'
                self.matchRange(u'0', u'9')








        finally:

            pass

    # $ANTLR end CELL_REF



    # $ANTLR start BOOLEAN_CONST
    def mBOOLEAN_CONST(self, ):

        try:
            self.type = BOOLEAN_CONST

            # orangescape/model/engine/util/enginegrammar.g:222:16: ( ( ( 'T' | 't' ) ( 'R' | 'r' ) ( 'U' | 'u' ) ( 'E' | 'e' ) ) | ( ( 'F' | 'f' ) ( 'A' | 'a' ) ( 'L' | 'l' ) ( 'S' | 's' ) ( 'E' | 'e' ) ) )
            alt7 = 2
            LA7_0 = self.input.LA(1)

            if (LA7_0 == u'T' or LA7_0 == u't') :
                alt7 = 1
            elif (LA7_0 == u'F' or LA7_0 == u'f') :
                alt7 = 2
            else:
                nvae = NoViableAltException("222:1: BOOLEAN_CONST : ( ( ( 'T' | 't' ) ( 'R' | 'r' ) ( 'U' | 'u' ) ( 'E' | 'e' ) ) | ( ( 'F' | 'f' ) ( 'A' | 'a' ) ( 'L' | 'l' ) ( 'S' | 's' ) ( 'E' | 'e' ) ) );", 7, 0, self.input)

                raise nvae

            if alt7 == 1:
                # orangescape/model/engine/util/enginegrammar.g:222:16: ( ( 'T' | 't' ) ( 'R' | 'r' ) ( 'U' | 'u' ) ( 'E' | 'e' ) )
                # orangescape/model/engine/util/enginegrammar.g:222:16: ( ( 'T' | 't' ) ( 'R' | 'r' ) ( 'U' | 'u' ) ( 'E' | 'e' ) )
                # orangescape/model/engine/util/enginegrammar.g:222:17: ( 'T' | 't' ) ( 'R' | 'r' ) ( 'U' | 'u' ) ( 'E' | 'e' )
                if self.input.LA(1) == u'T' or self.input.LA(1) == u't':
                    self.input.consume();

                else:
                    mse = MismatchedSetException(None, self.input)
                    self.recover(mse)
                    raise mse


                if self.input.LA(1) == u'R' or self.input.LA(1) == u'r':
                    self.input.consume();

                else:
                    mse = MismatchedSetException(None, self.input)
                    self.recover(mse)
                    raise mse


                if self.input.LA(1) == u'U' or self.input.LA(1) == u'u':
                    self.input.consume();

                else:
                    mse = MismatchedSetException(None, self.input)
                    self.recover(mse)
                    raise mse


                if self.input.LA(1) == u'E' or self.input.LA(1) == u'e':
                    self.input.consume();

                else:
                    mse = MismatchedSetException(None, self.input)
                    self.recover(mse)
                    raise mse







            elif alt7 == 2:
                # orangescape/model/engine/util/enginegrammar.g:222:60: ( ( 'F' | 'f' ) ( 'A' | 'a' ) ( 'L' | 'l' ) ( 'S' | 's' ) ( 'E' | 'e' ) )
                # orangescape/model/engine/util/enginegrammar.g:222:60: ( ( 'F' | 'f' ) ( 'A' | 'a' ) ( 'L' | 'l' ) ( 'S' | 's' ) ( 'E' | 'e' ) )
                # orangescape/model/engine/util/enginegrammar.g:222:61: ( 'F' | 'f' ) ( 'A' | 'a' ) ( 'L' | 'l' ) ( 'S' | 's' ) ( 'E' | 'e' )
                if self.input.LA(1) == u'F' or self.input.LA(1) == u'f':
                    self.input.consume();

                else:
                    mse = MismatchedSetException(None, self.input)
                    self.recover(mse)
                    raise mse


                if self.input.LA(1) == u'A' or self.input.LA(1) == u'a':
                    self.input.consume();

                else:
                    mse = MismatchedSetException(None, self.input)
                    self.recover(mse)
                    raise mse


                if self.input.LA(1) == u'L' or self.input.LA(1) == u'l':
                    self.input.consume();

                else:
                    mse = MismatchedSetException(None, self.input)
                    self.recover(mse)
                    raise mse


                if self.input.LA(1) == u'S' or self.input.LA(1) == u's':
                    self.input.consume();

                else:
                    mse = MismatchedSetException(None, self.input)
                    self.recover(mse)
                    raise mse


                if self.input.LA(1) == u'E' or self.input.LA(1) == u'e':
                    self.input.consume();

                else:
                    mse = MismatchedSetException(None, self.input)
                    self.recover(mse)
                    raise mse








        finally:

            pass

    # $ANTLR end BOOLEAN_CONST



    # $ANTLR start INT
    def mINT(self, ):

        try:
            self.type = INT

            # orangescape/model/engine/util/enginegrammar.g:223:7: ( ( '0' .. '9' )+ )
            # orangescape/model/engine/util/enginegrammar.g:223:7: ( '0' .. '9' )+
            # orangescape/model/engine/util/enginegrammar.g:223:7: ( '0' .. '9' )+
            cnt8 = 0
            while True: #loop8
                alt8 = 2
                LA8_0 = self.input.LA(1)

                if ((LA8_0 >= u'0' and LA8_0 <= u'9')) :
                    alt8 = 1


                if alt8 == 1:
                    # orangescape/model/engine/util/enginegrammar.g:223:7: '0' .. '9'
                    self.matchRange(u'0', u'9')



                else:
                    if cnt8 >= 1:
                        break #loop8

                    eee = EarlyExitException(8, self.input)
                    raise eee

                cnt8 += 1






        finally:

            pass

    # $ANTLR end INT



    # $ANTLR start FLOAT
    def mFLOAT(self, ):

        try:
            self.type = FLOAT

            # orangescape/model/engine/util/enginegrammar.g:224:8: ( INT '.' INT | '.' INT )
            alt9 = 2
            LA9_0 = self.input.LA(1)

            if ((LA9_0 >= u'0' and LA9_0 <= u'9')) :
                alt9 = 1
            elif (LA9_0 == u'.') :
                alt9 = 2
            else:
                nvae = NoViableAltException("224:1: FLOAT : ( INT '.' INT | '.' INT );", 9, 0, self.input)

                raise nvae

            if alt9 == 1:
                # orangescape/model/engine/util/enginegrammar.g:224:8: INT '.' INT
                self.mINT()

                self.match(u'.')

                self.mINT()



            elif alt9 == 2:
                # orangescape/model/engine/util/enginegrammar.g:224:21: '.' INT
                self.match(u'.')

                self.mINT()




        finally:

            pass

    # $ANTLR end FLOAT



    # $ANTLR start NEWLINE
    def mNEWLINE(self, ):

        try:
            self.type = NEWLINE

            # orangescape/model/engine/util/enginegrammar.g:225:9: ( ( '\\r' )? '\\n' )
            # orangescape/model/engine/util/enginegrammar.g:225:9: ( '\\r' )? '\\n'
            # orangescape/model/engine/util/enginegrammar.g:225:9: ( '\\r' )?
            alt10 = 2
            LA10_0 = self.input.LA(1)

            if (LA10_0 == u'\r') :
                alt10 = 1
            if alt10 == 1:
                # orangescape/model/engine/util/enginegrammar.g:225:9: '\\r'
                self.match(u'\r')




            self.match(u'\n')





        finally:

            pass

    # $ANTLR end NEWLINE



    # $ANTLR start PUB_CELL
    def mPUB_CELL(self, ):

        try:
            self.type = PUB_CELL

            # orangescape/model/engine/util/enginegrammar.g:226:12: ( ( 'a' .. 'z' | 'A' .. 'Z' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )* )
            # orangescape/model/engine/util/enginegrammar.g:226:12: ( 'a' .. 'z' | 'A' .. 'Z' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )*
            if (self.input.LA(1) >= u'A' and self.input.LA(1) <= u'Z') or (self.input.LA(1) >= u'a' and self.input.LA(1) <= u'z'):
                self.input.consume();

            else:
                mse = MismatchedSetException(None, self.input)
                self.recover(mse)
                raise mse


            # orangescape/model/engine/util/enginegrammar.g:226:31: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )*
            while True: #loop11
                alt11 = 2
                LA11_0 = self.input.LA(1)

                if ((LA11_0 >= u'0' and LA11_0 <= u'9') or (LA11_0 >= u'A' and LA11_0 <= u'Z') or LA11_0 == u'_' or (LA11_0 >= u'a' and LA11_0 <= u'z')) :
                    alt11 = 1


                if alt11 == 1:
                    # orangescape/model/engine/util/enginegrammar.g:
                    if (self.input.LA(1) >= u'0' and self.input.LA(1) <= u'9') or (self.input.LA(1) >= u'A' and self.input.LA(1) <= u'Z') or self.input.LA(1) == u'_' or (self.input.LA(1) >= u'a' and self.input.LA(1) <= u'z'):
                        self.input.consume();

                    else:
                        mse = MismatchedSetException(None, self.input)
                        self.recover(mse)
                        raise mse




                else:
                    break #loop11






        finally:

            pass

    # $ANTLR end PUB_CELL



    # $ANTLR start FNNAME
    def mFNNAME(self, ):

        try:
            self.type = FNNAME

            # orangescape/model/engine/util/enginegrammar.g:227:10: ( ( 'a' .. 'z' | 'A' .. 'Z' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' )* '(' )
            # orangescape/model/engine/util/enginegrammar.g:227:10: ( 'a' .. 'z' | 'A' .. 'Z' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' )* '('
            if (self.input.LA(1) >= u'A' and self.input.LA(1) <= u'Z') or (self.input.LA(1) >= u'a' and self.input.LA(1) <= u'z'):
                self.input.consume();

            else:
                mse = MismatchedSetException(None, self.input)
                self.recover(mse)
                raise mse


            # orangescape/model/engine/util/enginegrammar.g:227:29: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' )*
            while True: #loop12
                alt12 = 2
                LA12_0 = self.input.LA(1)

                if ((LA12_0 >= u'0' and LA12_0 <= u'9') or (LA12_0 >= u'A' and LA12_0 <= u'Z') or (LA12_0 >= u'a' and LA12_0 <= u'z')) :
                    alt12 = 1


                if alt12 == 1:
                    # orangescape/model/engine/util/enginegrammar.g:
                    if (self.input.LA(1) >= u'0' and self.input.LA(1) <= u'9') or (self.input.LA(1) >= u'A' and self.input.LA(1) <= u'Z') or (self.input.LA(1) >= u'a' and self.input.LA(1) <= u'z'):
                        self.input.consume();

                    else:
                        mse = MismatchedSetException(None, self.input)
                        self.recover(mse)
                        raise mse




                else:
                    break #loop12


            self.match(u'(')





        finally:

            pass

    # $ANTLR end FNNAME



    # $ANTLR start STR_CONST
    def mSTR_CONST(self, ):

        try:
            self.type = STR_CONST

            # orangescape/model/engine/util/enginegrammar.g:228:13: ( ( '\"' ) ( '#' .. '~' | '!' | ' ' )* ( '\"' ) )
            # orangescape/model/engine/util/enginegrammar.g:228:13: ( '\"' ) ( '#' .. '~' | '!' | ' ' )* ( '\"' )
            # orangescape/model/engine/util/enginegrammar.g:228:13: ( '\"' )
            # orangescape/model/engine/util/enginegrammar.g:228:14: '\"'
            self.match(u'"')




            # orangescape/model/engine/util/enginegrammar.g:228:18: ( '#' .. '~' | '!' | ' ' )*
            while True: #loop13
                alt13 = 2
                LA13_0 = self.input.LA(1)

                if ((LA13_0 >= u' ' and LA13_0 <= u'!') or (LA13_0 >= u'#' and LA13_0 <= u'~')) :
                    alt13 = 1


                if alt13 == 1:
                    # orangescape/model/engine/util/enginegrammar.g:
                    if (self.input.LA(1) >= u' ' and self.input.LA(1) <= u'!') or (self.input.LA(1) >= u'#' and self.input.LA(1) <= u'~'):
                        self.input.consume();

                    else:
                        mse = MismatchedSetException(None, self.input)
                        self.recover(mse)
                        raise mse




                else:
                    break #loop13


            # orangescape/model/engine/util/enginegrammar.g:228:37: ( '\"' )
            # orangescape/model/engine/util/enginegrammar.g:228:38: '\"'
            self.match(u'"')








        finally:

            pass

    # $ANTLR end STR_CONST



    # $ANTLR start CELL_REF_3D_PUBLIC
    def mCELL_REF_3D_PUBLIC(self, ):

        try:
            self.type = CELL_REF_3D_PUBLIC

            # orangescape/model/engine/util/enginegrammar.g:229:21: ( ( 'a' .. 'z' | 'A' .. 'Z' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )* '.' ( 'a' .. 'z' | 'A' .. 'Z' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )* )
            # orangescape/model/engine/util/enginegrammar.g:229:21: ( 'a' .. 'z' | 'A' .. 'Z' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )* '.' ( 'a' .. 'z' | 'A' .. 'Z' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )*
            if (self.input.LA(1) >= u'A' and self.input.LA(1) <= u'Z') or (self.input.LA(1) >= u'a' and self.input.LA(1) <= u'z'):
                self.input.consume();

            else:
                mse = MismatchedSetException(None, self.input)
                self.recover(mse)
                raise mse


            # orangescape/model/engine/util/enginegrammar.g:229:40: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )*
            while True: #loop14
                alt14 = 2
                LA14_0 = self.input.LA(1)

                if ((LA14_0 >= u'0' and LA14_0 <= u'9') or (LA14_0 >= u'A' and LA14_0 <= u'Z') or LA14_0 == u'_' or (LA14_0 >= u'a' and LA14_0 <= u'z')) :
                    alt14 = 1


                if alt14 == 1:
                    # orangescape/model/engine/util/enginegrammar.g:
                    if (self.input.LA(1) >= u'0' and self.input.LA(1) <= u'9') or (self.input.LA(1) >= u'A' and self.input.LA(1) <= u'Z') or self.input.LA(1) == u'_' or (self.input.LA(1) >= u'a' and self.input.LA(1) <= u'z'):
                        self.input.consume();

                    else:
                        mse = MismatchedSetException(None, self.input)
                        self.recover(mse)
                        raise mse




                else:
                    break #loop14


            self.match(u'.')

            if (self.input.LA(1) >= u'A' and self.input.LA(1) <= u'Z') or (self.input.LA(1) >= u'a' and self.input.LA(1) <= u'z'):
                self.input.consume();

            else:
                mse = MismatchedSetException(None, self.input)
                self.recover(mse)
                raise mse


            # orangescape/model/engine/util/enginegrammar.g:229:97: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )*
            while True: #loop15
                alt15 = 2
                LA15_0 = self.input.LA(1)

                if ((LA15_0 >= u'0' and LA15_0 <= u'9') or (LA15_0 >= u'A' and LA15_0 <= u'Z') or LA15_0 == u'_' or (LA15_0 >= u'a' and LA15_0 <= u'z')) :
                    alt15 = 1


                if alt15 == 1:
                    # orangescape/model/engine/util/enginegrammar.g:
                    if (self.input.LA(1) >= u'0' and self.input.LA(1) <= u'9') or (self.input.LA(1) >= u'A' and self.input.LA(1) <= u'Z') or self.input.LA(1) == u'_' or (self.input.LA(1) >= u'a' and self.input.LA(1) <= u'z'):
                        self.input.consume();

                    else:
                        mse = MismatchedSetException(None, self.input)
                        self.recover(mse)
                        raise mse




                else:
                    break #loop15






        finally:

            pass

    # $ANTLR end CELL_REF_3D_PUBLIC



    def mTokens(self):
        # orangescape/model/engine/util/enginegrammar.g:1:10: ( T16 | T17 | T18 | T19 | T20 | T21 | T22 | T23 | T24 | T25 | T26 | T27 | T28 | T29 | T30 | T31 | WS | CELL_REF_3D_SUGAR | AREA_REF | CELL_REF | BOOLEAN_CONST | INT | FLOAT | NEWLINE | PUB_CELL | FNNAME | STR_CONST | CELL_REF_3D_PUBLIC )
        alt16 = 28
        alt16 = self.dfa16.predict(self.input)
        if alt16 == 1:
            # orangescape/model/engine/util/enginegrammar.g:1:10: T16
            self.mT16()



        elif alt16 == 2:
            # orangescape/model/engine/util/enginegrammar.g:1:14: T17
            self.mT17()



        elif alt16 == 3:
            # orangescape/model/engine/util/enginegrammar.g:1:18: T18
            self.mT18()



        elif alt16 == 4:
            # orangescape/model/engine/util/enginegrammar.g:1:22: T19
            self.mT19()



        elif alt16 == 5:
            # orangescape/model/engine/util/enginegrammar.g:1:26: T20
            self.mT20()



        elif alt16 == 6:
            # orangescape/model/engine/util/enginegrammar.g:1:30: T21
            self.mT21()



        elif alt16 == 7:
            # orangescape/model/engine/util/enginegrammar.g:1:34: T22
            self.mT22()



        elif alt16 == 8:
            # orangescape/model/engine/util/enginegrammar.g:1:38: T23
            self.mT23()



        elif alt16 == 9:
            # orangescape/model/engine/util/enginegrammar.g:1:42: T24
            self.mT24()



        elif alt16 == 10:
            # orangescape/model/engine/util/enginegrammar.g:1:46: T25
            self.mT25()



        elif alt16 == 11:
            # orangescape/model/engine/util/enginegrammar.g:1:50: T26
            self.mT26()



        elif alt16 == 12:
            # orangescape/model/engine/util/enginegrammar.g:1:54: T27
            self.mT27()



        elif alt16 == 13:
            # orangescape/model/engine/util/enginegrammar.g:1:58: T28
            self.mT28()



        elif alt16 == 14:
            # orangescape/model/engine/util/enginegrammar.g:1:62: T29
            self.mT29()



        elif alt16 == 15:
            # orangescape/model/engine/util/enginegrammar.g:1:66: T30
            self.mT30()



        elif alt16 == 16:
            # orangescape/model/engine/util/enginegrammar.g:1:70: T31
            self.mT31()



        elif alt16 == 17:
            # orangescape/model/engine/util/enginegrammar.g:1:74: WS
            self.mWS()



        elif alt16 == 18:
            # orangescape/model/engine/util/enginegrammar.g:1:77: CELL_REF_3D_SUGAR
            self.mCELL_REF_3D_SUGAR()



        elif alt16 == 19:
            # orangescape/model/engine/util/enginegrammar.g:1:95: AREA_REF
            self.mAREA_REF()



        elif alt16 == 20:
            # orangescape/model/engine/util/enginegrammar.g:1:104: CELL_REF
            self.mCELL_REF()



        elif alt16 == 21:
            # orangescape/model/engine/util/enginegrammar.g:1:113: BOOLEAN_CONST
            self.mBOOLEAN_CONST()



        elif alt16 == 22:
            # orangescape/model/engine/util/enginegrammar.g:1:127: INT
            self.mINT()



        elif alt16 == 23:
            # orangescape/model/engine/util/enginegrammar.g:1:131: FLOAT
            self.mFLOAT()



        elif alt16 == 24:
            # orangescape/model/engine/util/enginegrammar.g:1:137: NEWLINE
            self.mNEWLINE()



        elif alt16 == 25:
            # orangescape/model/engine/util/enginegrammar.g:1:145: PUB_CELL
            self.mPUB_CELL()



        elif alt16 == 26:
            # orangescape/model/engine/util/enginegrammar.g:1:154: FNNAME
            self.mFNNAME()



        elif alt16 == 27:
            # orangescape/model/engine/util/enginegrammar.g:1:161: STR_CONST
            self.mSTR_CONST()



        elif alt16 == 28:
            # orangescape/model/engine/util/enginegrammar.g:1:171: CELL_REF_3D_PUBLIC
            self.mCELL_REF_3D_PUBLIC()








    # lookup tables for DFA #16

    DFA16_eot = DFA.unpack(
        u"\2\uffff\1\30\1\32\13\uffff\3\35\1\44\10\uffff\2\35\1\uffff\1\35"
        u"\2\uffff\1\50\1\uffff\1\35\1\uffff\2\35\1\50\2\uffff\1\35\1\56"
        u"\1\50\1\35\1\uffff\1\56"
        )

    DFA16_eof = DFA.unpack(
        u"\60\uffff"
        )

    DFA16_min = DFA.unpack(
        u"\1\12\1\uffff\2\75\13\uffff\3\50\1\56\10\uffff\2\50\1\uffff\1\56"
        u"\2\uffff\1\50\1\uffff\1\50\1\uffff\3\50\2\uffff\4\50\1\uffff\1"
        u"\50"
        )

    DFA16_max = DFA.unpack(
        u"\1\172\1\uffff\1\76\1\75\13\uffff\3\172\1\71\10\uffff\2\172\1\uffff"
        u"\1\172\2\uffff\1\172\1\uffff\1\172\1\uffff\3\172\2\uffff\4\172"
        u"\1\uffff\1\172"
        )

    DFA16_accept = DFA.unpack(
        u"\1\uffff\1\1\2\uffff\1\7\1\10\1\11\1\12\1\13\1\14\1\15\1\16\1\17"
        u"\1\20\1\21\4\uffff\1\27\1\30\1\33\1\2\1\6\1\4\1\5\1\3\2\uffff\1"
        u"\31\1\uffff\1\32\1\34\1\uffff\1\22\1\uffff\1\26\3\uffff\1\24\1"
        u"\23\4\uffff\1\25\1\uffff"
        )

    DFA16_special = DFA.unpack(
        u"\60\uffff"
        )

            
    DFA16_transition = [
        DFA.unpack(u"\1\24\2\uffff\1\24\22\uffff\1\16\1\uffff\1\25\2\uffff"
        u"\1\12\1\4\1\uffff\1\13\1\14\1\7\1\5\1\15\1\6\1\23\1\10\12\22\2"
        u"\uffff\1\2\1\1\1\3\2\uffff\5\21\1\20\15\21\1\17\6\21\3\uffff\1"
        u"\11\2\uffff\5\21\1\20\15\21\1\17\6\21"),
        DFA.unpack(u""),
        DFA.unpack(u"\1\27\1\26"),
        DFA.unpack(u"\1\31"),
        DFA.unpack(u""),
        DFA.unpack(u""),
        DFA.unpack(u""),
        DFA.unpack(u""),
        DFA.unpack(u""),
        DFA.unpack(u""),
        DFA.unpack(u""),
        DFA.unpack(u""),
        DFA.unpack(u""),
        DFA.unpack(u""),
        DFA.unpack(u""),
        DFA.unpack(u"\1\37\5\uffff\1\40\1\uffff\12\41\7\uffff\21\34\1\33"
        u"\10\34\1\42\3\uffff\1\36\1\uffff\21\34\1\33\10\34"),
        DFA.unpack(u"\1\37\5\uffff\1\40\1\uffff\12\41\7\uffff\1\43\31\34"
        u"\1\42\3\uffff\1\36\1\uffff\1\43\31\34"),
        DFA.unpack(u"\1\37\5\uffff\1\40\1\uffff\12\41\7\uffff\32\34\1\42"
        u"\3\uffff\1\36\1\uffff\32\34"),
        DFA.unpack(u"\1\23\1\uffff\12\22"),
        DFA.unpack(u""),
        DFA.unpack(u""),
        DFA.unpack(u""),
        DFA.unpack(u""),
        DFA.unpack(u""),
        DFA.unpack(u""),
        DFA.unpack(u""),
        DFA.unpack(u""),
        DFA.unpack(u"\1\37\5\uffff\1\40\1\uffff\12\41\7\uffff\24\46\1\45"
        u"\5\46\1\42\3\uffff\1\36\1\uffff\24\46\1\45\5\46"),
        DFA.unpack(u"\1\37\5\uffff\1\40\1\uffff\12\41\7\uffff\32\46\1\42"
        u"\3\uffff\1\36\1\uffff\32\46"),
        DFA.unpack(u""),
        DFA.unpack(u"\1\40\1\uffff\12\36\7\uffff\32\36\1\42\3\uffff\1\36"
        u"\1\uffff\32\36"),
        DFA.unpack(u""),
        DFA.unpack(u""),
        DFA.unpack(u"\1\37\5\uffff\1\40\1\uffff\12\47\1\51\6\uffff\32\46"
        u"\1\42\3\uffff\1\36\1\uffff\32\46"),
        DFA.unpack(u""),
        DFA.unpack(u"\1\37\5\uffff\1\40\1\uffff\12\41\7\uffff\13\46\1\52"
        u"\16\46\1\42\3\uffff\1\36\1\uffff\13\46\1\52\16\46"),
        DFA.unpack(u""),
        DFA.unpack(u"\1\37\5\uffff\1\40\1\uffff\12\46\7\uffff\4\46\1\53\25"
        u"\46\1\42\3\uffff\1\36\1\uffff\4\46\1\53\25\46"),
        DFA.unpack(u"\1\37\5\uffff\1\40\1\uffff\12\46\7\uffff\32\46\1\42"
        u"\3\uffff\1\36\1\uffff\32\46"),
        DFA.unpack(u"\1\37\5\uffff\1\40\1\uffff\12\54\1\51\6\uffff\32\46"
        u"\1\42\3\uffff\1\36\1\uffff\32\46"),
        DFA.unpack(u""),
        DFA.unpack(u""),
        DFA.unpack(u"\1\37\5\uffff\1\40\1\uffff\12\46\7\uffff\22\46\1\55"
        u"\7\46\1\42\3\uffff\1\36\1\uffff\22\46\1\55\7\46"),
        DFA.unpack(u"\1\37\5\uffff\1\40\1\uffff\12\46\7\uffff\32\46\1\42"
        u"\3\uffff\1\36\1\uffff\32\46"),
        DFA.unpack(u"\1\37\5\uffff\1\40\1\uffff\12\46\1\51\6\uffff\32\46"
        u"\1\42\3\uffff\1\36\1\uffff\32\46"),
        DFA.unpack(u"\1\37\5\uffff\1\40\1\uffff\12\46\7\uffff\4\46\1\57\25"
        u"\46\1\42\3\uffff\1\36\1\uffff\4\46\1\57\25\46"),
        DFA.unpack(u""),
        DFA.unpack(u"\1\37\5\uffff\1\40\1\uffff\12\46\7\uffff\32\46\1\42"
        u"\3\uffff\1\36\1\uffff\32\46")
    ]

    # class definition for DFA #16

    DFA16 = DFA
 

