InterfaceParser.py
Go to the documentation of this file.
00001 # $ANTLR 3.1.2 /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g 2010-08-20 14:12:16
00002 
00003 import sys
00004 from antlr3 import *
00005 from antlr3.compat import set, frozenset
00006          
00007 import sys
00008 import traceback
00009 
00010 from InterfaceLexer import InterfaceLexer
00011 
00012 class Method(object):
00013         def __init__(self, name, return_fields, fields, attributes):
00014                 self.name = name
00015                 self.return_fields = return_fields
00016                 self.fields = fields
00017                 self.attributes = attributes
00018                 
00019                 if (self.fields is None):
00020                         self.fields = []
00021                 if (self.return_fields is None):
00022                         self.return_fields = []
00023                 if (self.attributes is None):
00024                         self.attributes = []
00025                 
00026         def __repr__(self):
00027                 return "%s: ret: %s fields: %s attr: %s"%(self.name, self.return_fields, self.fields, self.attributes)
00028 
00029 class Interface(object):
00030         def __init__(self, name):
00031                 self.name = name
00032                 self.methods = []
00033                 
00034         def __repr__(self):
00035                 return "%s: %s"%(self.name, self.methods)
00036 
00037 
00038 
00039 # for convenience in actions
00040 HIDDEN = BaseRecognizer.HIDDEN
00041 
00042 # token types
00043 CLOSEPAREN=9
00044 LETTER=17
00045 ATTRIBUTE=5
00046 OPENBRACKET=6
00047 WHITESPACE=4
00048 SEMICOLON=10
00049 ID=18
00050 EOF=-1
00051 CLOSEBRACKET=7
00052 SLASH=12
00053 COMMA=11
00054 MESSAGE=14
00055 INTERFACE=13
00056 DIGIT=16
00057 OPENPAREN=8
00058 COMMENT=19
00059 RETURNS=15
00060 
00061 # token names
00062 tokenNames = [
00063     "<invalid>", "<EOR>", "<DOWN>", "<UP>", 
00064     "WHITESPACE", "ATTRIBUTE", "OPENBRACKET", "CLOSEBRACKET", "OPENPAREN", 
00065     "CLOSEPAREN", "SEMICOLON", "COMMA", "SLASH", "INTERFACE", "MESSAGE", 
00066     "RETURNS", "DIGIT", "LETTER", "ID", "COMMENT"
00067 ]
00068 
00069 
00070 
00071 
00072 class InterfaceParser(Parser):
00073     grammarFileName = "/wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g"
00074     antlr_version = version_str_to_tuple("3.1.2")
00075     antlr_version_str = "3.1.2"
00076     tokenNames = tokenNames
00077 
00078     def __init__(self, input, state=None):
00079         if state is None:
00080             state = RecognizerSharedState()
00081 
00082         Parser.__init__(self, input, state)
00083 
00084 
00085 
00086 
00087 
00088 
00089 
00090                 
00091 
00092 
00093         
00094 
00095      
00096     interfaces = []
00097 
00098 
00099     class method_return(ParserRuleReturnScope):
00100         def __init__(self):
00101             ParserRuleReturnScope.__init__(self)
00102 
00103             self.name = None
00104             self.rs = None
00105             self.ps = None
00106             self.attrs = None
00107 
00108 
00109 
00110 
00111     # $ANTLR start "method"
00112     # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:65:1: method returns [name, rs, ps, attrs] : (attr= ATTRIBUTE )* my_name= ID OPENPAREN pvals= parameter_list CLOSEPAREN ( RETURNS rvals= return_vals )? SEMICOLON ;
00113     def method(self, ):
00114 
00115         retval = self.method_return()
00116         retval.start = self.input.LT(1)
00117 
00118         attr = None
00119         my_name = None
00120         pvals = None
00121 
00122         rvals = None
00123 
00124 
00125         try:
00126             try:
00127                 # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:66:2: ( (attr= ATTRIBUTE )* my_name= ID OPENPAREN pvals= parameter_list CLOSEPAREN ( RETURNS rvals= return_vals )? SEMICOLON )
00128                 # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:67:2: (attr= ATTRIBUTE )* my_name= ID OPENPAREN pvals= parameter_list CLOSEPAREN ( RETURNS rvals= return_vals )? SEMICOLON
00129                 pass 
00130                 #action start
00131                    
00132                 retval.rs = [] 
00133                 retval.ps = [] 
00134                 retval.attrs = []
00135                         
00136                 #action end
00137                 # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:73:2: (attr= ATTRIBUTE )*
00138                 while True: #loop1
00139                     alt1 = 2
00140                     LA1_0 = self.input.LA(1)
00141 
00142                     if (LA1_0 == ATTRIBUTE) :
00143                         alt1 = 1
00144 
00145 
00146                     if alt1 == 1:
00147                         # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:74:3: attr= ATTRIBUTE
00148                         pass 
00149                         attr=self.match(self.input, ATTRIBUTE, self.FOLLOW_ATTRIBUTE_in_method78)
00150                         #action start
00151                            
00152                         retval.attrs.append(attr.text)
00153                                         
00154                         #action end
00155 
00156 
00157                     else:
00158                         break #loop1
00159 
00160 
00161                 my_name=self.match(self.input, ID, self.FOLLOW_ID_in_method92)
00162                 #action start
00163                 retval.name = my_name.text
00164                 #action end
00165                 self.match(self.input, OPENPAREN, self.FOLLOW_OPENPAREN_in_method96)
00166                 self._state.following.append(self.FOLLOW_parameter_list_in_method104)
00167                 pvals = self.parameter_list()
00168 
00169                 self._state.following.pop()
00170                 #action start
00171                    
00172                 retval.ps = pvals 
00173                         
00174                 #action end
00175                 self.match(self.input, CLOSEPAREN, self.FOLLOW_CLOSEPAREN_in_method112)
00176                 # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:84:13: ( RETURNS rvals= return_vals )?
00177                 alt2 = 2
00178                 LA2_0 = self.input.LA(1)
00179 
00180                 if (LA2_0 == RETURNS) :
00181                     alt2 = 1
00182                 if alt2 == 1:
00183                     # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:84:14: RETURNS rvals= return_vals
00184                     pass 
00185                     self.match(self.input, RETURNS, self.FOLLOW_RETURNS_in_method115)
00186                     self._state.following.append(self.FOLLOW_return_vals_in_method121)
00187                     rvals = self.return_vals()
00188 
00189                     self._state.following.pop()
00190                     #action start
00191                     retval.rs = rvals
00192                     #action end
00193 
00194 
00195 
00196                 self.match(self.input, SEMICOLON, self.FOLLOW_SEMICOLON_in_method127)
00197 
00198 
00199 
00200                 retval.stop = self.input.LT(-1)
00201 
00202 
00203             except RecognitionException, re:
00204                 self.reportError(re)
00205                 self.recover(self.input, re)
00206         finally:
00207 
00208             pass
00209 
00210         return retval
00211 
00212     # $ANTLR end "method"
00213 
00214 
00215     # $ANTLR start "interface"
00216     # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:87:1: interface : INTERFACE name= ID OPENBRACKET (mt= method )* CLOSEBRACKET ;
00217     def interface(self, ):
00218 
00219         name = None
00220         mt = None
00221 
00222 
00223         try:
00224             try:
00225                 # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:88:2: ( INTERFACE name= ID OPENBRACKET (mt= method )* CLOSEBRACKET )
00226                 # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:88:4: INTERFACE name= ID OPENBRACKET (mt= method )* CLOSEBRACKET
00227                 pass 
00228                 self.match(self.input, INTERFACE, self.FOLLOW_INTERFACE_in_interface141)
00229                 name=self.match(self.input, ID, self.FOLLOW_ID_in_interface145)
00230                 #action start
00231                 self.interfaces.append(Interface(name.text)) 
00232                 #action end
00233                 self.match(self.input, OPENBRACKET, self.FOLLOW_OPENBRACKET_in_interface149)
00234                 # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:89:3: (mt= method )*
00235                 while True: #loop3
00236                     alt3 = 2
00237                     LA3_0 = self.input.LA(1)
00238 
00239                     if (LA3_0 == ATTRIBUTE or LA3_0 == ID) :
00240                         alt3 = 1
00241 
00242 
00243                     if alt3 == 1:
00244                         # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:90:3: mt= method
00245                         pass 
00246                         self._state.following.append(self.FOLLOW_method_in_interface162)
00247                         mt = self.method()
00248 
00249                         self._state.following.pop()
00250                         #action start
00251                            
00252                         self.interfaces[-1].methods.append(Method(mt.name, mt.rs, mt.ps, mt.attrs))
00253                                         
00254                         #action end
00255 
00256 
00257                     else:
00258                         break #loop3
00259 
00260 
00261                 self.match(self.input, CLOSEBRACKET, self.FOLLOW_CLOSEBRACKET_in_interface178)
00262 
00263 
00264 
00265 
00266             except RecognitionException, re:
00267                 self.reportError(re)
00268                 self.recover(self.input, re)
00269         finally:
00270 
00271             pass
00272 
00273         return 
00274 
00275     # $ANTLR end "interface"
00276 
00277 
00278     # $ANTLR start "parameter_list"
00279     # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:99:1: parameter_list returns [params] : ( | tv= type i= ID ( COMMA tvo= type io= ID )* );
00280     def parameter_list(self, ):
00281 
00282         params = None
00283 
00284         i = None
00285         io = None
00286         tv = None
00287 
00288         tvo = None
00289 
00290 
00291         try:
00292             try:
00293                 # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:100:2: ( | tv= type i= ID ( COMMA tvo= type io= ID )* )
00294                 alt5 = 2
00295                 LA5_0 = self.input.LA(1)
00296 
00297                 if (LA5_0 == CLOSEPAREN) :
00298                     alt5 = 1
00299                 elif (LA5_0 == ID) :
00300                     alt5 = 2
00301                 else:
00302                     nvae = NoViableAltException("", 5, 0, self.input)
00303 
00304                     raise nvae
00305 
00306                 if alt5 == 1:
00307                     # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:101:2: 
00308                     pass 
00309 
00310                 elif alt5 == 2:
00311                     # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:101:4: tv= type i= ID ( COMMA tvo= type io= ID )*
00312                     pass 
00313                     self._state.following.append(self.FOLLOW_type_in_parameter_list204)
00314                     tv = self.type()
00315 
00316                     self._state.following.pop()
00317                     i=self.match(self.input, ID, self.FOLLOW_ID_in_parameter_list210)
00318                     #action start
00319                     params = [(((tv is not None) and [self.input.toString(tv.start,tv.stop)] or [None])[0], i.text)]
00320                     #action end
00321                     # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:101:55: ( COMMA tvo= type io= ID )*
00322                     while True: #loop4
00323                         alt4 = 2
00324                         LA4_0 = self.input.LA(1)
00325 
00326                         if (LA4_0 == COMMA) :
00327                             alt4 = 1
00328 
00329 
00330                         if alt4 == 1:
00331                             # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:101:56: COMMA tvo= type io= ID
00332                             pass 
00333                             self.match(self.input, COMMA, self.FOLLOW_COMMA_in_parameter_list215)
00334                             self._state.following.append(self.FOLLOW_type_in_parameter_list221)
00335                             tvo = self.type()
00336 
00337                             self._state.following.pop()
00338                             io=self.match(self.input, ID, self.FOLLOW_ID_in_parameter_list227)
00339                             #action start
00340                             params.append((((tvo is not None) and [self.input.toString(tvo.start,tvo.stop)] or [None])[0], io.text)) 
00341                             #action end
00342 
00343 
00344                         else:
00345                             break #loop4
00346 
00347 
00348 
00349 
00350 
00351             except RecognitionException, re:
00352                 self.reportError(re)
00353                 self.recover(self.input, re)
00354         finally:
00355 
00356             pass
00357 
00358         return params
00359 
00360     # $ANTLR end "parameter_list"
00361 
00362 
00363     # $ANTLR start "package_type"
00364     # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:104:1: package_type returns [t] : pkg= ID SLASH id= ID ;
00365     def package_type(self, ):
00366 
00367         t = None
00368 
00369         pkg = None
00370         id = None
00371 
00372         try:
00373             try:
00374                 # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:105:2: (pkg= ID SLASH id= ID )
00375                 # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:105:4: pkg= ID SLASH id= ID
00376                 pass 
00377                 pkg=self.match(self.input, ID, self.FOLLOW_ID_in_package_type250)
00378                 self.match(self.input, SLASH, self.FOLLOW_SLASH_in_package_type252)
00379                 id=self.match(self.input, ID, self.FOLLOW_ID_in_package_type256)
00380                 #action start
00381                 t = '%s/%s'%(pkg, id) 
00382                 #action end
00383 
00384 
00385 
00386 
00387             except RecognitionException, re:
00388                 self.reportError(re)
00389                 self.recover(self.input, re)
00390         finally:
00391 
00392             pass
00393 
00394         return t
00395 
00396     # $ANTLR end "package_type"
00397 
00398     class type_return(ParserRuleReturnScope):
00399         def __init__(self):
00400             ParserRuleReturnScope.__init__(self)
00401 
00402             self.type_name = None
00403 
00404 
00405 
00406 
00407     # $ANTLR start "type"
00408     # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:108:1: type returns [type_name] : (n= ID | np= package_type );
00409     def type(self, ):
00410 
00411         retval = self.type_return()
00412         retval.start = self.input.LT(1)
00413 
00414         n = None
00415         np = None
00416 
00417 
00418         try:
00419             try:
00420                 # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:109:2: (n= ID | np= package_type )
00421                 alt6 = 2
00422                 LA6_0 = self.input.LA(1)
00423 
00424                 if (LA6_0 == ID) :
00425                     LA6_1 = self.input.LA(2)
00426 
00427                     if (LA6_1 == SLASH) :
00428                         alt6 = 2
00429                     elif (LA6_1 == ID) :
00430                         alt6 = 1
00431                     else:
00432                         nvae = NoViableAltException("", 6, 1, self.input)
00433 
00434                         raise nvae
00435 
00436                 else:
00437                     nvae = NoViableAltException("", 6, 0, self.input)
00438 
00439                     raise nvae
00440 
00441                 if alt6 == 1:
00442                     # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:109:4: n= ID
00443                     pass 
00444                     n=self.match(self.input, ID, self.FOLLOW_ID_in_type278)
00445                     #action start
00446                     retval.type_name = n
00447                     #action end
00448 
00449 
00450                 elif alt6 == 2:
00451                     # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:110:4: np= package_type
00452                     pass 
00453                     self._state.following.append(self.FOLLOW_package_type_in_type289)
00454                     np = self.package_type()
00455 
00456                     self._state.following.pop()
00457                     #action start
00458                     retval.type_name = np
00459                     #action end
00460 
00461 
00462                 retval.stop = self.input.LT(-1)
00463 
00464 
00465             except RecognitionException, re:
00466                 self.reportError(re)
00467                 self.recover(self.input, re)
00468         finally:
00469 
00470             pass
00471 
00472         return retval
00473 
00474     # $ANTLR end "type"
00475 
00476 
00477     # $ANTLR start "return_vals"
00478     # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:113:1: return_vals returns [rs] : ( | OPENPAREN pl= parameter_list CLOSEPAREN );
00479     def return_vals(self, ):
00480 
00481         rs = None
00482 
00483         pl = None
00484 
00485 
00486         try:
00487             try:
00488                 # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:114:2: ( | OPENPAREN pl= parameter_list CLOSEPAREN )
00489                 alt7 = 2
00490                 LA7_0 = self.input.LA(1)
00491 
00492                 if (LA7_0 == SEMICOLON) :
00493                     alt7 = 1
00494                 elif (LA7_0 == OPENPAREN) :
00495                     alt7 = 2
00496                 else:
00497                     nvae = NoViableAltException("", 7, 0, self.input)
00498 
00499                     raise nvae
00500 
00501                 if alt7 == 1:
00502                     # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:115:2: 
00503                     pass 
00504 
00505                 elif alt7 == 2:
00506                     # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:115:4: OPENPAREN pl= parameter_list CLOSEPAREN
00507                     pass 
00508                     self.match(self.input, OPENPAREN, self.FOLLOW_OPENPAREN_in_return_vals311)
00509                     self._state.following.append(self.FOLLOW_parameter_list_in_return_vals317)
00510                     pl = self.parameter_list()
00511 
00512                     self._state.following.pop()
00513                     #action start
00514                     rs = pl 
00515                     #action end
00516                     self.match(self.input, CLOSEPAREN, self.FOLLOW_CLOSEPAREN_in_return_vals321)
00517 
00518 
00519 
00520             except RecognitionException, re:
00521                 self.reportError(re)
00522                 self.recover(self.input, re)
00523         finally:
00524 
00525             pass
00526 
00527         return rs
00528 
00529     # $ANTLR end "return_vals"
00530 
00531 
00532     # $ANTLR start "message"
00533     # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:118:1: message : MESSAGE ID OPENBRACKET ( type ID SEMICOLON )* CLOSEBRACKET ;
00534     def message(self, ):
00535 
00536         try:
00537             try:
00538                 # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:119:2: ( MESSAGE ID OPENBRACKET ( type ID SEMICOLON )* CLOSEBRACKET )
00539                 # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:119:4: MESSAGE ID OPENBRACKET ( type ID SEMICOLON )* CLOSEBRACKET
00540                 pass 
00541                 self.match(self.input, MESSAGE, self.FOLLOW_MESSAGE_in_message334)
00542                 self.match(self.input, ID, self.FOLLOW_ID_in_message336)
00543                 self.match(self.input, OPENBRACKET, self.FOLLOW_OPENBRACKET_in_message338)
00544                 # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:119:27: ( type ID SEMICOLON )*
00545                 while True: #loop8
00546                     alt8 = 2
00547                     LA8_0 = self.input.LA(1)
00548 
00549                     if (LA8_0 == ID) :
00550                         alt8 = 1
00551 
00552 
00553                     if alt8 == 1:
00554                         # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:119:28: type ID SEMICOLON
00555                         pass 
00556                         self._state.following.append(self.FOLLOW_type_in_message341)
00557                         self.type()
00558 
00559                         self._state.following.pop()
00560                         self.match(self.input, ID, self.FOLLOW_ID_in_message343)
00561                         self.match(self.input, SEMICOLON, self.FOLLOW_SEMICOLON_in_message345)
00562 
00563 
00564                     else:
00565                         break #loop8
00566 
00567 
00568                 self.match(self.input, CLOSEBRACKET, self.FOLLOW_CLOSEBRACKET_in_message349)
00569 
00570 
00571 
00572 
00573             except RecognitionException, re:
00574                 self.reportError(re)
00575                 self.recover(self.input, re)
00576         finally:
00577 
00578             pass
00579 
00580         return 
00581 
00582     # $ANTLR end "message"
00583 
00584 
00585     # $ANTLR start "main"
00586     # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:122:1: main : ( interface | message )* EOF ;
00587     def main(self, ):
00588 
00589         try:
00590             try:
00591                 # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:123:2: ( ( interface | message )* EOF )
00592                 # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:123:4: ( interface | message )* EOF
00593                 pass 
00594                 # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:123:4: ( interface | message )*
00595                 while True: #loop9
00596                     alt9 = 3
00597                     LA9_0 = self.input.LA(1)
00598 
00599                     if (LA9_0 == INTERFACE) :
00600                         alt9 = 1
00601                     elif (LA9_0 == MESSAGE) :
00602                         alt9 = 2
00603 
00604 
00605                     if alt9 == 1:
00606                         # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:123:5: interface
00607                         pass 
00608                         self._state.following.append(self.FOLLOW_interface_in_main363)
00609                         self.interface()
00610 
00611                         self._state.following.pop()
00612 
00613 
00614                     elif alt9 == 2:
00615                         # /wg/bvu/jfaust/ros/dev/visualization-2.0/visualization/rve_interface_gen/antlr/InterfaceParser.g:123:17: message
00616                         pass 
00617                         self._state.following.append(self.FOLLOW_message_in_main367)
00618                         self.message()
00619 
00620                         self._state.following.pop()
00621 
00622 
00623                     else:
00624                         break #loop9
00625 
00626 
00627                 self.match(self.input, EOF, self.FOLLOW_EOF_in_main371)
00628 
00629 
00630 
00631 
00632             except RecognitionException, re:
00633                 self.reportError(re)
00634                 self.recover(self.input, re)
00635         finally:
00636 
00637             pass
00638 
00639         return 
00640 
00641     # $ANTLR end "main"
00642 
00643 
00644     # Delegated rules
00645 
00646 
00647  
00648 
00649     FOLLOW_ATTRIBUTE_in_method78 = frozenset([5, 18])
00650     FOLLOW_ID_in_method92 = frozenset([8])
00651     FOLLOW_OPENPAREN_in_method96 = frozenset([9, 18])
00652     FOLLOW_parameter_list_in_method104 = frozenset([9])
00653     FOLLOW_CLOSEPAREN_in_method112 = frozenset([10, 15])
00654     FOLLOW_RETURNS_in_method115 = frozenset([8, 10])
00655     FOLLOW_return_vals_in_method121 = frozenset([10])
00656     FOLLOW_SEMICOLON_in_method127 = frozenset([1])
00657     FOLLOW_INTERFACE_in_interface141 = frozenset([18])
00658     FOLLOW_ID_in_interface145 = frozenset([6])
00659     FOLLOW_OPENBRACKET_in_interface149 = frozenset([5, 7, 18])
00660     FOLLOW_method_in_interface162 = frozenset([5, 7, 18])
00661     FOLLOW_CLOSEBRACKET_in_interface178 = frozenset([1])
00662     FOLLOW_type_in_parameter_list204 = frozenset([18])
00663     FOLLOW_ID_in_parameter_list210 = frozenset([1, 11])
00664     FOLLOW_COMMA_in_parameter_list215 = frozenset([18])
00665     FOLLOW_type_in_parameter_list221 = frozenset([18])
00666     FOLLOW_ID_in_parameter_list227 = frozenset([1, 11])
00667     FOLLOW_ID_in_package_type250 = frozenset([12])
00668     FOLLOW_SLASH_in_package_type252 = frozenset([18])
00669     FOLLOW_ID_in_package_type256 = frozenset([1])
00670     FOLLOW_ID_in_type278 = frozenset([1])
00671     FOLLOW_package_type_in_type289 = frozenset([1])
00672     FOLLOW_OPENPAREN_in_return_vals311 = frozenset([9, 18])
00673     FOLLOW_parameter_list_in_return_vals317 = frozenset([9])
00674     FOLLOW_CLOSEPAREN_in_return_vals321 = frozenset([1])
00675     FOLLOW_MESSAGE_in_message334 = frozenset([18])
00676     FOLLOW_ID_in_message336 = frozenset([6])
00677     FOLLOW_OPENBRACKET_in_message338 = frozenset([7, 18])
00678     FOLLOW_type_in_message341 = frozenset([18])
00679     FOLLOW_ID_in_message343 = frozenset([10])
00680     FOLLOW_SEMICOLON_in_message345 = frozenset([7, 18])
00681     FOLLOW_CLOSEBRACKET_in_message349 = frozenset([1])
00682     FOLLOW_interface_in_main363 = frozenset([13, 14])
00683     FOLLOW_message_in_main367 = frozenset([13, 14])
00684     FOLLOW_EOF_in_main371 = frozenset([1])
00685 
00686 
00687 
00688        
00689 def main(argv, otherArg=None):
00690   char_stream = ANTLRFileStream(sys.argv[1])
00691   lexer = InterfaceLexer(char_stream)
00692   tokens = CommonTokenStream(lexer)
00693   parser = InterfaceParser(tokens);
00694 
00695   try:
00696       parser.main()
00697   except RecognitionException:
00698         traceback.print_stack()
00699 
00700 
00701 if __name__ == '__main__':
00702     main(sys.argv)


rve_interface_gen
Author(s): Josh Faust
autogenerated on Wed Dec 11 2013 14:31:00