#language #parser #ast

lang-util

Utilities for implementing parsers and ASTs using lalrpop and Logos

8 releases

Uses new Rust 2021

new 0.3.1 Jul 3, 2022
0.3.0 Jun 15, 2022
0.2.1 Jun 11, 2022
0.2.0 Feb 7, 2022
0.1.3 Apr 16, 2021

#81 in Parser tooling

Download history 32/week @ 2022-03-16 18/week @ 2022-03-23 22/week @ 2022-03-30 16/week @ 2022-04-06 144/week @ 2022-04-13 15/week @ 2022-04-20 47/week @ 2022-04-27 32/week @ 2022-05-04 92/week @ 2022-05-11 43/week @ 2022-05-18 38/week @ 2022-05-25 60/week @ 2022-06-01 48/week @ 2022-06-08 71/week @ 2022-06-15 46/week @ 2022-06-22 44/week @ 2022-06-29

213 downloads per month
Used in 9 crates (6 directly)

BSD-3-Clause

47KB
1K SLoC

lang-util

Crates.io docs.rs

lang-util is a crate that implements utilities to parse and represent syntax trees. It also provides error formatting facilities for parsers using lalrpop and logos.

This crate is tailored for use in the glsl-lang crate, but you may use its utilities for implementing your own language parsers:

  • [error]: parsing error reporting module, with user-readable location information. Only available with the lalrpop feature enabled.
  • [node]: AST node structure and display
  • [position]: utilities for working with positions in strings

Author

Vincent Tavernier vince.tavernier@gmail.com

License

BSD-3-Clause


lib.rs:

lang-util is a crate that implements utilities to parse and represent syntax trees. It also provides error formatting facilities for parsers using lalrpop and logos.

This crate is tailored for use in the glsl-lang crate, but you may use its utilities for implementing your own language parsers:

  • [error]: parsing error reporting module, with user-readable location information. Only available with the lalrpop feature enabled.
  • [node]: AST node structure and display
  • [position]: utilities for working with positions in strings

Dependencies

~0.6–1MB
~24K SLoC