Skip to content

Latest commit

 

History

History
11 lines (10 loc) · 581 Bytes

README.md

File metadata and controls

11 lines (10 loc) · 581 Bytes

Metamorphose

My own compiler and interpreter, that translates code written in a toy programming language to machine understandable code and interprets it.

  • scanner.l - Flex code, scans the tokens.
  • parser.y - Written in Bison, describes the CFG of the grammar and checks whether the statements are syntactically correct.
  • ast.c - Creates nodes in the AST.
  • ast.h - Function definitions and declarations.
  • interpreter.cpp - Interprets the AST, that is, computes the nodes in the AST.
  • Interpreter.h - Function definitions and declarations.
  • codegen.cpp
  • Codegen.h