An open API service indexing awesome lists of open source software.

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.

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