aboutsummaryrefslogtreecommitdiff
path: root/src/boot/strap
diff options
context:
space:
mode:
Diffstat (limited to 'src/boot/strap')
-rw-r--r--src/boot/strap/parser.clisp6
-rw-r--r--src/boot/strap/tokens.clisp7
2 files changed, 9 insertions, 4 deletions
diff --git a/src/boot/strap/parser.clisp b/src/boot/strap/parser.clisp
index 802fc8bc..078f48a7 100644
--- a/src/boot/strap/parser.clisp
+++ b/src/boot/strap/parser.clisp
@@ -697,10 +697,12 @@
(DEFUN |bpTimes| ()
(OR (|bpReduce|) (|bpLeftAssoc| '(TIMES SLASH) #'|bpExpt|)))
+(DEFUN |bpEuclid| () (|bpLeftAssoc| '(QUO REM) #'|bpTimes|))
+
(DEFUN |bpMinus| ()
- (OR (AND (|bpInfGeneric| '(MINUS)) (OR (|bpTimes|) (|bpTrap|))
+ (OR (AND (|bpInfGeneric| '(MINUS)) (OR (|bpEuclid|) (|bpTrap|))
(|bpPush| (|bfApplication| (|bpPop2|) (|bpPop1|))))
- (|bpTimes|)))
+ (|bpEuclid|)))
(DEFUN |bpArith| () (|bpLeftAssoc| '(PLUS MINUS) #'|bpMinus|))
diff --git a/src/boot/strap/tokens.clisp b/src/boot/strap/tokens.clisp
index 94923a97..81c97675 100644
--- a/src/boot/strap/tokens.clisp
+++ b/src/boot/strap/tokens.clisp
@@ -12,8 +12,9 @@
(LIST "if" 'IF) (LIST "import" 'IMPORT) (LIST "in" 'IN)
(LIST "is" 'IS) (LIST "isnt" 'ISNT) (LIST "leave" 'LEAVE)
(LIST "module" 'MODULE) (LIST "namespace" 'NAMESPACE)
- (LIST "of" 'OF) (LIST "or" 'OR) (LIST "repeat" 'REPEAT)
- (LIST "return" 'RETURN) (LIST "structure" 'STRUCTURE)
+ (LIST "of" 'OF) (LIST "or" 'OR) (LIST "rem" 'REM)
+ (LIST "repeat" 'REPEAT) (LIST "return" 'RETURN)
+ (LIST "quo" 'QUO) (LIST "structure" 'STRUCTURE)
(LIST "then" 'THEN) (LIST "throw" 'THROW) (LIST "try" 'TRY)
(LIST "until" 'UNTIL) (LIST "where" 'WHERE)
(LIST "while" 'WHILE) (LIST "." 'DOT) (LIST ":" 'COLON)
@@ -165,6 +166,7 @@
(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
(LET ((|bfVar#7| (LIST (LIST 'SHOEEQ '=) (LIST 'TIMES '*)
+ (LIST 'REM '|rem|) (LIST 'QUO '|quo|)
(LIST 'PLUS '+) (LIST 'IS '|is|)
(LIST 'ISNT '|isnt|) (LIST 'AND '|and|)
(LIST 'OR '|or|) (LIST 'SLASH '/)
@@ -237,6 +239,7 @@
(LIST '|writeByte| 'WRITE-BYTE)
(LIST '|writeLine| 'WRITE-LINE) (LIST 'PLUS '+)
(LIST 'MINUS '-) (LIST 'TIMES '*) (LIST 'POWER 'EXPT)
+ (LIST 'REM 'REM) (LIST 'QUO 'TRUNCATE)
(LIST 'SLASH '/) (LIST 'LT '<) (LIST 'GT '>)
(LIST 'LE '<=) (LIST 'GE '>=) (LIST 'SHOEEQ 'EQUAL)
(LIST 'SHOENE '/=) (LIST 'T 'T$)))