Skip to content

JustinCanton/csc467

Repository files navigation

csc467 Compilers and Interpreters

Justin Canton, Samprit Raihan

Lab 1

In lab 1, we had to build a lexical analyser to scan MiniGLSL, and implement the "trace scanner" functionality (-Tn switch) of the compiler. Mainly in scanner.l.

Lab 2

In lab 2, we had to build a parser (using the Bison parser generator) that accepts the language generated by the MiniGLSL grammar. Our parser had to implement the “trace parser” functionality (-Tp command-line flag) of the compiler. No semantic analysis or AST construction needed be performed. Mainly in parser.y.

Lab 3

This lab was about constructing abstract syntax trees (ASTs) and making three AST visitors: one that does semantic checking, one that de-allocates an AST, and one that prints an AST (-Da). Mainly in ast.c and ast.h.

Lab 4

This lab involved generating ARB fragment shader assembly. Our compiler compiled code into a text file (frag.txt). We were then provided with two MiniGLSL and OpenGL programs that we could use for testing, found in Demo folder. Mainly in codegen.c and codegen.h.

About

Creating a compiler for the MiniGLSL language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published