instaparse

If you're not trampolining your parser, why bother getting up in the morning?
xiongtx 2018-01-22T03:26:06.000116Z

Does the order of rules for Instaparse matter? I seem to recall that rule order didn't for tools like Lex/JLex...but I could be wrong.

aengelberg 2018-01-22T03:27:04.000206Z

The order of rules in an alternation does not matter, if that's what you're asking.

xiongtx 2018-01-22T03:44:21.000083Z

I meant the statements themselves; but funny you should bring that up, b/c I was just wondering about the order of alternations as well.

xiongtx 2018-01-22T03:46:00.000027Z

For

type = 'int' | 'boolean' | className

className = identifier

identifier = #"[A-Za-z_]+[A-Za-z0-9_]*"
Is there a way to the order of alternations matter, i.e. (insta/parse parser "int") return {:type "int"] instead of (from my observation) [:type [:className [:identifier "int"]]]?