instaparse

If you're not trampolining your parser, why bother getting up in the morning?
misha 2020-11-16T13:31:58.042400Z

greetings! is there a way to specify "greedy" matches in the grammar (instead of the tree transforming) other than using inline regex-es? (insta/parse (insta/parser "S = 'a'+") "aaaa") to get => [:S "aaaa"] instead of: => [:S "a" "a" "a" "a"] my actual use case is: I have a bunch of rules wrapped in <> (for "documentation"), so the tags will not show up in output tree, so I'd line to have a single match string in the output (like "aaaaa"). I'd like to avoid tree transforming, because grammar is "up for extension" for someone else, and making sure they update transformers as well add a line to grammar - is extra point of potential failure

misha 2020-11-16T13:39:19.043400Z

and inline regexes do not compose well at all:

&lt;phrase&gt; =    #'\w+(\s+\w+)*'
text     = #'\s*\w+(\s+\w+)*\s*'
instead of
&lt;space&gt;  = #'\s+'
&lt;word&gt;   = #'\w+'
&lt;phrase&gt; = word (space word)*
text     = space? phrase space?