Open zoffixznet opened 6 years ago
Grammars or regexes?
:woman_shrugging:
OK. Had a look at this on and off during the day. A few preliminary points (as I see it - correct where necessary):
So, before I go further, I need to know if
there's a whole heap of stuff I'm not getting; and
if I'm reasonably on track, do we want to expose some of the cursor management details to end users so they can build there own meta parsing rules with this feature; or
"take away" this feature. i.e. make it an "internals only" type thing; or
leave things as is - its exposed for you to use if you can, but there's no documentation on it.
None of these options look all that good to me. I need some advice. Lastly, either this isn't really a "good first issue" or I've got a lot to learn...
You look reasonably on track, but you probably need to show your examples to see how it goes. You can't take away this feature; if it's internal, it should not be documented, but if it's not...
Gist documented what's been done so far here: https://gist.github.com/mryan/dc8c890de862876abc4f87f55d974070 Thanks @mryan
This looks extremely useful, I'm +1 for adding it. Generally, we should first look if there are any tests in roast for it. If there are, then we document it right away. If not, then we don't…
If there are no tests for it right now, maybe add some? I'm not sure which part of it exactly is implementation-specific…
I've posted a question to stack overflow asking how to use this feature. Need to see how it's used before being able to document how it's used. https://stackoverflow.com/questions/50210456/how-can-i-use-the-perl6-regex-metasyntax-foo-regex
Check out @TimToady 's comment in the IRC https://colabti.org/irclogger/irclogger_log/perl6?date=2018-05-08#l150
It's a special syntax that lets users write stuff like their own versions of stuff like
<before ...>
. (description copied from https://github.com/rakudo/rakudo/issues/1634#issuecomment-374689565)I guess maybe somewhere in the "advanced" section or grammars is a good place to put this. Just to separate it from all the common syntax novice users might be reading through.