GitXplorerGitXplorer
s

Galaxous

public
5 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
a2b79286b0abaee1cc5bb037c60b74db4e2137fe

Fixes input bugs

ssahilsaha7773 committed 5 years ago
Verified
fc644c039a98b97567958be77ead35a7f75dd122

Update If statements and variables in Galaxous.md

ssahilsaha7773 committed 5 years ago
Verified
df98a1318e71a34ed5e2b76458dd256624e71193

Update If statements and variables in Galaxous.md

ssahilsaha7773 committed 5 years ago
Verified
60aff729ab4a70eb9ee3d3e2ea46ccd5f95bf3db

Update If statements and variables in Galaxous.md

ssahilsaha7773 committed 5 years ago
Verified
c44550716ed97702f0122bf73607bbd957d7c843

Update README.md

ssahilsaha7773 committed 5 years ago
Verified
a53c9c3a7e6a9e4d8c40fe5baea6930b36e73626

Update README.md

ssahilsaha7773 committed 5 years ago

README

The README file for this repository.

Galaxous (in development)

Java just made simpler

Galaxous is a programming language which is based on java. The code written in Galaxous is much simpler and is converted into pure java by the Galaxous lexer.

demo

Features

  • No semicolons
  • No braces
  • No complex lines like java to take input
  • Want the pure java code? Get it printed in your terminal
  • No indentation
  • And much more...

Hello World program

import java.util.*
create public class test
main()
println "Hello World"
endm
end

Explanation of the above code

The first line imports the java.util package.

create - This keyword is used for creation of any class or method.

  • To create a class the following line of code is used create <access specifier> class <class name>.

main() - This simply means the creation of a general style main method in a java program.

  • The java code for this line is public static void main(String args[]){.

println "Hello World" - The java code for this keyword is System.out.println("Hello World");. You can also use print which will result to System.out.print.

endm - This marks the end of the current method(here main method).

end - This marks the end of the program.

Note: In a galaxous code you must import the java.util package. This might be updated in the future.

The pure java code for above program

import java.util.*;
public class test {
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    System.out.println( "Hello World");
  }
}
Note: The Scanner class line is included in the pure java code of every galaxous program to avoid input anomalies.

Running a Galaxous program in Windows

Note: Be sure that java jdk is installed on your machine.
  • Clone the Galaxous repo to your local computer.
  • Add the cloned Galaxous folder to the PATH environment variables.
  • Write your galaxous code and save it with the extension ".ga".
  • Open cmd and run the command galaxous <the absolute path of your galaxous code file>. For example:
    galaxous C:\Users\dell\test
    
    Note: Don't write the extension in the path.
    

Created by Sahil Saha