Cool-Compiler

Shoubra faculty of engineering Compilers Course Project - Cool

Introduction

"Cool" is abbreviation for "Classroom Object-Oriented Language"

The full name of "Cool" is "The Classroom Object-Oriented Language". It is a small language designed for use in an undergraduate compiler course project

Cool has many of the features of modern programming languages, including objects, automatic memory management, and strong static typing. It generates three address code

More info: COOL manual : https://theory.stanford.edu/~aiken/software/cool/cool-manual.pdf

Assignments

A1: Lexer Analyser

Lexical analysis is the first phase of a compiler. The lexical analyzer breaks the source code into a series of tokens, and passes the data to the parser when it demands.

A2: Parser

Parsing (or syntax analysis) is the second phase of a compiler. A parser takes the input from a lexical analyzer in the form of token streams and analyzes the source code (token stream) against the production rules to detect any errors in the code. The output of this phase is an abstract syntax tree (AST).