aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-05-09 15:57:28 +0000
committerdos-reis <gdr@axiomatics.org>2010-05-09 15:57:28 +0000
commitb248654cba0d6c5ae213882837140358f92bab1c (patch)
treeb11ab78c2648334dcc1c9bbe63e82f6878ed27f4 /src
parentaa827b23f713e6568dde0c7c9fecf67d2ee2e7fd (diff)
downloadopen-axiom-b248654cba0d6c5ae213882837140358f92bab1c.tar.gz
* boot/tokens.boot: Don't rename 'cons'.
* interp/msg.boot: Remove uses of cons. * interp/postpar.boot: Likewise. * interp/types.boot: Likewise.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog9
-rw-r--r--src/boot/strap/parser.clisp31
-rw-r--r--src/boot/strap/tokens.clisp9
-rw-r--r--src/boot/strap/translator.clisp2
-rw-r--r--src/boot/tokens.boot1
-rw-r--r--src/interp/incl.boot2
-rw-r--r--src/interp/msg.boot2
-rw-r--r--src/interp/postpar.boot4
-rw-r--r--src/interp/types.boot6
9 files changed, 39 insertions, 27 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 937d284a..09ee6ec7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,4 +1,11 @@
-2010-05-09 Gabriel Dos Reis <gdr@cse.tamu.edu>
+2010-05-09 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * boot/tokens.boot: Don't rename 'cons'.
+ * interp/msg.boot: Remove uses of cons.
+ * interp/postpar.boot: Likewise.
+ * interp/types.boot: Likewise.
+
+2010-05-09 Gabriel Dos Reis <gdr@cs.tamu.edu>
* boot/ast.boot: Miscellaneous cleanup.
* boot/includer.boot: Likewise.
diff --git a/src/boot/strap/parser.clisp b/src/boot/strap/parser.clisp
index a63057f2..8498e086 100644
--- a/src/boot/strap/parser.clisp
+++ b/src/boot/strap/parser.clisp
@@ -568,8 +568,16 @@
(|bpPush| NIL)))
(DEFUN |bpPrimary1| ()
- (OR (|bpName|) (|bpDot|) (|bpConstTok|) (|bpConstruct|) (|bpCase|)
- (|bpStruct|) (|bpPDefinition|) (|bpBPileDefinition|)))
+ (OR (|bpParenthesizedApplication|) (|bpDot|) (|bpConstTok|)
+ (|bpConstruct|) (|bpCase|) (|bpStruct|) (|bpPDefinition|)
+ (|bpBPileDefinition|)))
+
+(DEFUN |bpParenthesizedApplication| ()
+ (AND (|bpName|) (|bpAnyNo| #'|bpArgumentList|)))
+
+(DEFUN |bpArgumentList| ()
+ (AND (|bpPDefinition|)
+ (|bpPush| (|bfApplication| (|bpPop2|) (|bpPop1|)))))
(DEFUN |bpPrimary| ()
(AND (|bpFirstTok|) (OR (|bpPrimary1|) (|bpPrefixOperator|))))
@@ -592,8 +600,6 @@
(|bpPush| (|bfElt| (|bpPop2|) (|bpPop1|))))
(|bpPush| (|bfSuffixDot| (|bpPop1|))))))
-(DEFUN |bpOperator| () (AND (|bpPrimary|) (|bpAnyNo| #'|bpSelector|)))
-
(DEFUN |bpApplication| ()
(AND (|bpPrimary|) (|bpAnyNo| #'|bpSelector|)
(OR (AND (|bpApplication|)
@@ -1080,13 +1086,16 @@
(OR (|bpBracketConstruct| #'|bpPatternL|) (|bpAssignLHS|)))
(DEFUN |bpAssignLHS| ()
- (AND (|bpName|)
- (OR (AND (|bpEqKey| 'COLON) (OR (|bpApplication|) (|bpTrap|))
- (|bpPush| (|bfLocal| (|bpPop2|) (|bpPop1|))))
- (AND (|bpEqKey| 'DOT) (|bpList| #'|bpPrimary| 'DOT)
- (|bpChecknull|)
- (|bpPush| (|bfTuple| (CONS (|bpPop2|) (|bpPop1|)))))
- T)))
+ (COND
+ ((NOT (|bpName|)) NIL)
+ ((|bpEqKey| 'COLON) (OR (|bpApplication|) (|bpTrap|))
+ (|bpPush| (|bfLocal| (|bpPop2|) (|bpPop1|))))
+ (T (AND (|bpArgumentList|) (OR (|bpEqPeek| 'DOT) (|bpTrap|)))
+ (COND
+ ((|bpEqKey| 'DOT)
+ (AND (|bpList| #'|bpPrimary| 'DOT) (|bpChecknull|)
+ (|bpPush| (|bfTuple| (CONS (|bpPop2|) (|bpPop1|))))))
+ (T T)))))
(DEFUN |bpChecknull| ()
(PROG (|a|)
diff --git a/src/boot/strap/tokens.clisp b/src/boot/strap/tokens.clisp
index f2853636..c288dd05 100644
--- a/src/boot/strap/tokens.clisp
+++ b/src/boot/strap/tokens.clisp
@@ -202,11 +202,10 @@
(LET ((|bfVar#9| (LIST (LIST '|and| 'AND) (LIST '|append| 'APPEND)
(LIST '|apply| 'APPLY) (LIST '|atom| 'ATOM)
(LIST '|car| 'CAR) (LIST '|cdr| 'CDR)
- (LIST '|cons| 'CONS) (LIST '|cons?| 'CONSP)
- (LIST '|copy| 'COPY) (LIST '|croak| 'CROAK)
- (LIST '|drop| 'DROP) (LIST '|exit| 'EXIT)
- (LIST '|false| 'NIL) (LIST '|first| 'CAR)
- (LIST '|fourth| 'CADDDR)
+ (LIST '|cons?| 'CONSP) (LIST '|copy| 'COPY)
+ (LIST '|croak| 'CROAK) (LIST '|drop| 'DROP)
+ (LIST '|exit| 'EXIT) (LIST '|false| 'NIL)
+ (LIST '|first| 'CAR) (LIST '|fourth| 'CADDDR)
(LIST '|function| 'FUNCTION)
(LIST '|genvar| 'GENVAR)
(LIST '|integer?| 'INTEGERP)
diff --git a/src/boot/strap/translator.clisp b/src/boot/strap/translator.clisp
index bb7c66d3..06af9992 100644
--- a/src/boot/strap/translator.clisp
+++ b/src/boot/strap/translator.clisp
@@ -1282,8 +1282,6 @@
((MEMBER (|Option| '|no|) |$FilesToRetain|) NIL)
(T (MEMBER (|Option| |ext|) |$FilesToRetain|))))
-(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL) (TRACE |retainFile?|))
-
(DEFUN |compileBootHandler| (|progname| |options| |file|)
(PROG (|objFile| |intFile|)
(RETURN
diff --git a/src/boot/tokens.boot b/src/boot/tokens.boot
index 9d4f6274..d40e7f80 100644
--- a/src/boot/tokens.boot
+++ b/src/boot/tokens.boot
@@ -239,7 +239,6 @@ for i in [ _
["atom", "ATOM"] , _
["car", "CAR"] , _
["cdr", "CDR"] , _
- ["cons", "CONS"] , _
["cons?", "CONSP"] , _
["copy", "COPY"] , _
["croak", "CROAK"] , _
diff --git a/src/interp/incl.boot b/src/interp/incl.boot
index ebd71c2e..33bce836 100644
--- a/src/interp/incl.boot
+++ b/src/interp/incl.boot
@@ -327,7 +327,7 @@ incLude1 (:z) ==
Tail :=
[xlConStill (eb, str, lno,ufos,n),:Tail]
- Head := cons (xlConsole(eb, str, lno,ufos), Head)
+ Head := [xlConsole(eb, str, lno,ufos),:Head]
[xlOK(eb,str,lno,ufos.0),:incAppend(Head,Tail)]
info.2 = '"fin" =>
diff --git a/src/interp/msg.boot b/src/interp/msg.boot
index a13df0c7..74b97dc2 100644
--- a/src/interp/msg.boot
+++ b/src/interp/msg.boot
@@ -120,7 +120,7 @@ processKeyedError msg ==
CallerName 4,:erMsg] --temp
msgImPr? msg =>
msgOutputter msg
- $ncMsgList := cons (msg, $ncMsgList)
+ $ncMsgList := [msg,:$ncMsgList]
---------------------------------
--%getting info from db.
diff --git a/src/interp/postpar.boot b/src/interp/postpar.boot
index 311f1117..fc7ac484 100644
--- a/src/interp/postpar.boot
+++ b/src/interp/postpar.boot
@@ -39,11 +39,11 @@ module postpar
++ The type of parse trees.
%ParseTree <=>
- %Number or %Symbol or %String or cons
+ %Number or %Symbol or %String or %Pair
++ The result of processing a parse tree.
%ParseForm <=>
- %Number or %Symbol or %String or cons
+ %Number or %Symbol or %String or %Pair
$postStack := []
diff --git a/src/interp/types.boot b/src/interp/types.boot
index a9f67800..37c1d8e5 100644
--- a/src/interp/types.boot
+++ b/src/interp/types.boot
@@ -119,13 +119,13 @@ namespace BOOT
%Sequence <=> SEQUENCE
-%Pair <=> cons
+%Pair <=> CONS
%Maybe a <=> null or a
--% Data structures for the compiler
%Constructor <=> %Symbol -- constructor
-%Form <=> %Number or %Symbol or %String or cons -- input syntax form
+%Form <=> %Number or %Symbol or %String or %Pair -- input syntax form
%Instantiation <=> [%Constructor,:%Form] -- constructor instance
%Env <=> %List -- compiling env
%Mode <=> %Symbol or %String or %List -- type of forms
@@ -134,7 +134,7 @@ namespace BOOT
[%Code,:[%Mode,:[%Env,:null]]]
%Signature -- signature
- <=> %Symbol or cons
+ <=> %Symbol or %Pair
%Modemap <=> %List -- modemap