CSE425 Compiler Design Lab

Lab 2 · Lexical analyser in C++

This lab aims to generate tokens for lexemes producing keywords, identifiers, numbers etc…


We use a input file (Game.hx) which contains a sample program written in an pre-assigned language, on which we perform lexical analysis.

g++ LexicalAnalyser.cpp -o Lexi
chmod 777 Lexi
./Lexi Game.hx >& output


← Lab 1 · All labs · Lab 3 →