> Try adding the lexer rules:
>
> LParen : '(';
> RParen : ')';
>
It didn't helped.
New grammar file:
grammar skipper;
options
{
language = C;
}
LParen : '(';
RParen : ')';
skipper
@init {
int braceCount = 1;
}
: (
LParen
{
braceCount ++;
}
| RParen
{
braceCount --;
if(braceCount == 0)
{
LTOKEN = EOF_TOKEN;
}
}
| ~(LParen|RParen)
) *
;
Antlrwoks reports the same error on 28 line which is
| ~(LParen|RParen)
There is also a strange thing in rule view, it looks like antlr does
not see LParen and RParen in twiddle operator.
I attached screenshot with it.
List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
<<attachment: grammar.png>>
-- 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.
