eoc
eoc copied to clipboard
Command-line toolkit for parsing, compiling, transpiling, optimizing, linking, dataizing, and running EOLANG programs
EOLANG Command Line Took-Kit
First, you install npm and Java SE.
Then, you install eolang package:
npm install -g eolang
Then, you write a simple EO program in hello.eo file
in the current directory:
[args] > hello
QQ.io.stdout > @
"Hello, world!\n"
Then, you run it:
eoc dataize hello
That's it.
Commands
You can also do many other things with eoc commands
(the flow is explained in this blog post):
registerfinds necessary EO files and registers them in a JSON catalogassembleparses EO files into XMIR, optimizes them, and pulls foreign EO objectstranspileconverts XMIR to target programming language (Java by default)compileconverts target language sources to binarieslinkputs all binaries together into a single executable binarydataizedataizes a single object from the executable binarytestdataizes all visible unit tests
There are also commands that help manipulate with XMIR and EO sources (the list is not completed, while some of them are not implemented as of yet):
auditinspects all required packages and reports their statusforeigninspects all objects found in the program afterassemblestepsodggenerates SODG from XMIR, further rederable as XML or Dotphigenerates PHI files from XMIRunphigenerates XMIR files from PHI filesprintgenerates EO files from PHI files- ~~
translateconverts Java/C++/Python/etc. program to EO program~~ - ~~
demuremovescageandmemoryobjects~~ - ~~
dejumpremovesgotoobjects~~ - ~~
infersuggests object names where it's possible to infer them~~ - ~~
flattenmoves inner objects to upper level~~
This command line toolkit simply integrates other tools available in the @objectionary GitHub organization.
How to Contribute
First, run npm install. Then, run grunt. All tests should pass.
If you want to run a single test:
npm test -- test/test_mvnw.js
Make your changes and then make a pull request.