peggyjs / peggy

Peggy: Parser generator for JavaScript
https://peggyjs.org/
MIT License
883 stars 63 forks source link

Update documentation.html #506

Closed Flamenco closed 3 months ago

Flamenco commented 3 months ago

Add "END OF INPUT" syntax and example.

hildjj commented 3 months ago

Please ensure you are in the AUTHORS file and add a changelog entry.

Flamenco commented 3 months ago

OK. I need to the the example working. I am not sure how it works, so I will remove it for now.

hildjj commented 3 months ago

To get the examples to work, add your example to docs/js/examples.peggy and run npm run examples to build.

Flamenco commented 3 months ago

Thanks! I will update the PR with examples later today.

Mingun commented 3 months ago

I think, that you should specially mention, that this is only composite rule which is constructed from two parts. Actually, everyone can approach to this solution, but it may not be immediately obvious.

hildjj commented 3 months ago

Maybe let's add a section for composite rules? we can add more to it later as desired.

Flamenco commented 3 months ago

Its amazing how little information on the web there is about this EOI syntax. I left the example next to the . example for now, because they are related to each other.

Flamenco commented 3 months ago

I just trimmed off the fat and kept it simple. I was not sure if including the rebuilt peggy.js was appropriate.

Flamenco commented 3 months ago

Not sure why my second commit did not show up, but it is now aligned with your comments.