Looks like you are parsing with empty input. What is the input you gave to the parser?
Cheers, Indhu Marwan Ajraoui wrote: > Hi there; > > I'm getting a strange error form a parser. I have defined a grammar, > wich contains these rules; > > > decl_codigo : decl_libreria decl_program > > decl_libreria : TAG_START_OPEN 'function_library' ':' FN_ID TAG_CLOSE > decl_funciones TAG_END_OPEN 'function_library' TAG_CLOSE; > > decl_program : TAG_START_OPEN 'program' type_return '::' FN_ID ':' > params_list TAG_CLOSE lista_instrucciones TAG_END_OPEN 'program' > TAG_CLOSE ; > > > > So when i finish parsing the input tested, ANTLR notifies, > > line 0:-1 mismatched input '<EOF>' expecting TAG_START_OPEN > > To find out what could be the problem, i put the TAG_START_OPEN , so i got: > > line 0:-1 mismatched input '<EOF>' expecting 'function_library' > > > I did check my .g, if i have some other reference to "decl_libreria", > but No, the only reference is written is the one i mentioned before in > the lines above. it is supposed to finish without errors and return an > AST, as i set up the option. > > So why it does behave in recursive way? Any idea. > > > thanks in advance > > > > List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to il-antlr-interest@googlegroups.com To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---