Skip to content

JoelCourtney/parce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

version downloads docs license

parce

IN PROGRESS, not ready for real use.

todo:

  • #1
  • remove dependencies generated by macros (if possible)
  • use the same algorithm for lexer and parser
  • optimize for speeeed
  • semantic predicates
    • left-recursive grammar rewriting

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

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

About

Create a syntax tree and parser in pure Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages