Skip to content

csun-comp430-s20/codegen_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Compilation Example

Compiles to JVM bytecode, using the ASM bytecode manipulation library.

If you're interested in seeing a bigger language which compiles to MIPS assembly, see this example (and its branches).

Grammar

x is a variable
i is an integer
b is a boolean
t is a type
e is an expression
op is a binary operator
s is a statement
p is a program
t ::= int | bool
e ::= x | i | b | e1 op e2
op ::= + | - | / | *
s ::= t x = e; | x = e; | print(x);
p ::= s*

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages