aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/interp/newaux.lisp36
-rw-r--r--src/interp/spad-parser.boot56
3 files changed, 60 insertions, 36 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 84506065..c7ab6055 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,9 @@
2012-06-10 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * interp/newaux.lisp: Move Led property setting to spad-parser.boot.
+
+2012-06-10 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* interp/newaux.lisp: Move Nud property setting to spad-parser.boot.
Import sys-utility.
* interp/Makefile.in: Adjust.
diff --git a/src/interp/newaux.lisp b/src/interp/newaux.lisp
index 54a3494f..b2d17b99 100644
--- a/src/interp/newaux.lisp
+++ b/src/interp/newaux.lisp
@@ -82,8 +82,6 @@
(defparameter OpAssoc nil
"Information used by OUT BOOT operator pretty printing routines")
-(defun MAKENEWOP (X Y) (MAKEOP X Y '|PARSE-NewKEY|))
-
(defun MAKEOP (X Y KEYNAME)
(if (OR (NOT (CDR X)) (NUMBERP (SECOND X)))
(SETQ X (CONS (FIRST X) X)))
@@ -96,40 +94,6 @@
(defvar |PARSE-NewKEY| nil) ;;list of keywords
-(mapcar #'(LAMBDA(J) (MAKENEWOP J '|Led|))
- '((* 800 801) (|rem| 800 801) (|mod| 800 801)
- (|quo| 800 801) (|div| 800 801)
- (/ 800 801) (** 900 901) (^ 900 901)
- (|exquo| 800 801) (+ 700 701)
- (- 700 701) (-> 1001 1002) (<- 1001 1002)
- (\: 996 997) (\:\: 996 997)
- (\@ 996 997) (|pretend| 995 996)
- (\.) (\! \! 1002 1001)
- (\, 110 111)
- (\; 81 82 |parseSemicolon|)
- (< 400 400) (> 400 400)
- (<< 400 400) (>> 400 400)
- (<= 400 400) (>= 400 400)
- (= 400 400)
- (~= 400 400)
- (|in| 400 400)
- (|case| 400 400)
- (|add| 400 120)
- (|with| 2000 400 |parseInfixWith|)
- (|has| 400 400)
- (|where| 121 104) ; must be 121 for SPAD, 126 for boot--> nboot
- (|when| 112 190)
- (|is| 400 400) (|isnt| 400 400)
- (|and| 250 251) (|or| 200 201)
- (/\\ 250 251) (\\/ 200 201)
- (\.\. SEGMENT 401 699 |parseSegmentTail|)
- (=> 123 103)
- (+-> 998 121)
- (== DEF 122 121)
- (==> MDEF 122 121)
- (\| 108 111) ;was 190 190
- (\:- 125 124) (\:= 125 124)))
-
(defun SPECIALCASESYNTAX () (OR (AND (char= TOK '#\#) (DIGITP CHR))))
(defun TERMINATOR (CHR)
diff --git a/src/interp/spad-parser.boot b/src/interp/spad-parser.boot
index 99071c56..678c66d2 100644
--- a/src/interp/spad-parser.boot
+++ b/src/interp/spad-parser.boot
@@ -1131,6 +1131,62 @@ for x in ["-", "=", "*", "rem", "mod", "quo", "div", "/", "^",
--%
+MAKENEWOP(x,y) ==
+ MAKEOP(x,y,'PARSE_-NewKEY)
+
+for j in [
+ ["*",800,801],
+ ["rem",800,801],
+ ["mod",800,801],
+ ["quo",800,801],
+ ["div",800,801],
+ ["/",800,801],
+ ["**",900,901],
+ ["^",900,901],
+ ["exquo",800,801],
+ ["+",700,701],
+ ["-",700,701],
+ ["->",1001,1002],
+ ["<-",1001,1002],
+ [":",996,997],
+ ["::",996,997],
+ ["@",996,997],
+ ["pretend",995,996],
+ ["."],
+ ["!","!",1002,1001],
+ [",",110,111],
+ [";",81,82,function parseSemicolon],
+ ["<",400,400],
+ [">",400,400],
+ ["<<",400,400],
+ [">>",400,400],
+ ["<=",400,400],
+ [">=",400,400],
+ ["=",400,400],
+ ["~=",400,400],
+ ["in",400,400],
+ ["case",400,400],
+ ["add",400,120],
+ ["with",2000,400,function parseInfixWith],
+ ["has",400,400],
+ ["where",121,104],
+ ["when",112,190],
+ ["is",400,400],
+ ["isnt",400,400],
+ ["and",250,251],
+ ["or",200,201],
+ ["/\",250,251],
+ ["\/",200,201],
+ ["..","SEGMENT",401,699,function parseSegmentTail],
+ ["=>",123,103],
+ ["+->",998,121],
+ ["==","DEF",122,121],
+ ["==>","MDEF",122,121],
+ ["|",108,111],
+ [":-",125,124],
+ [":=",125,124]
+ ] repeat MAKENEWOP(j,'Led)
+
for j in [
["for",130,350,function parseLoop],
["while",130,190,function parseLoop],