Skip to content
Sign upLog in
← Back to Community
Custom Language Compiler
Profile icon
hacker
has Hacker Plan
Geocube101

This program (which took around 4 or 5 months) compiles a custom language into python for execution. It's not the most efficient language but it was just an idea.

There is now a basic tutorial in the tutorials folder. You can look over each file to see how to use this language

The custom language code will be (by default) compiled from the "program.ccl" file though this can be changed

Supported Functions

  • Variable creation: create : >>
  • Variable modification: set : >>
  • Variable calling: get [new] : >>
  • Variable destruction: destroy [: ]
  • Module Importing: import :
  • If statement: if () {}
  • ,[object Object],[object Object]
[object Object]
Voters
Profile icon
RohanDaCoder
Profile icon
ChezCoder
Profile icon
EddieHozan
Profile icon
NikoBrooks
Profile icon
Kai_Justice
Profile icon
billehb
Profile icon
MatthewDoan1
Profile icon
rediar
Profile icon
pyelias
Profile icon
Vandesm14
Comments
hotnewtop
Profile icon
Geocube101

@ChezCoder
@EddieHozan
@NikoBrooks
@Kai_Justice
@billehb
@MatthewDoan
@rediar
@pyelias
@Vandesm14
@theangryepicbanana

Thanks
I added a few files in the "tutorial" folder of this repl for some information on how to use this language.

Profile icon
rediar

@Geocube101
Maybe you should make a tutorial on the learn board.

Profile icon
Geocube101

@rediar
Ok I'll start on that

Profile icon
Geocube101

@rediar
I'm posting it in parts. The first part is up and is basically just the markdown files copied into the description

Profile icon
rediar
Profile icon
Geocube101

@billehb
the main part of the program is complete as all necessary commands have been completed. All that remains are some modules.
Feel free to tell me of any bugs

Profile icon
billehb

@Geocube101
ok, trying it out now

Profile icon
billehb

it does not work

Profile icon
Geocube101

@billehb
I know, I'm currently trying to implement a new function

Profile icon
billehb
Profile icon
Geocube101

@billehb
I've changed some stuff so it should work again
(Still trying to add the "handle" statement)

Profile icon
billehb

Ok, trying it now

@Geocube101

Profile icon
billehb

@Geocube101
for me as soon as I run it it just says hello works and exits

Profile icon
Geocube101

@billehb
That's all the code in the file. I don't currently have a docs for this but the custom code to compile goes into the "program.ccl" file.
All code to be executed is in that file and it's currently set to print "Hello World"

Profile icon
billehb
Profile icon
billehb

@Geocube101
can you let me know egen you are done with the program (I know it can take a Long time I just sant to know when it is done)

Profile icon
Geocube101
Profile icon
ChezCoder

Change the error line from No Variable Found Called 'VARIABLE NAME' to Couldn't find 'VARIABLE NAME'

Profile icon
Geocube101

@ChezCoder
I could do that, though it may take some time as there are more than one line that checks and outputs a NameError

Profile icon
ChezCoder
Profile icon
Geocube101

@ChezCoder
I added a file (called "error_string.json") that allows for people to change the error strings (as I really liked the ones I had hard-coded in). Anyway, some strings use the format() method so those with "{}" in the string must always have "{}" in the string
More info in "tutorials/custom errors.md"