A library for parsing and semantic analysis of Ada code, designed as a building block for IDE integration and static analysis tools.
Libadalang is a library for parsing and performing semantic analysis of Ada code. It provides syntactic analysis with error recovery and semantic queries like reference and type resolution, serving as a building block for tools such as IDEs and static analyzers. The library is designed to handle both correct and incorrect code gracefully, enabling robust tooling even in the presence of errors.
Tool developers and engineers building IDE integrations, static analysis tools, code navigation utilities, or other language-aware applications for Ada. It is also suitable for researchers or developers working on compiler testing or language tooling.
Developers choose Libadalang for its error-tolerant design, incremental processing capabilities, and multi-language bindings, which offer greater flexibility and performance compared to traditional Ada analysis tools like ASIS, especially for syntax-focused or IDE-oriented applications.
Ada semantic analysis library.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Produces syntax trees even for incorrect code with error recovery, enabling tools like pretty-printers to work on semantically flawed sources, as highlighted in the comparison with ASIS.
Processes semantic information only on-demand for specific code portions, improving efficiency for IDEs and tools handling partial or evolving code, as described in the philosophy section.
Offers bindings in Ada, Python, C, and experimental OCaml, facilitating integration across environments and rapid prototyping with the Python playground, as noted in the features.
Handles efficient reparsing and cross-referencing for dependent sources, making it suitable for dynamic code changes in IDE engines, as mentioned in the key features.
Lacks full Ada language legality checks, requiring users to rely on external compilers like GNAT for complete semantic analysis, as admitted in the README.
Allows breaking changes in the main branch, forcing reliance on stable branches like 19.1 for production use, which complicates long-term integration.
Building from source involves installing dependencies and generating code via Langkit, making setup more involved compared to using the Alire crate for releases.