Skip to content

Parsing an arithmetic expression to x86 AT&T-syntax asssembly using a LR(1) Parser

Notifications You must be signed in to change notification settings

semicube1/exprtoasm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ExprToAsm

Quickstart

To use exprtoasm:

$ git clone https://github.com/semicube/expr-to-asm.git
$ cd expr-to-asm/
$ ./build.sh
$ ./exprtoasm -v "((2 + 3)*5 - 2)/7"
$ gcc output.s -o output
$ ./output

To test the parser, add your lex rules in lex.h, semantic rules in grammar.txt, input in input.txt

$ cd parsing-examples/
$ ./build.sh
$ ./test

About

Parsing an arithmetic expression to x86 AT&T-syntax asssembly using a LR(1) Parser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published