Corrected infinite definition in the intermediate parser specification
svn: r6737
This commit is contained in:
parent
ce4aa511ea
commit
2c2b3b17da
|
@ -338,7 +338,7 @@
|
||||||
|
|
||||||
(define (new-class expr)
|
(define (new-class expr)
|
||||||
(choose ((sequence (new name O_PAREN C_PAREN) id "class instantiation")
|
(choose ((sequence (new name O_PAREN C_PAREN) id "class instantiation")
|
||||||
(sequence (new name O_PAREN (comma-sep expression "arguments") C_PAREN) id "class instantiation"))
|
(sequence (new name O_PAREN (comma-sep expr "arguments") C_PAREN) id "class instantiation"))
|
||||||
"class instantiation"))
|
"class instantiation"))
|
||||||
|
|
||||||
(define (new-array type-name expr)
|
(define (new-array type-name expr)
|
||||||
|
@ -725,11 +725,12 @@
|
||||||
EQUAL expression))))
|
EQUAL expression))))
|
||||||
|
|
||||||
(define statement
|
(define statement
|
||||||
(make-statement (list (if-s expression (eta statement) #f)
|
(make-statement
|
||||||
(return-s expression #t)
|
(list (if-s expression (eta statement) #f)
|
||||||
(variable-declaration (value+name-type prim-type) expression #f "local variable")
|
(return-s expression #t)
|
||||||
(block (repeat (eta statement)))
|
(variable-declaration (value+name-type prim-type) expression #f "local variable")
|
||||||
(sequence (stmt-expr SEMI_COLON) id "statement"))))
|
(block (repeat (eta statement)))
|
||||||
|
(sequence (stmt-expr SEMI_COLON) id "statement"))))
|
||||||
|
|
||||||
(define field (make-field #f (value+name-type prim-type) expression #t))
|
(define field (make-field #f (value+name-type prim-type) expression #t))
|
||||||
(define intermediate+access-field (make-field access-mods (value+name-type prim-type) expression #t))
|
(define intermediate+access-field (make-field access-mods (value+name-type prim-type) expression #t))
|
||||||
|
@ -772,7 +773,8 @@
|
||||||
(repeat method-sig-no-abs)))
|
(repeat method-sig-no-abs)))
|
||||||
|
|
||||||
(define class
|
(define class
|
||||||
(class-def tok:abstract (extend-dec identifier) (implements-dec (comma-sep identifier "interfaces"))
|
(class-def tok:abstract (extend-dec identifier)
|
||||||
|
(implements-dec (comma-sep identifier "interfaces"))
|
||||||
(repeat (class-body (list field method constructor)))))
|
(repeat (class-body (list field method constructor)))))
|
||||||
|
|
||||||
(define intermediate+access-class
|
(define intermediate+access-class
|
||||||
|
@ -782,10 +784,10 @@
|
||||||
intermediate+access-constructor)))))
|
intermediate+access-constructor)))))
|
||||||
|
|
||||||
(define program
|
(define program
|
||||||
(program #f (repeat import-dec) (repeat (top-member (list class interface)))))
|
(make-program #f (repeat import-dec) (repeat (top-member (list class interface)))))
|
||||||
|
|
||||||
(define intermediate+access-prog
|
(define intermediate+access-prog
|
||||||
(program #f (repeat import-dec)
|
(make-program #f (repeat import-dec)
|
||||||
(repeat (top-member (list intermediate+access-class interface)))))
|
(repeat (top-member (list intermediate+access-class interface)))))
|
||||||
|
|
||||||
)
|
)
|
||||||
|
@ -893,7 +895,7 @@
|
||||||
(method-header method-sig-abs))))))
|
(method-header method-sig-abs))))))
|
||||||
|
|
||||||
(define program
|
(define program
|
||||||
(program (sequence (tok:package name SEMI_COLON) id "package specification")
|
(make-program (sequence (tok:package name SEMI_COLON) id "package specification")
|
||||||
(repeat import-dec)
|
(repeat import-dec)
|
||||||
(repeat (top-member (list class interface)))))
|
(repeat (top-member (list class interface)))))
|
||||||
)
|
)
|
||||||
|
|
|
@ -307,6 +307,7 @@
|
||||||
;(printf "looping in order-cus: ~a ~a ~n" (empty-queue? queue) (length ordered))
|
;(printf "looping in order-cus: ~a ~a ~n" (empty-queue? queue) (length ordered))
|
||||||
(unless (empty-queue? queue)
|
(unless (empty-queue? queue)
|
||||||
(let ((cu (send queue pop)))
|
(let ((cu (send queue pop)))
|
||||||
|
;(printf "cu ~a~n" cu)
|
||||||
(if (ok-to-add? cu ordered cus type-recs)
|
(if (ok-to-add? cu ordered cus type-recs)
|
||||||
(set! ordered (cons cu ordered))
|
(set! ordered (cons cu ordered))
|
||||||
(send queue push cu)))
|
(send queue push cu)))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user