Skip to content

Lexical & Syntax Analysis for Simple Programming Language: Source code, docs, and tests for the CPT316 Assignment (Semester 1, 2023/2024). Demonstrates tokenization and AST generation in compiler design.

Notifications You must be signed in to change notification settings

ahdeanlau/CPT316_Assignment_1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Compiler Phases Implementation: Lexical and Syntax Analysis

Welcome to Group 6 repository for the CPT316 assignment on implementing the lexical and syntax analysis phases of a compiler.

Instructions to Run

  1. Clone the repository: git clone https://github.com/ahdeanlau/CPT316_Assignment_1.
  2. Navigate to the source directory: cd CPT316_Assignment_1.
  3. Run the program: python parse_code.py

Displaying the AST

  1. Open the generated syntax_tree.dot file.
  2. Copy the contents of the file.
  3. Paste the contents into the Graphviz Online Editor.

Objective

This project aims to:

  1. Provide hands-on experience in implementing the lexical and syntax analysis phases of a compiler.
  2. Understand the role of these phases in parsing source code and generating an abstract syntax tree (AST).
  3. Enhance our problem-solving and coding skills in building a functional compiler component.
  4. Document our implementation to make it clear and comprehensible for others.

About

Lexical & Syntax Analysis for Simple Programming Language: Source code, docs, and tests for the CPT316 Assignment (Semester 1, 2023/2024). Demonstrates tokenization and AST generation in compiler design.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages