Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 773 Bytes

README.md

File metadata and controls

34 lines (26 loc) · 773 Bytes

cminus-compiler

  1. Scanner
    • Implementation Of Lexer
    • Using flex
  2. Parser
    • just using yacc
  3. Semantic analyzer
    • Implementation of Symbol Table
    • Implementation of Type Checker

Semantic Analysis

  • main.c
    • Modify NO_ANALYZE, TraceParse, and TraceAnalyze to suit your assignment
  • symtab.h symtab.c
    • Add scope and type to symbol table
    • Implement hash table
  • analyze.c
    • Insert built-in function
      • Input(), output()
    • Modify symbol table generation
    • Modify the checkNode() function to check the semantics of C-Minus

Execution

$ make
$ ./compiler gcd.cm