hamlet/LrTable-struct.ss
(module LrTable-struct (planet chongkai/sml)
  (#%module-begin
   (Program:
    (STRDECTopDec:
     (STRUCTUREStrDec:
      (StrBind:
       (StrId: LrTable-struct)
       (COLONStrExp:
        (STRUCTStrExp:
         (SEQStrDec:
          (DECStrDec: (OPENDec: (LongStrId: Array-struct)))
          (SEQStrDec:
           (DECStrDec: (EMPTYDec:))
           (SEQStrDec:
            (DECStrDec:
             (DATATYPEDec:
              (DatBind:
               (TyVarseq: (TyVar: |'a|) (TyVar: |'b|))
               (TyCon: pairlist-type)
               (ConBind:
                (VId: EMPTY)
                (ConBind:
                 (VId: PAIR)
                 (RECORDTy:
                  (TyRow:
                   (Lab: |1|)
                   (VARTy: (TyVar: |'a|))
                   (TyRow:
                    (Lab: |2|)
                    (VARTy: (TyVar: |'b|))
                    (TyRow: (Lab: |3|) (CONTy: (Tyseq: (VARTy: (TyVar: |'a|)) (VARTy: (TyVar: |'b|))) (LongTyCon: pairlist-type)))))))))))
            (SEQStrDec:
             (DECStrDec: (DATATYPEDec: (DatBind: (TyVarseq:) (TyCon: term-type) (ConBind: (VId: T) (CONTy: (Tyseq:) (LongTyCon: int-type))))))
             (SEQStrDec:
              (DECStrDec: (DATATYPEDec: (DatBind: (TyVarseq:) (TyCon: nonterm-type) (ConBind: (VId: NT) (CONTy: (Tyseq:) (LongTyCon: int-type))))))
              (SEQStrDec:
               (DECStrDec: (DATATYPEDec: (DatBind: (TyVarseq:) (TyCon: state-type) (ConBind: (VId: STATE) (CONTy: (Tyseq:) (LongTyCon: int-type))))))
               (SEQStrDec:
                (DECStrDec:
                 (DATATYPEDec:
                  (DatBind:
                   (TyVarseq:)
                   (TyCon: action-type)
                   (ConBind:
                    (VId: SHIFT)
                    (CONTy: (Tyseq:) (LongTyCon: state-type))
                    (ConBind: (VId: REDUCE) (CONTy: (Tyseq:) (LongTyCon: int-type)) (ConBind: (VId: ACCEPT) (ConBind: (VId: ERROR))))))))
                (SEQStrDec:
                 (DECStrDec:
                  (EXCEPTIONDec:
                   (NEWExBind:
                    (VId: Goto)
                    (RECORDTy:
                     (TyRow: (Lab: |1|) (CONTy: (Tyseq:) (LongTyCon: state-type)) (TyRow: (Lab: |2|) (CONTy: (Tyseq:) (LongTyCon: nonterm-type))))))))
                 (SEQStrDec:
                  (DECStrDec:
                   (TYPEDec:
                    (TypBind:
                     (TyVarseq:)
                     (TyCon: table-type)
                     (RECORDTy:
                      (TyRow:
                       (Lab: states)
                       (CONTy: (Tyseq:) (LongTyCon: int-type))
                       (TyRow:
                        (Lab: rules)
                        (CONTy: (Tyseq:) (LongTyCon: int-type))
                        (TyRow:
                         (Lab: initialState)
                         (CONTy: (Tyseq:) (LongTyCon: state-type))
                         (TyRow:
                          (Lab: action)
                          (CONTy:
                           (Tyseq:
                            (PARTy:
                             (RECORDTy:
                              (TyRow:
                               (Lab: |1|)
                               (CONTy:
                                (Tyseq: (CONTy: (Tyseq:) (LongTyCon: term-type)) (CONTy: (Tyseq:) (LongTyCon: action-type)))
                                (LongTyCon: pairlist-type))
                               (TyRow: (Lab: |2|) (CONTy: (Tyseq:) (LongTyCon: action-type)))))))
                           (LongTyCon: array-type))
                          (TyRow:
                           (Lab: goto)
                           (CONTy:
                            (Tyseq:
                             (CONTy:
                              (Tyseq: (CONTy: (Tyseq:) (LongTyCon: nonterm-type)) (CONTy: (Tyseq:) (LongTyCon: state-type)))
                              (LongTyCon: pairlist-type)))
                            (LongTyCon: array-type)))))))))))
                  (SEQStrDec:
                   (DECStrDec:
                    (VALDec:
                     (TyVarseq:)
                     (PLAINValBind:
                      (ATPat: (IDAtPat: (LongVId: numStates)))
                      (FNExp:
                       (Match:
                        (Mrule:
                         (ATPat:
                          (PARAtPat:
                           (COLONPat:
                            (ATPat: (RECORDAtPat: (FIELDPatRow: (Lab: states) (ATPat: (IDAtPat: (LongVId: states))) (DOTSPatRow:))))
                            (CONTy: (Tyseq:) (LongTyCon: table-type)))))
                         (ATExp: (IDAtExp: (LongVId: states)))))))))
                   (SEQStrDec:
                    (DECStrDec:
                     (VALDec:
                      (TyVarseq:)
                      (PLAINValBind:
                       (ATPat: (IDAtPat: (LongVId: numRules)))
                       (FNExp:
                        (Match:
                         (Mrule:
                          (ATPat:
                           (PARAtPat:
                            (COLONPat:
                             (ATPat: (RECORDAtPat: (FIELDPatRow: (Lab: rules) (ATPat: (IDAtPat: (LongVId: rules))) (DOTSPatRow:))))
                             (CONTy: (Tyseq:) (LongTyCon: table-type)))))
                          (ATExp: (IDAtExp: (LongVId: rules)))))))))
                    (SEQStrDec:
                     (DECStrDec:
                      (VALDec:
                       (TyVarseq:)
                       (PLAINValBind:
                        (ATPat: (IDAtPat: (LongVId: describeActions)))
                        (FNExp:
                         (Match:
                          (Mrule:
                           (ATPat:
                            (PARAtPat:
                             (COLONPat:
                              (ATPat: (RECORDAtPat: (FIELDPatRow: (Lab: action) (ATPat: (IDAtPat: (LongVId: action))) (DOTSPatRow:))))
                              (CONTy: (Tyseq:) (LongTyCon: table-type)))))
                           (FNExp:
                            (Match:
                             (Mrule:
                              (ATPat: (PARAtPat: (ATPat: (PARAtPat: (CONPat: (LongVId: STATE) (IDAtPat: (LongVId: s)))))))
                              (ATExp:
                               (PARAtExp:
                                (APPExp:
                                 (ATExp: (IDAtExp: (LongVId: sub)))
                                 (RECORDAtExp:
                                  (ExpRow:
                                   (Lab: |1|)
                                   (ATExp: (IDAtExp: (LongVId: action)))
                                   (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: s))))))))))))))))))
                     (SEQStrDec:
                      (DECStrDec:
                       (VALDec:
                        (TyVarseq:)
                        (PLAINValBind:
                         (ATPat: (IDAtPat: (LongVId: describeGoto)))
                         (FNExp:
                          (Match:
                           (Mrule:
                            (ATPat:
                             (PARAtPat:
                              (COLONPat:
                               (ATPat: (RECORDAtPat: (FIELDPatRow: (Lab: goto) (ATPat: (IDAtPat: (LongVId: goto))) (DOTSPatRow:))))
                               (CONTy: (Tyseq:) (LongTyCon: table-type)))))
                            (FNExp:
                             (Match:
                              (Mrule:
                               (ATPat: (PARAtPat: (ATPat: (PARAtPat: (CONPat: (LongVId: STATE) (IDAtPat: (LongVId: s)))))))
                               (ATExp:
                                (PARAtExp:
                                 (APPExp:
                                  (ATExp: (IDAtExp: (LongVId: sub)))
                                  (RECORDAtExp:
                                   (ExpRow:
                                    (Lab: |1|)
                                    (ATExp: (IDAtExp: (LongVId: goto)))
                                    (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: s))))))))))))))))))
                      (SEQStrDec:
                       (DECStrDec:
                        (VALDec:
                         (TyVarseq:)
                         (RECValBind:
                          (PLAINValBind:
                           (ATPat: (IDAtPat: (LongVId: findTerm)))
                           (FNExp:
                            (Match:
                             (Mrule:
                              (ATPat:
                               (PARAtPat:
                                (ATPat:
                                 (RECORDAtPat:
                                  (FIELDPatRow:
                                   (Lab: |1|)
                                   (ATPat: (PARAtPat: (CONPat: (LongVId: T) (IDAtPat: (LongVId: term)))))
                                   (FIELDPatRow:
                                    (Lab: |2|)
                                    (ATPat: (IDAtPat: (LongVId: row)))
                                    (FIELDPatRow: (Lab: |3|) (ATPat: (IDAtPat: (LongVId: default))))))))))
                              (ATExp:
                               (LETAtExp:
                                (VALDec:
                                 (TyVarseq:)
                                 (RECValBind:
                                  (PLAINValBind:
                                   (ATPat: (IDAtPat: (LongVId: find)))
                                   (FNExp:
                                    (Match:
                                     (Mrule:
                                      (ATPat:
                                       (PARAtPat:
                                        (ATPat:
                                         (PARAtPat:
                                          (ATPat:
                                           (PARAtPat:
                                            (CONPat:
                                             (LongVId: PAIR)
                                             (RECORDAtPat:
                                              (FIELDPatRow:
                                               (Lab: |1|)
                                               (ATPat: (PARAtPat: (CONPat: (LongVId: T) (IDAtPat: (LongVId: key)))))
                                               (FIELDPatRow:
                                                (Lab: |2|)
                                                (ATPat: (IDAtPat: (LongVId: data)))
                                                (FIELDPatRow: (Lab: |3|) (ATPat: (IDAtPat: (LongVId: r))))))))))))))
                                      (IFExp:
                                       (ATExp:
                                        (PARAtExp:
                                         (APPExp:
                                          (ATExp: (IDAtExp: (LongVId: <)))
                                          (RECORDAtExp:
                                           (ExpRow:
                                            (Lab: |1|)
                                            (ATExp: (IDAtExp: (LongVId: key)))
                                            (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: term)))))))))
                                       (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: find))) (IDAtExp: (LongVId: r)))))
                                       (IFExp:
                                        (ATExp:
                                         (PARAtExp:
                                          (APPExp:
                                           (ATExp: (IDAtExp: (LongVId: =)))
                                           (RECORDAtExp:
                                            (ExpRow:
                                             (Lab: |1|)
                                             (ATExp: (IDAtExp: (LongVId: key)))
                                             (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: term)))))))))
                                        (ATExp: (IDAtExp: (LongVId: data)))
                                        (ATExp: (IDAtExp: (LongVId: default))))))
                                     (Match: (Mrule: (ATPat: (PARAtPat: (ATPat: (IDAtPat: (LongVId: EMPTY))))) (ATExp: (IDAtExp: (LongVId: default))))))))))
                                (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: find))) (IDAtExp: (LongVId: row))))))))))))))
                       (SEQStrDec:
                        (DECStrDec:
                         (VALDec:
                          (TyVarseq:)
                          (RECValBind:
                           (PLAINValBind:
                            (ATPat: (IDAtPat: (LongVId: findNonterm)))
                            (FNExp:
                             (Match:
                              (Mrule:
                               (ATPat:
                                (PARAtPat:
                                 (ATPat:
                                  (RECORDAtPat:
                                   (FIELDPatRow:
                                    (Lab: |1|)
                                    (ATPat: (PARAtPat: (CONPat: (LongVId: NT) (IDAtPat: (LongVId: nt)))))
                                    (FIELDPatRow: (Lab: |2|) (ATPat: (IDAtPat: (LongVId: row)))))))))
                               (ATExp:
                                (LETAtExp:
                                 (VALDec:
                                  (TyVarseq:)
                                  (RECValBind:
                                   (PLAINValBind:
                                    (ATPat: (IDAtPat: (LongVId: find)))
                                    (FNExp:
                                     (Match:
                                      (Mrule:
                                       (ATPat:
                                        (PARAtPat:
                                         (ATPat:
                                          (PARAtPat:
                                           (ATPat:
                                            (PARAtPat:
                                             (CONPat:
                                              (LongVId: PAIR)
                                              (RECORDAtPat:
                                               (FIELDPatRow:
                                                (Lab: |1|)
                                                (ATPat: (PARAtPat: (CONPat: (LongVId: NT) (IDAtPat: (LongVId: key)))))
                                                (FIELDPatRow:
                                                 (Lab: |2|)
                                                 (ATPat: (IDAtPat: (LongVId: data)))
                                                 (FIELDPatRow: (Lab: |3|) (ATPat: (IDAtPat: (LongVId: r))))))))))))))
                                       (IFExp:
                                        (ATExp:
                                         (PARAtExp:
                                          (APPExp:
                                           (ATExp: (IDAtExp: (LongVId: <)))
                                           (RECORDAtExp:
                                            (ExpRow:
                                             (Lab: |1|)
                                             (ATExp: (IDAtExp: (LongVId: key)))
                                             (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: nt)))))))))
                                        (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: find))) (IDAtExp: (LongVId: r)))))
                                        (IFExp:
                                         (ATExp:
                                          (PARAtExp:
                                           (APPExp:
                                            (ATExp: (IDAtExp: (LongVId: =)))
                                            (RECORDAtExp:
                                             (ExpRow:
                                              (Lab: |1|)
                                              (ATExp: (IDAtExp: (LongVId: key)))
                                              (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: nt)))))))))
                                         (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: SOME))) (IDAtExp: (LongVId: data)))))
                                         (ATExp: (IDAtExp: (LongVId: NONE))))))
                                      (Match: (Mrule: (ATPat: (PARAtPat: (ATPat: (IDAtPat: (LongVId: EMPTY))))) (ATExp: (IDAtExp: (LongVId: NONE))))))))))
                                 (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: find))) (IDAtExp: (LongVId: row))))))))))))))
                        (SEQStrDec:
                         (DECStrDec:
                          (VALDec:
                           (TyVarseq:)
                           (PLAINValBind:
                            (ATPat: (IDAtPat: (LongVId: action)))
                            (FNExp:
                             (Match:
                              (Mrule:
                               (ATPat:
                                (PARAtPat:
                                 (COLONPat:
                                  (ATPat: (RECORDAtPat: (FIELDPatRow: (Lab: action) (ATPat: (IDAtPat: (LongVId: action))) (DOTSPatRow:))))
                                  (CONTy: (Tyseq:) (LongTyCon: table-type)))))
                               (FNExp:
                                (Match:
                                 (Mrule:
                                  (ATPat:
                                   (RECORDAtPat:
                                    (FIELDPatRow:
                                     (Lab: |1|)
                                     (ATPat: (PARAtPat: (CONPat: (LongVId: STATE) (IDAtPat: (LongVId: state)))))
                                     (FIELDPatRow: (Lab: |2|) (ATPat: (IDAtPat: (LongVId: term)))))))
                                  (ATExp:
                                   (LETAtExp:
                                    (VALDec:
                                     (TyVarseq:)
                                     (PLAINValBind:
                                      (ATPat:
                                       (RECORDAtPat:
                                        (FIELDPatRow:
                                         (Lab: |1|)
                                         (ATPat: (IDAtPat: (LongVId: row)))
                                         (FIELDPatRow: (Lab: |2|) (ATPat: (IDAtPat: (LongVId: default)))))))
                                      (ATExp:
                                       (PARAtExp:
                                        (APPExp:
                                         (ATExp: (IDAtExp: (LongVId: sub)))
                                         (RECORDAtExp:
                                          (ExpRow:
                                           (Lab: |1|)
                                           (ATExp: (IDAtExp: (LongVId: action)))
                                           (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: state)))))))))))
                                    (ATExp:
                                     (PARAtExp:
                                      (APPExp:
                                       (ATExp: (IDAtExp: (LongVId: findTerm)))
                                       (RECORDAtExp:
                                        (ExpRow:
                                         (Lab: |1|)
                                         (ATExp: (IDAtExp: (LongVId: term)))
                                         (ExpRow:
                                          (Lab: |2|)
                                          (ATExp: (IDAtExp: (LongVId: row)))
                                          (ExpRow: (Lab: |3|) (ATExp: (IDAtExp: (LongVId: default)))))))))))))))))))))
                         (SEQStrDec:
                          (DECStrDec:
                           (VALDec:
                            (TyVarseq:)
                            (PLAINValBind:
                             (ATPat: (IDAtPat: (LongVId: goto)))
                             (FNExp:
                              (Match:
                               (Mrule:
                                (ATPat:
                                 (PARAtPat:
                                  (COLONPat:
                                   (ATPat: (RECORDAtPat: (FIELDPatRow: (Lab: goto) (ATPat: (IDAtPat: (LongVId: goto))) (DOTSPatRow:))))
                                   (CONTy: (Tyseq:) (LongTyCon: table-type)))))
                                (FNExp:
                                 (Match:
                                  (Mrule:
                                   (ATPat:
                                    (PARAtPat:
                                     (ASPat:
                                      (VId: a)
                                      (ATPat:
                                       (RECORDAtPat:
                                        (FIELDPatRow:
                                         (Lab: |1|)
                                         (ATPat: (PARAtPat: (CONPat: (LongVId: STATE) (IDAtPat: (LongVId: state)))))
                                         (FIELDPatRow: (Lab: |2|) (ATPat: (IDAtPat: (LongVId: nonterm))))))))))
                                   (APPExp:
                                    (ATExp:
                                     (PARAtExp:
                                      (FNExp:
                                       (Match:
                                        (Mrule:
                                         (ATPat: (PARAtPat: (CONPat: (LongVId: SOME) (IDAtPat: (LongVId: state)))))
                                         (ATExp: (IDAtExp: (LongVId: state))))
                                        (Match:
                                         (Mrule:
                                          (ATPat: (IDAtPat: (LongVId: NONE)))
                                          (RAISEExp:
                                           (ATExp:
                                            (PARAtExp: (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: Goto))) (IDAtExp: (LongVId: a))))))))))))))
                                    (PARAtExp:
                                     (ATExp:
                                      (PARAtExp:
                                       (APPExp:
                                        (ATExp: (IDAtExp: (LongVId: findNonterm)))
                                        (RECORDAtExp:
                                         (ExpRow:
                                          (Lab: |1|)
                                          (ATExp: (IDAtExp: (LongVId: nonterm)))
                                          (ExpRow:
                                           (Lab: |2|)
                                           (ATExp:
                                            (PARAtExp:
                                             (APPExp:
                                              (ATExp: (IDAtExp: (LongVId: sub)))
                                              (RECORDAtExp:
                                               (ExpRow:
                                                (Lab: |1|)
                                                (ATExp: (IDAtExp: (LongVId: goto)))
                                                (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: state))))))))))))))))))))))))))
                          (SEQStrDec:
                           (DECStrDec:
                            (VALDec:
                             (TyVarseq:)
                             (PLAINValBind:
                              (ATPat: (IDAtPat: (LongVId: initialState)))
                              (FNExp:
                               (Match:
                                (Mrule:
                                 (ATPat:
                                  (PARAtPat:
                                   (COLONPat:
                                    (ATPat: (RECORDAtPat: (FIELDPatRow: (Lab: initialState) (ATPat: (IDAtPat: (LongVId: initialState))) (DOTSPatRow:))))
                                    (CONTy: (Tyseq:) (LongTyCon: table-type)))))
                                 (ATExp: (IDAtExp: (LongVId: initialState)))))))))
                           (DECStrDec:
                            (VALDec:
                             (TyVarseq:)
                             (PLAINValBind:
                              (ATPat: (IDAtPat: (LongVId: mkLrTable)))
                              (FNExp:
                               (Match:
                                (Mrule:
                                 (ATPat:
                                  (RECORDAtPat:
                                   (FIELDPatRow:
                                    (Lab: actions)
                                    (ATPat: (IDAtPat: (LongVId: actions)))
                                    (FIELDPatRow:
                                     (Lab: gotos)
                                     (ATPat: (IDAtPat: (LongVId: gotos)))
                                     (FIELDPatRow:
                                      (Lab: initialState)
                                      (ATPat: (IDAtPat: (LongVId: initialState)))
                                      (FIELDPatRow:
                                       (Lab: numStates)
                                       (ATPat: (IDAtPat: (LongVId: numStates)))
                                       (FIELDPatRow: (Lab: numRules) (ATPat: (IDAtPat: (LongVId: numRules))))))))))
                                 (ATExp:
                                  (PARAtExp:
                                   (COLONExp:
                                    (ATExp:
                                     (RECORDAtExp:
                                      (ExpRow:
                                       (Lab: action)
                                       (ATExp: (IDAtExp: (LongVId: actions)))
                                       (ExpRow:
                                        (Lab: goto)
                                        (ATExp: (IDAtExp: (LongVId: gotos)))
                                        (ExpRow:
                                         (Lab: states)
                                         (ATExp: (IDAtExp: (LongVId: numStates)))
                                         (ExpRow:
                                          (Lab: rules)
                                          (ATExp: (IDAtExp: (LongVId: numRules)))
                                          (ExpRow: (Lab: initialState) (ATExp: (IDAtExp: (LongVId: initialState))))))))))
                                    (CONTy: (Tyseq:) (LongTyCon: table-type))))))))))))))))))))))))))))))
        (IDSigExp: (SigId: LR_TABLE-sig)))))))))