aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2012-06-10 05:55:07 +0000
committerdos-reis <gdr@axiomatics.org>2012-06-10 05:55:07 +0000
commit6da0c161f99ee105a3bb461625ca2b3be87f7015 (patch)
treedf7ac82bbf248f8f46eb82d0613b840ff1ed0bc3 /src/interp
parent6a5c8a141d2d0a980d59531d090811c16afa3704 (diff)
downloadopen-axiom-6da0c161f99ee105a3bb461625ca2b3be87f7015.tar.gz
* interp/newaux.lisp: Move Nud property setting to spad-parser.boot.
Import sys-utility. * interp/Makefile.in: Adjust.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/Makefile.in4
-rw-r--r--src/interp/newaux.lisp40
-rw-r--r--src/interp/spad-parser.boot45
3 files changed, 46 insertions, 43 deletions
diff --git a/src/interp/Makefile.in b/src/interp/Makefile.in
index 49513340..db05e53b 100644
--- a/src/interp/Makefile.in
+++ b/src/interp/Makefile.in
@@ -314,11 +314,11 @@ server.$(FASLEXT): sys-macros.$(FASLEXT)
## The old parser component roughtly is:
##
-spad-parser.$(FASLEXT): parse.$(FASLEXT) lexing.$(FASLEXT)
+spad-parser.$(FASLEXT): parse.$(FASLEXT) lexing.$(FASLEXT) newaux.$(FASLEXT)
parse.$(FASLEXT): postpar.$(FASLEXT)
packtran.$(FASLEXT): sys-macros.$(FASLEXT)
postpar.$(FASLEXT): sys-macros.$(FASLEXT)
-newaux.$(FASLEXT): sys-macros.$(FASLEXT)
+newaux.$(FASLEXT): sys-macros.$(FASLEXT) sys-utility.$(FASLEXT)
nlib.$(FASLEXT): sys-macros.$(FASLEXT)
lexing.$(FASLEXT): sys-utility.$(FASLEXT) sys-macros.$(FASLEXT) \
io.$(FASLEXT)
diff --git a/src/interp/newaux.lisp b/src/interp/newaux.lisp
index 182ec453..54a3494f 100644
--- a/src/interp/newaux.lisp
+++ b/src/interp/newaux.lisp
@@ -74,6 +74,7 @@
(IMPORT-MODULE "sys-macros")
+(IMPORT-MODULE "sys-utility")
(in-package "BOOT")
; ** TABLE CREATION
@@ -128,45 +129,6 @@
(==> MDEF 122 121)
(\| 108 111) ;was 190 190
(\:- 125 124) (\:= 125 124)))
-
-(mapcar #'(LAMBDA (J) (MAKENEWOP J `|Nud|))
- '((|for| 130 350 |parseLoop|)
- (|while| 130 190 |parseLoop|)
- (|until| 130 190 |parseLoop|)
- (|repeat| 130 190 |parseLoop|)
- (|import| 120 0 |parseImport|)
- (|inline| 120 0 |parseInline|)
- (|forall| 998 999 |parseScheme|)
- (|exist| 998 999 |parseScheme|)
- (|unless|)
- (|add| 900 120)
- (|with| 1000 300 |parseWith|)
- (|has| 400 400)
- (- 701 700) ; right-prec. wants to be -1 + left-prec
-;; (\+ 701 700)
- (\# 999 998)
- (\! 1002 1001)
- (\' 999 999 |parseData|)
- (-> 1001 1002)
- (\: 194 195)
- (|not| 260 259 NIL)
- (~ 260 259 nil)
- (= 400 700)
- (|return| 202 201 |parseReturn|)
- (|try| 202 201 |parseTry|)
- (|throw| 202 201 |parseThrow|)
- (|leave| 202 201 |parseLeave|)
- (|exit| 202 201 |parseExit|)
- (|break| 202 201 |parseJump|)
- (|iterate| 202 201 |parseJump|)
- (|from|)
- (|yield|)
- (|if| 130 0 |parseConditional|) ; was 130
- (|case| 130 190 |parseMatch|)
- (\| 0 190)
- (|suchthat|)
- (|then| 0 114)
- (|else| 0 114)))
(defun SPECIALCASESYNTAX () (OR (AND (char= TOK '#\#) (DIGITP CHR))))
diff --git a/src/interp/spad-parser.boot b/src/interp/spad-parser.boot
index f4f50db6..99071c56 100644
--- a/src/interp/spad-parser.boot
+++ b/src/interp/spad-parser.boot
@@ -42,6 +42,7 @@
-- -- gdr/2007-11-02
--
+import newaux
import lexing
import parse
namespace BOOT
@@ -594,8 +595,8 @@ parseRightBindingPowerOf(x,p) ==
parseGetSemanticForm(rd,x,p,y) ==
z :=
- ident? y => apply(y,rd,nil)
- EVAL y -- FIXME get rid of EVAL.
+ y = nil => nil
+ apply(y,rd,nil)
z ~= nil => z
p = "Nud" => parsePrefix rd
p = "Led" => parseInfix rd
@@ -1128,3 +1129,43 @@ for x in ["-", "=", "*", "rem", "mod", "quo", "div", "/", "^",
repeat
property(x,'GENERIC) := true
+--%
+
+for j in [
+ ["for",130,350,function parseLoop],
+ ["while",130,190,function parseLoop],
+ ["until",130,190,function parseLoop],
+ ["repeat",130,190,function parseLoop],
+ ["import",120,0,function parseImport],
+ ["inline",120,0,function parseInline],
+ ["forall",998,999,function parseScheme],
+ ["exist",998,999,function parseScheme],
+ ["unless"],
+ ["add",900,120],
+ ["with",1000,300,function parseWith],
+ ["has",400,400],
+ ["-",701,700],
+ ["#",999,998],
+ ["!",1002,1001],
+ ["'",999,999,function parseData],
+ ["->",1001,1002],
+ [":",194,195],
+ ["not",260,259],
+ ["~",260,259],
+ ["=",400,700],
+ ["return",202,201,function parseReturn],
+ ["try",202,201,function parseTry],
+ ["throw",202,201,function parseThrow],
+ ["leave",202,201,function parseLeave],
+ ["exit",202,201,function parseExit],
+ ["break",202,201,function parseJump],
+ ["iterate",202,201,function parseJump],
+ ["from"],
+ ["yield"],
+ ["if",130,0,function parseConditional],
+ ["case",130,190,function parseMatch],
+ ["|",0,190],
+ ["suchthat"],
+ ["then",0,114],
+ ["else",0,114]
+ ] repeat MAKENEWOP(j,'Nud)