An open API service indexing awesome lists of open source software.

https://github.com/cprieto/pygments_hack_asm

Pygments lexer for Hack Assembler (Nand2Tetris Assembler)
https://github.com/cprieto/pygments_hack_asm

assembler nand2tetris pygments pygments-lexer

Last synced: 6 months ago
JSON representation

Pygments lexer for Hack Assembler (Nand2Tetris Assembler)

Awesome Lists containing this project

README

          

Nand2Tetris Hack Assembler lexer
================================

.. image:: https://badge.fury.io/py/pygments-hackasm-lexer.svg
:target: https://badge.fury.io/py/pygments-hackasm-lexer

`Pygments`_ lexer for `Nand2Tetris Hack Assembler`_ language.

Part of the languages used/developed in the `Building a Modern Computer from First Principles`_ book.

Usage
-----

The name of the lexer is ``hack_asm`` so you can call it from ``pygmentize`` like this:

::

pygmentize -l hack_asm -f html -O full test.asm

The recognize extension is ``.asm`` but it is as well used by many other lexers (like, you know, other assemblers), so I recommend passing directly the lexer name.

Installation
------------

The lexer is available in PyPI, just install using ``pip``:

::

pip install pygments-hackasm-lexer

And start using it.

.. _Pygments: http://pygments.org/
.. _Nand2Tetris Hack Assembler: http://www.nand2tetris.org/chapters/chapter%2004.pdf
.. _Building a Modern Computer from First Principles: http://www.nand2tetris.org/`