|
|
@ -13,14 +13,14 @@
|
|
|
|
(let loop ((i 1))
|
|
|
|
(let loop ((i 1))
|
|
|
|
(cond
|
|
|
|
(cond
|
|
|
|
((> i x) null)
|
|
|
|
((> i x) null)
|
|
|
|
(else
|
|
|
|
(src-pos
|
|
|
|
(if src-pos
|
|
|
|
|
|
|
|
`(,(datum->syntax-object act (string->symbol (format "$~a" i)))
|
|
|
|
`(,(datum->syntax-object act (string->symbol (format "$~a" i)))
|
|
|
|
,(datum->syntax-object act (string->symbol (format "$~a-start-pos" i)))
|
|
|
|
,(datum->syntax-object act (string->symbol (format "$~a-start-pos" i)))
|
|
|
|
,(datum->syntax-object act (string->symbol (format "$~a-end-pos" i)))
|
|
|
|
,(datum->syntax-object act (string->symbol (format "$~a-end-pos" i)))
|
|
|
|
,@(loop (add1 i)))
|
|
|
|
,@(loop (add1 i))))
|
|
|
|
|
|
|
|
(else
|
|
|
|
`(,(datum->syntax-object act (string->symbol (format "$~a" i)))
|
|
|
|
`(,(datum->syntax-object act (string->symbol (format "$~a" i)))
|
|
|
|
,@(loop (add1 i))))))))
|
|
|
|
,@(loop (add1 i)))))))
|
|
|
|
|
|
|
|
|
|
|
|
;; nullable: production list * int -> non-term set
|
|
|
|
;; nullable: production list * int -> non-term set
|
|
|
|
;; determines which non-terminals can derive epsilon
|
|
|
|
;; determines which non-terminals can derive epsilon
|
|
|
|