congo-cc / congo-parser-generator

The CongoCC Parser Generator, the Next Generation of JavaCC 21, which in turn was the next generation of JavaCC
https://discuss.congocc.org/
Other
36 stars 11 forks source link

Jtb changes #43

Closed adMartem closed 1 year ago

adMartem commented 1 year ago

Just checking where these stand w.r.t. the full tests. These changes are the latest of the JTB support for my COBOL parser rebased on main.

revusky commented 1 year ago

This whole situation where the Python and Csharp tests break so easily even when you're not working on that side is just completely frustrating to me. I guess I'm going to have to figure out how to tear this all apart and put it back together in a way that is less fragile. I guess....

revusky commented 1 year ago

Well, actually, come to think of it, the problem is clearly that the transpilation machinery that Vinay put in place cannot handle some of the code in code injections that you added. I think the way to handle the situation for now is to just comment out (for the purposes of the non-Java languages) the various problematic code injections. There is a preprocessor symbol that you can use for that, since the language generated is exposed via, like java or csharp or java. If you want some injected code to only be injected if you are generating Java, you can use: #if __java__ ... #endif so that it is only injected if you are generating Java. I actually added it for this very reason largely!

adMartem commented 1 year ago

Thanks, I didn't quite know where to look to solve this. I'll work on this using your suggestion. BTW, I rebased these changes (again) onto your recent ones, so they are, for now, on the tippy-top again. They seem to be very stable, w.r.t. the JTB functionality (i.e., I haven't had to do anything to them in quite a while). I'll condition the injections and try a new pull request draft.