diff options
author | Paweł Dybiec <pdybiec@stud.cs.uni.wroc.pl> | 2018-11-04 00:35:34 +0100 |
---|---|---|
committer | Paweł Dybiec <pdybiec@stud.cs.uni.wroc.pl> | 2018-11-04 00:35:34 +0100 |
commit | 94595193b52e2b4913cda4bb8de4c9a733b2c440 (patch) | |
tree | df38c4192e84f3b17a6c5f18ac9721c5202cb82d /source/mod_student/lexer.mll | |
parent | Add first tokens (diff) |
Add basic tokens + parse function name
Diffstat (limited to 'source/mod_student/lexer.mll')
-rw-r--r-- | source/mod_student/lexer.mll | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/source/mod_student/lexer.mll b/source/mod_student/lexer.mll index f785e52..a62b8ad 100644 --- a/source/mod_student/lexer.mll +++ b/source/mod_student/lexer.mll @@ -58,6 +58,50 @@ { LPAREN } | ")" { RPAREN } + | "{" + { LBRACKET } + | "{" + { RBRACKET } + | ":" + { COLON } + | "+" + { OP_PLUS } + | "-" + { OP_MINUS } + | "*" + { OP_MULT } + | "/" + { OP_DIV } + | "%" + { OP_REM } + | "&" + { OP_AND } + | "|" + { OP_OR } + | "==" + { OP_EQ } + | "!=" + { OP_NEQ } + | "<=" + { OP_LE } + | ">=" + { OP_GE } + | "<" + { OP_LT } + | ">" + { OP_GT } + | "=" + { ASSIGN } + | "if" + { IF } + | "else" + { ELSE } + | "while" + { WHILE } + | "return" + { RETURN } + | "length" + { LENGTH } | identifier as id { IDENTIFIER id } |