Calc Programming Language – Arithmetic Expression Interpreter

Built a simple arithmetic expression evaluator in Python to explore lexical analysis, parsing, and interpretation—demonstrating foundational principles of programming language design.

Technologies Used

Python

Overview This personal project involves the creation of a basic arithmetic expression interpreter to understand the internals of how programming languages process input. The interpreter supports fundamental operations such as addition, subtraction, multiplication, and division, and serves as an educational tool to learn about lexical analysis, parsing, and interpretation.

Key Features

  • Parses and evaluates arithmetic expressions from string input

  • Implements lexical analysis to tokenize input into operators and operands

  • Builds an Abstract Syntax Tree (AST) to represent expression structure

  • Performs recursive evaluation based on operator precedence

  • Fully implemented in pure Python with no external dependencies

Educational Purpose This project was designed to provide hands-on experience in core compiler and interpreter concepts. By working through the stages of tokenization, syntax tree construction, and evaluation, learners can better grasp how high-level languages are executed under the hood.