Skip to content

Rewrite is a little programming language, written years ago at the college as final project for the 'programming languajes' subject.

License

Notifications You must be signed in to change notification settings

cococov/rewrite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

REWRITE

Rewrite is a little programming language, written years ago at the college as final project for the 'programming languajes' subject. Compiles to Jasmin and JVM bytecode.

Example code

REWRITE_START
	REWRITE_STRING str
{
	str = "Hello World !"
	printString(str)
} REWRITE_END

Compile the compiler

bison -d rewrite.y && flex rewrite.l
gcc rewrite.tab.c lex.yy.c symtab.c node.c gencode.c -o Rewrite

Compile a Rewrite code

./Rewrite [path] [program name] && java -jar jasmin.jar [program name].j

example:

./Rewrite examples/programa.rwrt programa && java -jar jasmin.jar programa.j

Run a Rewrite program

java [program name]

example:

java programa

About

Rewrite is a little programming language, written years ago at the college as final project for the 'programming languajes' subject.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published