Avoid using asfix-anno-location and implode-asfix
In the upcoming version of Spoofax (the
new-termbranch), JSGLR can directly create abstract syntax trees, avoiding the (significant) overhead of creating parse trees with character branches and then imploding them.To make use of this in WebDSL, two things must change:
WebDSL still uses one of the
parse-ptstrategies to first create a parse tree and then implode it. It should use aparsealternative instead to directly get the AST.WebDSL also uses
asfix-anno-locationto annotate the parse tree with location information. Instead, it should use theorigin-lineandorigin-columnstrategies to add these annotations directly to the AST.Perhaps
Submitted by Lennart Kats on 1 February 2011 at 18:33parse-pt+implode-asfixcan be efficiently supported in the future with some runtime tricks, butasfix-anno-locationwill likely remain as is.
Issue Log
At this point calling
implode-asfixin 0.6.1 uses the Stratego implementation of the imploder, which doesn’t support origin tracking or position information. Another reason not to use it anymore;)Just do something liketopdown(!<id>{At(filename, <origin-line>, <origin-column>)})to get the annotations.
Note that WebDSL seems to be incompatible with Spoofax 0.6.1 at this point because of this issue.
fixed in the editor however since , are not available in the compiler it is hard refactor it there
Log in to post comments