Fork me on GitHub
#instaparse
<
2023-05-03
>
diego.videco04:05:12

Thanks @aengelberg and @ghaskins, actually my insta/parse was working as expected (prioritizing the correct version) but insta/parses is still showing more than one possibility, though I guess that this might prevent cases where the first parse is not the one I want right?

aengelberg04:05:00

Ah, yes, ordered choice still gives you all the possible parses. If you want it to be unambiguous, try a negative look ahead.

op-degrade = (<'?'> degrade-amount) | <'?'> !degrade-amount

diego.videco00:05:38

Thanks, that works great!

diego.videco00:05:07

I believe I was missusing the negative look ahead syntax. I appreciate the example!