aboutsummaryrefslogtreecommitdiff
path: root/src/interp/fnewmeta.lisp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2009-07-13 22:36:51 +0000
committerdos-reis <gdr@axiomatics.org>2009-07-13 22:36:51 +0000
commitc6efaa6ac903c17bd85eb51e672f80e9baa0ebc4 (patch)
treef0543ea203bea22c063a517ca7136ed10a486be1 /src/interp/fnewmeta.lisp
parent361eca1c035acd57ad9f0ac1133fb641eabe122b (diff)
downloadopen-axiom-c6efaa6ac903c17bd85eb51e672f80e9baa0ebc4.tar.gz
* interp/metalex.lisp: "break" is now a keyword.
* interp/fnewmeta.lisp (PARSE-Jump): New. * interp/compiler.boot (compAtom): Dipatch compilation of "break" and "iterate" to... (compBreak): ... here (compIterate): and here. (jumpFromLoop): New. (compRepeatOrCollect): Initialize $lookKind, $iterateCount, and $breakCount. Set exit point for loop bodies with 'iterate' expressions. * interp/parse.boot (parseAtom): Remove. (parseTran): Adjust. * algebra/outform.spad.pamphlet: Tidy. * interp/c-util.boot ($loopKind): Declare. ($repeatBodyLabel): Likewise. ($iterateCount): Likewise. ($breakCount): Likewise.
Diffstat (limited to 'src/interp/fnewmeta.lisp')
-rw-r--r--src/interp/fnewmeta.lisp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/interp/fnewmeta.lisp b/src/interp/fnewmeta.lisp
index 0e248f83..7df80102 100644
--- a/src/interp/fnewmeta.lisp
+++ b/src/interp/fnewmeta.lisp
@@ -113,7 +113,7 @@
;; Return: 'return' Expression +(return #1) ;
-;; Exit: 'exit' (Expression / +\$NoValue) +(exit #1) ;
+;; Exit: 'exit' Expression +(exit #1) ;
;; Leave: 'leave' ( Expression / +\$NoValue )
;; ('from' Label +(leaveFrom #1 #1) / +(leave #1)) ;
@@ -571,13 +571,19 @@
(PUSH-REDUCTION '|PARSE-Return|
(CONS '|return| (CONS (POP-STACK-1) NIL)))))
+(DEFUN |PARSE-Jump| ()
+ (LET ((S (CURRENT-SYMBOL)))
+ (AND S
+ (ACTION (ADVANCE-TOKEN))
+ (PUSH-REDUCTION '|PARSE-Jump| S))))
+
(DEFUN |PARSE-Exit| ()
(AND (MATCH-ADVANCE-STRING "exit")
(MUST (OR (|PARSE-Expression|)
(PUSH-REDUCTION '|PARSE-Exit| '|$NoValue|)))
(PUSH-REDUCTION '|PARSE-Exit|
- (CONS '|exit| (CONS (POP-STACK-1) NIL)))))
+ (CONS '|exit| (CONS (POP-STACK-1) NIL)))))
(DEFUN |PARSE-Leave| ()