Brasm is one more compiler.
- Clone the repo
git clone https://github.com/fabrv/js-brasm.git
cd js-brasm
- Install dependencies
npm i
- Start program
node -r esm index.js <filename> [options]
Options:
Option | Description |
---|---|
--o <output file name> |
Sets the file where the compiler will output. |
--target <stage> |
Runs up to a stages can be scan , parse , ast , semantic , irt , codegen . |
--opt <optimzation stage> |
Sets the stage of optimization; constant , algebraic . |
Or just run npm start
for a setup wizard.
regex/tokensRegex.json
, includes all the tokens in Regexregex/grammar.json
, includes the grammar rules