HiLexed can now compile semantic actions at any time (I could even allow these to change between invokations) and invoke as needed. Currently, only java is supported for these actions, but I am keeping my options open by making the decision on compilation strategy in a configuration file. Individual user projects should be able to override the default, but initially I will just create a working system.
Recursion is probably the final big problem to solve for this version. That is, I have parts of the problem solved, but the many different forms do not fit well together. The plan is to emulate the results of LR-parsing by annotating recursive segments with information on its form of recursion and by keeping track of recursive insertion points into the resulting list. Yes, results will be serialized since different languages have different priority for the same operators. I believe Smalltalk and NewSpeak are strictly left-to-right, whilst the wast majority of languages use standard arithmetic priority.
Upon entering a recursive segment selection, some segments are allowed and some disallowed. Upon exiting a recursive segment there is a certain set of allowed follow segments and for some even an exit segment. What is allowed differ depending on the annotations made earlier. Some segments are multi-recursive, directly or indirectly so the different rules have to be combined. Very complex but I believe solvable for deterministic grammars.