parce

Crates.ioparce
lib.rsparce
version0.0.1
sourcesrc
created_at2021-06-13 09:33:24.157787
updated_at2021-06-23 06:11:49.74385
descriptionA pure-rust parser generator
homepage
repositoryhttps://github.com/JoelCourtney/parce
max_upload_size
id409518
size69,648
Joel Courtney (JoelCourtney)

documentation

README

version downloads docs license

parce

Parce is a parser and lexer generator, where the grammar and the parse tree are the same data structure. It is similar to ANTLR, but the grammar is written in Rust code, not a special DSL.

Links

Features

Lexer Features

  • Regex-like repetition operators
    • The usual *, +, and ?
    • And also {n} (exactly n), {n,} (n or more), and {n,m} (between n and m inclusive) <- ANTLR doesn't have those :)
  • Lexeme nesting
  • Regex-like character classes
  • Skipped lexemes
  • Fragment lexemes
  • Modal lexers
    • unlike ANTLR, lexemes can be active in multiple modes

Parser Features

Future plans

  • Semantic predicates
    • left-recursive grammar re-writing like ANTLR, using semantic predicates
  • Data post-processors
  • multi-threaded lexing and parsing.

Contributing

If you find a bug or want a new feature, please create an issue or pull request on GitHub!

License: MIT OR Apache-2.0

Commit count: 62

cargo fmt