ccomparini / fpl2cc

fpl parser generator language
https://ccomparini.github.io/fpl2cc/
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Does mismatch() dtrt when there are more than 2 possibly matching sequences? #12

Open ccomparini opened 2 months ago

ccomparini commented 2 months ago

The lookahead test is breaking my brain right now so I'm not sure, but afaict it doesn't test the case where there are 3 or more possible ultimate matches at a given state. The mismatch() code looks like it marks whatever's on the stack, and thus it looks like it can eliminate at most one forward path, which means (I would think) that it won't come up with a unique path. I would expect it to get stuck indefinitely oscillating among the paths.

Test.