Skip to main content

A command line tool written in Python

Project description

EGG Programming Language

EGG is a small programming language that provides basic programming features.

Installation

Install EGG using pip:

pip install egglang

Run EGG:

egg run file.egg

About EGG

When I started my coding journey, I was always curious about how programming languages actually work. It felt like magic — how a few lines of code could be executed by a computer.

One day, when I had very little programming knowledge and only knew the basics of Python, I tried to create my own programming language. At that time, it was a simple program that could take input and produce output. I got stuck when I tried to make it more complex and add more features. That was when I realized that this was not the proper way to build a programming language.

You can check that early attempt here:

https://github.com/codeaddicthq/egg/v1

For this version, I studied how programming languages actually work. It was not an easy journey because there were not many proper resources available about this topic. However, I kept learning and managed to build:

  • Lexer
  • Parser
  • AST (Abstract Syntax Tree)
  • Interpreter architecture

During this process, I also learned new DSA concepts. These were new to me because, on 1/7/26, I had not started studying data structures and algorithms seriously yet.

I learned concepts like:

  • Trees
  • Binary trees
  • Tree traversal
  • Recursive structures

and implemented those ideas while building the parser.

The algorithms required to build a parser looked extremely complex before I started. I never thought I would be able to understand them, but eventually, I did.

Features

EGG currently supports:

  • Variables
  • Functions
  • If statements
  • For loops
  • While loops
  • Lists
  • Dictionaries
  • Basic programming language features

Why EGG?

EGG was not created to compete with large programming languages.

The goal of EGG is to explore, learn, and share the process of creating a programming language.

EGG is a project focused on understanding how programming languages work internally and experimenting with language design.

Built With

  • Python
  • Lexer
  • Parser
  • AST
  • Interpreter

Because EGG is built with Python, it may not be the fastest programming language. However, it provides a simple way to learn how interpreters and programming languages work internally.

Example

var name = "World"

fun greet(person) {
    show("Hello " + person)
}

greet(name)

Output:

Hello World

Future Plans

Possible future improvements:

  • Add a module import system
  • Improve error messages
  • Create a standard library
  • Improve performance
  • Add more built-in functions

Feedback

Try EGG, explore it, and share your feedback!

Made with curiosity and a love for programming.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

egglang-0.1.3.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

egglang-0.1.3-py3-none-any.whl (22.6 kB view details)

Uploaded Python 3

File details

Details for the file egglang-0.1.3.tar.gz.

File metadata

  • Download URL: egglang-0.1.3.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for egglang-0.1.3.tar.gz
Algorithm Hash digest
SHA256 0cd44ef4223aed6b3dfe61fedc4ffde2af31bad3144e2abcb2321c74a9d85726
MD5 98e14bea9a4555325d4b654853ed9378
BLAKE2b-256 c7378b9c8699b3ca8f2122bf9b7ebfa77f10dc430a8984939b8c8830049f3299

See more details on using hashes here.

File details

Details for the file egglang-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: egglang-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 22.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for egglang-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d521ef1b0f69146cee48da2ce0217b5b15b323f53cf7aac6f907464e152e5071
MD5 ed49c3160e66cd58811189e4098183d6
BLAKE2b-256 eed5dd01ee55a040e0fc19d5cacefb8052c2ca09f906f561775f8454dc27bc7d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page