Skip to content

Small esoteric language based on quotes from The Room movie

License

Notifications You must be signed in to change notification settings

CunoDNFC/TommyWiC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TommyWiC

An esoteric programming language (just a silly Python transpiler for now. Sorry, I'm working on it) inspired by quotes from the cult movie The Room by brilliant Tommy Wiseau.

With all due respect to ArnoldC


Based on python3, ANTLR4 grammar, interface with tkinter

Hello, World!

Oh hi Mark
Yeah, you can say that again "Hello, world!"
What a story, Mark

Quick start

If you want to set up a virtual environment:

python -m venv tommyenv

...and activate your venv:

source tommyenv/bin/activate #*nix(Linux, macOS)
tommyenv\Scripts\activate    #Windows

Set dependencies:

pip install -r requirements.txt

Generate lexer, parser and visitor files:*

cd main/grammar
antlr4 -Dlanguage=Python3 -visitor -no-listener TommyWiC.g4
cd ../

*or simply copy the files from the generated folder into the grammar folder

Then main.py and enjoy!

Short guide


Operations:

PLUS OPERATOR:
val1 and your stupid mother val2

MINUS OPERATOR: Get out! Get out! Get out of var1 's life, var2

MUL OPERATOR:
var1 let's go inside and eat some var2

DIV OPERATOR:
You are taking var1 apart, var2

INCREMENT:
You're acting like a kid. Just grow up, var

DECREMENT:
var is as good in bed as he is at getting promotions... Awful!


Expressions:

ID: named declared variable (the name must begin with a letter of the English alphabet or the “_” character)

INT: a negative, positive or zero integer

TRUE: Anything for my princes

FALSE: I did not hit her. It's not true! It's bullshit, I DID NOT!

LESS:
expression1 is great but expression2 is a crowd

NOT EQ, !=:
expression1 is a quack, expression2 is a duck

AND:
I'm so happy I have expression1 as my best friend, and I love expression2 so much

OR:
Look, this is not right. You are living with a expression1 and doing sex with a expression2

NOT:
It's bullshit! expression


Statements:

Value assignment:

var is just a expression CHEEP CHEEP CHEEP!

Operations:

Arithmetic operations, decrement and increment

Print:

Yeah, you can say that again expression

Yeah, you can say that again 'str'

Conditional Statements:

if: I have an announcement to make. We are expecting

   expression 
   statements 

elif: Alright, let's toss the ball around

   expression 
   statements 

else: Anyway, how is your sex life?

   statements 

endif:I'm tired. I'm wasted. I love you, darling

While:

This is a great party, you invited all my friends

expression

statements

Everybody betray me. I'm fed up with this world!

Try/Except:

Just what sort of perverted filth are you planning to use

operations

for?

Come on, stop. It was a mistake

operations

To comment the line:

Keep your stupid comments in your pocket any ignored stuff here


In progress:

(but that's not certain)

  1. Furious debugging
  2. Methods
  3. Static typing
  4. Adding new types
  5. Abstract Syntax Tree
  6. Intermediate Representation from AST
  7. Machine code generation from IR
  8. ??????
  9. PROFIT!

About

Small esoteric language based on quotes from The Room movie

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published