A library that parses Delphi source code to generate abstract syntax trees for analysis and tooling.
DelphiAST is an abstract syntax tree builder specifically designed for the Delphi programming language. It parses Delphi source code files and generates structured tree representations that developers can use for code analysis, refactoring tools, and IDE extensions. The library solves the problem of programmatically understanding Delphi code structure without requiring full compilation.
Delphi and FreePascal developers building code analysis tools, IDE plugins, refactoring utilities, or static analysis tools for Pascal-based codebases.
Developers choose DelphiAST because it provides a specialized, reliable parser for Delphi syntax that's compatible with both commercial Delphi and open-source FreePascal/Lazarus environments, offering detailed AST generation without the overhead of full compilation or symbol table resolution.
Abstract syntax tree builder for Delphi
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Specialized for Delphi syntax, handling core language constructs as evidenced by the detailed XML output with node types like METHOD and ASSIGN in the README sample.
Works with both Delphi and FreePascal/Lazarus, making it versatile for developers in different Pascal environments, as stated in the key features.
Includes line numbers and column positions in the AST, enabling precise code analysis for tools like refactoring utilities, as shown in the XML attributes like 'line' and 'col'.
Generates hierarchical XML representations, facilitating easy parsing and integration with other tools, demonstrated in the clear sample outcome with nested tags.
As admitted in the README ('without a symbol table'), it lacks semantic analysis, limiting its use for type checking or understanding variable scopes.
Processes only one unit at a time, making it inadequate for tools that need to analyze entire projects or dependencies between units, as highlighted in the description.
XML output can be large and inefficient for very large codebases, and the library does not natively support alternative formats like JSON, which might require additional processing.