summaryrefslogtreecommitdiff
path: root/src/parser.l
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-12-29 23:34:08 -0700
committerMike Buland <eichlan@xagasoft.com>2011-12-29 23:34:08 -0700
commitca31bda6b8dd27d59c053a4f391164496577f479 (patch)
treef22649ad785da8210770d643f3041c45e2ec5ee7 /src/parser.l
parent35f71b12dc48a928d98743f607f62b2f6dbe7307 (diff)
downloadstage-ca31bda6b8dd27d59c053a4f391164496577f479.tar.gz
stage-ca31bda6b8dd27d59c053a4f391164496577f479.tar.bz2
stage-ca31bda6b8dd27d59c053a4f391164496577f479.tar.xz
stage-ca31bda6b8dd27d59c053a4f391164496577f479.zip
Single quote strings work now.
Diffstat (limited to 'src/parser.l')
-rw-r--r--src/parser.l6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/parser.l b/src/parser.l
index 1743dd6..8bc687d 100644
--- a/src/parser.l
+++ b/src/parser.l
@@ -15,7 +15,7 @@
15 15
16%x sitname 16%x sitname
17%x comment 17%x comment
18%x dqstr tdqstr tsqstr 18%x dqstr sqstr tdqstr tsqstr
19%% 19%%
20 20
21"<=" { return tokLtEq; } 21"<=" { return tokLtEq; }
@@ -96,6 +96,10 @@ null { return tokNull; }
96<dqstr>[^"]+ { (*yylval->sValue) += yytext; } 96<dqstr>[^"]+ { (*yylval->sValue) += yytext; }
97<dqstr>\" { BEGIN( INITIAL ); return tokString; } 97<dqstr>\" { BEGIN( INITIAL ); return tokString; }
98 98
99\' { BEGIN( sqstr ); yylval->sValue = new Bu::String(); }
100<sqstr>[^']+ { (*yylval->sValue) += yytext; }
101<sqstr>\' { BEGIN( INITIAL ); return tokString; }
102
99[ \t]+ { 103[ \t]+ {
100 yylloc->first_line = yylloc->last_line; 104 yylloc->first_line = yylloc->last_line;
101 yylloc->first_column = yylloc->last_column+1; 105 yylloc->first_column = yylloc->last_column+1;