meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
key_differences [2020/02/09 22:57] – revusky | key_differences [2023/07/08 07:25] (current) – revusky | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Key Differences between | + | ====== Key Differences between |
- | From the end user's point of view, the most important difference is that JavaCC 21 has undergone quite a bit of re-design to make it much more usable "out of the box" than the legacy JavaCC. One of the most basic (and obvious) things that JavaCC 21 provides is the [[INCLUDE]] statement. With legacy JavaCC, the only way to reuse commonly used constructs across different grammars was via the classic copy-paste // | + | From the end user's point of view, the most important difference is that CongoCC |
- | It is quite clear that building | + | There has been an effort to clean up the set of configuration options. In general, the philosophy of JavaCC |
- | With JavaCC | + | It seems quite clear that building an AST [[Abstract Syntax Tree]] is the most typical use case for this sort of tool. So, there has been a heavy focus on making the whole thing much simpler. In legacy |
+ | |||
+ | With Congo, the JJTree pre-processor functionality is merged into the JavaCC tool and, even in the absence of special tree-building annotations (though they are still supported) | ||
===== Tree Building Enhancements ===== | ===== Tree Building Enhancements ===== | ||
- | Aside from being the out-of-the-box default, tree building has been enhanced considerably compared to what JJTree offers. In particular, the generated | + | Aside from being the out-of-the-box default, tree building has been enhanced considerably compared to what JJTree offers. In particular, the generated |
+ | |||
+ | ===== Code Injection ===== | ||
+ | |||
+ | CongoCC introduces a new statement called **INJECT** that allows you to " | ||
+ | |||
+ | ===== Streamlined Syntax ===== | ||
+ | |||
+ | CongoCC incorporates an [[new syntax summary|alternative streamlined syntax]] that should be quite a bit more pleasant to write and easier to read. | ||
+ | |||
+ | The difference is frequently dramatic. Where the legacy tool required you to write things like: | ||
+ | |||
+ | < | ||
+ | LOOKAHEAD (Foo() Bar()) Foo() Bar() Baz() | ||
+ | </ | ||
+ | |||
+ | in CongoCC you could express the above as: | ||
+ | |||
+ | < | ||
+ | Foo Bar =>|| Baz | ||
+ | </ | ||
+ | |||
+ | ===== More powerful lookahead ===== | ||
+ | |||
+ | Perhaps most importantly, | ||
+ | |||
+ | The '' | ||
+ | The new [[up to here]] construct should eliminate the need to write more verbose and error-prone numerical and syntactic lookahead constructs. | ||
- | < | ||
- | * The tree building functionality has been enhanced considerably compared to what was available in JJTree. | ||
- | * There has been an effort to clean up the set of configuration options. In general, the philosophy of FreeCC is to make configuration options largely unnecessary, | ||
- | * FreeCC introduces a new statement called `INJECT` that allows you to " | ||
- | * FreeCC introduced a new INCLUDE statement which allows you to break your grammar into more than one physical file. See [The Include Statement](https:// | + | ===== CongoCC is being actively developed ===== |
- | * As of the latest 0.9.4 release (2019-12-28) FreeCC supports | + | CongoCC now supports |
- | </ |