Name: lunarity
Owner: Parity Technologies
Description: Lunarity - a Solidity parser in Rust
Created: 2017-12-05 03:03:56.0
Updated: 2018-03-25 02:19:48.0
Pushed: 2018-01-03 15:04:47.0
Size: 285
Language: Rust
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A high performance, correctness-oriented Solidity parser + other tools.
The produced AST is mostly grammar.txt compliant. The AST is statically typed to make sure that it is not possible to construct an AST representation of what would be illegal grammar.
It's really fast.
ing target/release/deps/second_price_auction-2b369ce54b97fb9f
ing 2 tests
parse_to_ast ... bench: 24,028 ns/iter (+/- 573) = 562 MB/s
tokenize ... bench: 15,037 ns/iter (+/- 1,405) = 898 MB/s
Neither the lexer nor the parser ever backtrack while reading bytes/tokens. The parser is using a paginated arena allocator to avoid heap allocation costs (or garbage collection costs, or anything else).
Feel free to rerun the benchmarks (requires nightly Rust, with rustup: rustup run nightly cargo bench
)
This crate is distributed under the terms of both the MIT license and the Apache License (Version 2.0). Choose whichever one works best for you.
See LICENSE-APACHE and LICENSE-MIT for details.