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.

Wednesday, April 6, 2016

OILexer - The start of syntax error notices.

Long overdue, but below is a screenshot of a simple language starting to flex its knowledge of the language.

This is the command-line arguments from OILexer represented as a grammar within itself. Didn't take a whole lot of work to get it there by hand, the next step is replicating the behavior within OILexer itself, then using that information to move the project further. I was staying my hand at this process, but I'm currently at a dead-end on another area, I figured now is as good a time as any to start this.