summaryrefslogtreecommitdiff
path: root/src/parser.l
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-12-18 00:45:12 -0700
committerMike Buland <eichlan@xagasoft.com>2011-12-18 00:45:12 -0700
commitcfa0ff5e6a45ce2d17fe18a09268acb2c0eb6724 (patch)
tree6f60b73f14a4b1270da784997dc882fabe8151ab /src/parser.l
parent2abb355a18934d72006e2958cf79fae1b18868ca (diff)
downloadstage-cfa0ff5e6a45ce2d17fe18a09268acb2c0eb6724.tar.gz
stage-cfa0ff5e6a45ce2d17fe18a09268acb2c0eb6724.tar.bz2
stage-cfa0ff5e6a45ce2d17fe18a09268acb2c0eb6724.tar.xz
stage-cfa0ff5e6a45ce2d17fe18a09268acb2c0eb6724.zip
The basic structure is complete.
Diffstat (limited to 'src/parser.l')
-rw-r--r--src/parser.l12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/parser.l b/src/parser.l
index cbf359c..841c5e6 100644
--- a/src/parser.l
+++ b/src/parser.l
@@ -18,7 +18,15 @@
18%x dqstr tdqstr tsqstr 18%x dqstr tdqstr tsqstr
19%% 19%%
20 20
21[-{}<>=+/*,();:.] { return yytext[0]; } 21"<=" { return tokLtEq; }
22">=" { return tokGtEq; }
23"==" { return tokCmp; }
24"+=" { return tokPlusAssign; }
25"-=" { return tokMinusAssign; }
26"*=" { return tokTimesAssign; }
27"/=" { return tokDivideAssign; }
28
29[-{}<>=+/*,();:.[\]] { return yytext[0]; }
22 30
23game { return tokGame; } 31game { return tokGame; }
24function { return tokFunction; } 32function { return tokFunction; }
@@ -34,6 +42,8 @@ else { return tokElse; }
34command { return tokCommand; } 42command { return tokCommand; }
35goto { return tokGoto; } 43goto { return tokGoto; }
36not { return tokNot; } 44not { return tokNot; }
45setup { return tokSetup; }
46enter { return tokEnter; }
37 47
38true { yylval->bValue = true; return tokBool; } 48true { yylval->bValue = true; return tokBool; }
39false { yylval->bValue = false; return tokBool; } 49false { yylval->bValue = false; return tokBool; }