FusionLang is a new programming language designed for flexibility and ease of use, incorporating innovative syntax inspired by everyday language. This project aims to provide developers with a unique programming experience.
- Simple and intuitive syntax
- Support for various programming constructs
- Future enhancements planned for comprehensive functionality
Fusion Lang's grammar is defined using ANTLR, supporting key constructs:
-
Statements: Includes print statements, variable declarations, function definitions, conditionals, loops, and exit statements.
-
Keywords:
bolo: For printing output. //IMPLEMENTEDnaam: To declare variables. //IMPLEMENTEDkhatam: To exit functions or statements. //IMPLEMENTEDagar, nahi_toh, warna: For conditional statements.firse: For for loops.bulao: For defining functions.- Arithmetic operations: For performing + - * /
Here's the README file in Markdown format, styled for GitHub so you can copy it directly:
Comments in the code are used for adding explanatory notes or temporarily disabling code. There are two types of comments:
-
Single-Line Comments: Denoted by
//. Anything following//on the same line is a comment and will not be executed.// This is a single-line comment -
Multiline Comments: Wrapped between
/*and*/. Text within this range is treated as a comment and ignored by the compiler./* This is a multiline comment */
Variables are declared using the keyword naam followed by the variable name, an equals sign =, and the value. Statements end with a semicolon ;. For string declaration place it between "STRING".
naam x = 1340;
naam y = 2000;
naam z = "Hello World";
The bolo command is used to print messages to the screen. Text to be printed is placed within quotation marks and parentheses. To include variable values within the output, use {variable_name} within the text.
bolo("Hello World");
bolo("The value of x is {x}");
End the program with the khatam command and an exit code.
khatam 0;
Copy this text into your GitHub README file to document your programming language syntax!
To get started with FusionLang, follow these steps:
Make sure you have the following installed on your system:
- CMake
- NASM
You can install CMake using the following command:
sudo apt update
sudo apt install cmake- Download the CMake installer from the CMake official website.
- Run the installer and follow the instructions.
You can install CMake using Homebrew:
brew install cmakeYou can install NASM using the following command:
sudo apt update
sudo apt install nasm- Download the NASM installer from the NASM official website.
- Run the installer and follow the instructions.
You can install NASM using Homebrew:
brew install nasm-
Clone the repository:
git clone https://github.com/bignya23/FusionLang.git
-
Navigate into the project directory:
cd FusionLang -
Create a build directory:
mkdir build cd build -
Run CMake to generate the project files:
cmake ..
-
Build the project:
cmake --build .
To run your FusionLang files, use the following command in the terminal:
./Fusionlang <filename.fl>Replace <filename.fl> with the name of your FusionLang file.
If you have a file named example.fl, you would run:
./Fusionlang example.fl- The installation instructions for both CMake and NASM include commands for Ubuntu and methods for Windows and macOS, making it accessible for users on different platforms.
- The README now provides clear steps for users to set up their environment before building and running the project.
Feel free to make any adjustments or ask for more details!