lc3asm

Crates.iolc3asm
lib.rslc3asm
version0.1.2
sourcesrc
created_at2019-08-19 11:45:26.100468
updated_at2019-08-21 13:40:32.903866
descriptionLC-3 assembly parser & assembler
homepage
repositoryhttps://github.com/cr0sh/lc3asm
max_upload_size
id158075
size81,074
Junghyun Nam (cr0sh)

documentation

README

lc3asm

LC-3 assembly code parser & assembler
Copyright (C) 2019 Nam Jeonghyun. (ska827@snu.ac.kr)

Installation

cargo install lc3asm --features binary-build

Assembly language parser

lc3asm::AsmParser and lc3asm::Rule provides an assembly parser and rules. Parser grammar follows definitions from Introduction to Computing Systems: From Bits and Gates to C and Beyond. Plus, some features are added:

  • UTF-8 string literal support(currently panics if non UTF-8 file is given)
  • Backslash escape sequence("\\"/"\r"/"\n"/"\t"/"\b"/"\f"/"\u00A9") support in string literal
    • Note that unicode escape sequence requires exactly four hexadecimal numbers for each character.
  • Elegant syntax error reporting(powered by Pest)
  • For compatiability issues, decimal literal without # is accepted for immediate values, but this could be removed in the future.
Commit count: 5

cargo fmt