Is it possible to use nearley-unparse with Moo?
See original GitHub issueI’ve been trying to use Nearley to parse a list of problems but I’m having trouble getting nearley-unparse
to correctly generate text matching Moo tokens. I posted a StackOverflow question to no avail so I thought it might be better suited for here. I’m using Nearley v2.11.0, Node v7.9.0 and NPM v4.2.0.
Everything is in the same Gist, but my grammar looks like this and the problems I’m trying to parse look like this.
After compiling the grammar however and using nearley-unparse
however, I just end up with text that looks like this, with the Moo tokens missing.
Section (Due )- #*, ,
Section (Due )- #, *,
Section (Due )- #*, , , *,
Section (Due )- #*, *
Section (Due )- #*, *, *, *
Is this a limitation of Nearley or Moo? Or am I doing something wrong with my grammar?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, i just want to point out that it may be the case that nearley-unparse may not work even when the rules defined in moo do not involve regexes.
The following grammar, when compiled, only returns empty strings when unparsed
While this works:
I haven’t tested the unparser with Moo myself. I suppose it’s plausible that it needs to be updated!
Sent with GitHawk