[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Requesting some enhancements
Thanks for your suggestions. See my comments below.
>1) When I have a syntax error, while running my parser, I see a message
> [line number, column number] [list of allowable tokens] "expected."
>Could you add the token received to this message? Sort of like:
> [line number, column number] "Got" [token] ", expecting one of" [list of
I'll do this.
>2) When generating my lexer, could you emit a warning when a token will
never occur? For example, given:
> word = ([a..z] + [A..Z])+;
> keyword = 'KEY';
>it would be great if SableCC could say something like:
>"Warning: TKeyword is hidden behind TWord"
I could get SableCC to write the following warning:
Token "xxx" hidden in state "yyy".
You would have to find what is hiding it (in that specific state). The
problem is that the hidden token could be partially hidden by many tokens,
but not completely hidden by a single token.