Your browser (Internet Explorer 7 or lower) is out of date. It has known security flaws and may not display all features of this and other websites. Learn how to update your browser.

X

SLX Compiler

Assembly compiler

Published: 2007
Platforms: Java

SLX Compiler is a program written by me in Java which compiles SLX code to a simple assembly language for a stack machine. The language supports integer variables, arrays, functions, for loops and if-else statements. The compiler builds a parser from a LL(1) context-free grammar and generates code using semantic actions. The compiler also includes basic type checking.Coco/R was used to build the scanner and parser from self-modified grammar. Here is an example of input language and target language build by the compiler. The example outputs fibonacci numbers recursively. The program was a school project of a compiling course in TKK in autumn 2007.

Leave a comment

name

email (not published)

website