5 ms·
Plex: a parser and lexer generator as a Rust syntax extension
- therobot24 11y agoProbably want to choose a better name seeing as plex.tv is pretty well known. Or maybe it's named to be confusing, "I built Plex", i dunno
- higherpurpose 11y agoIndeed, I thought the Plex guys started using Rust.
- deleted 11y ago[deleted]
- JustSomeNobody 11y agoNot to be confused with the media server. Come on, pick a better name.
- aaroncray 11y agoPlex = media server, noob
- ghc 11y agoSo, just to clarify...is this a port of the venerable Python lexer generator called Plex? https://pypi.python.org/pypi/plex/ https://pypi.python.org/pypi/plex/
- detrino 11y agoUnless you are Greg Ewing, you should probably choose a new name.
- McElroy 11y agoRename it to parl
- doomrobo 11y agoThe C comment example seems more simply solved using non-greedy matching. Is that not done because the parser absolutely does not support non-greedy (or minimal-munch) matching?
- profquail 11y agoThe parsing of C-style comments is a sort of standard example to demonstrate some additional features you have available when your lexer-generator is implemented using regular expression derivatives. See section 5 of "Regular Expression Derivatives, Re-examined" for details: http://www.mpi-sws.org/~turon/re-deriv.pdf http://www.mpi-sws.org/~turon/re-deriv.pdf
- valisystem 11y agoThere's also rustlex [1] that have been around for a while and provides rust stable v1.0 support through syntex [2]. I use it for a handlebars implementation [3]. [1] https://github.com/LeoTestard/rustlex https://github.com/LeoTestard/rustlex [2] https://github.com/erickt/rust-syntex https://github.com/erickt/rust-syntex [3] https://github.com/nicolas-cherel/rumblebars https://github.com/nicolas-cherel/rumblebars