From 8042d68702fdeda99a7e9e240b40e580ec82a8d8 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Fri, 15 Feb 2008 04:28:18 +0000 Subject: Add try/catch to Boot. * boot/tokens.boot (shoeKeyWords): Add new keywords. * boot/ast.boot (Ast): Include three new nodes. (bfTry): New. (bfThrow): Likewise. * boot/parser.boot ($bodyHasReturn): Remove. (bpNoteReturnStmt): Likewise. (bpThrow): New. (bpTry): Likewise. (bpPiledCatchItems): Likewise. (bpCatchItemList): Likewise. (bpExceptionHead): Likewise. (bpExceptionTail): Likewise. (bpException): Likewise. (bpCatchItem): Likewise. (bpReturn): Include `throw' expressions. (bpStatement): Include `try' expressions. * interp/macros.lisp (|tryLine|): Rename from |try|. * interp/pspad1.boot: Replace `try' with `tryLine' throughout. --- src/boot/tokens.boot | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/boot/tokens.boot') diff --git a/src/boot/tokens.boot b/src/boot/tokens.boot index a64c6d56..d3b9d2e0 100644 --- a/src/boot/tokens.boot +++ b/src/boot/tokens.boot @@ -42,6 +42,7 @@ shoeKeyWords := [ _ ['"and","AND"] , _ ['"by", "BY" ], _ ['"case","CASE"] , _ + ['"catch","CATCH"], _ ['"cross","CROSS"] , _ ['"else", "ELSE"] , _ ['"for", "FOR"] , _ @@ -57,6 +58,8 @@ shoeKeyWords := [ _ ['"return", "RETURN"], _ ['"structure", "STRUCTURE"], _ ['"then", "THEN"], _ + ['"throw", "THROW"], _ + ['"try", "TRY"], _ ['"until", "UNTIL"], _ ['"where", "WHERE"], _ ['"while", "WHILE"], _ -- cgit v1.2.3