Hi Jonathan,

I'm glad to see you again in opensource word :)

IMHO I think if FMParser should be restarted, it should be support IDE
support. I mean:

 * support fault tolerant mode. A template can be not valid (because user
is typing some content in the editor) but it should continue to parse the
template.
 * incremental support (very hard but not required). When user is
typing some content in the editor, it should be really nice to take the
existing Template and update it with new content.

If FreeCC could provides thoses features (or at least the fault tolerant
mode), it will help the integration of Freemarker in an IDE.

Today all support for languages are managed with LSP
https://microsoft.github.io/language-server-protocol/ and if Freemarker
could provides a Freemarker Language Server in their JAR, it will help a
lot the integration of the Freemarker in any IDE (Eclipse, IJ, vscode,
Atom, Sublime, etc which supports LSP).

I had started something in https://github.com/angelozerr/lsp4e-freemarker

I suggest you read the great article
https://github.com/microsoft/tolerant-php-parser/blob/master/docs/HowItWorks.md#how-it-works
which
explains how MS have implemented their PHP parser with tolerant mode.

Have a nice day

Regard's Angelo

Le dim. 5 janv. 2020 à 17:46, Jon Revusky <[email protected]> a écrit :

> I am pleased to announce that, after a decade-long hiatus, FreeCC is
> back in active development. FreeCC began life in 2008 as a development
> fork of the well known JavaCC parser generator but has evolved into what
> really amounts to a ground-up rewrite.
>
> Here are, not in any particular order, the reasons that people who are
> interested in FreeMarker should find FreeCC quite interesting:
>
>  1.
>
>     FreeCC is the only parser generator that integrates with FreeMarker
>     by design. Via a simple configuration toggle, the nodes in the AST
>     (abstract syntax tree) that your generated parser creates implement
>     the core freemarker TemplateNodeModel API so that you can expose
>     your AST to a FreeMarker template and process or transform them
>     using a very natural syntax
>     <https://freemarker.apache.org/docs/xgui_declarative_basics.html>.
>
>  2.
>
>     FreeCC is the only parser generator that uses FreeMarker templates
>     to generate code. Thus, the output of the code generation is
>     configurable by editing FreeMarker templates. (I anticipate using
>     this to target other languages besides Java, but I first had to fix
>     up certain things, like more up-to-date support for Java itself!)
>
>  3.
>
>     FreeCC is the only parser generator (to my knowledge) that comes
>     with a grammar for FTL (FreeMarker template language) in its
>     examples directory. In fact, there are at least two FreeCC grammars
>     for FTL, since the trunk of the development of FreeMarker (in
>     pre-Apache times) that was meant to be 2.4 was built using FreeCC.
>     Also, I am pretty sure that one FreeMarker release (2.3.15) was
>     built using FreeCC. I switched the build on 2.3.x back to using
>     JavaCC for hyper-technical reasons outlined here
>     <
> http://freemarker.624813.n4.nabble.com/Switched-back-to-using-Javacc-to-build-FreeMarker-2-3-td627924.html
> >.
>     The more streamlined grammar in the FreeCC examples directory was
>     intended to be the newer grammar in FreeMarker 2.4.
>
>  4.
>
>     The above three points regarding the relationship between FreeCC and
>     FreeMarker should come as no surprise since the main author of
>     FreeCC and of FreeMarker (the core parsing/rendering engine
>     certainly) are the same person! (Moi.)
>
>  5.
>
>     This latest release of FreeCC includes a Java grammar that handles
>     most of the newer constructs in the Java language -- more
>     specifically /all/of the features of Java 8, including lambda
>     expresssions, as well as some of the constructs introduced after
>     Java 8. The The Java 8 grammar included in FreeCC is separately
>     usable in projects and FreeCC uses it via the INCLUDE mechanism
>     <https://github.com/revusky/freecc/wiki/The-INCLUDE-statement>.
>     (Note that there is no ability to include grammars within other
>     grammars in JavaCC.) In general, for a list of features that FreeCC
>     has that JavaCC lacks, see here
>     <
> https://github.com/revusky/freecc/wiki/Main-Differences-between-FreeCC-and-JavaCC
> >.
>
> Although FreeCC began its life as a sister project of FreeMarker and was
> written by the same person who wrote the core of the FreeMarker
> codebase, this mailing list is not the preferred venue to discuss
> FreeCC. I have recently set up a separate discussion forum for that
> purpose at https://discuss.parsers.org.
>
> The discussion forum there requires you to create an account and sign in
> (like they all do) but I don't think that is particularly onerous. The
> re-activated FreeCC project is very much in need of energetic
> collaborators, and anybody who knows FreeMarker well already has a
> leg-up in terms of getting going with FreeCC development. If you are
> interested, you can post on that discussion forum, or if you want, you
> can write me personally. Either of those options would be my preference
> over any replies on this mailing list.
>
> Best Regards and Greetings from Spain,
>
> Jonathan Revusky
>
>

Reply via email to