https://github.com/devrihan/odialang
The Custom Coding Language project is an endeavor to create a simple programming language along with tools for lexing and compiling code written in this language. The language is designed to be easy to understand and suitable for educational purposes, while still demonstrating key concepts of lexing, parsing, and code generation.
https://github.com/devrihan/odialang
Last synced: about 1 year ago
JSON representation
The Custom Coding Language project is an endeavor to create a simple programming language along with tools for lexing and compiling code written in this language. The language is designed to be easy to understand and suitable for educational purposes, while still demonstrating key concepts of lexing, parsing, and code generation.
- Host: GitHub
- URL: https://github.com/devrihan/odialang
- Owner: devrihan
- Created: 2024-03-28T03:44:09.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-03T18:22:14.000Z (about 2 years ago)
- Last Synced: 2025-02-03T04:28:57.200Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 43 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
```markdown
# Custom Coding Language
Welcome to the Custom Coding Language project! This project aims to create a simple coding language along with a lexer and compiler implemented in JavaScript.
# Overview
This project consists of two main components:
1. Lexer: The lexer takes input code written in the custom coding language and converts it into tokens. These tokens are the basic building blocks of the language, representing keywords, identifiers, numbers, and operators.
2. Compiler: The compiler takes the tokens generated by the lexer and performs further processing, such as syntax analysis and code generation. Ultimately, it translates the input code into a form that can be executed by a computer.
# Getting Started
To get started with this project, follow these steps:
1. Clone the Repository: Clone this repository to your local machine using the following command:
```
git clone https://github.com/your-username/custom-coding-language.git
```
2. Install Dependencies: Ensure you have Node.js installed on your machine. Navigate to the project directory and install dependencies using npm:
```
npm install
```
3. Run the Compiler: You can now run the compiler on sample input code. Modify the `code` variable in `compiler.js` with your custom code, then execute the compiler using the following command:
```
node compiler.js
```
# Example
Here's an example of input code written in the custom coding language:
```plaintext
eita x = 5
eita y = 7
eita sum = x + y
kaha sum
```
When executed using the compiler, this code will output the value of the `sum` variable, which is 12.
# Contributing
Contributions to this project are welcome! If you'd like to contribute, please follow these guidelines:
- Fork the repository
- Create a new branch for your feature or bug fix
- Make your changes and ensure they're well-tested
- Create a pull request detailing your changes