3 releases (breaking)
Uses new Rust 2024
new 0.3.0 | Apr 17, 2025 |
---|---|
0.2.0 | Apr 9, 2025 |
0.1.0 | Mar 7, 2025 |
#534 in Text processing
157 downloads per month
59KB
988 lines
ADA_ANALYZER.rs
A library for analyzing Ada code to check if coding standards are respected in Rust.
Using this library, you can parse Ada code and programmatically verify its adherence to defined coding standards. This helps in ensuring code quality, consistency, and compliance within Ada projects.
Getting Started
ADA_Standards is available on crates.io. It is recommended to look there for the newest released version, as well as links to the newest builds of the docs.
At the point of the last update of this README, the latest published version could be used like this:
Add the following dependency to your Cargo manifest...
[dependencies]
ada-analyzer = "0.2.0"
...and see the docs for how to use it.
Example
use ADA_Standards::{AST, NodeData, Expression, ConditionExpr, UnaryExpression, BinaryExpression, MembershipExpression, Unaries, Binaries, Memberships};
use std::env;
let args: Vec<String> = env::args().collect();
let file_path = &args[1];
let code_text = fs::read_to_string(file_path)?;
let cleaned_code = AST::clean_code(code_text);
let mut node_data_vec: Vec<NodeData> = Vec::new();
node_data_vec =extract_statement_nodes(cleaned_code,node_data_vec);
ast = AST::new(node_data_vec);
ast.build();
ast.print_tree();
let conditions = AST::parse_condition_expression(cleaned_code);
License
Licensed under
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
Contribution
You are free to contribute by forking and creating a pull request !
Author
My name is Francesco Abate, I'm a computer engineer with experience in the fields of software and embedded programming, cybersecurity and AI, I am currently working on my mastery of the Rust language and seeking a job in that field!
Feel free to visit my website: Francesco Abate
You can also contact me @ francesco1.abate@yahoo.com or on linkedin
Dependencies
~2.6–3.5MB
~63K SLoC