Little Lang

Project Cover

Description

Little Lang is a simple, yet powerful programming language designed with a custom compiler and a set of essential tools. It supports various programming constructs, making it suitable for learning and experimenting with compiler design.

Role

Maintainer

Techstack

C

Makefile

Features

Language Capabilities

  1. Mathematical Operations
  2. Supports basic operations like addition, subtraction, multiplication, division, and modulus, making arithmetic computations straightforward.

  3. Function Definitions and Calls
  4. Allows defining and calling functions with typed parameters, promoting structured programming practices.

  5. Control Flow
  6. Includes if statements, for-loops, and while-loops to provide versatile control flow capabilities.

  7. Array Support
  8. Enables array manipulation for working with collections of data, making it suitable for a variety of use cases.

  9. Variable Assignments
  10. Provides support for variable declarations and assignments with clear syntax for better code readability.

  11. Comments
  12. Supports inline and block comments, allowing developers to document their code effectively.

Setbacks

Obstacles Faced

  1. Implementing Basic Arithmetic
  2. Handling operator precedence and type checking for mathematical operations required careful design and debugging.

  3. Adding Control Flow
  4. Implementing control flow constructs like loops and conditions involved creating a robust syntax tree and ensuring accurate parsing.

  5. Supporting Arrays
  6. Implementing array functionality, including memory allocation and type consistency, was more complex than anticipated.

Reflections

Insights Gained

  1. Understanding Compiler Design
  2. Developing Little Lang provided hands-on experience with parsing, tokenization, and syntax tree generation, deepening my understanding of compiler design.

  3. Balancing Features and Simplicity
  4. Striking a balance between adding new features and maintaining the language’s simplicity taught valuable lessons in project scope management.

  5. Debugging Complex Systems
  6. Debugging the compiler to ensure accurate error reporting and functional execution improved my problem-solving and debugging skills.

Project Website

Not Available

Like what you see?

Get in touch

Email

elias@jamee.se

Inspired by ishanipandey