Skip to content

CrazyRag778/HyOlang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HyOlang: A Custom Scripting Language Interpreter

This project is a custom interpreter for a simple scripting language. The interpreter reads commands from a file, parses them, and executes various operations such as printing, variable handling, and file operations.

Features

  • Printing Commands:
    • rawPRINT: Prints text without a newline at the end.
    • PRINT: Prints text with a newline.
    • fPRINT: Evaluates and prints the result of an expression without a newline.
    • LOOpRINT: Prints multiple pieces of text on the same line.
  • Variable Handling:
    • TYPE: Prints the type of an evaluated object.
    • INPUT: Prompts for user input and stores the result in a variable.
    • showVAR: Prints the value of a variable.
    • takeVAR: Assigns a value to a variable.
  • File Operations (Requires @ALLOW FILE):
    • FILE.ACCESS: Opens a file with a given mode.
    • FILE.CLOSE: Closes an open file.
    • FILE.CREATE: Creates a new file.
    • FILE.DELETE: Deletes a file.
    • FILE.WRITE: Writes to a file.
  • Module Management:
    • @ALLOW: Enables the use of specific modules, such as the FILE module.
  • End Command:
    • END: Exits the interpreter.

Usage

To run the interpreter, use the following command:

hyolang <script-file>

Where <script-file> is the file containing the commands to be executed by the interpreter.

Example Script

Here is a sample script that demonstrates the functionality:

@ALLOW - FILE;
PRINT - "Hello, World!";
INPUT - "Enter your name: " - name;
fPRINT - 2+6;
FILE.CREATE - test.txt - file;
FILE.WRITE - file - "This is a test.";
FILE.CLOSE - file;
END;

Security Considerations

This is not a real and working programming language, and was built for educational purpose. Do not use it for professional use!

Contributions

Contributions are welcome! If you'd like to contribute, please fork the repository and submit a pull request.

License

This project is licensed under the Creative Commons Zero v1.0 Universal. See the LICENSE file for more details.

About

A Programming language that is not ready for use, till date!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published