#language #parser #ast

lang-util

Utilities for implementing parsers and ASTs using lalrpop and Logos

10 unstable releases (3 breaking)

0.4.1 Sep 5, 2022
0.4.0 Sep 5, 2022
0.3.1 Jul 3, 2022
0.3.0 Jun 15, 2022
0.1.3 Apr 16, 2021

#141 in Parser tooling

Download history 26/week @ 2022-11-29 69/week @ 2022-12-06 48/week @ 2022-12-13 53/week @ 2022-12-20 41/week @ 2022-12-27 8/week @ 2023-01-03 38/week @ 2023-01-10 28/week @ 2023-01-17 73/week @ 2023-01-24 78/week @ 2023-01-31 67/week @ 2023-02-07 66/week @ 2023-02-14 114/week @ 2023-02-21 22/week @ 2023-02-28 36/week @ 2023-03-07 27/week @ 2023-03-14

218 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

~1–1.5MB
~35K SLoC