diff options
author | dos-reis <gdr@axiomatics.org> | 2012-05-30 17:10:37 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2012-05-30 17:10:37 +0000 |
commit | 801a2d17525131d617f226272ffdbd68467cfcbc (patch) | |
tree | 95ae72ebab94cbe9c8b1ea93a1f1467b72d82b10 /src/boot/ast.boot | |
parent | e978fdb127b726df8a04c4f7f1936b7eaf5e227b (diff) | |
download | open-axiom-801a2d17525131d617f226272ffdbd68467cfcbc.tar.gz |
* boot/ast.boot (bfSpecificErrorHere): New.
(bfISReverse) Use it. Don't use bpTrap.
(bfIS1): Likewise.
(bfParameterList): Likewise.
(bfHandlers): Likewise.
* boot/parser.boot (bpTrap): Take a parser state argument.
Adjust callers.
Diffstat (limited to 'src/boot/ast.boot')
-rw-r--r-- | src/boot/ast.boot | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/boot/ast.boot b/src/boot/ast.boot index 6fef514a..4a84bf87 100644 --- a/src/boot/ast.boot +++ b/src/boot/ast.boot @@ -123,6 +123,9 @@ $inDefIS := false quote x == ['QUOTE,x] +bfSpecificErrorHere msg == + throw msg : BootSpecificError + --% bfGenSymbol: () -> %Symbol @@ -721,8 +724,7 @@ bfISReverse(x,a) == y := bfISReverse(third x, nil) y.rest.rest.first := ['CONS,second x,a] y - bpSpecificErrorHere '"Error in bfISReverse" - bpTrap() + bfSpecificErrorHere '"Error in bfISReverse" bfIS1(lhs,rhs) == rhs = nil => ['NULL,lhs] @@ -768,13 +770,12 @@ bfIS1(lhs,rhs) == l2 := [l2,:nil] a is "DOT" => bfAND [rev,:l2] bfAND [rev,:l2,['PROGN,bfLetForm(a,['reverse!,a]),'T]] - bpSpecificErrorHere '"bad IS code is generated" - bpTrap() + bfSpecificErrorHere '"bad IS code is generated" bfHas(expr,prop) == symbol? prop => ["GET",expr, quote prop] - bpSpecificErrorHere('"expected identifier as property name") + bfSpecificErrorHere('"expected identifier as property name") bfKeyArg(k,x) == ['%Key,k,x] @@ -969,7 +970,7 @@ shoeComp x== bfParameterList(p1,p2) == p2=nil and p1 is [.,:.] => p1 p1 is ["&OPTIONAL",:.] => - p2 isnt ["&OPTIONAL",:.] => bpSpecificErrorHere '"default value required" + p2 isnt ["&OPTIONAL",:.] => bfSpecificErrorHere '"default value required" [first p1,:rest p1,:rest p2] p2 is ["&OPTIONAL",:.] => [p1,first p2,:rest p2] [p1,:p2] @@ -1367,7 +1368,7 @@ bfHandlers(n,e,hs) == main(n,e,hs,nil) where symbol? t => quote [t] -- instantiate niladic type ctor quote t main(n,e,hs',[[bfQ(["CAR",e],t),["LET",[[v,["CDR",e]]],s]],:xs]) - bpTrap() + bfSpecificErrorHere '"invalid handler message" codeForCatchHandlers(g,e,cs) == ehTest := ['AND,['CONSP,g], |