Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Plex: a parser and lexer generator as a Rust syntax extension (github.com/goffrie)
50 points by luu on July 3, 2015 | hide | past | favorite | 9 comments


Probably 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


Indeed, I thought the Plex guys started using Rust.


So, just to clarify...is this a port of the venerable Python lexer generator called Plex? https://pypi.python.org/pypi/plex/


Not to be confused with the media server.

Come on, pick a better name.


There'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

[2] https://github.com/erickt/rust-syntex

[3] https://github.com/nicolas-cherel/rumblebars


The 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?


The 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


Unless you are Greg Ewing, you should probably choose a new name.


Rename it to parl




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: