[antlr-interest] combined grammar filter options is invalid now?

Jim Idle jimi at temporal-wave.com
Wed Oct 22 08:32:30 PDT 2008


On Wed, 2008-10-22 at 13:31 +0800, 文少华 wrote:

> Hi there,
>   In antlr 3.0.1 , it works , but now it will report error for grammar
> optoins like:
> 
> grammar test;
> 
> options {
>   k = 3;
>   filter=true;
>   output = AST; 
>   backtrack = true; 
>   memoize = true;
> }
> 
> Is this a bug or something changed but not in the change log?


It is a bug in your grammar I think. filter=true is a lexer grammar
option that cannot be used in a combined grammar. Also, are you sure you
want to use backtrack at a global level? Your parser will (usually) be
quite a lot slower than it would be if you factored the grammar. If
speed isn't an issue, and locality of bug reporting is also not a
problem, then don't worry about it though.


JIm

> BR.
> Holy
> 
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20081022/f7b96333/attachment.html 


More information about the antlr-interest mailing list