EngLang is a free, open-source, general-purpose programming language designed to make programming as intuitive and accessible as possible. By embracing simplicity and human-readable syntax, EngLang allows users to write code in a way that closely resembles natural English sentences. Whether you're a complete beginner or an experienced developer, EngLang aims to provide a seamless and enjoyable coding experience.
- Introduction
- Why EngLang?
- Core Principles
- Getting Started
- Language Features
- Project Structure
- Roadmap
- Contribution Guidelines
- License
Programming languages have traditionally been seen as cryptic and inaccessible to those without a technical background. EngLang seeks to change that by introducing a language that reads almost like plain English. By lowering the barrier to entry, we hope to empower more people to learn programming and bring their ideas to life.
Please note: EngLang is in its very early stages of development. We are actively seeking feedback, ideas, and contributions to help shape the future of this language.
EngLang prioritizes human readability above all else. By using straightforward English phrases and reducing syntactic clutter, code written in EngLang is easier to read and understand.
Example:
Set x to 10
If x is greater than 5
Print "x is large"
EndIf
Learning to code can be intimidating. EngLang reduces this intimidation by using familiar language constructs, allowing beginners to focus on learning programming concepts rather than complex syntax.
EngLang is an open-source project that thrives on community involvement. We believe that the best software is built collaboratively, and we welcome contributions from developers of all skill levels.
Built with portability in mind, EngLang runs on all major operating systems, including Linux, macOS, and Windows. The interpreter is written in C, ensuring efficient performance across platforms.
EngLang is released under the GNU General Public License v3.0. We are committed to keeping EngLang free for everyone to use, modify, and distribute.
We aim to keep the language as simple as possible, avoiding unnecessary complexity while providing the tools needed to build functional programs.
We encourage the community to participate in EngLang's development. Your ideas, feedback, and contributions are invaluable to us.
- A C compiler (e.g.,
gcc
) make
utility- Git (for cloning the repository)
-
Clone the Repository
git clone https://github.com/TheHakan/EngLang.git cd EngLang
-
Build the Interpreter
make
-
(Optional) Install Globally
sudo cp eng /usr/local/bin/
Create a file named hello.eng
:
Print "Hello, World!"
Run the program:
eng hello.eng
Expected Output:
Hello, World!
Declare and assign variables using the Set
keyword.
Set age to 25
Set name to "Alice"
EngLang currently supports:
- Integers
- Floating-point numbers
- Strings
- Booleans (planned)
- Arithmetic:
+
,-
,*
,/
- Comparison:
is equal to
,is not equal to
,is greater than
,is less than
Example:
Set sum to 5 + 3
If sum is equal to 8
Print "Correct"
EndIf
If x is greater than 10
Print "x is large"
Else
Print "x is small"
EndIf
Switch day
Case "Monday"
Print "Start of the week"
Case "Friday"
Print "End of the week"
Default
Print "Midweek"
EndSwitch
Set i to 0
While i is less than 5
Print i
Set i to i + 1
EndWhile
For each item in list
Print item
EndFor
Defining reusable code blocks.
Function greet(name)
Print "Hello, " + name
EndFunction
greet("Alice")
This section provides an overview of the project’s file structure and explains the purpose of each directory and file.
-
CHANGES.md
: This file tracks all the project’s changes, updates, and new features. Every time you push a commit, ensure to document the modifications here for easy reference. -
CONTRIBUTING.md
: This file offers guidelines for developers interested in contributing to EngLang. It explains the process of submitting pull requests, writing tests, and adhering to coding standards. -
LICENSE
: Clearly defines the licensing terms under which this project is released. It protects both developers and users, ensuring clarity about the usage, distribution, and modification of the software. -
README.md
: Provides general information about the EngLang project, its purpose, and how to get started. It also includes instructions for building, contributing, and any other relevant details. -
TODO.md
: This file contains upcoming tasks, features, and improvements. It acts as a roadmap for the project's future direction.
-
bin/
: This directory is reserved for compiled binaries or executables. When users compile or build the project, the resulting binaries (compiled programs) will be stored here. -
build/
: Contains temporary or intermediate build artifacts, such as themylanguage.exe
. These artifacts are essential during the development process but are not intended to be distributed. -
dist/
: This directory is currently empty but will be used to store the final, distributable version of the project. When the project is packaged (as ZIP files, installers, etc.), they will be placed here. -
docs/
: Contains guides, manuals, or any documentation related to the project. TheGUIDE.md
explains how to use EngLang and contribute to it. You can expand this directory to include more user or developer guides in the future. -
grammar/
: Stores the grammar files that define the syntax of EngLang. This is an important directory as it helps in the lexical analysis and parsing of EngLang programs. -
include/
: Contains all the header files (e.g.,lexer.h
,parser.h
). These files declare functions, structures, and variables that are shared across different parts of the project. Having them in a central directory keeps the project modular and easy to maintain. -
src/
: This directory houses the actual source code files for EngLang. The source code is organized into subdirectories, such as:interpreter/
: Contains the code responsible for interpreting EngLang programs.lexer/
: Manages the lexical analysis (tokenization) of the source code.parser/
: Handles the parsing of tokens into a syntax tree for execution.
-
tests/
: This directory holds all test-related files, such astest.eng
andtest_runner.c
. It ensures that the project is tested regularly for correctness. Unit tests and functional tests should be stored here to guarantee code quality.
- Implement Functions: Allow users
to define and call functions.
- Expand Data Types: Introduce arrays, lists, and dictionaries.
- Error Handling: Implement try-catch blocks for robust programs.
- Standard Library: Build a library for common tasks like string manipulation and file I/O.
- Object-Oriented Features: Introduce classes and objects.
- Concurrency Support: Enable multi-threading capabilities.
- Package Manager: Develop a system for distributing and installing EngLang packages.
- Integrated Development Environment (IDE): Create an IDE tailored for EngLang.
We are excited to have you contribute! EngLang is open to all kinds of ideas and contributions.
-
Fork the Repository
Click the "Fork" button at the top right corner of the repository page.
-
Clone Your Fork
git clone https://github.com/YourUsername/EngLang.git cd EngLang
-
Create a New Branch
git checkout -b feature-or-bugfix-name
-
Make Your Changes
Ensure your code follows the project's coding standards.
-
Commit and Push
git add . git commit -m "Description of your changes" git push origin feature-or-bugfix-name
-
Submit a Pull Request
Go to the original repository and click on "New Pull Request."
- New Features: Implement planned features or propose new ones.
- Bug Fixes: Identify and fix bugs.
- Documentation: Improve or expand the documentation.
- Testing: Write unit tests to ensure code reliability.
- Optimizations: Enhance performance and efficiency.
EngLang is licensed under the GNU General Public License v3.0. You are free to use, modify, and distribute this software under the terms of this license.
For more details, see the LICENSE file or visit GNU's official website.