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

Re: Bug in SableCC 2.17.2?



Hi Xuan,

> Brackets () in sablecc grammar file are
> used to group list of productions/tokens.  However, grouping something

ERROR: they are only for grouping helpers/tokens  (not productions).
Sorry for the mistake. The example should read:

>
> Helpers
>
>
>         tokenchar = [[0x0000..0xFFFF]-','];
>
> Tokens
>
>         token =       tokenchar+;
>         comma =       ',';
> //token_list_tail       = token;         // works
> //token_list_tail       = (token)+;      // works
> //token_list_tail       = comma token;   // works
> //token_list_tail       = (comma token)+;// works
>
>
> Productions
>
>         token_list      =       token token_list_tail*;

best regards
Mariusz