Skip to content

Interpreter of the Micro programming language

License

Notifications You must be signed in to change notification settings

thewizardplusplus/micro

Repository files navigation

Micro

Interpreter of the Micro programming language.

Installation

Clone this repository:

$ git clone https://github.com/thewizardplusplus/micro.git
$ cd micro

Then install the interpreter with pip tool:

$ sudo -H python3.5 -m pip install .

sudo command is required to install micro console script. If it's not required, sudo command can be omitted:

$ python3.5 -m pip install .

But then the interpreter should be started as python3.5 -m micro.

Fix the warning from PLY library

When you're running the interpreter, you can get the following error:

WARNING: Couldn't create 'parsetab'. [Errno 13] Permission denied: '/usr/local/lib/python3.5/dist-packages/micro/parsetab.py'

In this case, you need to adjust permissions of the specified file:

$ sudo touch /usr/local/lib/python3.5/dist-packages/micro/parsetab.py
$ sudo chown "$USER:" /usr/local/lib/python3.5/dist-packages/micro/parsetab.py

Usage

$ micro -v | --version
$ micro -h | --help
$ micro [-t TARGET | --target TARGET] [<script>] [<args>...]

Options:

  • -v, --version — show the version message and exit;
  • -h, --help — show the help message and exit;
  • -t TARGET, --target TARGET — set a target of a script processing; it can take following values:
    • tokens;
    • preast;
    • ast;
    • evaluation (it's a default value).

Arguments:

  • <script> — a script (if it's empty or equals to -, then it'll read a script from stdin; a default value: -);
  • <args> — script arguments.

IDE support

Docs

Docs (ru).

License

The MIT License (MIT)

Copyright © 2016-2018 thewizardplusplus