all Keywords from primitives til modules

This commit is contained in:
Felix Müller 2024-04-15 21:12:17 +02:00
parent 46de25f8ce
commit 59da185baf
2 changed files with 39 additions and 2 deletions

View File

@ -56,8 +56,19 @@
"while" return(KeyWhile);
"in" return(KeyIn);
"out" return(KeyOut);
"fun" return(KeyFun);
"," return(',');
";" return(';');
"==" return(OpEquals);
"&&" return(OpAnd);
"||" return(OpOr);
"!!" return(OpNot);
"^^" return(OpXor);
"&" return('&');
"^" return('^');
"." return('.');

View File

@ -40,6 +40,15 @@
%token KeyWhile
%token KeyIn
%token KeyOut
%token KeyFun
%token OpEquals
%token OpAnd
%token OpOr
%token OpNot
%token OpXor
@ -65,6 +74,11 @@ decl: '=' {printf("=\n"); };
| '*' {printf("*\n"); };
| '/' {printf("/\n"); };
| '&' {printf("&\n"); };
| '^' {printf("^\n"); };
| '.' {printf(".\n"); };
| ',' {printf(",\n"); };
| ';' {printf(";\n"); };
@ -91,6 +105,18 @@ decl: '=' {printf("=\n"); };
| KeyElse {printf("KeyElse\n"); };
| KeyWhile {printf("KeyWhile\n"); };
| KeyIn {printf("KeyIn\n"); };
| KeyOut {printf("KeyOut\n"); };
| KeyFun {printf("KeyFun\n"); };
| OpEquals {printf("OpEquals\n"); };
| OpAnd {printf("OpAnd\n"); };
| OpOr {printf("OpOr\n"); };
| OpNot {printf("OpNot\n"); };
| OpXor {printf("OpXor\n"); };
%%