Skip to content

Axel-NCHO/CplusplusCodeAnalyser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C++ code analysis

This program uses the library Tree-sitter to get the lexical structure of a C++
code file as a tree. It then outputs it in a JSON file with simplified nodes that only contains
the kind of node, its name and its children with the same structure. The nodes' simplification
is done recursively on the tree.

How to run it

Ensure you have the rust compiler and cargo installed.

After that, go to the project's root directory "CPlusPlusParser" and run the program with cargo.
Here are the arguments :

Name Long name Description Default value
c cpp Path to a C++ code file
o output Path to the output file without extension code_structure

Command examples

cargo run
cargo run -- -c <cpp_file_name> -o <output_file_name>
cargo run -- --cpp <cpp_file_name>

About

A tool that output the lexical structure of a C++ piece of code using Tree-Sitter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages