|
Re: Whitespace problem in comma separated list [message #756585 is a reply to message #756569] |
Mon, 14 November 2011 12:16 |
Henrik Lindberg Messages: 2509 Registered: July 2009 |
Senior Member |
|
|
This is described in the documentation.
hidden(WS, SL_COMMENT, ML_COMMENT)
If you are using the default terminals, you get this out of the box. If
not, you have to make your terminals hidden (whatever you call the
hidden ones).
As an example, in my DSL, I have this:
grammar org.cloudsmith.geppetto.pp.dsl.PP hidden(WS, SL_COMMENT, ML_COMMENT)
Regards
- henrik
On 11/14/11 12:26 PM, steffen.schuette wrote:
> Dear xtexters,
>
> I'm trying to specify the grammar for a comma separated list, like "[1,
> 2, 3]".
> However, I cannot manage to solve the whitespace problem. My editor
> forces me to write "[1,2,3]". How do I enable some form of whitespace
> insensitivity?
>
> Here is my grammar:
>
> Array:
> '[' values+=INT ((',' values+=INT)*)?']';
>
>
>
> Thank you very much.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03316 seconds