aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure20
-rw-r--r--configure.ac2
-rw-r--r--src/ChangeLog10
-rw-r--r--src/boot/ast.boot4
-rw-r--r--src/boot/parser.boot10
-rw-r--r--src/boot/strap/ast.clisp5
-rw-r--r--src/boot/strap/parser.clisp19
-rw-r--r--src/boot/strap/tokens.clisp7
-rw-r--r--src/boot/strap/translator.clisp13
-rw-r--r--src/boot/tokens.boot1
-rw-r--r--src/boot/translator.boot6
11 files changed, 67 insertions, 30 deletions
diff --git a/configure b/configure
index d6cc2840..a9ea8982 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for OpenAxiom 1.4.0-2010-12-06.
+# Generated by GNU Autoconf 2.65 for OpenAxiom 1.4.0-2010-12-11.
#
# Report bugs to <open-axiom-bugs@lists.sf.net>.
#
@@ -701,8 +701,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='OpenAxiom'
PACKAGE_TARNAME='openaxiom'
-PACKAGE_VERSION='1.4.0-2010-12-06'
-PACKAGE_STRING='OpenAxiom 1.4.0-2010-12-06'
+PACKAGE_VERSION='1.4.0-2010-12-11'
+PACKAGE_STRING='OpenAxiom 1.4.0-2010-12-11'
PACKAGE_BUGREPORT='open-axiom-bugs@lists.sf.net'
PACKAGE_URL=''
@@ -1491,7 +1491,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures OpenAxiom 1.4.0-2010-12-06 to adapt to many kinds of systems.
+\`configure' configures OpenAxiom 1.4.0-2010-12-11 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1566,7 +1566,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of OpenAxiom 1.4.0-2010-12-06:";;
+ short | recursive ) echo "Configuration of OpenAxiom 1.4.0-2010-12-11:";;
esac
cat <<\_ACEOF
@@ -1677,7 +1677,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-OpenAxiom configure 1.4.0-2010-12-06
+OpenAxiom configure 1.4.0-2010-12-11
generated by GNU Autoconf 2.65
Copyright (C) 2009 Free Software Foundation, Inc.
@@ -2569,7 +2569,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by OpenAxiom $as_me 1.4.0-2010-12-06, which was
+It was created by OpenAxiom $as_me 1.4.0-2010-12-11, which was
generated by GNU Autoconf 2.65. Invocation command line was
$ $0 $@
@@ -5468,7 +5468,7 @@ fi
# Define the identity of the package.
PACKAGE='openaxiom'
- VERSION='1.4.0-2010-12-06'
+ VERSION='1.4.0-2010-12-11'
cat >>confdefs.h <<_ACEOF
@@ -20961,7 +20961,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by OpenAxiom $as_me 1.4.0-2010-12-06, which was
+This file was extended by OpenAxiom $as_me 1.4.0-2010-12-11, which was
generated by GNU Autoconf 2.65. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -21027,7 +21027,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-OpenAxiom config.status 1.4.0-2010-12-06
+OpenAxiom config.status 1.4.0-2010-12-11
configured by $0, generated by GNU Autoconf 2.65,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index c29dab32..4c8eff99 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,7 +33,7 @@ dnl Makefiles for building OpenAxiom interpreter, compiler, libraries, and
dnl auxiliary tools where appropriate.
dnl
-AC_INIT([OpenAxiom], [1.4.0-2010-12-06],
+AC_INIT([OpenAxiom], [1.4.0-2010-12-11],
[open-axiom-bugs@lists.sf.net])
dnl Most of the macros used in this configure.ac are defined in files
diff --git a/src/ChangeLog b/src/ChangeLog
index 9eb9e54e..9957bae3 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,15 @@
2010-12-11 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * boot/tokens.boot: `finally' is now a keyword.
+ * boot/parser.boot (bpMissing): Use a BootParserException exception.
+ (bpTrap): Likewise.
+ (bpListAndRecover): Catch them.
+ * boot/parser.boot (shoeOutParse): Likewise.
+ * boot/ast.boot (bfHandlers): Fix thinko.
+ (codeForCatchHandlers): Likewise.
+
+2010-12-11 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* boot/parser.boot (bpListAndRecover): Use Lisp-level CATCH.
(bpTry): Rewrite.
(bpTry): Likewise.
diff --git a/src/boot/ast.boot b/src/boot/ast.boot
index 2336a6c9..ed2ff3bc 100644
--- a/src/boot/ast.boot
+++ b/src/boot/ast.boot
@@ -1160,7 +1160,7 @@ bfHandlers(n,e,hs) == main(n,e,hs,nil) where
main(n,e,hs,xs) ==
hs = nil =>
["COND",
- nreverse
+ :nreverse
[[true,["THROW",KEYWORD::OPEN_-AXIOM_-CATCH_-POINT,n]],:xs]]
hs is [['%Catch,['%Signature,v,t],s],:hs'] =>
t :=
@@ -1171,7 +1171,7 @@ bfHandlers(n,e,hs) == main(n,e,hs,nil) where
codeForCatchHandlers(g,e,cs) ==
ehTest := ['AND,['CONSP,g],
- [bfQ(['CAR,g],KEYWORD::OPEN_-AXIOM_-CATCH_-POINT)]]
+ bfQ(['CAR,g],KEYWORD::OPEN_-AXIOM_-CATCH_-POINT)]
["LET",[[g,["CATCH",KEYWORD::OPEN_-AXIOM_-CATCH_-POINT,e]]],
["COND",[ehTest,bfHandlers(g,["CDR",g],cs)],[true,g]]]
diff --git a/src/boot/parser.boot b/src/boot/parser.boot
index 29141095..8212b965 100644
--- a/src/boot/parser.boot
+++ b/src/boot/parser.boot
@@ -258,13 +258,13 @@ bpMissingMate(close,open)==
bpMissing s==
bpSpecificErrorHere strconc(PNAME s,'" possibly missing")
- throw TRAPPOINT "TRAPPED"
+ throw 'TRAPPED : BootParserException
bpCompMissing s == bpEqKey s or bpMissing s
bpTrap()==
bpGeneralErrorHere()
- throw TRAPPOINT "TRAPPED"
+ throw 'TRAPPED : BootParserException
bpRecoverTrap()==
bpFirstToken()
@@ -281,9 +281,9 @@ bpListAndRecover(f)==
done := false
c := $inputStream
while not done repeat
- found := CATCH('TRAPPOINT,apply(f,nil))
--- try apply(f,nil)
--- catch TRAPPOINT --(e) => e
+ found :=
+ try apply(f,nil)
+ catch(e: BootParserException) => e
if found = "TRAPPED"
then
$inputStream:=c
diff --git a/src/boot/strap/ast.clisp b/src/boot/strap/ast.clisp
index 70ac6194..8511e03e 100644
--- a/src/boot/strap/ast.clisp
+++ b/src/boot/strap/ast.clisp
@@ -2082,7 +2082,7 @@
(RETURN
(COND
((NULL |hs|)
- (LIST 'COND
+ (CONS 'COND
(NREVERSE (CONS (LIST T
(LIST 'THROW
:OPEN-AXIOM-CATCH-POINT |n|))
@@ -2135,8 +2135,7 @@
(PROGN
(SETQ |ehTest|
(LIST 'AND (LIST 'CONSP |g|)
- (LIST (|bfQ| (LIST 'CAR |g|)
- :OPEN-AXIOM-CATCH-POINT))))
+ (|bfQ| (LIST 'CAR |g|) :OPEN-AXIOM-CATCH-POINT)))
(LIST 'LET
(LIST (LIST |g|
(LIST 'CATCH :OPEN-AXIOM-CATCH-POINT |e|)))
diff --git a/src/boot/strap/parser.clisp b/src/boot/strap/parser.clisp
index e009d80d..9cdd72cb 100644
--- a/src/boot/strap/parser.clisp
+++ b/src/boot/strap/parser.clisp
@@ -319,7 +319,7 @@
(|bpSpecificErrorHere| (CONCAT (PNAME |s|) " possibly missing"))
(THROW :OPEN-AXIOM-CATCH-POINT
(CONS :OPEN-AXIOM-CATCH-POINT
- (CONS '(|SystemException|) (TRAPPOINT 'TRAPPED))))))
+ (CONS '(|BootParserException|) 'TRAPPED)))))
(DEFUN |bpCompMissing| (|s|) (OR (|bpEqKey| |s|) (|bpMissing| |s|)))
@@ -328,7 +328,7 @@
(|bpGeneralErrorHere|)
(THROW :OPEN-AXIOM-CATCH-POINT
(CONS :OPEN-AXIOM-CATCH-POINT
- (CONS '(|SystemException|) (TRAPPOINT 'TRAPPED))))))
+ (CONS '(|BootParserException|) 'TRAPPED)))))
(DEFUN |bpRecoverTrap| ()
(PROG (|pos2| |pos1|)
@@ -356,7 +356,20 @@
(COND
(|done| (RETURN NIL))
(T (PROGN
- (SETQ |found| (CATCH 'TRAPPOINT (APPLY |f| NIL)))
+ (SETQ |found|
+ (LET ((#0=#:G1354
+ (CATCH :OPEN-AXIOM-CATCH-POINT
+ (APPLY |f| NIL))))
+ (COND
+ ((AND (CONSP #0#)
+ (EQUAL (CAR #0#)
+ :OPEN-AXIOM-CATCH-POINT))
+ (COND
+ ((EQUAL (CAR #1=(CDR #0#))
+ '(|BootParserException|))
+ (LET ((|e| (CDR #1#))) |e|))
+ (T (THROW :OPEN-AXIOM-CATCH-POINT #0#))))
+ (T #0#))))
(COND
((EQ |found| 'TRAPPED) (SETQ |$inputStream| |c|)
(|bpRecoverTrap|))
diff --git a/src/boot/strap/tokens.clisp b/src/boot/strap/tokens.clisp
index d64068f8..ecc3ce7e 100644
--- a/src/boot/strap/tokens.clisp
+++ b/src/boot/strap/tokens.clisp
@@ -8,9 +8,10 @@
(DEFCONSTANT |shoeKeyWords|
(LIST (LIST "and" 'AND) (LIST "by" 'BY) (LIST "case" 'CASE)
(LIST "catch" 'CATCH) (LIST "cross" 'CROSS)
- (LIST "else" 'ELSE) (LIST "for" 'FOR) (LIST "has" 'HAS)
- (LIST "if" 'IF) (LIST "import" 'IMPORT) (LIST "in" 'IN)
- (LIST "is" 'IS) (LIST "isnt" 'ISNT) (LIST "leave" 'LEAVE)
+ (LIST "else" 'ELSE) (LIST "finally" 'FINALLY)
+ (LIST "for" 'FOR) (LIST "has" 'HAS) (LIST "if" 'IF)
+ (LIST "import" 'IMPORT) (LIST "in" 'IN) (LIST "is" 'IS)
+ (LIST "isnt" 'ISNT) (LIST "leave" 'LEAVE)
(LIST "module" 'MODULE) (LIST "namespace" 'NAMESPACE)
(LIST "of" 'OF) (LIST "or" 'OR) (LIST "rem" 'REM)
(LIST "repeat" 'REPEAT) (LIST "return" 'RETURN)
diff --git a/src/boot/strap/translator.clisp b/src/boot/strap/translator.clisp
index 1d17a095..2171c415 100644
--- a/src/boot/strap/translator.clisp
+++ b/src/boot/strap/translator.clisp
@@ -506,7 +506,18 @@
(SETQ |$bpCount| 0)
(SETQ |$bpParenCount| 0)
(|bpFirstTok|)
- (SETQ |found| (CATCH 'TRAPPOINT (|bpOutItem|)))
+ (SETQ |found|
+ (LET ((#0=#:G1354
+ (CATCH :OPEN-AXIOM-CATCH-POINT (|bpOutItem|))))
+ (COND
+ ((AND (CONSP #0#)
+ (EQUAL (CAR #0#) :OPEN-AXIOM-CATCH-POINT))
+ (COND
+ ((EQUAL (CAR #1=(CDR #0#))
+ '(|BootParserException|))
+ (LET ((|e| (CDR #1#))) |e|))
+ (T (THROW :OPEN-AXIOM-CATCH-POINT #0#))))
+ (T #0#))))
(COND
((EQ |found| 'TRAPPED) NIL)
((NOT (|bStreamNull| |$inputStream|)) (|bpGeneralErrorHere|)
diff --git a/src/boot/tokens.boot b/src/boot/tokens.boot
index 62c33b56..e3d7bdf0 100644
--- a/src/boot/tokens.boot
+++ b/src/boot/tokens.boot
@@ -44,6 +44,7 @@ shoeKeyWords == [ _
['"catch","CATCH"], _
['"cross","CROSS"] , _
['"else", "ELSE"] , _
+ ['"finally", "FINALLY"], _
['"for", "FOR"] , _
['"has", "HAS"] , _
['"if", "IF"], _
diff --git a/src/boot/translator.boot b/src/boot/translator.boot
index 1ae7a639..dd20eb89 100644
--- a/src/boot/translator.boot
+++ b/src/boot/translator.boot
@@ -363,8 +363,10 @@ shoeOutParse stream ==
$bpCount := 0
$bpParenCount := 0
bpFirstTok()
- found := CATCH('TRAPPOINT,bpOutItem()) --try bpOutItem() catch TRAPPOINT
- found = "TRAPPED" => nil
+ found :=
+ try bpOutItem()
+ catch(e: BootParserException) => e
+ found = 'TRAPPED => nil
not bStreamNull $inputStream =>
bpGeneralErrorHere()
nil