Mercurial > hg > index.cgi
diff lwbasic/lexer.c @ 36:5325b640424d
First pass expression parsing
author | Lost Wizard (lost@starbug3) |
---|---|
date | Tue, 08 Feb 2011 22:42:12 -0700 |
parents | cdb0175e1063 |
children |
line wrap: on
line diff
--- a/lwbasic/lexer.c Sat Feb 05 14:22:54 2011 -0700 +++ b/lwbasic/lexer.c Tue Feb 08 22:42:12 2011 -0700 @@ -72,6 +72,8 @@ { "bor", token_op_bor }, { "bxor", token_op_bxor }, { "xor", token_op_xor }, + { "not", token_op_not }, + { "bnot", token_op_bnot }, { NULL } }; @@ -106,6 +108,10 @@ "<times>", "<divide>", "<modulus>", + "<openparen>", + "<closeparen>", + "<not>", + "<bitwisenot>", "<identifier>", "<char>", "<uint>", @@ -384,6 +390,13 @@ state -> lexer_token = token_op_modulus; return; + case '(': + state -> lexer_token = token_op_oparen; + return; + + case ')': + state -> lexer_token = token_op_cparen; + return; } }