You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
460 B
Scheme
20 lines
460 B
Scheme
#cs
|
|
(module parser-actions mzscheme
|
|
|
|
;; The entries into the action table
|
|
|
|
(provide shift? reduce? accept?
|
|
shift-state reduce-prod-num reduce-lhs-num reduce-rhs-length
|
|
make-shift make-reduce make-accept)
|
|
|
|
;; action = (shift int)
|
|
;; | (reduce int int int)
|
|
;; | (accept)
|
|
;; | int
|
|
;; | #f
|
|
|
|
(define-struct shift (state))
|
|
(define-struct reduce (prod-num lhs-num rhs-length))
|
|
(define-struct accept ())
|
|
)
|