1 unstable release

0.8.0 Jul 27, 2024

#918 in Programming languages

Download history 22/week @ 2024-11-13 12/week @ 2024-11-20 7/week @ 2024-11-27 11/week @ 2024-12-04 12/week @ 2024-12-11 5/week @ 2024-12-18 7/week @ 2025-01-08 11/week @ 2025-01-29 12/week @ 2025-02-05 15/week @ 2025-02-12 13/week @ 2025-02-19 12/week @ 2025-02-26

53 downloads per month
Used in 2 crates

MIT/Apache

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:

Dependencies

~0.4–0.8MB
~19K SLoC