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
I recently introduced a new @sdeverywhere/parse package in #405 that adds a new format-agnostic AST structure and a new parsing layer that insulates the @sdeverywhere/compile package from antlr4-vensim.
The next step (step 2 of the transition described in that issue) is to add new alternate implementations of the read and code gen phases of the compiler using the new parse package instead of depending directly on antlr4-vensim.
This work is now mostly complete (I've been working on it in a side branch for a while). The goal was for the new implementations to be as close to 100% compatible (in terms of behavior and generated code) with the old implementations, and that goal has mostly been met (there are only a few slight differences in whitespace and use of parentheses).
My plan is to introduce the new code alongside the old code, with the new code disabled for now, but allow it to be enabled by setting a temporary environment variable (SDE_NONPUBLIC_USE_NEW_PARSE=1).
Once we are satisfied with the new code, I will file a third issue/PR to make the new code the default and remove the old implementation.
Here's the mapping of old source files to new ones in the compile package:
Preprocess phase + shared parse reader code:
old:
preprocessor.js
model-reader.js
parser.js
new:
(handled by parse package)
Read dimensions (aka subscript ranges) phase:
old:
subscript-range-reader.js
new:
read-subscripts.js (will be renamed read-dimensions.js or similar in a later branch)
Read variables phase:
old:
variable-reader.js
new:
read-variables.js
Read equations phase:
old:
equation-reader.js
new:
read-equations.js
read-equation-fn-*.js
Reduce equations phase:
old:
expr-reader.js
new:
reduce-variables.js (with support from parse package)
Generate code phase:
old:
equation-gen.js
loop-index-vars.js
model-lhs-reader.js
var-name-reader.js
new:
gen-equation.js (entrypoint that depends on the following implementation files)
direct-data-helpers.js
gen-const-list.js
gen-direct-const.js
gen-expr.js
gen-lookup-*.js
The text was updated successfully, but these errors were encountered:
I recently introduced a new
@sdeverywhere/parse
package in #405 that adds a new format-agnostic AST structure and a new parsing layer that insulates the@sdeverywhere/compile
package fromantlr4-vensim
.The next step (step 2 of the transition described in that issue) is to add new alternate implementations of the read and code gen phases of the compiler using the new
parse
package instead of depending directly onantlr4-vensim
.This work is now mostly complete (I've been working on it in a side branch for a while). The goal was for the new implementations to be as close to 100% compatible (in terms of behavior and generated code) with the old implementations, and that goal has mostly been met (there are only a few slight differences in whitespace and use of parentheses).
My plan is to introduce the new code alongside the old code, with the new code disabled for now, but allow it to be enabled by setting a temporary environment variable (
SDE_NONPUBLIC_USE_NEW_PARSE=1
).Once we are satisfied with the new code, I will file a third issue/PR to make the new code the default and remove the old implementation.
Here's the mapping of old source files to new ones in the
compile
package:Preprocess phase + shared parse reader code:
parse
package)Read dimensions (aka subscript ranges) phase:
Read variables phase:
Read equations phase:
Reduce equations phase:
parse
package)Generate code phase:
The text was updated successfully, but these errors were encountered: