javacc
« Back to VersTracker
Description:
Parser generator for use with Java applications
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: parser-generator java compiler development dsl
Install: brew install javacc
About:
JavaCC is a widely used parser generator that reads a grammar specification and generates Java source code to parse input according to that grammar. It enables developers to build robust parsers, compilers, and translators for custom languages or complex data formats. Its main value is simplifying the complex task of lexical analysis and syntax parsing by automating the code generation process.
Key Features:
  • Generates pure Java code for easy integration
  • Supports multi-language grammars (Java, C#, Python, etc.)
  • Top-down parsing approach allows for intuitive grammar design
  • Integrated with JJTree to build Abstract Syntax Trees (ASTs)
  • Lexical analysis with token manager and lookahead specifications
Use Cases:
  • Building custom Domain-Specific Languages (DSLs)
  • Parsing complex configuration or data files (e.g., JSON, XML variants)
  • Creating compilers or interpreters for new programming languages
  • Processing and transforming structured text data
Alternatives:
  • ANTLR – More powerful LL(*) parser but with a steeper learning curve and different runtime dependencies
  • Flex/Bison – Standard for C/C++ but requires a C toolchain and is less integrated with the Java ecosystem
  • CUP – LALR parser generator for Java, generally more compact but with less readable error messages
Version History
Detected Version Rev Change Commit
Sep 14, 2024 9:29am 0 VERSION_BUMP 9cbb2030