Hi Oleg, entryRules describe a complete document from the beginning to the end. Therefore the EOF token is used in these rules. They serve as parser rules if partial parsing is applied during editing of a file.
In your particular example it seems to be a bug in Antlr, e.g. if I manually edit the generated grammar and put meaningless parentheses around the the subrule for id1 = ID?, I don't the the error anymore. I'm afraid you have to refactor your grammar slightly to adopt to that issue. I'd also recommend to use Java-conventional names for the production rules, e.g. TranlationUnit instead of translation_unit as there will be Java classes created from those names. Regards, Sebastian On 14.01.2014, at 09:12, Oleg Bolshakov wrote: > Hello, I posted the message on the forum > http://www.eclipse.org/forums/index.php/t/636966/ > > The problem seems to be somehow connected to the extensive use of "EOF" > tokens in generated antlr grammar though I can not understand why it's done. > Are there any info on what "entry rules" in generated grammar mean and why > EOF at the end of them is needed? > _______________________________________________ > xtext-dev mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/xtext-dev
signature.asc
Description: Message signed with OpenPGP using GPGMail
_______________________________________________ xtext-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/xtext-dev
