[antlr-interest] Two questions about antlr3 syntax

shmuel siegel antlr at shmuelhome.mine.nu
Thu Oct 27 15:34:02 PDT 2005


Oliver Zeigermann wrote:

>2005/10/27, shmuel siegel 
>  
>
>>1) In antlr2 I used EOT to indicate that the entire input file must
>>match my syntax. What has replaced this in antlr3.
>>example
>>     document : contextSection (eventSection)? (handlerList)?
>>(settingSection)* EOT!;
>>    
>>
>
>AFAIK the EOT is no longer required. The only thing you will need is
>at least one start rule. A start rule is called by no other rule.
>
>  
>
The EOT was introduced into this rule to avoid having document match a 
contextSection followed by garbage. Are you saying that the mere fact 
that document is a top level rule will make it try to consume the entire 
input stream?


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.12.4/146 - Release Date: 10/21/2005



More information about the antlr-interest mailing list