Semantic is a Haskell-based library and command-line tool designed for polyglot source code analysis. It functions as a static program analysis framework and a polyglot abstract syntax tree parser that converts multiple programming languages into structured syntax trees based on grammar definitions.
The main features of github/semantic are: Semantic Code Analyzers, Static Analysis Frameworks, Code Symbol Extractors, Code Version Comparisons, Scope-Aware Graphs, Lexical Scope Analysis, Symbol Indexing, Intermediate Representation Translation.
Open-source alternatives to github/semantic include: chai2010/go-ast-book — go-ast-book is a collection of educational and technical resources focused on abstract syntax tree analysis, compiler… dtolnay/syn — syn is a Rust syntax tree parser and token stream converter. It serves as a toolkit for procedural macro development,… typestrong/typedoc — TypeDoc is a documentation generator and AST analyzer that transforms TypeScript source code and comments into… aldanial/cloc — cloc is a codebase metrics tool and multi-language code analyzer designed to count blank lines, comment lines, and… universal-ctags/ctags — Universal Ctags is a multi-language symbol indexer and regex-based parsing engine used to extract and catalog… alibaba/p3c — p3c is a Java static analysis tool and code quality linter designed to enforce professional coding guidelines and…
go-ast-book is a collection of educational and technical resources focused on abstract syntax tree analysis, compiler development, and static code verification. It provides guides and manuals for parsing, traversing, and analyzing Go source code to extract semantic meaning. The project serves as a reference for building compiler frontends, covering the translation of high-level code into intermediate representations and single static assignment forms. It also provides instructions for using these techniques to develop language tooling and perform static code analysis. The resources cover a b
syn is a Rust syntax tree parser and token stream converter. It serves as a toolkit for procedural macro development, providing a framework to parse Rust source code into structured syntax trees for analysis and transformation. The project enables the manipulation of Rust abstract syntax trees through specialized visitor and folder patterns for traversing and mutating nodes. It provides a bidirectional mapping that allows developers to convert token streams into structured trees and print those trees back into tokens for code generation. The library covers a broad range of syntax analysis ca
cloc is a codebase metrics tool and multi-language code analyzer designed to count blank lines, comment lines, and physical lines of code. It serves as a source code line counter and report generator that identifies file types to calculate source volume across a wide variety of programming languages. The tool distinguishes itself by providing codebase version comparison to measure relative changes in source and comment lines between two versions of a directory or archive. It also supports the definition of custom languages and the extension of language recognition by loading custom comment fi
TypeDoc is a documentation generator and AST analyzer that transforms TypeScript source code and comments into structured API reference websites or data files. It functions as a static site generator that converts code symbols into a searchable web interface. The project is an extensible framework, allowing users to modify the documentation process and generator logic through a programmable plugin system and custom themes. Its capabilities include API reference generation, source code parsing, and documentation coverage validation to ensure exported members are properly described. It support