29 April 2022: Nelson Chamberlain
The CongoCC project began in early 2022 as a rebranding of the JavaCC 21 project, which itself was a forking and nearly 100% rewrite of the earlier JavaCC project. As part of the rebranding, the CC suffix now means "code-generation components" instead of the more traditional meaning of "compiler compiler". JavaCC, and it's various forks and incarnations, have always generated the code for parsers but not for compilers. The parsers that were generated could be extended by knowledgeable users to generate the code to create a compiler but this capability was NOT a basic or core capability of JavaCC.
Here are a few highlights in the history of JavaCC, FreeCC, and CongoCC:
- 1996: JavaCC developed and released internally at Sun Microsystems and at a startup company Metamata. Based on Java v1.
- 1997: JJTree added to JavaCC codebase, possibly by a different person or team than worked on the original JavaCC
- 1998: JavaCC acquired by Webgain but was still available for free download
- 2001: Webgain falls victim to 2001 dot-com crash and JavaCC becomes an asset of Sun Microsystems again
- 2003: Sun Microsystems releases JavaCC as open source.
- 2008: JavaCC was forked as the FreeCC project. The FreeMarker template engine, also written in Java, was incorporated into the project at this time to leverage the power of a templating engine to simplify and amplify the code generation capabilities of FreeCC.
- 2009 - 2019: Development hiatus
- 2019: Development resumes, now rebranded as JavaCC 21. Codebase is incrementally refactored and rewritten until almost all source code has been replaced. Changes and improvements include:
- Streamlined grammar syntax that removed a lot of empty punctuation marks
- Include statement that allows a large grammar to be broken up into multiple physical files
- Inject statements in grammar files allow Java code to be added to any generated file. Inject statements can be added to grammar file close to where their relevant productions
- Preprocessor that implements #define/#undef/#if/#elif/#else/#endif in same way as C# preprocessor
- AST Tree is normally generated instead of requiring a separate tree-generating step, eliminating need for editing of generated files. Tree building can be turned off if desired
- Contextual predicates provide a way of checking whether we are at a given point in a parse
- Improved lookahead capabilies available in new SCAN keyword, including the up-to-here marker =>||
- Lookbehind capabilities
- Nested syntactic lookaheads have been fixed
- Fault-tolerant parsing that incorporates heuristics for building the AST into the parser
- ATTEMPT/RECOVER statement to replace try/catch blocks to produce more meaningful fallback or recovery actions when the attempt fails.
- Python 3.10 grammar/parser available for your own projects
- C# grammar/parser available for your own projects
- 2022: JavaCC 21 rebranded as CongoCC