jmeaster30 / vore

VerbOse Regular Expressions - Regular Expression Engine with Verbose English-like Syntax
MIT License
1 stars 0 forks source link

Parsing error with not expressions #75

Closed jmeaster30 closed 1 year ago

jmeaster30 commented 1 year ago

While writing down my language's grammar I found an issue with not expressions and they cause the parser to parse things in an unexpected way.

find all letter = this produces this AST structure:

FIND (all)
    DEC (this)
        LETTER

However find all not letter = this throws a parse error on the equal sign saying it was expecting a new search operation to start instead of continuing with the declaration

I would expect it to produce:

FIND (all)
    DEC (this)
        NOT LETTER
jmeaster30 commented 1 year ago

Fixed