Avoid using asfix-anno-location and implode-asfix
In the upcoming version of Spoofax (the
new-term
branch), 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-pt
strategies to first create a parse tree and then implode it. It should use aparse
alternative instead to directly get the AST.WebDSL also uses
asfix-anno-location
to annotate the parse tree with location information. Instead, it should use theorigin-line
andorigin-column
strategies to add these annotations directly to the AST.Perhaps
Submitted by Lennart Kats on 1 February 2011 at 18:33parse-pt
+implode-asfix
can be efficiently supported in the future with some runtime tricks, butasfix-anno-location
will likely remain as is.
Issue Log
At this point calling
implode-asfix
in 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