ADA_Standards
A library for analyzing Ada code to check if coding standards are respected in Rust.
ADA_Standards is a Rust library designed for lightweight parsing and analysis of Ada source code. It uses regular expressions to extract structural information (packages, procedures, loops, etc.) and builds an Abstract Syntax Tree (AST) using indextree. This allows developers to programmatically inspect Ada code, enforce coding standards, and identify potential issues.
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...
[]
= "1.0.1"
...and see the docs for how to use it.
Example
use ;
use fs;
use Path;
use env;
let args: = args.collect;
let file_path = &args;
let code_text = read_to_string?;
let cleaned_code = ASTclean_code;
let mut node_data_vec: = Vecnew;
node_data_vec =extract_statement_nodes;
ast = ASTnew;
ast.build;
ast.print_tree;
let conditions = ASTparse_condition_expression;
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