Skip to content
This repository has been archived by the owner on Jun 10, 2023. It is now read-only.

A compiler which takes an .arnoldc file and output a javascript file

Notifications You must be signed in to change notification settings

SiegfriedEhret/arnoldc-to-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

arnoldc-to-js

arnoldc-to-js is a compiler from ArnoldC language to Javascript.

You can read about the original project here : https://github.com/lhartikk/ArnoldC

How to use it

Just use the command node main PATH_TO_YOUR_FILE.arnoldc and it will output a javascript file next to the original file.

Then you can execute your generated file with NodeJS like a normal file.

How does it works ?

It uses Jison to parse the file and to produce a simple AST of the code.

Then, it uses functions defined in the file Transpiler.js to produce the corresponding Javascript code.

If you want to change the grammar rules in arnoldc.jison, don't forget to generate the parser afterwards !

First, you need to have Jison installed globally (by running the command npm install -g jison) and then to produce the parser : jison arnoldc.jison

Not supported yet

  • Non void methods
  • Return statement
  • Assign variable from method call
  • Read integer

It's coming soon !

About

A compiler which takes an .arnoldc file and output a javascript file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published