The disambiguation of the if-then-else operator isn't ok. The current implementation, which is the best I've been able to achieve without obfuscating the whole grammar, allows:
"s ; if s then s else s ; s"
"s + if s then s else s + s"
but not:
"s ; if s then s else s + s"
"s + if s then s else s ; s"
I've no idea how to solve this completely in an acceptable way. The solution in the "Disambiguation Filters For Scannerless Generalized LR Parsers" article is ambiguous as well.
Martin Bravenboer [2004-04-08 06:59]
The disambiguation of the if-then-else operator isn't ok. The current implementation, which is the best I've been able to achieve without obfuscating the whole grammar, allows:
"s ; if s then s else s ; s"
"s + if s then s else s + s"
but not:
"s ; if s then s else s + s"
"s + if s then s else s ; s"
I've no idea how to solve this completely in an acceptable way. The solution in the "Disambiguation Filters For Scannerless Generalized LR Parsers" article is ambiguous as well.
"s ; if s then s else s ; s"
"s + if s then s else s + s"
but not:
"s ; if s then s else s + s"
"s + if s then s else s ; s"
I've no idea how to solve this completely in an acceptable way. The solution in the "Disambiguation Filters For Scannerless Generalized LR Parsers" article is ambiguous as well.