ANTLR Parser Generator Tool
github.com
2
Leaving SiteNav
External Link Disclaimer
You are about to visit github.com. This website is not operated by us. We are not responsible for its content or privacy practices.
About this website
ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files. Created by Terence Parr in 1989 and now at version 4.x, ANTLR is widely used in academia and industry for building languages, tools, and frameworks. Key features: generates LL(*) parsers from grammar descriptions, supporting left-recursion elimination so developers can write natural left-recursive grammar rules. Adaptive LL(*) analysis that dynamically resolves grammar decisions at runtime, combining the simplicity of LL parsing with the power of more complex parser classes. Target language code generation for Java, C#, Python, JavaScript, TypeScript, Go, C++, Swift, PHP, and Dart, enabling parser reuse across technology stacks. Lexer and parser separation with lexer rules (tokens) and parser rules defined in the same grammar file. Tree construction and traversal via automatically generated parse trees and built-in tree walker classes for visitor and listener patterns. Semantic predicates and actions for embedding target-language code in grammar rules for context-sensitive parsing and custom logic. Error handling and recovery with configurable error strategies for robust parsing of malformed input. Token channels (e.g., HIDDEN, WHITESPACE) for filtering tokens like comments and whitespace. Unicode and multi-byte character support in lexer rules. Grammar inheritance for composing grammars and sharing rules. Grammar lexer modes for context-sensitive lexing (e.g., string interpolation, template languages). ANTLR Lab web-based IDE for testing grammars interactively. TestRig tool (grun) for debugging parsers with visual parse tree display. Used in Twitter search, Hadoop Hive, Presto, Elasticsearch, Salesforce Apex, and hundreds of languages and DSLs.
Statistics
2
Views
0
Clicks
0
Like
0
Dislike