Skip to content

cr0sh/lc3asm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

LC-3 assembly code parser & assembler

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages