ADA_Standards 1.1.0

A library to help you handle checks on your ADA projects, especially good to build scripts to check coding standards conformity.
Documentation

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.

Rust Latest version Documentation License

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_Standards = "1.1.0" 

...and see the docs for how to use it.

Example

use ADA_Standards::{AST, NodeData, Expression, ConditionExpr, UnaryExpression, BinaryExpression, MembershipExpression, Unaries, Binaries, Memberships, ASTError};
use std::fs;
use std::path::Path;
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

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