aboutsummaryrefslogtreecommitdiff
path: root/cibic.l
diff options
context:
space:
mode:
Diffstat (limited to 'cibic.l')
-rw-r--r--cibic.l5
1 files changed, 3 insertions, 2 deletions
diff --git a/cibic.l b/cibic.l
index 26fca1f..cd9b6eb 100644
--- a/cibic.l
+++ b/cibic.l
@@ -64,12 +64,12 @@ digit [0-9]
return INT_CONST;
}
-'([^\'\\]|\\.)' {
+'([^\'\\]|\\.|\\[0-7][0-7]?[0-7]?|\\[xX][0-9a-fA-F]+)' {
yylval.strval = strdup(yytext);
return CHAR_CONST;
}
-\"[^\n\"]*\" {
+\"[^\n\"]*\" {
yylval.strval = strndup(yytext + 1, strlen(yytext) - 2);
return STR_CONST;
}
@@ -79,6 +79,7 @@ digit [0-9]
"==" { return OPT_EQ; }
"!=" { return OPT_NE; }
"<=" { return OPT_LE; }
+">=" { return OPT_GE; }
"<<" { return OPT_SHL; }
">>" { return OPT_SHR; }
"++" { return OPT_INC; }