Commit f6e4dfe5 authored by Akim Demaille's avatar Akim Demaille
Browse files

2003-04-08 Akim Demaille <akim@epita.fr>

	Version 0.14.

	* src/Scan.hs (scanLiteralContent): Display a complete error
	message on bad escapes.
parent 28863c72
2003-04-08 Akim Demaille <akim@epita.fr>
Version 0.14.
* src/Scan.hs (scanLiteralContent): Display a complete error
message on bad escapes.
2003-04-06 Akim Demaille <akim@epita.fr>
* src/Print.hs (showList): New, for Exp and Stm.
......
......@@ -16,10 +16,14 @@
# the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
AC_PREREQ(2.57)
AC_INIT(HAVM, 0.13, anisko_r@epita.fr)
AC_PREREQ([2.57])
AC_INIT([HAVM], [0.13], [anisko_r@epita.fr])
AC_CONFIG_AUX_DIR(config)
AM_INIT_AUTOMAKE([foreign 1.7.3])
AC_CONFIG_FILES(Makefile config/Makefile src/Config.hs src/Makefile)
AC_CONFIG_FILES([
Makefile
config/Makefile
src/Config.hs
src/Makefile])
AC_OUTPUT
;; -*- Prcs -*-
(Created-By-Prcs-Version 1 3 2)
(Project-Description "Haskell VM for Tiger")
(Project-Version havm 0 71)
(Parent-Version havm 0 70)
(Version-Log "(Previous checkin failed.)
(Project-Version havm 0 72)
(Parent-Version havm 0 71)
(Version-Log "2003-04-08 Akim Demaille <akim@epita.fr>
2003-04-06 Akim Demaille <akim@epita.fr>
Version 0.14.
* src/Print.hs (showList): New, for Exp and Stm.
Remove all the final \"n\" for each instruction type, since
showList now handles it.")
* src/Scan.hs (scanLiteralContent): Display a complete error
message on bad escapes.")
(New-Version-Log "")
(Checkin-Time "Sun, 06 Apr 2003 18:51:10 +0200")
(Checkin-Time "Tue, 08 Apr 2003 16:44:56 +0200")
(Checkin-Login akim)
(Populate-Ignore
(
......@@ -30,8 +29,8 @@
(Project-Keywords)
(Files
(prj (havm.prj) :symlink)
(ChangeLog (havm/0_ChangeLog 1.70 644))
(configure.ac (havm/34_configure. 1.2 644))
(ChangeLog (havm/0_ChangeLog 1.71 644))
(configure.ac (havm/34_configure. 1.3 644))
(Makefile.am (havm/35_Makefile.a 1.1 644))
(config/Makefile.am (havm/36_Makefile.a 1.1 644))
......@@ -65,7 +64,7 @@
(src/RuntimePrint.hs (havm/29_RuntimePri 1.1 644))
(src/RuntimeString.hs (havm/24_RuntimeStr 1.3 644))
(src/RuntimeSystem.hs (havm/26_RuntimeSys 1.3 644))
(src/Scan.hs (havm/12_Scan.hs 1.14 644))
(src/Scan.hs (havm/12_Scan.hs 1.15 644))
(src/StdBinop.hs (havm/13_StdBinop.h 1.3 644))
(src/StdRelop.hs (havm/14_StdRelop.h 1.2 644))
(src/Token.hs (havm/15_Token.hs 1.5 644))
......
......@@ -57,16 +57,16 @@ scanLiteral input loc =
(string, loc, tokens) -> TokLiteral (string, loc) : tokens
escapeToChar :: Char -> Char
escapeToChar 'a' = '\a'
escapeToChar 'b' = '\b'
escapeToChar 'f' = '\f'
escapeToChar 'n' = '\n'
escapeToChar 'r' = '\r'
escapeToChar 't' = '\t'
escapeToChar 'v' = '\v'
escapeToChar 'a' = '\a'
escapeToChar 'b' = '\b'
escapeToChar 'f' = '\f'
escapeToChar 'n' = '\n'
escapeToChar 'r' = '\r'
escapeToChar 't' = '\t'
escapeToChar 'v' = '\v'
escapeToChar '\\' = '\\'
escapeToChar '"' = '"'
escapeToChar ''' = '\''
escapeToChar '"' = '"'
escapeToChar '\'' = '\''
scanLiteralContent :: String -> Loc -> (String, Loc, [Tok])
scanLiteralContent ('\\' : c : cs) loc
......@@ -80,6 +80,9 @@ scanLiteralContent ('\\' : 'x' : h : l : cs) loc
(string, loc, tokens) -> (c : string, loc, tokens)
where c = chr ((digitToInt h) * 16 + (digitToInt l))
scanLiteralContent ('\\' : c : cs) loc =
error (show loc ++ ": unexpected escape: \\" ++ [c])
scanLiteralContent ('\n' : cs) loc =
case scanLiteralContent cs (incl 1 loc) of
(string, loc, tokens) -> ('\n' : string, loc, tokens)
......
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