1 unstable release
0.8.0 | Jul 27, 2024 |
---|
#334 in Programming languages
43 downloads per month
Used in 2 crates
96KB
2K
SLoC
bulloak-syntax
Overview
bulloak-syntax
is a Rust crate that provides a syntax parser for converting tree-like structures in string form into Abstract Syntax Trees (ASTs). It also includes a semantic analyzer for further processing of the parsed structures.
Features
- Parse strings containing tree-like structures into ASTs
- Tokenize input strings
- Perform semantic analysis on parsed ASTs
- Support for parsing both single and multiple trees
- Error handling with custom
FrontendError
type
Usage
To use bulloak-syntax in your project, add it to your Cargo.toml
:
[dependencies]
bulloak-syntax = "0.1.0" # Replace with the actual version
And then parse the input:
use bulloak_syntax::parse;
fn main() -> anyhow::Result<()> {
let input = "your tree-like structure here";
let asts = parse(input)?;
// Process the ASTs as needed
for ast in asts {
// ...
}
Ok(())
}
License
This project is licensed under either of:
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0).
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT).
Dependencies
~0.4–0.9MB
~20K SLoC