Sandun666 / coolc

Compiler for COOL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cool Compiler project

Purpose

Compiler project for COOL (Classroom Object Oriented Language) for the Stanford Compilers class.

Each programming assignment corresponds to one part of the compiler:

  • Lexer
  • Parser
  • Semantic analyzer
  • Code generation

Building

Builds with the following deps (you may be able to build with older deps, but at least these should work):

  • Bison 3.0
  • Flex 2.5
  • G++ 6.2

If you're building in Windows Subsytem for Linux, everything should be alright, except you may have to install G++ 6.x manually. Once you've done that, the compiled binary may complain about version CXXABI_1.3.9 not found. This means you have to update your LD_LIBRARY_PATH env variable to have the folder that contains libstdc++.so.

Something like

export LD_LIBRARY_PATH=/usr/local/lib64/:$LD_LIBRARY_PATH

About

Compiler for COOL


Languages

Language:C++ 65.1%Language:Perl 25.7%Language:C 6.0%Language:Yacc 1.0%Language:Makefile 0.6%Language:Lex 0.6%Language:Shell 0.5%Language:Cool 0.4%Language:PowerShell 0.0%