On 04/04/2011 11:18 AM, Jason Doege wrote:
> Hi All,
> 
> I am (we are) having a bit of trouble with spaces in a grammar.
> 
> What should be parseable is:
> 
> Alias b = in[4] {}
> 
> But what the generated parser seems to require to parse correctly is:
> 
> Alias b = in[4] { }
> 
> Here is the production that is supposed to parse it:
> 
> alias_def                : 'Alias' alias_name '=' concat_hier_data_signal (
>                              ';' |
>                              ('{' ('RefEnum' enum_name ';')* '}' )
>                            ) ;
> 
> Do you have any idea why a space is required between the '{'  '}' ?

Not without seeing *all* of your token rules....
(You *do* have rules for your tokens, right?  Either Lexer productions
or in a @tokens block?)

> To the best of my knowledge, I have no token that specifies '{}' in the
> grammar.

Please show us.

> Any suggestions would be welcome.
> 
> We are using the latest and greatest ANTLR.
> 
> --Jason Doege
> [email protected]

-- 
Kevin J. Cummings
[email protected]
[email protected]
[email protected]
Registered Linux User #1232 (http://counter.li.org)

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to