vsajip
I just tried to build the parsers for Python and C#. Python built fine, i.e.
java -jar congocc-full.jar -lang python Lua.ccc
I haven't tested that it actually works! But I would bet a substantial sum that it does. (Ever the optimist!)
With C#, on the other hand, it doesn't work. We have some failure in the translateLexerInjections
method, looks like this:
freemarker.template.TemplateModelException: Method public java.lang.String
org.congocc.codegen.TemplateGlobals.translateLexerInjections(boolean) threw an exception when invoked
...snip...
Caused by: java.lang.UnsupportedOperationException
at org.congocc.codegen.csharp.CSharpTranslator.internalTranslateStatement(CSharpTranslator.java:819)
at org.congocc.codegen.csharp.CSharpTranslator.internalTranslateStatement(CSharpTranslator.java:480)
at org.congocc.codegen.csharp.CSharpTranslator.internalTranslateStatement(CSharpTranslator.java:706)
at org.congocc.codegen.Translator.translateStatement(Translator.java:1573)
at org.congocc.codegen.TemplateGlobals.translateInjections(TemplateGlobals.java:343)
at org.congocc.codegen.TemplateGlobals.translateLexerInjections(TemplateGlobals.java:442)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:741)
at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:55)
... 15 more
I've noticed that the failure to translate injections can make the tool quite fragile in terms of generating parsers in either Python or C#. I think transpilation is a good thing to have, since a lot of simple stuff can actually be transpiled pretty reliably. However, we also really do need injection in the target languages working. The big refactoring that I reported on a little while ago actually should get us most of the way there. That should be coming very soon.
I really feel that, aside from getting INJECT working for non-Java targets, we also to have at least some skeletal reference manual. I think that's going to be coming pretty soon. Generally speaking, I feel quite energized/motivated to get the Congo branding fullly done and have something that looks more polished.
As of the policy on "official releases", well, I'm thinking that with Congo, we will just give the people what they want. So my idea is that we'll just roll up a release every month, a snapshot of the thing at that point in time, label it and put it up there... where??? Well, I guess in the various typical places. Maybe we just roll up a release with the code, the binary, the manual... And we just do it at the beginning of every month, like paying the rent. We should have an automated script that makes the whole thing basically painless. Heck, it could be a chron job at the beginning of every month maybe. Well, I guess it can't be that automated because we do need to hand-write some release notes of some sort, like we did this, that or the other thing.
But, generally speaking, we really need to get the word out much more.
By the way, I installed this wiki app called Bookstack that some people definitely like very much. I sent you an invite to join. That is at https://bookstack.congocc.org/ but actually the top-level also redirects there. https://congocc.org/
By the way, if anybody wants to try it out, you don't even have to create an account. There is a "public playground" that is editable. So anybody can get on there and write a page. Though I think if one intends to do much editing on there, one should have an account and I'll give anybody an account who asks for one.
I'm not at all committed to Bookstack, mind you, but it does seem like a pretty slick app. Also, you can take a "book" and generate a PDF from it. That feature got me thinking that this could be a solution to our documentation problems/needs. (Not sure...) I started using the wiki built into Github, thinking I was just being silly installing my own web apps. I had a Dokuwiki instance set up earlier. (Still do.) But I think that Gollum thing that the built-in github wiki uses is kind of limited. It seems to have just about no concept of hierarchy, while Bookstack has "shelves", "books", and "chapters". Well, the Gollum thing does have its strong points, like the ability to edit the content in all sorts of formats -- Markdown, Asciidoc, rst I think as well. Also, its integration with git. I think Bookstack basically just supports Markdown and that's it, though there may be some plugins that allow other formats. But you can convert from Markdown to other formats pretty easily using pandoc.
Of course, there are a lot of possibilities for webapps for collaborative editing and so on, but the hard truth is that whatever tool stack you use, you still have to buckle down and write the material! And actually, it's not that there is no material. I mean, the wordpress blog (that, by the way, I moved from javacc.com to parsers.org) does have 49 articles on it (I just counted) some of which are quite in-depth. And the dokuwiki instance has maybe 20 pages on it. Between the two, there is quite a bit of information, but it's not well organized like a reference manual, no. It was just because I did things, like the streamlined syntax and so on, and felt I had to document them somewhere, so I wrote some blog article.
So, those are the two main things -- getting INJECT working, and really starting to have some reference docs finally. In writing the Lua grammar, I became (painfully) aware of certain glitches that do need to be addressed, but I'll write about that later.
But, anyway, it would be nice if you could get the Python and CSharp parsers for Lua working, probably add that as a testcase, and then I will try to scream about it on the appropriate venues. I did just subscribe to the lua-users mailing list, for example.