[antlr-interest] End of file

jg z zjg1964 at yahoo.com
Tue Apr 23 05:59:28 PDT 2002


Thank you, Ric,
     According to your comment, we got our problem
solved. We did forget to add something at that point
during the conversion.

   Zuo & David

> 
> I had a short look at the files David sent me
> earlier the problem is most
> probable in the external_declaration rule where
> there's an alternative:
> 
> 	  {K_and_R = TRUE;}
> 	   {printf("CPP_parser.g Ln490\n");}
> 	  function_definition
> 	 |
>       // templated forward class decl, init/decl of
> static member in template
>       {beginTemplateDefinition();}
>       (template_head declaration_specifiers
> 		 ( init_declarator_list ) ? SEMICOLON {
> end_of_stmt();}
> 		 ) =>      {endTemplateDefinition();}
> 
>  /*** what is missing here???? ***/
> 
>    |
>       // Templated FUNCTIONS and CONSTRUCTORS
> matched here.
>       {beginTemplateDefinition();}
>       template_head
>       (
> 
> Note the predicate pointing to nothing. Removing
> that eliminates the EOF
> from the lookahead set of external_declaration.
> 
> Advice: antlr -diagnostic <yourinputfile> is your
> friend. (The textfile it
> generates lists all lookahead sets in readable
> format, that way you can
> track down which alternative is the culprit if
> something gets a wrong piece
> of lookahead)
> 
> Advice2: I'm getting the impression that you are
> trying to convert the old
> PCCTS grammar as a whole? If so then it's probably
> not the most practical
> approach. Try to convert it piece by piece (or
> better said alternative by
> alternative). That way it's easier to pinpoint rules
> that give trouble.
> 
> Good luck,
> 
> Ric
> --
>
-----+++++*****************************************************+++++++++-------
>     ---- Ric Klaren ----- klaren at cs.utwente.nl -----
> +31 53 4893722  ----
>
-----+++++*****************************************************+++++++++-------
>      Human beings, who are almost unique in having
> the ability to learn
>    from the experience of others, are also
> remarkable for their apparent
>          disinclination to do so. --- Douglas Adams,
> Last Chance to See
> 
> 
>  
> 
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/ 
> 
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
http://games.yahoo.com/

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list