Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compiler Code

A Python learning repository for compiler-design concepts, lexical analysis, parsing, translation, automata, and chapter-wise exercise solutions. The code is organized around classroom chapters, lab exams, and standalone compiler construction experiments.

Highlights

  • Lexical analyzer that recognizes numbers, identifiers, keywords, and symbols.
  • Recursive-descent parser for expression translation.
  • Syntax tree, environment, tag, and token helper classes.
  • Chapter-wise exercise solutions for compiler theory problems.
  • Automata and lab-practice scripts for exams and finals.

Project Structure

.
|-- chapter2/       # Lexer, parser, translator, token classes, syntax tree
|-- chapter3/       # Chapter 3 exercise and section problem solutions
|-- exam/           # Lab/exam practice scripts
|-- final/          # Final exam practice scripts and automata examples
`-- finalexam/      # Additional final exam lab files

Tech Stack

  • Python

Getting Started

Run individual examples with Python:

cd chapter2
python lexer.py
python parser.py

Most scripts are standalone and print their output directly to the terminal.

Learning Goals

  • Understand tokenization and symbol-table construction.
  • Practice predictive parsing and infix-to-postfix translation.
  • Implement automata and compiler-theory exercises in Python.
  • Keep course and exam practice code organized by topic.

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages