[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: All chars except several



Hi Etienne,



I am very new to SableCC but I like it very much already. I am using helper instead I wrote this token just to make question shorter. Thank you for your answer. I am waiting for stable SableCC 4 release.



Regards,

Konstantin Chikarev

http://antilogics.com/



> Hi Konstantin,

> I'm not sure why you would need an "any" token. Usually, "any" serves as

> a helper. Anyway, to answer your question, you should write:

> any = [[0x0000..0xFFFF] - [[tab + ' '] + [cr + lf]]]+;

> 

> I know, it is painful. SableCC 4 will be more convenient:

> any = (#x0000..#xFFFF) - (' ' | tab | cr | lf);

> 

> Have fun!

> Etienne

> maddcast wrote:

> > As you can see I've excluded semicolon and CR, but I need to exclude all the whitespaces. How can I do that?

> >

> --

> Etienne M. Gagnon, Ph.D.

> SableCC:http://sablecc.org

> SableVM:http://sablevm.org

> 

>