Skip to content

Command-line toolkit for parsing, compiling, transpiling, optimizing, linking, dataizing, and running EOLANG programs

License

Notifications You must be signed in to change notification settings

objectionary/eoc

This branch is 1 commit ahead of, 3 commits behind master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b0acc6c · Jan 31, 2025
Jan 31, 2025
Jan 23, 2025
Jan 23, 2025
Jan 31, 2025
Jan 23, 2025
Jan 23, 2025
Jan 31, 2025
May 13, 2022
Jan 31, 2025
May 31, 2024
May 13, 2022
Jan 23, 2025
Jan 23, 2025
Jun 20, 2022
Jan 23, 2025
Jan 23, 2025
Dec 17, 2024
Dec 23, 2024
Dec 23, 2024
Jan 31, 2025
Jan 31, 2025
May 28, 2023

Repository files navigation

EOLANG Command Line Tool-Kit

EO principles respected here We recommend IntelliJ IDEA

grunt node-current PDD status Hits-of-Code License

This is a command-line tool-kit for EO programming languages, allowing you to compile EO programs, test, dataize, and check for errors.

First, you install npm and Java SE.

Then, you install eolang package:

npm install -g eolang@0.28.0

Then, you write a simple EO program in hello.eo file in the current directory:

# My first object in EO!
[args] > hello
  QQ.io.stdout > @
    "Hello, world!\n"

Then, you run it:

eoc --easy dataize hello

That's it.

Commands

You can also do many other things with eoc commands (the flow is explained in this blog post):

  • register finds necessary .eo files and registers them in a JSON catalog
  • assemble parses .eo files into .xmir, optimizes them, and pulls foreign EO objects
  • transpile converts .xmir files to the target programming language (Java by default)
  • compile converts target language sources (e.g., .java) to binaries (e.g., .class)
  • link puts all binaries together into a single executable binary
  • dataize dataizes a single object from the executable binary
  • test dataizes all visible unit tests
  • lint finds style-related errors in EO and XMIR files
  • jeo:disassemble converts Java .class files to .xmir (via jeo)
  • jeo:assemble converts .xmir files to Java .class files (via jeo)

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):

  • audit inspects all required packages and reports their status
  • foreign inspects all objects found in the program after the assemble step
  • sodg generates .sodg from .xmir, further rederable as XML or Dot
  • phi generates .phi files from .xmir files
  • unphi generates .xmir files from .phi files
  • print generates .eo files from .phi files
  • translate converts Java/C++/Python/etc. program to EO program
  • demu removes cage and memory objects
  • dejump removes goto objects
  • infer suggests object names where it's possible to infer them
  • flatten moves 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.

About

Command-line toolkit for parsing, compiling, transpiling, optimizing, linking, dataizing, and running EOLANG programs

Topics

Resources

License

Citation

Stars

Watchers

Forks