[antlr-interest] problem with option, and double kot

David Holroyd dave at badgers-in-foil.co.uk
Sun Mar 30 07:44:43 PDT 2008


On Sun, Mar 30, 2008 at 04:31:18PM +0200, jabon wrote:
> I begun to use antlr (the main goal is to make a plugin eclipse with a 
> new language).
> but I have trouble with options.

Looks like you're trying to copy examples of ANTLR2 syntax, but you're
processing the grammar with ANTLR3...

> exemple if I have a token like this
> 
> LPAREN:
> options {paraphrase="'('";}
> '(';

'paraphrase' is not available in ANTLR3.

> or even
> tokens {
>    PLUS     = "+";
> }

in ANTLR3, you have to use single ('), not double quotes (").


Try to find ANTLR3-specific examples to learn from, or if you've got a
specific grammar you're trying to adapt, this may help,

  http://www.antlr.org/wiki/display/ANTLR3/Migrating+from+ANTLR+2+to+ANTLR+3



ta,
dave

-- 
http://david.holroyd.me.uk/


More information about the antlr-interest mailing list