[antlr-interest] RewriteEmptyStreamException when changing from quoted string to token?

Jon Schewe jpschewe at mtu.net
Mon Jan 21 05:37:28 PST 2008


David Holroyd wrote:
> I suspect RewriteEmptyStreamException is the result when the rewrite
> tries to insert one of the captured PRODUCTs, but the parse didn't
> capture one (because there was an 'atom' with no '*', I guess).
>
>
> Here's another idea that I didn't test :)
>
>   multExpr[boolean negate]
>     :   a+=atom (a+=multHelp)* -> {negate}? ^(PRODUCT ^(NUMBER DOUBLE["-1"]) $a)
>                                ->           ^(PRODUCT $a)
>     ;
>
>   multHelp
>     :   PRODUCT atom -> atom
>
>
>   
Thanks, that took care of it.  Now on to debugging other parts of the 
parser.

-- 
Jon Schewe | http://mtu.net/~jpschewe
If you see an attachment named signature.asc, this is my digital
signature.
See http://www.gnupg.org for more information.

For I am convinced that neither death nor life, neither angels 
nor demons, neither the present nor the future, nor any 
powers, neither height nor depth, nor anything else in all 
creation, will be able to separate us from the love of God that 
is in Christ Jesus our Lord. - Romans 8:38-39



More information about the antlr-interest mailing list