ccomparini / fpl2cc

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

Certain un-meldable constructs parse successfully but generate crashing code #3

Closed ccomparini closed 4 months ago

ccomparini commented 6 months ago

In another project, I did this:

'('^ (member ','?)* ')'^ -> argument_list +{ ... }+

Note that the comma between member (arguments) is marked optional, but it's not ejected.

It looks like somehow "member" bubbles up (correctly) but then (incorrectly) successfully melds. It should not be able to meld, because it doesn't know if it needs to skip commas or not.

If the commas are ejected, it (correctly) melds and dtrt.

ccomparini commented 4 months ago

fixed in 29d107e3c4d