hamlet/LineAwareLexer-functor.ss
(module LineAwareLexer-functor (planet chongkai/sml)
  (#%module-begin
   (Program:
    (FUNDECTopDec:
     (FunDec:
      (FunBind:
       (FunId: LineAwareLexer-functor)
       (StrId: _id34-struct)
       (SIGSigExp:
        (SEQSpec:
         (STRUCTURESpec:
          (StrDesc:
           (StrId: Lexer-struct)
           (WHERETYPESigExp:
            (WHERETYPESigExp: (IDSigExp: (SigId: LEXER-sig)) (TyVarseq:) (LongTyCon: UserDeclarations.pos-type) (CONTy: (Tyseq:) (LongTyCon: int-type)))
            (TyVarseq: (TyVar: |'a|) (TyVar: |'b|))
            (LongTyCon: UserDeclarations.token-type)
            (CONTy: (Tyseq: (VARTy: (TyVar: |'a|)) (VARTy: (TyVar: |'b|))) (LongTyCon: LrParser.Token.token-type)))))
         (EXCEPTIONSpec:
          (ExDesc:
           (VId: Error)
           (RECORDTy:
            (TyRow:
             (Lab: |1|)
             (PARTy: (RECORDTy: (TyRow: (Lab: |1|) (CONTy: (Tyseq:) (LongTyCon: int-type)) (TyRow: (Lab: |2|) (CONTy: (Tyseq:) (LongTyCon: int-type))))))
             (TyRow: (Lab: |2|) (CONTy: (Tyseq:) (LongTyCon: string-type)))))))))
       (LETStrExp:
        (DECStrDec: (OPENDec: (LongStrId: _id34-struct)))
        (STRUCTStrExp:
         (SEQStrDec:
          (STRUCTUREStrDec:
           (StrBind:
            (StrId: UserDeclarations-struct)
            (STRUCTStrExp:
             (SEQStrDec:
              (DECStrDec: (OPENDec: (LongStrId: Lexer.UserDeclarations-struct)))
              (DECStrDec: (TYPEDec: (TypBind: (TyVarseq:) (TyCon: pos-type) (CONTy: (Tyseq:) (LongTyCon: Source.pos-type)))))))))
          (SEQStrDec:
           (DECStrDec: (EXCEPTIONDec: (EQUALExBind: (VId: |Error'|) (LongVId: Error))))
           (SEQStrDec:
            (DECStrDec:
             (EXCEPTIONDec:
              (NEWExBind:
               (VId: Error)
               (RECORDTy:
                (TyRow: (Lab: |1|) (CONTy: (Tyseq:) (LongTyCon: Source.region-type)) (TyRow: (Lab: |2|) (CONTy: (Tyseq:) (LongTyCon: string-type))))))))
            (DECStrDec:
             (VALDec:
              (TyVarseq:)
              (RECValBind:
               (PLAINValBind:
                (ATPat: (IDAtPat: (LongVId: makeLexer)))
                (FNExp:
                 (Match:
                  (Mrule:
                   (ATPat: (PARAtPat: (ATPat: (IDAtPat: (LongVId: yyinput)))))
                   (ATExp:
                    (LETAtExp:
                     (SEQDec:
                      (VALDec:
                       (TyVarseq:)
                       (PLAINValBind:
                        (ATPat: (IDAtPat: (LongVId: lin)))
                        (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: ref))) (SCONAtExp: (INTSCon: 1)))))))
                      (SEQDec:
                       (VALDec:
                        (TyVarseq:)
                        (PLAINValBind:
                         (ATPat: (IDAtPat: (LongVId: col)))
                         (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: ref))) (SCONAtExp: (INTSCon: 0)))))))
                       (SEQDec:
                        (VALDec:
                         (TyVarseq:)
                         (PLAINValBind:
                          (ATPat: (IDAtPat: (LongVId: pos)))
                          (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: ref))) (SCONAtExp: (INTSCon: 0)))))))
                        (SEQDec:
                         (VALDec:
                          (TyVarseq:)
                          (PLAINValBind:
                           (ATPat: (IDAtPat: (LongVId: buf)))
                           (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: ref))) (SCONAtExp: (STRINGSCon: "")))))))
                         (SEQDec:
                          (VALDec:
                           (TyVarseq:)
                           (PLAINValBind:
                            (ATPat: (IDAtPat: (LongVId: off)))
                            (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: ref))) (SCONAtExp: (INTSCon: 0)))))))
                          (SEQDec:
                           (VALDec:
                            (TyVarseq:)
                            (PLAINValBind:
                             (ATPat: (IDAtPat: (LongVId: que)))
                             (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: Queue.mkQueue))) (RECORDAtExp:))))))
                           (SEQDec:
                            (VALDec:
                             (TyVarseq:)
                             (PLAINValBind:
                              (ATPat: (IDAtPat: (LongVId: offE)))
                              (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: ref))) (SCONAtExp: (INTSCon: 0)))))))
                            (SEQDec:
                             (VALDec:
                              (TyVarseq:)
                              (RECValBind:
                               (PLAINValBind:
                                (ATPat: (IDAtPat: (LongVId: count)))
                                (FNExp:
                                 (Match:
                                  (Mrule:
                                   (ATPat:
                                    (PARAtPat:
                                     (ATPat:
                                      (RECORDAtPat:
                                       (FIELDPatRow:
                                        (Lab: |1|)
                                        (ATPat: (IDAtPat: (LongVId: i)))
                                        (FIELDPatRow:
                                         (Lab: |2|)
                                         (ATPat: (IDAtPat: (LongVId: |i'|)))
                                         (FIELDPatRow:
                                          (Lab: |3|)
                                          (ATPat: (IDAtPat: (LongVId: lin)))
                                          (FIELDPatRow: (Lab: |4|) (ATPat: (IDAtPat: (LongVId: col)))))))))))
                                   (IFExp:
                                    (ATExp:
                                     (PARAtExp:
                                      (APPExp:
                                       (ATExp: (IDAtExp: (LongVId: =)))
                                       (RECORDAtExp:
                                        (ExpRow: (Lab: |1|) (ATExp: (IDAtExp: (LongVId: i))) (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: |i'|)))))))))
                                    (ATExp:
                                     (RECORDAtExp:
                                      (ExpRow: (Lab: |1|) (ATExp: (IDAtExp: (LongVId: lin))) (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: col)))))))
                                    (HANDLEExp:
                                     (ATExp:
                                      (PARAtExp:
                                       (APPExp:
                                        (ATExp:
                                         (PARAtExp:
                                          (FNExp:
                                           (Match:
                                            (Mrule:
                                             (ATPat: (SCONAtPat: (CHARSCon: #\newline)))
                                             (ATExp:
                                              (PARAtExp:
                                               (APPExp:
                                                (ATExp: (IDAtExp: (LongVId: count)))
                                                (RECORDAtExp:
                                                 (ExpRow:
                                                  (Lab: |1|)
                                                  (ATExp:
                                                   (PARAtExp:
                                                    (APPExp:
                                                     (ATExp: (IDAtExp: (LongVId: +)))
                                                     (RECORDAtExp:
                                                      (ExpRow:
                                                       (Lab: |1|)
                                                       (ATExp: (IDAtExp: (LongVId: i)))
                                                       (ExpRow: (Lab: |2|) (ATExp: (SCONAtExp: (INTSCon: 1)))))))))
                                                  (ExpRow:
                                                   (Lab: |2|)
                                                   (ATExp: (IDAtExp: (LongVId: |i'|)))
                                                   (ExpRow:
                                                    (Lab: |3|)
                                                    (ATExp:
                                                     (PARAtExp:
                                                      (APPExp:
                                                       (ATExp: (IDAtExp: (LongVId: +)))
                                                       (RECORDAtExp:
                                                        (ExpRow:
                                                         (Lab: |1|)
                                                         (ATExp: (IDAtExp: (LongVId: lin)))
                                                         (ExpRow: (Lab: |2|) (ATExp: (SCONAtExp: (INTSCon: 1)))))))))
                                                    (ExpRow: (Lab: |4|) (ATExp: (SCONAtExp: (INTSCon: 0))))))))))))
                                            (Match:
                                             (Mrule:
                                              (ATPat: (SCONAtPat: (CHARSCon: #\tab)))
                                              (ATExp:
                                               (PARAtExp:
                                                (APPExp:
                                                 (ATExp: (IDAtExp: (LongVId: count)))
                                                 (RECORDAtExp:
                                                  (ExpRow:
                                                   (Lab: |1|)
                                                   (ATExp:
                                                    (PARAtExp:
                                                     (APPExp:
                                                      (ATExp: (IDAtExp: (LongVId: +)))
                                                      (RECORDAtExp:
                                                       (ExpRow:
                                                        (Lab: |1|)
                                                        (ATExp: (IDAtExp: (LongVId: i)))
                                                        (ExpRow: (Lab: |2|) (ATExp: (SCONAtExp: (INTSCon: 1)))))))))
                                                   (ExpRow:
                                                    (Lab: |2|)
                                                    (ATExp: (IDAtExp: (LongVId: |i'|)))
                                                    (ExpRow:
                                                     (Lab: |3|)
                                                     (ATExp: (IDAtExp: (LongVId: lin)))
                                                     (ExpRow:
                                                      (Lab: |4|)
                                                      (ATExp:
                                                       (PARAtExp:
                                                        (APPExp:
                                                         (ATExp: (IDAtExp: (LongVId: -)))
                                                         (RECORDAtExp:
                                                          (ExpRow:
                                                           (Lab: |1|)
                                                           (ATExp:
                                                            (PARAtExp:
                                                             (APPExp:
                                                              (ATExp: (IDAtExp: (LongVId: +)))
                                                              (RECORDAtExp:
                                                               (ExpRow:
                                                                (Lab: |1|)
                                                                (ATExp: (IDAtExp: (LongVId: col)))
                                                                (ExpRow: (Lab: |2|) (ATExp: (SCONAtExp: (INTSCon: 8)))))))))
                                                           (ExpRow:
                                                            (Lab: |2|)
                                                            (ATExp:
                                                             (PARAtExp:
                                                              (APPExp:
                                                               (ATExp: (IDAtExp: (LongVId: mod)))
                                                               (RECORDAtExp:
                                                                (ExpRow:
                                                                 (Lab: |1|)
                                                                 (ATExp: (IDAtExp: (LongVId: col)))
                                                                 (ExpRow: (Lab: |2|) (ATExp: (SCONAtExp: (INTSCon: 8))))))))))))))))))))))))
                                             (Match:
                                              (Mrule:
                                               (ATPat: (WILDCARDAtPat:))
                                               (ATExp:
                                                (PARAtExp:
                                                 (APPExp:
                                                  (ATExp: (IDAtExp: (LongVId: count)))
                                                  (RECORDAtExp:
                                                   (ExpRow:
                                                    (Lab: |1|)
                                                    (ATExp:
                                                     (PARAtExp:
                                                      (APPExp:
                                                       (ATExp: (IDAtExp: (LongVId: +)))
                                                       (RECORDAtExp:
                                                        (ExpRow:
                                                         (Lab: |1|)
                                                         (ATExp: (IDAtExp: (LongVId: i)))
                                                         (ExpRow: (Lab: |2|) (ATExp: (SCONAtExp: (INTSCon: 1)))))))))
                                                    (ExpRow:
                                                     (Lab: |2|)
                                                     (ATExp: (IDAtExp: (LongVId: |i'|)))
                                                     (ExpRow:
                                                      (Lab: |3|)
                                                      (ATExp: (IDAtExp: (LongVId: lin)))
                                                      (ExpRow:
                                                       (Lab: |4|)
                                                       (ATExp:
                                                        (PARAtExp:
                                                         (APPExp:
                                                          (ATExp: (IDAtExp: (LongVId: +)))
                                                          (RECORDAtExp:
                                                           (ExpRow:
                                                            (Lab: |1|)
                                                            (ATExp: (IDAtExp: (LongVId: col)))
                                                            (ExpRow: (Lab: |2|) (ATExp: (SCONAtExp: (INTSCon: 1))))))))))))))))))))))))
                                        (PARAtExp:
                                         (ATExp:
                                          (PARAtExp:
                                           (APPExp:
                                            (ATExp: (IDAtExp: (LongVId: String.sub)))
                                            (RECORDAtExp:
                                             (ExpRow:
                                              (Lab: |1|)
                                              (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: !))) (IDAtExp: (LongVId: buf)))))
                                              (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: i)))))))))))))
                                     (Match:
                                      (Mrule:
                                       (ATPat: (IDAtPat: (LongVId: Subscript)))
                                       (HANDLEExp:
                                        (ATExp:
                                         (LETAtExp:
                                          (SEQDec:
                                           (VALDec:
                                            (TyVarseq:)
                                            (PLAINValBind:
                                             (ATPat: (IDAtPat: (LongVId: n)))
                                             (ATExp:
                                              (PARAtExp:
                                               (APPExp:
                                                (ATExp: (IDAtExp: (LongVId: String.size)))
                                                (PARAtExp: (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: !))) (IDAtExp: (LongVId: buf)))))))))))
                                           (VALDec:
                                            (TyVarseq:)
                                            (PLAINValBind:
                                             (ATPat:
                                              (RECORDAtPat:
                                               (FIELDPatRow:
                                                (Lab: |1|)
                                                (ATPat: (IDAtPat: (LongVId: |buf'|)))
                                                (FIELDPatRow: (Lab: |2|) (ATPat: (IDAtPat: (LongVId: |off'|)))))))
                                             (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: Queue.dequeue))) (IDAtExp: (LongVId: que))))))))
                                          (ATExp:
                                           (SEQAtExp:
                                            (ATExp:
                                             (PARAtExp:
                                              (APPExp:
                                               (ATExp: (IDAtExp: (LongVId: :=)))
                                               (RECORDAtExp:
                                                (ExpRow:
                                                 (Lab: |1|)
                                                 (ATExp: (IDAtExp: (LongVId: buf)))
                                                 (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: |buf'|)))))))))
                                            (SEQAtExp:
                                             (ATExp:
                                              (PARAtExp:
                                               (APPExp:
                                                (ATExp: (IDAtExp: (LongVId: :=)))
                                                (RECORDAtExp:
                                                 (ExpRow:
                                                  (Lab: |1|)
                                                  (ATExp: (IDAtExp: (LongVId: off)))
                                                  (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: |off'|)))))))))
                                             (PARAtExp:
                                              (ATExp:
                                               (PARAtExp:
                                                (APPExp:
                                                 (ATExp: (IDAtExp: (LongVId: count)))
                                                 (RECORDAtExp:
                                                  (ExpRow:
                                                   (Lab: |1|)
                                                   (ATExp: (SCONAtExp: (INTSCon: 0)))
                                                   (ExpRow:
                                                    (Lab: |2|)
                                                    (ATExp:
                                                     (PARAtExp:
                                                      (APPExp:
                                                       (ATExp: (IDAtExp: (LongVId: -)))
                                                       (RECORDAtExp:
                                                        (ExpRow:
                                                         (Lab: |1|)
                                                         (ATExp: (IDAtExp: (LongVId: |i'|)))
                                                         (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: n)))))))))
                                                    (ExpRow:
                                                     (Lab: |3|)
                                                     (ATExp: (IDAtExp: (LongVId: lin)))
                                                     (ExpRow: (Lab: |4|) (ATExp: (IDAtExp: (LongVId: col)))))))))))))))))
                                        (Match:
                                         (Mrule:
                                          (ATPat: (IDAtPat: (LongVId: Dequeue)))
                                          (ATExp:
                                           (SEQAtExp:
                                            (ATExp:
                                             (PARAtExp:
                                              (APPExp:
                                               (ATExp: (IDAtExp: (LongVId: :=)))
                                               (RECORDAtExp:
                                                (ExpRow:
                                                 (Lab: |1|)
                                                 (ATExp: (IDAtExp: (LongVId: buf)))
                                                 (ExpRow: (Lab: |2|) (ATExp: (SCONAtExp: (STRINGSCon: "")))))))))
                                            (SEQAtExp:
                                             (ATExp:
                                              (PARAtExp:
                                               (APPExp:
                                                (ATExp: (IDAtExp: (LongVId: :=)))
                                                (RECORDAtExp:
                                                 (ExpRow:
                                                  (Lab: |1|)
                                                  (ATExp: (IDAtExp: (LongVId: off)))
                                                  (ExpRow:
                                                   (Lab: |2|)
                                                   (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: !))) (IDAtExp: (LongVId: offE)))))))))))
                                             (PARAtExp:
                                              (ATExp:
                                               (RECORDAtExp:
                                                (ExpRow:
                                                 (Lab: |1|)
                                                 (ATExp: (IDAtExp: (LongVId: lin)))
                                                 (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: col))))))))))))))))))))))))
                             (SEQDec:
                              (VALDec:
                               (TyVarseq:)
                               (RECValBind:
                                (PLAINValBind:
                                 (ATPat: (IDAtPat: (LongVId: transform)))
                                 (FNExp:
                                  (Match:
                                   (Mrule:
                                    (ATPat:
                                     (PARAtPat:
                                      (ATPat:
                                       (RECORDAtPat:
                                        (FIELDPatRow:
                                         (Lab: |1|)
                                         (ATPat: (IDAtPat: (LongVId: pos1)))
                                         (FIELDPatRow: (Lab: |2|) (ATPat: (IDAtPat: (LongVId: pos2)))))))))
                                    (ATExp:
                                     (LETAtExp:
                                      (SEQDec:
                                       (VALDec:
                                        (TyVarseq:)
                                        (PLAINValBind:
                                         (ATPat: (IDAtPat: (LongVId: n0)))
                                         (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: !))) (IDAtExp: (LongVId: off)))))))
                                       (SEQDec:
                                        (VALDec:
                                         (TyVarseq:)
                                         (PLAINValBind:
                                          (ATPat:
                                           (RECORDAtPat:
                                            (FIELDPatRow:
                                             (Lab: |1|)
                                             (ATPat: (IDAtPat: (LongVId: l1)))
                                             (FIELDPatRow: (Lab: |2|) (ATPat: (IDAtPat: (LongVId: c1)))))))
                                          (ATExp:
                                           (PARAtExp:
                                            (APPExp:
                                             (ATExp: (IDAtExp: (LongVId: count)))
                                             (RECORDAtExp:
                                              (ExpRow:
                                               (Lab: |1|)
                                               (ATExp:
                                                (PARAtExp:
                                                 (APPExp:
                                                  (ATExp: (IDAtExp: (LongVId: -)))
                                                  (RECORDAtExp:
                                                   (ExpRow:
                                                    (Lab: |1|)
                                                    (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: !))) (IDAtExp: (LongVId: pos)))))
                                                    (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: n0)))))))))
                                               (ExpRow:
                                                (Lab: |2|)
                                                (ATExp:
                                                 (PARAtExp:
                                                  (APPExp:
                                                   (ATExp: (IDAtExp: (LongVId: -)))
                                                   (RECORDAtExp:
                                                    (ExpRow:
                                                     (Lab: |1|)
                                                     (ATExp: (IDAtExp: (LongVId: pos1)))
                                                     (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: n0)))))))))
                                                (ExpRow:
                                                 (Lab: |3|)
                                                 (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: !))) (IDAtExp: (LongVId: lin)))))
                                                 (ExpRow:
                                                  (Lab: |4|)
                                                  (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: !))) (IDAtExp: (LongVId: col)))))))))))))))
                                        (SEQDec:
                                         (VALDec:
                                          (TyVarseq:)
                                          (PLAINValBind:
                                           (ATPat: (IDAtPat: (LongVId: n0)))
                                           (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: !))) (IDAtExp: (LongVId: off)))))))
                                         (VALDec:
                                          (TyVarseq:)
                                          (PLAINValBind:
                                           (ATPat:
                                            (RECORDAtPat:
                                             (FIELDPatRow:
                                              (Lab: |1|)
                                              (ATPat: (IDAtPat: (LongVId: l2)))
                                              (FIELDPatRow: (Lab: |2|) (ATPat: (IDAtPat: (LongVId: c2)))))))
                                           (ATExp:
                                            (PARAtExp:
                                             (APPExp:
                                              (ATExp: (IDAtExp: (LongVId: count)))
                                              (RECORDAtExp:
                                               (ExpRow:
                                                (Lab: |1|)
                                                (ATExp:
                                                 (PARAtExp:
                                                  (APPExp:
                                                   (ATExp: (IDAtExp: (LongVId: -)))
                                                   (RECORDAtExp:
                                                    (ExpRow:
                                                     (Lab: |1|)
                                                     (ATExp: (IDAtExp: (LongVId: pos1)))
                                                     (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: n0)))))))))
                                                (ExpRow:
                                                 (Lab: |2|)
                                                 (ATExp:
                                                  (PARAtExp:
                                                   (APPExp:
                                                    (ATExp: (IDAtExp: (LongVId: -)))
                                                    (RECORDAtExp:
                                                     (ExpRow:
                                                      (Lab: |1|)
                                                      (ATExp: (IDAtExp: (LongVId: pos2)))
                                                      (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: n0)))))))))
                                                 (ExpRow:
                                                  (Lab: |3|)
                                                  (ATExp: (IDAtExp: (LongVId: l1)))
                                                  (ExpRow: (Lab: |4|) (ATExp: (IDAtExp: (LongVId: c1))))))))))))))))
                                      (ATExp:
                                       (SEQAtExp:
                                        (ATExp:
                                         (PARAtExp:
                                          (APPExp:
                                           (ATExp: (IDAtExp: (LongVId: :=)))
                                           (RECORDAtExp:
                                            (ExpRow:
                                             (Lab: |1|)
                                             (ATExp: (IDAtExp: (LongVId: lin)))
                                             (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: l2)))))))))
                                        (SEQAtExp:
                                         (ATExp:
                                          (PARAtExp:
                                           (APPExp:
                                            (ATExp: (IDAtExp: (LongVId: :=)))
                                            (RECORDAtExp:
                                             (ExpRow:
                                              (Lab: |1|)
                                              (ATExp: (IDAtExp: (LongVId: col)))
                                              (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: c2)))))))))
                                         (SEQAtExp:
                                          (ATExp:
                                           (PARAtExp:
                                            (APPExp:
                                             (ATExp: (IDAtExp: (LongVId: :=)))
                                             (RECORDAtExp:
                                              (ExpRow:
                                               (Lab: |1|)
                                               (ATExp: (IDAtExp: (LongVId: pos)))
                                               (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: pos2)))))))))
                                          (PARAtExp:
                                           (ATExp:
                                            (RECORDAtExp:
                                             (ExpRow:
                                              (Lab: left)
                                              (ATExp:
                                               (RECORDAtExp:
                                                (ExpRow:
                                                 (Lab: abs)
                                                 (ATExp: (IDAtExp: (LongVId: pos1)))
                                                 (ExpRow:
                                                  (Lab: lin)
                                                  (ATExp: (IDAtExp: (LongVId: l1)))
                                                  (ExpRow: (Lab: col) (ATExp: (IDAtExp: (LongVId: c1))))))))
                                              (ExpRow:
                                               (Lab: right)
                                               (ATExp:
                                                (RECORDAtExp:
                                                 (ExpRow:
                                                  (Lab: abs)
                                                  (ATExp: (IDAtExp: (LongVId: pos2)))
                                                  (ExpRow:
                                                   (Lab: lin)
                                                   (ATExp: (IDAtExp: (LongVId: l2)))
                                                   (ExpRow: (Lab: col) (ATExp: (IDAtExp: (LongVId: c2)))))))))))))))))))))))))
                              (SEQDec:
                               (VALDec:
                                (TyVarseq:)
                                (RECValBind:
                                 (PLAINValBind:
                                  (ATPat: (IDAtPat: (LongVId: |yyinput'|)))
                                  (FNExp:
                                   (Match:
                                    (Mrule:
                                     (ATPat: (PARAtPat: (ATPat: (IDAtPat: (LongVId: n)))))
                                     (ATExp:
                                      (LETAtExp:
                                       (VALDec:
                                        (TyVarseq:)
                                        (PLAINValBind:
                                         (ATPat: (IDAtPat: (LongVId: s)))
                                         (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: yyinput))) (IDAtExp: (LongVId: n)))))))
                                       (ATExp:
                                        (SEQAtExp:
                                         (ATExp:
                                          (PARAtExp:
                                           (APPExp:
                                            (ATExp: (IDAtExp: (LongVId: Queue.enqueue)))
                                            (RECORDAtExp:
                                             (ExpRow:
                                              (Lab: |1|)
                                              (ATExp: (IDAtExp: (LongVId: que)))
                                              (ExpRow:
                                               (Lab: |2|)
                                               (ATExp:
                                                (RECORDAtExp:
                                                 (ExpRow:
                                                  (Lab: |1|)
                                                  (ATExp: (IDAtExp: (LongVId: s)))
                                                  (ExpRow:
                                                   (Lab: |2|)
                                                   (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: !))) (IDAtExp: (LongVId: offE)))))))))))))))
                                         (SEQAtExp:
                                          (ATExp:
                                           (PARAtExp:
                                            (APPExp:
                                             (ATExp: (IDAtExp: (LongVId: :=)))
                                             (RECORDAtExp:
                                              (ExpRow:
                                               (Lab: |1|)
                                               (ATExp: (IDAtExp: (LongVId: offE)))
                                               (ExpRow:
                                                (Lab: |2|)
                                                (ATExp:
                                                 (PARAtExp:
                                                  (APPExp:
                                                   (ATExp: (IDAtExp: (LongVId: +)))
                                                   (RECORDAtExp:
                                                    (ExpRow:
                                                     (Lab: |1|)
                                                     (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: !))) (IDAtExp: (LongVId: offE)))))
                                                     (ExpRow:
                                                      (Lab: |2|)
                                                      (ATExp:
                                                       (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: String.size))) (IDAtExp: (LongVId: s)))))))))))))))))
                                          (PARAtExp: (ATExp: (IDAtExp: (LongVId: s)))))))))))))))
                               (VALDec:
                                (TyVarseq:)
                                (PLAINValBind:
                                 (ATPat: (IDAtPat: (LongVId: lexer)))
                                 (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: Lexer.makeLexer))) (IDAtExp: (LongVId: |yyinput'|)))))))))))))))))
                     (FNExp:
                      (Match:
                       (Mrule:
                        (ATPat: (RECORDAtPat:))
                        (HANDLEExp:
                         (ATExp:
                          (LETAtExp:
                           (SEQDec:
                            (VALDec:
                             (TyVarseq:)
                             (PLAINValBind:
                              (ATPat:
                               (PARAtPat:
                                (CONPat:
                                 (LongVId: LrParser.Token.TOKEN)
                                 (RECORDAtPat:
                                  (FIELDPatRow:
                                   (Lab: |1|)
                                   (ATPat: (IDAtPat: (LongVId: term)))
                                   (FIELDPatRow:
                                    (Lab: |2|)
                                    (ATPat:
                                     (RECORDAtPat:
                                      (FIELDPatRow:
                                       (Lab: |1|)
                                       (ATPat: (IDAtPat: (LongVId: svalue)))
                                       (FIELDPatRow:
                                        (Lab: |2|)
                                        (ATPat: (IDAtPat: (LongVId: pos1)))
                                        (FIELDPatRow: (Lab: |3|) (ATPat: (IDAtPat: (LongVId: pos2))))))))))))))
                              (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: lexer))) (RECORDAtExp:))))))
                            (VALDec:
                             (TyVarseq:)
                             (PLAINValBind:
                              (ATPat:
                               (RECORDAtPat:
                                (FIELDPatRow:
                                 (Lab: left)
                                 (ATPat: (IDAtPat: (LongVId: left)))
                                 (FIELDPatRow: (Lab: right) (ATPat: (IDAtPat: (LongVId: right)))))))
                              (ATExp:
                               (PARAtExp:
                                (APPExp:
                                 (ATExp: (IDAtExp: (LongVId: transform)))
                                 (RECORDAtExp:
                                  (ExpRow: (Lab: |1|) (ATExp: (IDAtExp: (LongVId: pos1))) (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: pos2))))))))))))
                           (ATExp:
                            (PARAtExp:
                             (APPExp:
                              (ATExp: (IDAtExp: (LongVId: LrParser.Token.TOKEN)))
                              (RECORDAtExp:
                               (ExpRow:
                                (Lab: |1|)
                                (ATExp: (IDAtExp: (LongVId: term)))
                                (ExpRow:
                                 (Lab: |2|)
                                 (ATExp:
                                  (RECORDAtExp:
                                   (ExpRow:
                                    (Lab: |1|)
                                    (ATExp: (IDAtExp: (LongVId: svalue)))
                                    (ExpRow:
                                     (Lab: |2|)
                                     (ATExp: (IDAtExp: (LongVId: left)))
                                     (ExpRow: (Lab: |3|) (ATExp: (IDAtExp: (LongVId: right))))))))))))))))
                         (Match:
                          (Mrule:
                           (ATPat:
                            (PARAtPat:
                             (CONPat:
                              (LongVId: |Error'|)
                              (RECORDAtPat:
                               (FIELDPatRow:
                                (Lab: |1|)
                                (ATPat: (IDAtPat: (LongVId: position)))
                                (FIELDPatRow: (Lab: |2|) (ATPat: (IDAtPat: (LongVId: e)))))))))
                           (RAISEExp:
                            (ATExp:
                             (PARAtExp:
                              (APPExp:
                               (ATExp: (IDAtExp: (LongVId: Error)))
                               (RECORDAtExp:
                                (ExpRow:
                                 (Lab: |1|)
                                 (ATExp: (PARAtExp: (APPExp: (ATExp: (IDAtExp: (LongVId: transform))) (IDAtExp: (LongVId: position)))))
                                 (ExpRow: (Lab: |2|) (ATExp: (IDAtExp: (LongVId: e))))))))))))))))))))))))))))))))))))