#Modelica in JavaScript – MoiJS
Moijs provides a Modelica parser in JavaScript. This enables the processing of Modelica definitions in a Web browser. Moijs can also run server-side or on the command line using a tool like Node.js.
The Modelica parser moparser.js
is generated with Jison out of the grammar in moparser.jison
and the lexical specification in molexer.jisonlex
.
##CodeMirror
A Modelica editing mode for CodeMirror is generated from molexer.jison
and molexer.jisonlex
.
##Examples
The moijs project pages show running examples.
###Running in a Web browser
moparse.html
– HTML page using CodeMirror and invokingmoparser.js
###Running in Node.js
moparse.js
– invokemoparser.js
for console input or for files of a Modelica packagemolex.js
– tokenize console input