@ghaiklor/iterum
Yet another attempt to create VM with its own language and intermediate representation
Last updated a year ago by ghaiklor .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @ghaiklor/iterum 
SYNC missed versions from official npm registry.

iterum

Travis (.com) branch Codecov branch Codacy branch grade GitHub last commit Maintenance ECMA-262 Coverage GitHub code size in bytes

GitHub followers Twitter Follow

Iterum (latin) means “again, a second time, repeatedly, once more, for the second time, anew,”. This is my another attempt to create a simple, but fully implemented interpreter for a subset of ECMA specification.

NOTE: This is an educational project, and it is not designed for use in production.

Why

For a last few years I was passionate about compilers, languages and similar stuff. And I am still passionate about it.

However, all my knowledge was based on theoretical knowledge and not on a practical one. So, I’ve written an interpreter to fasten it.

Key Concepts

iterum itself is implemented on top of these key concepts:

  • Recursive descent parser with a look-ahead by one character;
  • Parser for an ECMA subset emits ESTree;
  • Interpreter is implemented on top of traverser for different AST nodes;

Getting Started

iterum is packed as an npm package, so you can easily run it with npx:

npx @ghaiklor/iterum --help

Create a file somewhere on your machine with an iterum code:

// hello-world.js
function helloWorld() {
    print "Hello, World";
}

helloWorld();

If you want to take a look into AST generated from the file above:

npx @ghaiklor/iterum --print-ast hello-world.js

Otherwise, you can interpret it:

npx @ghaiklor/iterum --interpret hello-world.js

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

How It Works

You can find rough explanation here.

License

MIT License

Current Tags

  • 1.0.0                                ...           latest (a year ago)

7 Versions

  • 1.0.0                                ...           a year ago
  • 0.6.0                                ...           a year ago
  • 0.5.0                                ...           a year ago
  • 0.4.0                                ...           a year ago
  • 0.3.0                                ...           a year ago
  • 0.2.0                                ...           a year ago
  • 0.1.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 7
Last Day 7
Last Week 7
Last Month 0
Dependencies (1)
Dev Dependencies (12)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |