>Hi>>I am a newbie with the parsing stuff, and I am trying to convert a BNF>grammar to an EBNF one. I have a lexer rule which states Set ::= Set1 ->Set2; I am using ANTLR v3.0 Beta 3 and unable to get how to convert>this into the ANTLR grammar. ANTLR just rejects the "-" operation on>sets. Please help!>

It's been a while since I've done a parser with ANTLR so don't depend
on the syntax below.

Depending on what Set2 actually is, you may be able to use a syntactic
predicate like the following that proceeds only if the next token is
not from Set2.

Set: ( ~Set2 )=> Set1;

There is also a way (but I forget how - check the manual) to
programmatically examine the token so you could write a semantic
predicate to check for and reject a token from Set2. Semantic
predicates throw an exception if they fail which you will have to
catch. Use an alternation like the following: