Commit 263b6a76 authored by Benoit Perrot's avatar Benoit Perrot
Browse files

Accept quoted characters.

parent 99ba1ed6
2003-08-19 Benot Perrot <benoit@lrde.epita.fr>
* dev/mipsy-scanner-gen.py: Accept a quoted character as an integer
value.
2003-08-14 Benot Perrot <benoit@lrde.epita.fr> 2003-08-14 Benot Perrot <benoit@lrde.epita.fr>
* configure.ac, NEWS: * configure.ac, NEWS:
......
...@@ -164,6 +164,21 @@ print """ ...@@ -164,6 +164,21 @@ print """
-?{dec_int} yylval->i = atoi (yytext); return INTEGER; -?{dec_int} yylval->i = atoi (yytext); return INTEGER;
-?{hex_int} yylval->i = strtoll (yytext, 0, 16); return INTEGER; -?{hex_int} yylval->i = strtoll (yytext, 0, 16); return INTEGER;
'\\\\a' yylval->i = '\\a'; return INTEGER;
'\\\\b' yylval->i = '\\b'; return INTEGER;
'\\\\f' yylval->i = '\\f'; return INTEGER;
'\\\\n' yylval->i = '\\n'; return INTEGER;
'\\\\r' yylval->i = '\\r'; return INTEGER;
'\\\\t' yylval->i = '\\t'; return INTEGER;
'\\\\v' yylval->i = '\\v'; return INTEGER;
'\\\\[\\\\\\']' yylval->i = yytext[1]; return INTEGER;
'\\\\.' {
std::cerr << *yylloc
<< \": unrecognized escape: \" << escape (yytext) << std::endl;
exit_set (exit_scan);
}
'[^\\'\\n\\r\\\\]' yylval->i = yytext[1]; return INTEGER;
\\\" yylval->s = new std::string; BEGIN STATE_STRING; \\\" yylval->s = new std::string; BEGIN STATE_STRING;
<STATE_STRING>{ <STATE_STRING>{
......
...@@ -2,16 +2,16 @@ ...@@ -2,16 +2,16 @@
(Created-By-Prcs-Version 1 3 2) (Created-By-Prcs-Version 1 3 2)
(Project-Description "") (Project-Description "")
(Project-Version mipsy 0 50) (Project-Version mipsy 0 51)
(Parent-Version mipsy 0 49) (Parent-Version mipsy 0 50)
(Version-Log (Version-Log
"Bump to 0.5 "Accept quoted characters.
") ")
(New-Version-Log (New-Version-Log
"") "")
(Checkin-Time "Thu, 14 Aug 2003 14:44:20 +0200") (Checkin-Time "Tue, 19 Aug 2003 19:43:22 +0200")
(Checkin-Login benoit) (Checkin-Login benoit)
(Files (Files
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
;; ./ ;; ./
(AUTHORS (mipsy/0_AUTHORS 1.1 644)) (AUTHORS (mipsy/0_AUTHORS 1.1 644))
(COPYING (mipsy/1_COPYING 1.1 644)) (COPYING (mipsy/1_COPYING 1.1 644))
(ChangeLog (mipsy/2_ChangeLog 1.44 644)) (ChangeLog (mipsy/2_ChangeLog 1.45 644))
(Makefile.am (mipsy/3_Makefile.a 1.5 644)) (Makefile.am (mipsy/3_Makefile.a 1.5 644))
(NEWS (mipsy/b/25_NEWS 1.5 644)) (NEWS (mipsy/b/25_NEWS 1.5 644))
(README (mipsy/4_README 1.2 644)) (README (mipsy/4_README 1.2 644))
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
(dev/mipsy-inst-gen.py (mipsy/12_mipsy-inst 1.3 745)) (dev/mipsy-inst-gen.py (mipsy/12_mipsy-inst 1.3 745))
(dev/mipsy-mk-inst-gen.py (mipsy/b/15_mipsy-mk-i 1.2 745)) (dev/mipsy-mk-inst-gen.py (mipsy/b/15_mipsy-mk-i 1.2 745))
(dev/mipsy-parser-gen.py (mipsy/13_mipsy-pars 1.4 745)) (dev/mipsy-parser-gen.py (mipsy/13_mipsy-pars 1.4 745))
(dev/mipsy-scanner-gen.py (mipsy/14_mipsy-scan 1.5 745)) (dev/mipsy-scanner-gen.py (mipsy/14_mipsy-scan 1.6 745))
(dev/mipsy.py (mipsy/16_mipsy.py 1.4 745)) (dev/mipsy.py (mipsy/16_mipsy.py 1.4 745))
(dev/mipsy.xml (mipsy/17_mipsy.xml 1.10 644)) (dev/mipsy.xml (mipsy/17_mipsy.xml 1.10 644))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment