Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • Here's my compilation harness, with potentially interesting choices you might want to look at godbolt.org/z/8eYKj7458 Commented Jan 11 at 23:12
  • Thanks so much! "Your grammar can be expressed more elegantly" -> Why is that one more "elegant" than the other? Commented Jan 17 at 18:29
  • 1
    Because it involves iteration instead of recursion and as such more directly expresses the repeated grammar production. It's subjective of course. It also involves a less complex semantic action, avoiding the need to destructure any attributes. Commented Jan 17 at 20:10