zenika-open-source / immutadot

immutadot is a JavaScript library to deal with nested immutable structures.
https://immutadot.zenika.com
MIT License
178 stars 5 forks source link

Rewrite path parser with PEG.js #307

Open nlepage opened 6 years ago

nlepage commented 6 years ago

https://nearley.js.org/

nlepage commented 6 years ago

I can't get nearley to work like I would want...

PEG.js seems to work fine though, and it generates a parser that doesn't need any runtime dependency !

Renaming the issue...

frinyvonnick commented 6 years ago

Does PEG.js generate path grammar documentation too ?

nlepage commented 6 years ago

No it doesn't seem so, but the grammar file in itself is almost a documentation (just a little polluted by post processors)... See for yourself https://github.com/Zenika/immutadot/blob/8078a98fa4d2e43100a95a5933df07155b680eba/packages/parser-peg/src/path.pegjs

frinyvonnick commented 6 years ago

Yes, that's nice !