-
Notifications
You must be signed in to change notification settings - Fork 0
Exifers/Scripto
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
== Scripto2 == Small test script langage, v0.2. = Features = [X] Lexer [X] Parser [X] Pretty-printer [X] Interpreter = Prerequisites = - GNU/Linux - g++ - make = Compile = `make` = Use = `./main` Enter some code and type enter it will show the AST pretty-printed. Type `Ctrl+D` to exit. = Grammar = exps :== { exp } exp :== /* print values */ 'print' value /* assignment */ | lvalue '=' value /* function definition and function call */ | 'function' name '{' exps '}' | name '(' ')' /* control structures */ | 'if' '(' value '==' value ')' '{' exps '}' [ 'else' '{' exps '}' ] /* loops */ | 'repeat' '(' num ')' '{' exps '}' value :== lvalue | rvalue lvalue :== name rvalue :== name | num | string num :== [0-9]\+ name :== [a-zA-Z][a-zA-Z0-9_]* string :== "[a-aA-Z0-9_]+" All tokens must be separated by spaces (' ', '\n' or '\t). = Usage = ./scripto2 <filename> or ./scripto2, then enter code, then ctrl+D = Sheebang = Scripto2 accepts an eventual '#' on the first line of the file, if it finds it, it skips the first line. = Authors = Exifers, July 2018
About
Home-made elemental script language
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published