Skip to content

delvinbuckley/pascal-compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pascal-compiler

This is an academic project implementing a Pascal-inspired interpreter using C++ and Flex. It features a recursive descent parser written manually (no Bison/Yacc) and supports basic Pascal constructs such as variable declarations, arithmetic expressions, and control flow.

Features

  • Manual recursive descent parser in C++
  • Lexical analysis using Flex (rules.l)
  • Support for:
    • Variable declarations
    • Arithmetic operations
    • if, while, and other control flow
  • Organized test cases in the test_cases/ folder

How to Build and Run

  1. Clean previous builds (optional but recommended):
    makeclean
  2. Build the project
    make
  3. Run the interpreter with a test file
    ./tips test_cases/factorial.pas
    

About

My academic Pascal-based interpreter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors