Skip to content

berli888/moijs

 
 

Repository files navigation

#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 invoking moparser.js

###Running in Node.js

  • moparse.js – invoke moparser.js for console input or for files of a Modelica package
  • molex.js – tokenize console input

###Generation of moparser.js

npx jison moparser.jison molexer.jisonlex -p lr

About

Modelica in JavaScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Yacc 95.4%
  • Lex 4.6%