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.
br-parser-tools/collects/parser-tools/private-yacc/parser-actions.ss

20 lines
448 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)
;; 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 ())
)