Sunday, April 10, 2016

OILexer - The start of syntax error notices. (Continued)

On the syntax verification aspect, so far, so good.

Using the previous example as a jumping point, I've implemented basic syntax awareness within the generated parsers.  Left-recursive rules seem to be a bit 'iffy' but I'll be rewriting that area of focus soon anyway (I think I hit upon a pattern in the approach, it's just an arduous process.)

Below is a screenshot of a grammar file 'Errors.oilexer' which has an error at character 4, a '-'.

Oilexer (bottom) seems to somewhat disagree on what's valid at this point:
I haven't investigated why OILexer seems to think that '(' is valid, but I might find it's incorrect in its understanding of the language. It also seems to think that 'End of line' is always a valid component, as it appears with most of its syntax errors.

No comments: