Semantic Parser
The parser module is responsible for analyzing raw source code and constructing a highly granular semantic relationship graph.
Role
Traditional line-based tools cannot accurately capture the nuances of an Object-Oriented codebase. By leveraging Tree-sitter, the parser builds an Abstract Syntax Tree (AST) that natively understands the target language (currently Java).
It operates in two passes:
- Pass 1 (Discovery): Scans all files and recursively identifies
classes,interfaces, andmethods. - Pass 2 (Linking): Scans the AST for method invocations. Whenever
Method Ais seen callingMethod B, it searches the index and creates aCALLSedge between them.
Outputs
The tool generates a raw graph.json artifact containing thousands of Nodes and Edges. Optionally, it can export this structured data into a Graphviz .dot file for low-level visual validation.