Skip to content

raamtpj/HCL

 
 

Repository files navigation

HCL

made-with-java java-version hcl-version

A simple, yet advanced High level Computing Language

About

HCL is an Interpreted, Object Oriented language written in Java. It is also dynamically typed and has a very modern syntax inspired from Java and Python. This interpreter is inspired from jLox of Crafting Interpreters.

Requirements

  • Java JDK (latest version is more preferable)

Installation

To Install the interpreter, head over to the releases page and download the latest release of HCL interpreter. The zip/tarball file will be named as hcl-<latest_version>. Unzip the release and store it in your desired directory.

Then Add the /bin directory to your PATH environment variable.

For windows users

  1. Copy the \bin location of HCL installed folder to clipboard
  2. The first step depends which version of Windows you're using:
  • If you're using Windows 8 or 10, press the Windows key, then search for and select "System (Control Panel)".
  • If you're using Windows 7, right click the "Computer" icon on the desktop and click "Properties".
  1. Click "Advanced system settings".
  2. Click "Environment Variables".
  3. Under "System Variables", find the PATH variable, select it, and click "Edit". If there is no PATH variable, click "New".
  4. Add the copied directory location to the beginning of the variable value followed by ; (a semicolon). For example, if the value was C:\Windows\System32, change it to C:\Users\Me\HCL\bin;C:\Windows\System32.
  5. Click "OK".
  6. Restart your terminal.
  7. Verify that the path is set by opening a new command window and run hcl -v.

For Mac users:

  1. Copy the \bin location of HCL installed folder to clipboard
  2. Open the .bash_profile file in your home directory (for example, /Users/your-user-name/.bash_profile) in a text editor.
  3. Add export PATH="<copied-hcl-bin-path>:$PATH" to the last line of the file, where is the copied directory location of HCL.
  4. Save the .bash_profile file.
  5. Restart your terminal.
  6. Verify that the path is set by opening a new terminal and run hcl -v.

For Linux users:

  1. Copy the \bin location of HCL installed folder to clipboard
  2. Open the .bashrc file in your home directory (for example, /home/your-user-name/.bashrc) in a text editor.
  3. Add export PATH="<copied-hcl-bin-path>:$PATH" to the last line of the file, where is the copied directory location of HCL.
  4. Save the .bashrc file.
  5. Restart your terminal.
  6. Verify that the path is set by opening a new terminal and run hcl -v.

Usage

To run your first program, fire up you favourite text editor and copy the following lines to hello.hcl file:

# A Simple Hello, World! program

println "Hello, world!";
println "HCL is interesting!";

Then open a new terminal in the same directory as the file and run:

$ hcl hello.hcl

For windows users: just run the same command.

You'll see the following output on your terminal:

Hello, world!
HCL is interesting!

Support

If you've any questions regarding this project, please check our documentation or file an issue.

Contributing

Contributions are welcome, To contribute please refer to details here.

License

Copyright © 2023 M.V.Harish Kumar.

This project is BSD-2 licensed.

Project status

This project is still In its baby steps. Many features need to be added. Thus the stability of the syntax is not guaranteed. However, most features is planned to be retained. Contributers can give their contribution to this project to make this project stable.

About

A Simple, yet Advanced High Level Computing Language

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 90.1%
  • HCL 5.7%
  • GAP 2.1%
  • Python 1.3%
  • Makefile 0.8%