You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Semi-inspired by the NoWa presentation. In the future numerous rewrite features for WAGon may be written. Not everyone wants every rewrite. Perhaps people only want the "import" rewrite but not the "ebnf" rewrite. It would be nice to allow people to easily specify which rewrites they want.
Current idea: have a trait Rewrite which takes a Wag and returns a Wag. People can implement it in whatever way they desire. Then, have a function rewrite which takes a list of dynamic Rewrite objects and simply applies them one-by-one to the Wag.
Not super efficient though. It would be nice to have some sort of visitor pattern wherein it first does all the rewrites on the Wag level, then on the Rule level etc. Don't know if that's actually feasible though. What if rewrites influence things further up in the tree?
The text was updated successfully, but these errors were encountered:
Semi-inspired by the NoWa presentation. In the future numerous rewrite features for WAGon may be written. Not everyone wants every rewrite. Perhaps people only want the "import" rewrite but not the "ebnf" rewrite. It would be nice to allow people to easily specify which rewrites they want.
Current idea: have a trait
Rewrite
which takes aWag
and returns aWag
. People can implement it in whatever way they desire. Then, have a functionrewrite
which takes a list of dynamicRewrite
objects and simply applies them one-by-one to theWag
.Not super efficient though. It would be nice to have some sort of visitor pattern wherein it first does all the rewrites on the
Wag
level, then on theRule
level etc. Don't know if that's actually feasible though. What if rewrites influence things further up in the tree?The text was updated successfully, but these errors were encountered: