patrickfrey / mewa

Compiler-compiler for writing compiler frontends with Lua
https://github.com/patrickfrey/mewa
MIT License
23 stars 2 forks source link

Duplicate rules in grammar do not lead to a REDUCE/REDUCE conflict #6

Closed patrickfrey closed 2 years ago

patrickfrey commented 2 years ago

... probably due to states merged together to one. But the thing has to be investigated. And it is a bug anyway. Duplicates should be reported.

patrickfrey commented 2 years ago

Duplicates of regular expressions are hard to detect, except in trivial cases. The rule is: The first definition of the list of the longest matches wins.