diff --git a/arpit.lca b/arpit.lca index 729f27c..3f49787 100644 --- a/arpit.lca +++ b/arpit.lca @@ -1,11 +1,11 @@ -FUN concat(string1, string2) -> string1 + string2 -FUN appendCool(string) -> string + " is cool!" -FUN print_table(number) +FUN CONCAT(string1, string2) -> string1 + string2 +FUN APPENDCOOL(string) -> string + " is cool!" +FUN PRINT_TABLE(number) FOR i = 1 TO 11 THEN PRINT(i*number) END END -FUN map(element, func) +FUN MAP(element, func) VAR result = [] FOR i = 0 TO LEN(element) THEN APPEND(result, func(element/i)) @@ -13,12 +13,12 @@ FUN map(element, func) RETURN result END PRINT("-----------------------------------------") -PRINT(concat("Greeting from ","LazyCoderr's Compiler")) +PRINT(CONCAT("Greeting from ","LazyCoderr's Compiler")) PRINT("-----------------------------------------") PRINT("Table of 5") -print_table(5) +PRINT_TABLE(5) PRINT("-----------------------------------------") -VAR res = map(["Arpit", "LaxyCoderr"],appendCool) +VAR res = MAP(["Arpit", "LaxyCoderr"],APPENDCOOL) FOR i = 0 TO LEN(res) THEN PRINT(res/i) -END \ No newline at end of file +END diff --git a/main.py b/main.py index f8b84df..ff875a9 100644 --- a/main.py +++ b/main.py @@ -17,8 +17,13 @@ def getFileText(name): while True and not compileFile: if len(sys.argv) < 2: + + text = input('lazy > ').upper() + if text.strip() == "QUIT()": break + text = input('lazy >> ') if text.strip() == "quit()": break + if text.strip() == "": continue else: compileFile = True