#tree #solidity #syntax-tree #ast #parse-tree #compiler #ast-parser

bulloak-syntax

A Solidity test generator based on the Branching Tree Technique

1 unstable release

0.8.0 Jul 27, 2024

#339 in Programming languages

38 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–1MB
~21K SLoC