From ca31bda6b8dd27d59c053a4f391164496577f479 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 29 Dec 2011 23:34:08 -0700 Subject: Single quote strings work now. --- src/parser.l | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/parser.l') 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 @@ %x sitname %x comment -%x dqstr tdqstr tsqstr +%x dqstr sqstr tdqstr tsqstr %% "<=" { return tokLtEq; } @@ -96,6 +96,10 @@ null { return tokNull; } [^"]+ { (*yylval->sValue) += yytext; } \" { BEGIN( INITIAL ); return tokString; } +\' { BEGIN( sqstr ); yylval->sValue = new Bu::String(); } +[^']+ { (*yylval->sValue) += yytext; } +\' { BEGIN( INITIAL ); return tokString; } + [ \t]+ { yylloc->first_line = yylloc->last_line; yylloc->first_column = yylloc->last_column+1; -- cgit v1.2.3