From c8d016a2c7b8a2781eb013ecc88cff8b7b361a2b Mon Sep 17 00:00:00 2001 From: dos-reis Date: Wed, 30 Apr 2008 02:48:44 +0000 Subject: * boot/tokens.boot: Declare tokens as constants. --- src/ChangeLog | 2 ++ src/boot/strap/tokens.clisp | 22 +++++++++++----------- src/boot/tokens.boot | 24 ++++++++++++------------ 3 files changed, 25 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index dae86473..19fc995e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2008-04-29 Gabriel Dos Reis + * boot/tokens.boot: Declare tokens as constants. + * boot/parser.boot (bpExportItemList): New. (bpExports): Likewise. (bpModule): Use it. diff --git a/src/boot/strap/tokens.clisp b/src/boot/strap/tokens.clisp index c286f0d5..b564c939 100644 --- a/src/boot/strap/tokens.clisp +++ b/src/boot/strap/tokens.clisp @@ -4,7 +4,7 @@ (IN-PACKAGE "BOOTTRAN") -(DEFPARAMETER |shoeKeyWords| +(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 "if" 'IF) @@ -44,27 +44,27 @@ (DEFPARAMETER |shoeKeyTable| (|shoeKeyTableCons|)) -(DEFPARAMETER |shoeSPACE| (QENUM " " 0)) +(DEFCONSTANT |shoeSPACE| (QENUM " " 0)) -(DEFPARAMETER |shoeESCAPE| (QENUM "_ " 0)) +(DEFCONSTANT |shoeESCAPE| (QENUM "_ " 0)) (DEFPARAMETER |shoeLispESCAPE| (QENUM "! " 0)) -(DEFPARAMETER |shoeSTRINGCHAR| (QENUM "\" " 0)) +(DEFCONSTANT |shoeSTRINGCHAR| (QENUM "\" " 0)) -(DEFPARAMETER |shoePLUSCOMMENT| (QENUM "+ " 0)) +(DEFCONSTANT |shoePLUSCOMMENT| (QENUM "+ " 0)) -(DEFPARAMETER |shoeMINUSCOMMENT| (QENUM "- " 0)) +(DEFCONSTANT |shoeMINUSCOMMENT| (QENUM "- " 0)) -(DEFPARAMETER |shoeDOT| (QENUM ". " 0)) +(DEFCONSTANT |shoeDOT| (QENUM ". " 0)) -(DEFPARAMETER |shoeEXPONENT1| (QENUM "E " 0)) +(DEFCONSTANT |shoeEXPONENT1| (QENUM "E " 0)) -(DEFPARAMETER |shoeEXPONENT2| (QENUM "e " 0)) +(DEFCONSTANT |shoeEXPONENT2| (QENUM "e " 0)) -(DEFPARAMETER |shoeCLOSEPAREN| (QENUM ") " 0)) +(DEFCONSTANT |shoeCLOSEPAREN| (QENUM ") " 0)) -(DEFPARAMETER |shoeTAB| 9) +(DEFCONSTANT |shoeTAB| 9) (DEFUN |shoeInsert| (|s| |d|) (PROG (|v| |k| |n| |u| |h| |l|) diff --git a/src/boot/tokens.boot b/src/boot/tokens.boot index 8895fe53..5c8382a3 100644 --- a/src/boot/tokens.boot +++ b/src/boot/tokens.boot @@ -38,7 +38,7 @@ import initial_-env )package "BOOTTRAN" ++ Table of Boot keywords and their token name. -shoeKeyWords := [ _ +shoeKeyWords == [ _ ['"and","AND"] , _ ['"by", "BY" ], _ ['"case","CASE"] , _ @@ -108,27 +108,27 @@ shoeKeyTableCons()== shoeKeyTable:=shoeKeyTableCons() -shoeSPACE := QENUM('" ", 0) +shoeSPACE == QENUM('" ", 0) -shoeESCAPE := QENUM('"__ ", 0) +shoeESCAPE == QENUM('"__ ", 0) shoeLispESCAPE := QENUM('"! ", 0) -shoeSTRING_CHAR := QENUM('"_" ", 0) +shoeSTRING_CHAR == QENUM('"_" ", 0) -shoePLUSCOMMENT := QENUM('"+ ", 0) +shoePLUSCOMMENT == QENUM('"+ ", 0) -shoeMINUSCOMMENT:= QENUM('"- ", 0) +shoeMINUSCOMMENT == QENUM('"- ", 0) -shoeDOT := QENUM('". ", 0) +shoeDOT == QENUM('". ", 0) -shoeEXPONENT1 := QENUM('"E ", 0) +shoeEXPONENT1 == QENUM('"E ", 0) -shoeEXPONENT2 := QENUM('"e ", 0) +shoeEXPONENT2 == QENUM('"e ", 0) -shoeCLOSEPAREN := QENUM('") ", 0) +shoeCLOSEPAREN == QENUM('") ", 0) ---shoeCLOSEANGLE := QENUM('"> ", 0) -shoeTAB := 9 +--shoeCLOSEANGLE == QENUM('"> ", 0) +shoeTAB == 9 shoeInsert(s,d) == l := #s -- cgit v1.2.3