-- Parser generated by Pappy - do not edit
module TestPappy where

import Pos
import Parse


import System.Environment
import Data.Maybe
import Data.Data
import Preprocess

ml = maybeToList




type TailTerms = ([Term], Maybe Clause, [Free])
type Term = Sumti

type Text = Sentence
type Paragraphs = Sentence
type Paragraph = Sentence
type Fragment = Sentence
type Statement = Sentence

data Sentence
	= Selbri Selbri
	| SelbriTailTerms Selbri [Term] (Maybe Clause) [Free]
	| GekSentence Gek Sentence Gik Sentence [Term] (Maybe Clause) [Free]
	| KEGekSentence (Maybe Tag) Clause [Free] Sentence (Maybe Clause) [Free]
	| NAGekSentence Clause [Free] Sentence
	| GihekBO Sentence Gihek (Maybe Tag) Clause [Free] Sentence [Term]
		(Maybe Clause) [Free]
	| GihekSentence Sentence
		[(Gihek, [Free], Sentence, [Term], Maybe Clause, [Free])]
	| GihekKE Sentence Gihek (Maybe Tag) Clause [Free] Sentence (Maybe Clause)
		[Free] [Term] (Maybe Clause) [Free]
	| TermsBridiTail [Term] (Maybe Clause) [Free] Sentence
	| PrenexSentence [Term] Clause [Free] Sentence
	| TUhE (Maybe Tag) Clause [Free] Text (Maybe Clause) [Free]
	| IBOStatement Statement Clause (Maybe JoikJek) (Maybe Tag) Clause [Free]
		Statement
	| IBO Statement Clause (Maybe JoikJek) (Maybe Tag) Clause [Free]
	| IJoikJek Statement [(Clause, JoikJek, [Free], Maybe Statement)]
	| Prenex [Term] Clause [Free] Statement
	| FPrenex [Term] Clause [Free]
	| FTermsVAU [Term] (Maybe Clause) [Free]
	| FEk Ek [Free]
	| FGihek Gihek [Free]
	| FQuantifier Quantifier
	| FNA Clause [Free]
	| FRelativeClause RelativeClause
	| FLinks Links
	| FLinkargs Linkargs
	| StatementI Statement [(Clause, [Free], Maybe Statement)]
	| NIhO Paragraph [Clause] [Free] Paragraphs
	| IText_1 Clause (Maybe JoikJek) (Maybe (Maybe Tag, Clause)) [Free]
		(Maybe Text)
	| HeadNIhO [Clause] [Free] (Maybe Paragraphs)
	| TopText [Clause] (Either [Clause] (Maybe [([String], String)])) [Free]
		(Maybe (JoikJek, [Free])) (Maybe Text) (Maybe Pre)
	deriving (Eq, Show, Data, Typeable)

data Sumti
	= TermsPEhETerms Term [(Clause, [Free], JoikJek, [Free], Term)]
	| TermCEhETerm Term [(Clause, [Free], Term)]
	| TagSumti Tag Sumti
	| KU (Maybe Clause) [Free]
	| NAKU Clause Clause [Free]
	| NUhIGek Clause [Free] Gek [Term] (Maybe Clause) [Free] Gik [Term]
		(Maybe Clause) [Free]
	| NUhI Clause [Free] [Term] (Maybe Clause) [Free]
	| Gek Gek TermsGikTerms
	| ZO [String] String String Indicators [Free]
	| ZOI [String] String [String] Indicators [Free]
	| LOhU [String] String [String] Pre Indicators [Free]
	| LerfuString LerfuString (Maybe Clause) [Free]
	| LU Clause Text (Maybe Clause) [Free]
	| LAhE_NAhE Clause (Maybe Clause) [Free] (Maybe RelativeClauses)
		Sumti (Maybe Clause) [Free]
	| KOhA Clause [Free]
	| LALE Clause [Free] SumtiTail (Maybe Clause) [Free]
	| LA Clause [Free] (Maybe RelativeClauses) [Clause] [Free]
	| LI Clause [Free] Mex (Maybe Clause) [Free]
	| OuterQuantifier (Maybe Quantifier) Sumti (Maybe RelativeClauses)
	| SQuantifierSelbri Quantifier Selbri (Maybe Clause) [Free]
		(Maybe RelativeClauses)
	| GekSumti Gek Sumti Gik Sumti
	| JoikEkBOSumti Sumti JoikEk [Free] (Maybe Tag) Clause [Free] Sumti
	| JoikEkSumti Sumti [(JoikEk, [Free], Sumti)]
	| JoikEkKESumti Sumti JoikEk [Free] (Maybe Tag) Clause [Free] Sumti
		(Maybe Clause) [Free]
	| VUhO Sumti Clause [Free] RelativeClauses
	deriving (Eq, Show, Data, Typeable)

data TermsGikTerms
	= TGT Term TermsGikTerms Term
	| Gik Gik
	deriving (Eq, Show, Data, Typeable)

data SumtiTail
	= SumtiSumtiTail Sumti (Maybe RelativeClauses) SumtiTail
	| RelativeClausesSumtiTail RelativeClauses SumtiTail
	| SelbriRelativeClauses Selbri (Maybe RelativeClauses)
	| STQuantifierSelbri Quantifier Selbri (Maybe RelativeClauses)
	| QuantifierSumti Quantifier Sumti
	deriving (Eq, Show, Data, Typeable)

data Selbri
	= Brivla Clause [Free]
	| GOhA Clause (Maybe Clause) [Free]
	| KE Clause [Free] Selbri (Maybe Clause) [Free]
	| ME Clause [Free] Sumti (Maybe Clause) [Free] (Maybe Clause) [Free]
	| MOI NumberLerfuString Clause [Free]
	| NUhA Clause [Free] MexOperator
	| SE Clause [Free] Selbri
	| JAI Clause [Free] (Maybe Tag) Selbri
	| NAhE Clause [Free] Selbri
	| Linkargs Selbri Linkargs
	| CEI Selbri [(Clause, [Free], Selbri)]
	| BO Selbri Clause [Free] Selbri
	| GuhekGik (Maybe Clause) [Free] Guhek Selbri Gik Selbri
	| JekJoikBO Selbri JoikJek (Maybe Tag) Clause [Free] Selbri
	| JoikJek Selbri [JoikJekSelbri5]
	| Tanru [Selbri]
	| CO Selbri Clause [Free] Selbri
	| NA Clause [Free] Selbri
	| Tag Tag Selbri
	| NU Clause (Maybe Clause) [Free]
		[(JoikJek, [Free], Clause, Maybe Clause, [Free])]
		Sentence (Maybe Clause) [Free]
	deriving (Eq, Show, Data, Typeable)

type RelativeClauses = RelativeClause

data RelativeClause
	= GOI Clause [Free] Term (Maybe Clause) [Free]
	| NOI Clause [Free] Sentence (Maybe Clause) [Free]
	| RelativeClauseZIhE RelativeClause [(Clause, [Free], RelativeClause)]
	deriving (Eq, Show, Data, Typeable)

type JoikJekSelbri5 = Either (JoikJek, [Free], Selbri)
	(Joik, (Maybe Tag), Clause, [Free], Selbri, Maybe Clause, [Free])

data Linkargs
	= BE Clause [Free] Term (Maybe Links) (Maybe Clause) [Free]
	deriving (Eq, Show, Data, Typeable)
data Links
	= BEI Clause [Free] Term (Maybe Links)
	deriving (Eq, Show, Data, Typeable)

type Quantifier = Operand
type Mex = Operand
data MexOperator
	= VUhU Clause [Free]
	| NAhU Clause [Free] Selbri (Maybe Clause) [Free]
	| MAhO Clause [Free] Mex (Maybe Clause) [Free]
	| NAhEOperator Clause [Free] MexOperator
	| SEOperator Clause [Free] MexOperator
	| KEOperator Clause [Free] MexOperator (Maybe Clause) [Free]
	| GuhekOperator Guhek MexOperator Gik MexOperator
	| JekJoikBOOperator MexOperator JoikJek (Maybe Tag) Clause [Free] MexOperator
	| JoikJekJoikKEOperator MexOperator
		[Either (JoikJek, [Free], MexOperator)
			(Joik, Maybe Tag, Clause, [Free], MexOperator,
				Maybe Clause, [Free])]
	deriving (Eq, Show, Data, Typeable)

data Operand
	= OLerfuString LerfuString (Maybe Clause) [Free]
	| OperandJoikEkBO Operand JoikEk [Free] (Maybe Tag) Clause [Free] Operand
	| OperandJoikEk Operand [(JoikEk, [Free], Operand)]
	| OperandJoikEkKE Operand JoikEk [Free] (Maybe Tag) Clause [Free] Operand
		(Maybe Clause) [Free]
	| MexOperatorMex Mex [(MexOperator, Mex)]
	| FUhA Clause [Free] RPExpression
	| PEhO (Maybe Clause) [Free] MexOperator [Mex] (Maybe Clause) [Free]
	| BIhE Mex Clause [Free] MexOperator Mex
	| VEI Clause [Free] Mex (Maybe Clause) [Free]
	| Number Number (Maybe Clause) [Free]
	| NIhE Clause [Free] Selbri (Maybe Clause) [Free]
	| MOhE Clause [Free] Sumti (Maybe Clause) [Free]
	| JOhI Clause [Free] [Mex] (Maybe Clause) [Free]
	| GekOperand Gek Operand Gik Operand
	| LAhE_NAhEOperand Clause (Maybe Clause) [Free] Operand (Maybe Clause) [Free]
	deriving (Eq, Show, Data, Typeable)

data RPExpression
	= RPExpression Operand (Maybe RPExpressionTail)
	deriving (Eq, Show, Data, Typeable)
data RPExpressionTail
	= RPExpressionTail RPExpression MexOperator (Maybe RPExpressionTail)
	deriving (Eq, Show, Data, Typeable)

type NumberLerfuString = [Clause]
type Number = [Clause]
type LerfuString = [Clause]

data Free
	= VocativeSumti [Clause] (Maybe Sumti) (Maybe Clause)
	| XINumber Clause [Free] NumberLerfuString (Maybe Clause)
	| XIMex Clause [Free] Clause [Free] Mex (Maybe Clause)
	| SEI Clause [Free] (Maybe ([Term], Maybe Clause, [Free])) Selbri (Maybe Clause)
	| SOI Clause [Free] Sumti (Maybe Sumti) (Maybe Clause)
	| TO Clause Text (Maybe Clause)
	| MAI NumberLerfuString Clause
	| VocativeSelbri [Clause] (Maybe RelativeClauses) Selbri
		(Maybe RelativeClauses) (Maybe Clause)
	| VocativeCmene [Clause] (Maybe RelativeClauses) [Clause] [Free]
		(Maybe RelativeClauses) (Maybe Clause)
	deriving (Eq, Show, Data, Typeable)

type Clause = ([String], String, Indicators)
type Pre = ([String], String)
type Indicators = [[([String], String)]]

type Ek = JoikJek
type Jek = JoikJek
type Joik = JoikJek
type JoikEk = JoikJek
type Gihek = JoikJek
data JoikJek
	= JOI (Maybe Clause) (Clause) (Maybe Clause)
	| Jek (Maybe Clause) (Maybe Clause) Clause (Maybe Clause)
	| Ek (Maybe Clause) (Maybe Clause) Clause (Maybe Clause)
	| Gihek (Maybe Clause) (Maybe Clause) Clause (Maybe Clause)
	| BIhI (Maybe Clause) Clause (Maybe Clause)
	| GAhO Clause JoikJek Clause
	deriving (Eq, Show, Data, Typeable)
data Gek
	= GA (Maybe Clause) Clause (Maybe Clause) [Free]
	| JoikGI Joik Clause [Free]
	| STagGik Tag Gik
	deriving (Eq, Show, Data, Typeable)
-- type Guhek = ([Clause], [Free])
-- type Gik = ([Clause], [Free])
type Guhek = (Maybe Clause, Clause, Maybe Clause, [Free])
type Gik = (Clause, Maybe Clause, [Free])

type Tense = Tag
data IntervalProperty
	= ROI Number Clause (Maybe Clause)
	| TAhE Clause (Maybe Clause)
	| ZAhO Clause (Maybe Clause)
	deriving (Eq, Show, Data, Typeable)

data Tag
	= BAI (Maybe Clause) (Maybe Clause) Clause (Maybe Clause) (Maybe Clause)
	| FA Clause [Free]
	| KI Clause
	| CUhE Clause
	| Time (Maybe Clause) [(Clause, Maybe Clause, Maybe Clause)]
		(Maybe (Clause, Maybe (Clause, Maybe Clause))) [IntervalProperty]
	| Space (Maybe Clause) [SpaceOffset] (Maybe SpaceInterval) (Maybe (Clause, SpaceOffset))
	| SpaceTime Tense Tense
	| TimeSpace Tense Tense
	| TenseCAhA Tense Clause
	| CAhA Clause
	| NAhETenseKI (Maybe Clause) Tense (Maybe Clause)
	| SimpleTenseModalFree Tag [Free]
	| FIhO Clause [Free] Selbri (Maybe Clause) [Free]
	| JoikJekTag Tag [(JoikJek, [Free], Tag)]
	| JekJoikSTag Tag [(JoikJek, Tag)]
	deriving (Eq, Show, Data, Typeable)

data SpaceInterval
	= FEhE [(Clause, IntervalProperty)]
	| VEhAVIhA (Maybe Clause) (Maybe Clause)
	| VEhAVIhAFAhA (Maybe Clause) (Maybe Clause) Clause (Maybe Clause)
	| VEhAVIhAFEhE (Maybe Clause) (Maybe Clause) SpaceInterval
	| VEhAVIhAFAhAFEhE (Maybe Clause) (Maybe Clause) Clause (Maybe Clause) SpaceInterval
	deriving (Eq, Show, Data, Typeable)

data SpaceOffset
	= FAhA Clause (Maybe Clause) (Maybe Clause)
	deriving (Eq, Show, Data, Typeable)

{-
main = do
	[str] <- getArgs
	let p = fromMaybe (error "can't lex") $ preprocess str
	case testPappytest $ testPappyParse "test" p of
		Parsed v _ _ -> print v
		NoParse e -> error (show e)
-}

uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d
uncurry3 f (x, y, z) = f x y z

isSimpleText ::
	[Clause] -> (Either [Clause] (Maybe [([String], String)]), [Free]) ->
	Maybe (JoikJek, [Free]) -> Maybe Text -> Maybe Pre -> Bool
isSimpleText n tp2 jj t f =
	null n && isNothing (fromRight $ fst tp2) && null (snd tp2) &&
	isNothing jj && isJust t && isNothing f

fromRight :: Either a (Maybe b) -> Maybe b
fromRight = either (const $ Nothing) id



data TestPappyDerivs = TestPappyDerivs {
	testPappySub0 :: TestPappyDerivs0,
	testPappySub1 :: TestPappyDerivs1,
	testPappySub2 :: TestPappyDerivs2,
	testPappySub3 :: TestPappyDerivs3,
	testPappySub4 :: TestPappyDerivs4,
	testPappySub5 :: TestPappyDerivs5,
	testPappySub6 :: TestPappyDerivs6,
	testPappySub7 :: TestPappyDerivs7,
	testPappySub8 :: TestPappyDerivs8,
	testPappyChar :: Result TestPappyDerivs Char,
	testPappyPos :: Pos
}

instance Derivs TestPappyDerivs where
	dvChar d = testPappyChar d
	dvPos d = testPappyPos d

data TestPappyDerivs0 = TestPappyDerivs0 {
	testPappySubStarRule0 :: Result TestPappyDerivs ([Clause]),
	testPappySubtext :: Result TestPappyDerivs (Text),
	testPappySubStarRule3 :: Result TestPappyDerivs ([ () ]),
	testPappySubtext_1 :: Result TestPappyDerivs (Text),
	testPappySubparagraphs :: Result TestPappyDerivs (Paragraphs),
	testPappySubPlusRule2 :: Result TestPappyDerivs ([Clause]),
	testPappySubStarRule8 :: Result TestPappyDerivs ([ () ]),
	testPappySubStarRule9 :: Result TestPappyDerivs ([ (Clause, [Free], Maybe Statement) ]),
	testPappySubstatement :: Result TestPappyDerivs (Statement),
	testPappySubStarRule11 :: Result TestPappyDerivs ([ (Clause, JoikJek, [Free], Maybe Statement) ]),
	testPappySubstatement_2 :: Result TestPappyDerivs (Statement),
	testPappySubfragment :: Result TestPappyDerivs (Fragment),
	testPappySubsentence :: Result TestPappyDerivs (Sentence),
	testPappySubStarRule21 :: Result TestPappyDerivs ([ () ]),
	testPappySubStarRule23 :: Result TestPappyDerivs ([ () ]),
	testPappySubsubsentence :: Result TestPappyDerivs (Sentence),
	testPappySubbridi_tail :: Result TestPappyDerivs (Sentence),
	testPappySubStarRule26 :: Result TestPappyDerivs ([ () ]),
	testPappySubbridi_tail_start :: Result TestPappyDerivs ( () ),
	testPappySubStarRule27 :: Result TestPappyDerivs ([ (Gihek, [Free], Sentence, [Term], Maybe Clause, [Free]) ]),
	testPappySubbridi_tail_2 :: Result TestPappyDerivs (Sentence),
	testPappySubgek_sentence :: Result TestPappyDerivs (Sentence),
	testPappySubPlusRule3 :: Result TestPappyDerivs ([Term]),
	testPappySubStarRule34 :: Result TestPappyDerivs ([ (Clause, [Free], JoikJek, [Free], Term) ]),
	testPappySubStarRule35 :: Result TestPappyDerivs ([ () ]),
	testPappySubStarRule37 :: Result TestPappyDerivs ([ (Clause, [Free], Term) ]),
	testPappySubStarRule38 :: Result TestPappyDerivs ([ () ]),
	testPappySubStarRule40 :: Result TestPappyDerivs ([ () ]),
	testPappySubStarRule41 :: Result TestPappyDerivs ([ () ]),
	testPappySubStarRule42 :: Result TestPappyDerivs ([ () ]),
	testPappySubterm_1 :: Result TestPappyDerivs (Term),
	testPappySubStarRule46 :: Result TestPappyDerivs ([ () ]),
	testPappySubterm_start :: Result TestPappyDerivs ( () )}

data TestPappyDerivs1 = TestPappyDerivs1 {
	testPappySubterms_gik_terms :: Result TestPappyDerivs (TermsGikTerms),
	testPappySubsumti :: Result TestPappyDerivs (Sumti),
	testPappySubStarRule55 :: Result TestPappyDerivs ([ (JoikEk, [Free], Sumti) ]),
	testPappySubsumti_3 :: Result TestPappyDerivs (Sumti),
	testPappySubsumti_4 :: Result TestPappyDerivs (Sumti),
	testPappySubsumti_6 :: Result TestPappyDerivs (Sumti),
	testPappySubLAhE_NAhE :: Result TestPappyDerivs ( (Clause, Maybe Clause, [Free]) ),
	testPappySubStarRule73 :: Result TestPappyDerivs ([ (Clause, [Free], RelativeClause) ]),
	testPappySubStarRule75 :: Result TestPappyDerivs ([ () ]),
	testPappySubStarRule76 :: Result TestPappyDerivs ([ () ]),
	testPappySubrelative_clause_1 :: Result TestPappyDerivs (RelativeClause),
	testPappySubselbri :: Result TestPappyDerivs (Selbri),
	testPappySubselbri_2 :: Result TestPappyDerivs (Selbri),
	testPappySubPlusRule5 :: Result TestPappyDerivs ([Selbri]),
	testPappySubStarRule83 :: Result TestPappyDerivs ([JoikJekSelbri5]),
	testPappySubselbri_5 :: Result TestPappyDerivs (Selbri),
	testPappySubselbri_6 :: Result TestPappyDerivs (Selbri),
	testPappySubStarRule89 :: Result TestPappyDerivs ([ (Clause, [Free], Selbri) ]),
	testPappySubStarRule104 :: Result TestPappyDerivs ([ (JoikJek, [Free], Clause, Maybe Clause, [Free]) ]),
	testPappySubtanru_unit_2 :: Result TestPappyDerivs (Selbri),
	testPappySubStarRule107 :: Result TestPappyDerivs ([ () ]),
	testPappySublinkargs_1 :: Result TestPappyDerivs (Linkargs),
	testPappySubStarRule110 :: Result TestPappyDerivs ([ () ]),
	testPappySubStarRule111 :: Result TestPappyDerivs ([ () ]),
	testPappySublinks_1 :: Result TestPappyDerivs (Links),
	testPappySubStarRule113 :: Result TestPappyDerivs ([ () ]),
	testPappySubquantifier :: Result TestPappyDerivs (Quantifier),
	testPappySubStarRule117 :: Result TestPappyDerivs ([ () ]),
	testPappySubStarRule118 :: Result TestPappyDerivs ([ (MexOperator, Mex) ]),
	testPappySubmex_0 :: Result TestPappyDerivs (Mex),
	testPappySubStarRule119 :: Result TestPappyDerivs ([ () ]),
	testPappySubmex_start :: Result TestPappyDerivs ( () ),
	testPappySubmex_1 :: Result TestPappyDerivs (Mex)}

data TestPappyDerivs2 = TestPappyDerivs2 {
	testPappySubmex_2 :: Result TestPappyDerivs (Mex),
	testPappySubrp_expression_tail :: Result TestPappyDerivs ( Maybe RPExpressionTail),
	testPappySubStarRule124 :: Result TestPappyDerivs ([ () ]),
	testPappySubStarRule125 :: Result TestPappyDerivs ([ Either (JoikJek, [Free], MexOperator) (Joik, Maybe Tag, Clause, [Free], MexOperator, Maybe Clause, [Free]) ]),
	testPappySubStarRule128 :: Result TestPappyDerivs ([ () ]),
	testPappySuboperator_start :: Result TestPappyDerivs ( () ),
	testPappySuboperator_1 :: Result TestPappyDerivs (MexOperator),
	testPappySuboperator_2 :: Result TestPappyDerivs (MexOperator),
	testPappySubmex_operator :: Result TestPappyDerivs (MexOperator),
	testPappySubStarRule139 :: Result TestPappyDerivs ([ () ]),
	testPappySuboperand_0 :: Result TestPappyDerivs (Operand),
	testPappySubStarRule142 :: Result TestPappyDerivs ([ () ]),
	testPappySuboperand_start :: Result TestPappyDerivs ( () ),
	testPappySubStarRule143 :: Result TestPappyDerivs ([ (JoikEk, [Free], Operand) ]),
	testPappySuboperand_2 :: Result TestPappyDerivs (Operand),
	testPappySubPlusRule7 :: Result TestPappyDerivs ([Mex]),
	testPappySuboperand_3 :: Result TestPappyDerivs (Operand),
	testPappySubStarRule154 :: Result TestPappyDerivs ([ [Clause] ]),
	testPappySublerfu_word :: Result TestPappyDerivs ( [Clause] ),
	testPappySubek :: Result TestPappyDerivs (Ek),
	testPappySubStarRule155 :: Result TestPappyDerivs ([ () ]),
	testPappySubgihek_1 :: Result TestPappyDerivs (Gihek),
	testPappySubStarRule156 :: Result TestPappyDerivs ([ () ]),
	testPappySubjek :: Result TestPappyDerivs (Jek),
	testPappySubjoik :: Result TestPappyDerivs (Joik),
	testPappySubinterval :: Result TestPappyDerivs (Joik),
	testPappySubStarRule157 :: Result TestPappyDerivs ([ () ]),
	testPappySubStarRule160 :: Result TestPappyDerivs ([ () ]),
	testPappySubgek :: Result TestPappyDerivs (Gek),
	testPappySubguhek :: Result TestPappyDerivs (Guhek),
	testPappySubgik :: Result TestPappyDerivs (Gik),
	testPappySubStarRule168 :: Result TestPappyDerivs ([ (JoikJek, Tag) ]),
	testPappySubStarRule169 :: Result TestPappyDerivs ([ (JoikJek, [Free], Tag) ])}

data TestPappyDerivs3 = TestPappyDerivs3 {
	testPappySubtense_modal :: Result TestPappyDerivs (Tag),
	testPappySubsimple_tense_modal :: Result TestPappyDerivs (Tag),
	testPappySubPlusRule8 :: Result TestPappyDerivs ([ (Clause, Maybe Clause, Maybe Clause) ]),
	testPappySubStarRule177 :: Result TestPappyDerivs ([IntervalProperty]),
	testPappySubStarRule178 :: Result TestPappyDerivs ([ (Clause, Maybe Clause, Maybe Clause) ]),
	testPappySubPlusRule9 :: Result TestPappyDerivs ([IntervalProperty]),
	testPappySubtime :: Result TestPappyDerivs (Tense),
	testPappySubzeha_pu :: Result TestPappyDerivs ( (Clause, Maybe (Clause, Maybe Clause)) ),
	testPappySubtime_offset :: Result TestPappyDerivs ( (Clause, Maybe Clause, Maybe Clause) ),
	testPappySubPlusRule10 :: Result TestPappyDerivs ([SpaceOffset]),
	testPappySubStarRule181 :: Result TestPappyDerivs ([SpaceOffset]),
	testPappySubspace :: Result TestPappyDerivs (Tense),
	testPappySubspace_offset :: Result TestPappyDerivs (SpaceOffset),
	testPappySubspace_interval :: Result TestPappyDerivs (SpaceInterval),
	testPappySubVEhA_VIhA :: Result TestPappyDerivs ( (Maybe Clause, Maybe Clause) ),
	testPappySubPlusRule11 :: Result TestPappyDerivs ([ (Clause, IntervalProperty) ]),
	testPappySubinterval_property :: Result TestPappyDerivs (IntervalProperty),
	testPappySubPlusRule12 :: Result TestPappyDerivs ([Clause]),
	testPappySubStarRule188 :: Result TestPappyDerivs ([Free]),
	testPappySubPlusRule13 :: Result TestPappyDerivs ([ [([String], String, Indicators)] ]),
	testPappySubStarRule189 :: Result TestPappyDerivs ([ [([String], String, Indicators)] ]),
	testPappySubvocative :: Result TestPappyDerivs ( [([String], String, Indicators)] ),
	testPappySubcoi_nai :: Result TestPappyDerivs ( [([String], String, Indicators)] ),
	testPappySubPlusRule14 :: Result TestPappyDerivs ([ [([String], String)] ]),
	testPappySubindicator :: Result TestPappyDerivs ( [([String], String)] ),
	testPappySubStarRule190 :: Result TestPappyDerivs ([String]),
	testPappySubStarRule191 :: Result TestPappyDerivs ([String]),
	testPappySubPlusRule15 :: Result TestPappyDerivs ([ String ]),
	testPappySubPlusRule16 :: Result TestPappyDerivs ([Pre]),
	testPappySubpre_zei_bu :: Result TestPappyDerivs ( String ),
	testPappySubStarRule192 :: Result TestPappyDerivs ([Char]),
	testPappySubStarRule193 :: Result TestPappyDerivs ([ [([String], String)] ]),
	testPappySubpost_clause :: Result TestPappyDerivs ( [[([String], String)]] )}

data TestPappyDerivs4 = TestPappyDerivs4 {
	testPappySubpost_clause_no_ind :: Result TestPappyDerivs ( () ),
	testPappySubany_word_SA_handling :: Result TestPappyDerivs ( ([String], String) ),
	testPappySubStarRule194 :: Result TestPappyDerivs ([ () ]),
	testPappySubPlusRule17 :: Result TestPappyDerivs ([ () ]),
	testPappySubsi_clause_single :: Result TestPappyDerivs ( () ),
	testPappySuberasable_clause :: Result TestPappyDerivs ( () ),
	testPappySubBRIVLA_pre :: Result TestPappyDerivs ( ([String], String) ),
	testPappySubPlusRule18 :: Result TestPappyDerivs ([String]),
	testPappySubBAhE_clause_single :: Result TestPappyDerivs (String),
	testPappySubStarRule195 :: Result TestPappyDerivs ([ () ]),
	testPappySubStarRule196 :: Result TestPappyDerivs ([String]),
	testPappySubStarRule198 :: Result TestPappyDerivs ([String]),
	testPappySubPlusRule19 :: Result TestPappyDerivs ([String]),
	testPappySubcmene :: Result TestPappyDerivs (String),
	testPappySubStarRule200 :: Result TestPappyDerivs ([Char]),
	testPappySubcmavo :: Result TestPappyDerivs (String),
	testPappySubStarRule202 :: Result TestPappyDerivs ([String]),
	testPappySubStarRule203 :: Result TestPappyDerivs ([String]),
	testPappySubstressed_extended_rafsi :: Result TestPappyDerivs (String),
	testPappySubextended_rafsi :: Result TestPappyDerivs (String),
	testPappySubStarRule205 :: Result TestPappyDerivs ([String]),
	testPappySubStarRule206 :: Result TestPappyDerivs ([String]),
	testPappySubbrivla_head :: Result TestPappyDerivs (String),
	testPappySubStarRule207 :: Result TestPappyDerivs ([String]),
	testPappySubCVV_final_rafsi :: Result TestPappyDerivs (String),
	testPappySubshort_final_rafsi :: Result TestPappyDerivs (String),
	testPappySubstressed_y_rafsi :: Result TestPappyDerivs (String),
	testPappySubstressed_y_less_rafsi :: Result TestPappyDerivs (String),
	testPappySubstressed_long_rafsi :: Result TestPappyDerivs (String),
	testPappySuby_rafsi :: Result TestPappyDerivs (String),
	testPappySuby_less_rafsi :: Result TestPappyDerivs (String),
	testPappySubr_hyphen :: Result TestPappyDerivs (Char),
	testPappySubfinal_syllable :: Result TestPappyDerivs (String)}

data TestPappyDerivs5 = TestPappyDerivs5 {
	testPappySubstressed_syllable :: Result TestPappyDerivs (String),
	testPappySubstressed_vowel :: Result TestPappyDerivs (Char),
	testPappySubunstressed_syllable :: Result TestPappyDerivs (String),
	testPappySubStarRule208 :: Result TestPappyDerivs ([Char]),
	testPappySubconsonantal_syllable :: Result TestPappyDerivs (String),
	testPappySubcoda :: Result TestPappyDerivs (String),
	testPappySubonset :: Result TestPappyDerivs (String),
	testPappySubglide :: Result TestPappyDerivs (Char),
	testPappySubdiphthong :: Result TestPappyDerivs (String),
	testPappySubvowel :: Result TestPappyDerivs (Char),
	testPappySubPlusRule21 :: Result TestPappyDerivs ([Char]),
	testPappySubinitial_pair :: Result TestPappyDerivs (String),
	testPappySubinitial :: Result TestPappyDerivs (String),
	testPappySubl :: Result TestPappyDerivs (Char),
	testPappySubm :: Result TestPappyDerivs (Char),
	testPappySubn :: Result TestPappyDerivs (Char),
	testPappySubr :: Result TestPappyDerivs (Char),
	testPappySubb :: Result TestPappyDerivs (Char),
	testPappySubd :: Result TestPappyDerivs (Char),
	testPappySubg :: Result TestPappyDerivs (Char),
	testPappySubv :: Result TestPappyDerivs (Char),
	testPappySubj :: Result TestPappyDerivs (Char),
	testPappySubz :: Result TestPappyDerivs (Char),
	testPappySubs :: Result TestPappyDerivs (Char),
	testPappySubc :: Result TestPappyDerivs (Char),
	testPappySubx :: Result TestPappyDerivs (Char),
	testPappySubk :: Result TestPappyDerivs (Char),
	testPappySubf :: Result TestPappyDerivs (Char),
	testPappySubp :: Result TestPappyDerivs (Char),
	testPappySubt :: Result TestPappyDerivs (Char),
	testPappySubdigit :: Result TestPappyDerivs (Char),
	testPappySubpost_word :: Result TestPappyDerivs (String),
	testPappySubPlusRule22 :: Result TestPappyDerivs ([Char])}

data TestPappyDerivs6 = TestPappyDerivs6 {
	testPappySubPlusRule23 :: Result TestPappyDerivs ([ String ]),
	testPappySubStarRule236 :: Result TestPappyDerivs ([Char]),
	testPappySubStarRule237 :: Result TestPappyDerivs ([Char]),
	testPappySubA :: Result TestPappyDerivs (String),
	testPappySubBAI :: Result TestPappyDerivs (String),
	testPappySubBAhE :: Result TestPappyDerivs (String),
	testPappySubBEhO :: Result TestPappyDerivs (String),
	testPappySubBIhE :: Result TestPappyDerivs (String),
	testPappySubBIhI :: Result TestPappyDerivs (String),
	testPappySubBY :: Result TestPappyDerivs (String),
	testPappySubCAhA :: Result TestPappyDerivs (String),
	testPappySubCAI :: Result TestPappyDerivs (String),
	testPappySubCEhE :: Result TestPappyDerivs (String),
	testPappySubCOI :: Result TestPappyDerivs (String),
	testPappySubCUhE :: Result TestPappyDerivs (String),
	testPappySubDAhO :: Result TestPappyDerivs (String),
	testPappySubDOhU :: Result TestPappyDerivs (String),
	testPappySubFA :: Result TestPappyDerivs (String),
	testPappySubFAhA :: Result TestPappyDerivs (String),
	testPappySubFAhO :: Result TestPappyDerivs (String),
	testPappySubFEhE :: Result TestPappyDerivs (String),
	testPappySubFEhU :: Result TestPappyDerivs (String),
	testPappySubFIhO :: Result TestPappyDerivs (String),
	testPappySubFUhA :: Result TestPappyDerivs (String),
	testPappySubFUhE :: Result TestPappyDerivs (String),
	testPappySubFUhO :: Result TestPappyDerivs (String),
	testPappySubGA :: Result TestPappyDerivs (String),
	testPappySubGAhO :: Result TestPappyDerivs (String),
	testPappySubGEhU :: Result TestPappyDerivs (String),
	testPappySubGIhA :: Result TestPappyDerivs (String),
	testPappySubGOI :: Result TestPappyDerivs (String),
	testPappySubGOhA :: Result TestPappyDerivs (String),
	testPappySubGUhA :: Result TestPappyDerivs (String)}

data TestPappyDerivs7 = TestPappyDerivs7 {
	testPappySubJA :: Result TestPappyDerivs (String),
	testPappySubJOhI :: Result TestPappyDerivs (String),
	testPappySubJOI :: Result TestPappyDerivs (String),
	testPappySubKEhE :: Result TestPappyDerivs (String),
	testPappySubKOhA :: Result TestPappyDerivs (String),
	testPappySubKUhE :: Result TestPappyDerivs (String),
	testPappySubKUhO :: Result TestPappyDerivs (String),
	testPappySubLA :: Result TestPappyDerivs (String),
	testPappySubLAU :: Result TestPappyDerivs (String),
	testPappySubLAhE :: Result TestPappyDerivs (String),
	testPappySubLE :: Result TestPappyDerivs (String),
	testPappySubLEhU :: Result TestPappyDerivs (String),
	testPappySubLI :: Result TestPappyDerivs (String),
	testPappySubLIhU :: Result TestPappyDerivs (String),
	testPappySubLOhO :: Result TestPappyDerivs (String),
	testPappySubLOhU :: Result TestPappyDerivs (String),
	testPappySubLUhU :: Result TestPappyDerivs (String),
	testPappySubMAhO :: Result TestPappyDerivs (String),
	testPappySubMAI :: Result TestPappyDerivs (String),
	testPappySubMEhU :: Result TestPappyDerivs (String),
	testPappySubMOhE :: Result TestPappyDerivs (String),
	testPappySubMOhI :: Result TestPappyDerivs (String),
	testPappySubMOI :: Result TestPappyDerivs (String),
	testPappySubNA :: Result TestPappyDerivs (String),
	testPappySubNAhE :: Result TestPappyDerivs (String),
	testPappySubNAhU :: Result TestPappyDerivs (String),
	testPappySubNIhE :: Result TestPappyDerivs (String),
	testPappySubNIhO :: Result TestPappyDerivs (String),
	testPappySubNOI :: Result TestPappyDerivs (String),
	testPappySubNU :: Result TestPappyDerivs (String),
	testPappySubNUhA :: Result TestPappyDerivs (String),
	testPappySubNUhI :: Result TestPappyDerivs (String),
	testPappySubNUhU :: Result TestPappyDerivs (String)}

data TestPappyDerivs8 = TestPappyDerivs8 {
	testPappySubPA :: Result TestPappyDerivs (String),
	testPappySubPEhE :: Result TestPappyDerivs (String),
	testPappySubPEhO :: Result TestPappyDerivs (String),
	testPappySubPU :: Result TestPappyDerivs (String),
	testPappySubRAhO :: Result TestPappyDerivs (String),
	testPappySubROI :: Result TestPappyDerivs (String),
	testPappySubSE :: Result TestPappyDerivs (String),
	testPappySubSEI :: Result TestPappyDerivs (String),
	testPappySubSEhU :: Result TestPappyDerivs (String),
	testPappySubSI :: Result TestPappyDerivs (String),
	testPappySubSU :: Result TestPappyDerivs (String),
	testPappySubTAhE :: Result TestPappyDerivs (String),
	testPappySubTEhU :: Result TestPappyDerivs (String),
	testPappySubTO :: Result TestPappyDerivs (String),
	testPappySubTUhE :: Result TestPappyDerivs (String),
	testPappySubTUhU :: Result TestPappyDerivs (String),
	testPappySubUI :: Result TestPappyDerivs (String),
	testPappySubVA :: Result TestPappyDerivs (String),
	testPappySubVEhO :: Result TestPappyDerivs (String),
	testPappySubVUhU :: Result TestPappyDerivs (String),
	testPappySubVEhA :: Result TestPappyDerivs (String),
	testPappySubVIhA :: Result TestPappyDerivs (String),
	testPappySubVUhO :: Result TestPappyDerivs (String),
	testPappySubPlusRule24 :: Result TestPappyDerivs ([Char]),
	testPappySubZAhO :: Result TestPappyDerivs (String),
	testPappySubZEhA :: Result TestPappyDerivs (String),
	testPappySubZI :: Result TestPappyDerivs (String),
	testPappySubZIhE :: Result TestPappyDerivs (String),
	testPappySubZOI :: Result TestPappyDerivs (String),
	testPappySubZOhU :: Result TestPappyDerivs (String),
	testPappySubdummyTail :: Result TestPappyDerivs ((() -> ())),
	testPappySubdummy :: Result TestPappyDerivs (())}

testPappyStarRule0 = testPappySubStarRule0 . testPappySub0
testPappytext = testPappySubtext . testPappySub0
testPappyStarRule3 = testPappySubStarRule3 . testPappySub0
testPappytext_1 = testPappySubtext_1 . testPappySub0
testPappyparagraphs = testPappySubparagraphs . testPappySub0
testPappyPlusRule2 = testPappySubPlusRule2 . testPappySub0
testPappyStarRule8 = testPappySubStarRule8 . testPappySub0
testPappyStarRule9 = testPappySubStarRule9 . testPappySub0
testPappystatement = testPappySubstatement . testPappySub0
testPappyStarRule11 = testPappySubStarRule11 . testPappySub0
testPappystatement_2 = testPappySubstatement_2 . testPappySub0
testPappyfragment = testPappySubfragment . testPappySub0
testPappysentence = testPappySubsentence . testPappySub0
testPappyStarRule21 = testPappySubStarRule21 . testPappySub0
testPappyStarRule23 = testPappySubStarRule23 . testPappySub0
testPappysubsentence = testPappySubsubsentence . testPappySub0
testPappybridi_tail = testPappySubbridi_tail . testPappySub0
testPappyStarRule26 = testPappySubStarRule26 . testPappySub0
testPappybridi_tail_start = testPappySubbridi_tail_start . testPappySub0
testPappyStarRule27 = testPappySubStarRule27 . testPappySub0
testPappybridi_tail_2 = testPappySubbridi_tail_2 . testPappySub0
testPappygek_sentence = testPappySubgek_sentence . testPappySub0
testPappyPlusRule3 = testPappySubPlusRule3 . testPappySub0
testPappyStarRule34 = testPappySubStarRule34 . testPappySub0
testPappyStarRule35 = testPappySubStarRule35 . testPappySub0
testPappyStarRule37 = testPappySubStarRule37 . testPappySub0
testPappyStarRule38 = testPappySubStarRule38 . testPappySub0
testPappyStarRule40 = testPappySubStarRule40 . testPappySub0
testPappyStarRule41 = testPappySubStarRule41 . testPappySub0
testPappyStarRule42 = testPappySubStarRule42 . testPappySub0
testPappyterm_1 = testPappySubterm_1 . testPappySub0
testPappyStarRule46 = testPappySubStarRule46 . testPappySub0
testPappyterm_start = testPappySubterm_start . testPappySub0
testPappyterms_gik_terms = testPappySubterms_gik_terms . testPappySub1
testPappysumti = testPappySubsumti . testPappySub1
testPappyStarRule55 = testPappySubStarRule55 . testPappySub1
testPappysumti_3 = testPappySubsumti_3 . testPappySub1
testPappysumti_4 = testPappySubsumti_4 . testPappySub1
testPappysumti_6 = testPappySubsumti_6 . testPappySub1
testPappyLAhE_NAhE = testPappySubLAhE_NAhE . testPappySub1
testPappyStarRule73 = testPappySubStarRule73 . testPappySub1
testPappyStarRule75 = testPappySubStarRule75 . testPappySub1
testPappyStarRule76 = testPappySubStarRule76 . testPappySub1
testPappyrelative_clause_1 = testPappySubrelative_clause_1 . testPappySub1
testPappyselbri = testPappySubselbri . testPappySub1
testPappyselbri_2 = testPappySubselbri_2 . testPappySub1
testPappyPlusRule5 = testPappySubPlusRule5 . testPappySub1
testPappyStarRule83 = testPappySubStarRule83 . testPappySub1
testPappyselbri_5 = testPappySubselbri_5 . testPappySub1
testPappyselbri_6 = testPappySubselbri_6 . testPappySub1
testPappyStarRule89 = testPappySubStarRule89 . testPappySub1
testPappyStarRule104 = testPappySubStarRule104 . testPappySub1
testPappytanru_unit_2 = testPappySubtanru_unit_2 . testPappySub1
testPappyStarRule107 = testPappySubStarRule107 . testPappySub1
testPappylinkargs_1 = testPappySublinkargs_1 . testPappySub1
testPappyStarRule110 = testPappySubStarRule110 . testPappySub1
testPappyStarRule111 = testPappySubStarRule111 . testPappySub1
testPappylinks_1 = testPappySublinks_1 . testPappySub1
testPappyStarRule113 = testPappySubStarRule113 . testPappySub1
testPappyquantifier = testPappySubquantifier . testPappySub1
testPappyStarRule117 = testPappySubStarRule117 . testPappySub1
testPappyStarRule118 = testPappySubStarRule118 . testPappySub1
testPappymex_0 = testPappySubmex_0 . testPappySub1
testPappyStarRule119 = testPappySubStarRule119 . testPappySub1
testPappymex_start = testPappySubmex_start . testPappySub1
testPappymex_1 = testPappySubmex_1 . testPappySub1
testPappymex_2 = testPappySubmex_2 . testPappySub2
testPappyrp_expression_tail = testPappySubrp_expression_tail . testPappySub2
testPappyStarRule124 = testPappySubStarRule124 . testPappySub2
testPappyStarRule125 = testPappySubStarRule125 . testPappySub2
testPappyStarRule128 = testPappySubStarRule128 . testPappySub2
testPappyoperator_start = testPappySuboperator_start . testPappySub2
testPappyoperator_1 = testPappySuboperator_1 . testPappySub2
testPappyoperator_2 = testPappySuboperator_2 . testPappySub2
testPappymex_operator = testPappySubmex_operator . testPappySub2
testPappyStarRule139 = testPappySubStarRule139 . testPappySub2
testPappyoperand_0 = testPappySuboperand_0 . testPappySub2
testPappyStarRule142 = testPappySubStarRule142 . testPappySub2
testPappyoperand_start = testPappySuboperand_start . testPappySub2
testPappyStarRule143 = testPappySubStarRule143 . testPappySub2
testPappyoperand_2 = testPappySuboperand_2 . testPappySub2
testPappyPlusRule7 = testPappySubPlusRule7 . testPappySub2
testPappyoperand_3 = testPappySuboperand_3 . testPappySub2
testPappyStarRule154 = testPappySubStarRule154 . testPappySub2
testPappylerfu_word = testPappySublerfu_word . testPappySub2
testPappyek = testPappySubek . testPappySub2
testPappyStarRule155 = testPappySubStarRule155 . testPappySub2
testPappygihek_1 = testPappySubgihek_1 . testPappySub2
testPappyStarRule156 = testPappySubStarRule156 . testPappySub2
testPappyjek = testPappySubjek . testPappySub2
testPappyjoik = testPappySubjoik . testPappySub2
testPappyinterval = testPappySubinterval . testPappySub2
testPappyStarRule157 = testPappySubStarRule157 . testPappySub2
testPappyStarRule160 = testPappySubStarRule160 . testPappySub2
testPappygek = testPappySubgek . testPappySub2
testPappyguhek = testPappySubguhek . testPappySub2
testPappygik = testPappySubgik . testPappySub2
testPappyStarRule168 = testPappySubStarRule168 . testPappySub2
testPappyStarRule169 = testPappySubStarRule169 . testPappySub2
testPappytense_modal = testPappySubtense_modal . testPappySub3
testPappysimple_tense_modal = testPappySubsimple_tense_modal . testPappySub3
testPappyPlusRule8 = testPappySubPlusRule8 . testPappySub3
testPappyStarRule177 = testPappySubStarRule177 . testPappySub3
testPappyStarRule178 = testPappySubStarRule178 . testPappySub3
testPappyPlusRule9 = testPappySubPlusRule9 . testPappySub3
testPappytime = testPappySubtime . testPappySub3
testPappyzeha_pu = testPappySubzeha_pu . testPappySub3
testPappytime_offset = testPappySubtime_offset . testPappySub3
testPappyPlusRule10 = testPappySubPlusRule10 . testPappySub3
testPappyStarRule181 = testPappySubStarRule181 . testPappySub3
testPappyspace = testPappySubspace . testPappySub3
testPappyspace_offset = testPappySubspace_offset . testPappySub3
testPappyspace_interval = testPappySubspace_interval . testPappySub3
testPappyVEhA_VIhA = testPappySubVEhA_VIhA . testPappySub3
testPappyPlusRule11 = testPappySubPlusRule11 . testPappySub3
testPappyinterval_property = testPappySubinterval_property . testPappySub3
testPappyPlusRule12 = testPappySubPlusRule12 . testPappySub3
testPappyStarRule188 = testPappySubStarRule188 . testPappySub3
testPappyPlusRule13 = testPappySubPlusRule13 . testPappySub3
testPappyStarRule189 = testPappySubStarRule189 . testPappySub3
testPappyvocative = testPappySubvocative . testPappySub3
testPappycoi_nai = testPappySubcoi_nai . testPappySub3
testPappyPlusRule14 = testPappySubPlusRule14 . testPappySub3
testPappyindicator = testPappySubindicator . testPappySub3
testPappyStarRule190 = testPappySubStarRule190 . testPappySub3
testPappyStarRule191 = testPappySubStarRule191 . testPappySub3
testPappyPlusRule15 = testPappySubPlusRule15 . testPappySub3
testPappyPlusRule16 = testPappySubPlusRule16 . testPappySub3
testPappypre_zei_bu = testPappySubpre_zei_bu . testPappySub3
testPappyStarRule192 = testPappySubStarRule192 . testPappySub3
testPappyStarRule193 = testPappySubStarRule193 . testPappySub3
testPappypost_clause = testPappySubpost_clause . testPappySub3
testPappypost_clause_no_ind = testPappySubpost_clause_no_ind . testPappySub4
testPappyany_word_SA_handling = testPappySubany_word_SA_handling . testPappySub4
testPappyStarRule194 = testPappySubStarRule194 . testPappySub4
testPappyPlusRule17 = testPappySubPlusRule17 . testPappySub4
testPappysi_clause_single = testPappySubsi_clause_single . testPappySub4
testPappyerasable_clause = testPappySuberasable_clause . testPappySub4
testPappyBRIVLA_pre = testPappySubBRIVLA_pre . testPappySub4
testPappyPlusRule18 = testPappySubPlusRule18 . testPappySub4
testPappyBAhE_clause_single = testPappySubBAhE_clause_single . testPappySub4
testPappyStarRule195 = testPappySubStarRule195 . testPappySub4
testPappyStarRule196 = testPappySubStarRule196 . testPappySub4
testPappyStarRule198 = testPappySubStarRule198 . testPappySub4
testPappyPlusRule19 = testPappySubPlusRule19 . testPappySub4
testPappycmene = testPappySubcmene . testPappySub4
testPappyStarRule200 = testPappySubStarRule200 . testPappySub4
testPappycmavo = testPappySubcmavo . testPappySub4
testPappyStarRule202 = testPappySubStarRule202 . testPappySub4
testPappyStarRule203 = testPappySubStarRule203 . testPappySub4
testPappystressed_extended_rafsi = testPappySubstressed_extended_rafsi . testPappySub4
testPappyextended_rafsi = testPappySubextended_rafsi . testPappySub4
testPappyStarRule205 = testPappySubStarRule205 . testPappySub4
testPappyStarRule206 = testPappySubStarRule206 . testPappySub4
testPappybrivla_head = testPappySubbrivla_head . testPappySub4
testPappyStarRule207 = testPappySubStarRule207 . testPappySub4
testPappyCVV_final_rafsi = testPappySubCVV_final_rafsi . testPappySub4
testPappyshort_final_rafsi = testPappySubshort_final_rafsi . testPappySub4
testPappystressed_y_rafsi = testPappySubstressed_y_rafsi . testPappySub4
testPappystressed_y_less_rafsi = testPappySubstressed_y_less_rafsi . testPappySub4
testPappystressed_long_rafsi = testPappySubstressed_long_rafsi . testPappySub4
testPappyy_rafsi = testPappySuby_rafsi . testPappySub4
testPappyy_less_rafsi = testPappySuby_less_rafsi . testPappySub4
testPappyr_hyphen = testPappySubr_hyphen . testPappySub4
testPappyfinal_syllable = testPappySubfinal_syllable . testPappySub4
testPappystressed_syllable = testPappySubstressed_syllable . testPappySub5
testPappystressed_vowel = testPappySubstressed_vowel . testPappySub5
testPappyunstressed_syllable = testPappySubunstressed_syllable . testPappySub5
testPappyStarRule208 = testPappySubStarRule208 . testPappySub5
testPappyconsonantal_syllable = testPappySubconsonantal_syllable . testPappySub5
testPappycoda = testPappySubcoda . testPappySub5
testPappyonset = testPappySubonset . testPappySub5
testPappyglide = testPappySubglide . testPappySub5
testPappydiphthong = testPappySubdiphthong . testPappySub5
testPappyvowel = testPappySubvowel . testPappySub5
testPappyPlusRule21 = testPappySubPlusRule21 . testPappySub5
testPappyinitial_pair = testPappySubinitial_pair . testPappySub5
testPappyinitial = testPappySubinitial . testPappySub5
testPappyl = testPappySubl . testPappySub5
testPappym = testPappySubm . testPappySub5
testPappyn = testPappySubn . testPappySub5
testPappyr = testPappySubr . testPappySub5
testPappyb = testPappySubb . testPappySub5
testPappyd = testPappySubd . testPappySub5
testPappyg = testPappySubg . testPappySub5
testPappyv = testPappySubv . testPappySub5
testPappyj = testPappySubj . testPappySub5
testPappyz = testPappySubz . testPappySub5
testPappys = testPappySubs . testPappySub5
testPappyc = testPappySubc . testPappySub5
testPappyx = testPappySubx . testPappySub5
testPappyk = testPappySubk . testPappySub5
testPappyf = testPappySubf . testPappySub5
testPappyp = testPappySubp . testPappySub5
testPappyt = testPappySubt . testPappySub5
testPappydigit = testPappySubdigit . testPappySub5
testPappypost_word = testPappySubpost_word . testPappySub5
testPappyPlusRule22 = testPappySubPlusRule22 . testPappySub5
testPappyPlusRule23 = testPappySubPlusRule23 . testPappySub6
testPappyStarRule236 = testPappySubStarRule236 . testPappySub6
testPappyStarRule237 = testPappySubStarRule237 . testPappySub6
testPappyA = testPappySubA . testPappySub6
testPappyBAI = testPappySubBAI . testPappySub6
testPappyBAhE = testPappySubBAhE . testPappySub6
testPappyBEhO = testPappySubBEhO . testPappySub6
testPappyBIhE = testPappySubBIhE . testPappySub6
testPappyBIhI = testPappySubBIhI . testPappySub6
testPappyBY = testPappySubBY . testPappySub6
testPappyCAhA = testPappySubCAhA . testPappySub6
testPappyCAI = testPappySubCAI . testPappySub6
testPappyCEhE = testPappySubCEhE . testPappySub6
testPappyCOI = testPappySubCOI . testPappySub6
testPappyCUhE = testPappySubCUhE . testPappySub6
testPappyDAhO = testPappySubDAhO . testPappySub6
testPappyDOhU = testPappySubDOhU . testPappySub6
testPappyFA = testPappySubFA . testPappySub6
testPappyFAhA = testPappySubFAhA . testPappySub6
testPappyFAhO = testPappySubFAhO . testPappySub6
testPappyFEhE = testPappySubFEhE . testPappySub6
testPappyFEhU = testPappySubFEhU . testPappySub6
testPappyFIhO = testPappySubFIhO . testPappySub6
testPappyFUhA = testPappySubFUhA . testPappySub6
testPappyFUhE = testPappySubFUhE . testPappySub6
testPappyFUhO = testPappySubFUhO . testPappySub6
testPappyGA = testPappySubGA . testPappySub6
testPappyGAhO = testPappySubGAhO . testPappySub6
testPappyGEhU = testPappySubGEhU . testPappySub6
testPappyGIhA = testPappySubGIhA . testPappySub6
testPappyGOI = testPappySubGOI . testPappySub6
testPappyGOhA = testPappySubGOhA . testPappySub6
testPappyGUhA = testPappySubGUhA . testPappySub6
testPappyJA = testPappySubJA . testPappySub7
testPappyJOhI = testPappySubJOhI . testPappySub7
testPappyJOI = testPappySubJOI . testPappySub7
testPappyKEhE = testPappySubKEhE . testPappySub7
testPappyKOhA = testPappySubKOhA . testPappySub7
testPappyKUhE = testPappySubKUhE . testPappySub7
testPappyKUhO = testPappySubKUhO . testPappySub7
testPappyLA = testPappySubLA . testPappySub7
testPappyLAU = testPappySubLAU . testPappySub7
testPappyLAhE = testPappySubLAhE . testPappySub7
testPappyLE = testPappySubLE . testPappySub7
testPappyLEhU = testPappySubLEhU . testPappySub7
testPappyLI = testPappySubLI . testPappySub7
testPappyLIhU = testPappySubLIhU . testPappySub7
testPappyLOhO = testPappySubLOhO . testPappySub7
testPappyLOhU = testPappySubLOhU . testPappySub7
testPappyLUhU = testPappySubLUhU . testPappySub7
testPappyMAhO = testPappySubMAhO . testPappySub7
testPappyMAI = testPappySubMAI . testPappySub7
testPappyMEhU = testPappySubMEhU . testPappySub7
testPappyMOhE = testPappySubMOhE . testPappySub7
testPappyMOhI = testPappySubMOhI . testPappySub7
testPappyMOI = testPappySubMOI . testPappySub7
testPappyNA = testPappySubNA . testPappySub7
testPappyNAhE = testPappySubNAhE . testPappySub7
testPappyNAhU = testPappySubNAhU . testPappySub7
testPappyNIhE = testPappySubNIhE . testPappySub7
testPappyNIhO = testPappySubNIhO . testPappySub7
testPappyNOI = testPappySubNOI . testPappySub7
testPappyNU = testPappySubNU . testPappySub7
testPappyNUhA = testPappySubNUhA . testPappySub7
testPappyNUhI = testPappySubNUhI . testPappySub7
testPappyNUhU = testPappySubNUhU . testPappySub7
testPappyPA = testPappySubPA . testPappySub8
testPappyPEhE = testPappySubPEhE . testPappySub8
testPappyPEhO = testPappySubPEhO . testPappySub8
testPappyPU = testPappySubPU . testPappySub8
testPappyRAhO = testPappySubRAhO . testPappySub8
testPappyROI = testPappySubROI . testPappySub8
testPappySE = testPappySubSE . testPappySub8
testPappySEI = testPappySubSEI . testPappySub8
testPappySEhU = testPappySubSEhU . testPappySub8
testPappySI = testPappySubSI . testPappySub8
testPappySU = testPappySubSU . testPappySub8
testPappyTAhE = testPappySubTAhE . testPappySub8
testPappyTEhU = testPappySubTEhU . testPappySub8
testPappyTO = testPappySubTO . testPappySub8
testPappyTUhE = testPappySubTUhE . testPappySub8
testPappyTUhU = testPappySubTUhU . testPappySub8
testPappyUI = testPappySubUI . testPappySub8
testPappyVA = testPappySubVA . testPappySub8
testPappyVEhO = testPappySubVEhO . testPappySub8
testPappyVUhU = testPappySubVUhU . testPappySub8
testPappyVEhA = testPappySubVEhA . testPappySub8
testPappyVIhA = testPappySubVIhA . testPappySub8
testPappyVUhO = testPappySubVUhO . testPappySub8
testPappyPlusRule24 = testPappySubPlusRule24 . testPappySub8
testPappyZAhO = testPappySubZAhO . testPappySub8
testPappyZEhA = testPappySubZEhA . testPappySub8
testPappyZI = testPappySubZI . testPappySub8
testPappyZIhE = testPappySubZIhE . testPappySub8
testPappyZOI = testPappySubZOI . testPappySub8
testPappyZOhU = testPappySubZOhU . testPappySub8
testPappydummyTail = testPappySubdummyTail . testPappySub8
testPappydummy = testPappySubdummy . testPappySub8

testPappyParse :: String -> String -> TestPappyDerivs
testPappyParse name text = testPappyDerivs (Pos name 1 1) text

testPappyDerivs :: Pos -> String -> TestPappyDerivs
testPappyDerivs pos text = dvs where
  dvs = TestPappyDerivs
    (testPappyDerivs0 dvs)
    (testPappyDerivs1 dvs)
    (testPappyDerivs2 dvs)
    (testPappyDerivs3 dvs)
    (testPappyDerivs4 dvs)
    (testPappyDerivs5 dvs)
    (testPappyDerivs6 dvs)
    (testPappyDerivs7 dvs)
    (testPappyDerivs8 dvs)
    chr pos
  chr = case text of
    [] -> NoParse (eofError dvs)
    (c:cs) -> Parsed c (testPappyDerivs (nextPos pos c) cs) (nullError dvs)

testPappyDerivs0 dvs = TestPappyDerivs0
	(testPappyParseStarRule0 dvs)
	(testPappyParsetext dvs)
	(testPappyParseStarRule3 dvs)
	(testPappyParsetext_1 dvs)
	(testPappyParseparagraphs dvs)
	(testPappyParsePlusRule2 dvs)
	(testPappyParseStarRule8 dvs)
	(testPappyParseStarRule9 dvs)
	(testPappyParsestatement dvs)
	(testPappyParseStarRule11 dvs)
	(testPappyParsestatement_2 dvs)
	(testPappyParsefragment dvs)
	(testPappyParsesentence dvs)
	(testPappyParseStarRule21 dvs)
	(testPappyParseStarRule23 dvs)
	(testPappyParsesubsentence dvs)
	(testPappyParsebridi_tail dvs)
	(testPappyParseStarRule26 dvs)
	(testPappyParsebridi_tail_start dvs)
	(testPappyParseStarRule27 dvs)
	(testPappyParsebridi_tail_2 dvs)
	(testPappyParsegek_sentence dvs)
	(testPappyParsePlusRule3 dvs)
	(testPappyParseStarRule34 dvs)
	(testPappyParseStarRule35 dvs)
	(testPappyParseStarRule37 dvs)
	(testPappyParseStarRule38 dvs)
	(testPappyParseStarRule40 dvs)
	(testPappyParseStarRule41 dvs)
	(testPappyParseStarRule42 dvs)
	(testPappyParseterm_1 dvs)
	(testPappyParseStarRule46 dvs)
	(testPappyParseterm_start dvs)

testPappyDerivs1 dvs = TestPappyDerivs1
	(testPappyParseterms_gik_terms dvs)
	(testPappyParsesumti dvs)
	(testPappyParseStarRule55 dvs)
	(testPappyParsesumti_3 dvs)
	(testPappyParsesumti_4 dvs)
	(testPappyParsesumti_6 dvs)
	(testPappyParseLAhE_NAhE dvs)
	(testPappyParseStarRule73 dvs)
	(testPappyParseStarRule75 dvs)
	(testPappyParseStarRule76 dvs)
	(testPappyParserelative_clause_1 dvs)
	(testPappyParseselbri dvs)
	(testPappyParseselbri_2 dvs)
	(testPappyParsePlusRule5 dvs)
	(testPappyParseStarRule83 dvs)
	(testPappyParseselbri_5 dvs)
	(testPappyParseselbri_6 dvs)
	(testPappyParseStarRule89 dvs)
	(testPappyParseStarRule104 dvs)
	(testPappyParsetanru_unit_2 dvs)
	(testPappyParseStarRule107 dvs)
	(testPappyParselinkargs_1 dvs)
	(testPappyParseStarRule110 dvs)
	(testPappyParseStarRule111 dvs)
	(testPappyParselinks_1 dvs)
	(testPappyParseStarRule113 dvs)
	(testPappyParsequantifier dvs)
	(testPappyParseStarRule117 dvs)
	(testPappyParseStarRule118 dvs)
	(testPappyParsemex_0 dvs)
	(testPappyParseStarRule119 dvs)
	(testPappyParsemex_start dvs)
	(testPappyParsemex_1 dvs)

testPappyDerivs2 dvs = TestPappyDerivs2
	(testPappyParsemex_2 dvs)
	(testPappyParserp_expression_tail dvs)
	(testPappyParseStarRule124 dvs)
	(testPappyParseStarRule125 dvs)
	(testPappyParseStarRule128 dvs)
	(testPappyParseoperator_start dvs)
	(testPappyParseoperator_1 dvs)
	(testPappyParseoperator_2 dvs)
	(testPappyParsemex_operator dvs)
	(testPappyParseStarRule139 dvs)
	(testPappyParseoperand_0 dvs)
	(testPappyParseStarRule142 dvs)
	(testPappyParseoperand_start dvs)
	(testPappyParseStarRule143 dvs)
	(testPappyParseoperand_2 dvs)
	(testPappyParsePlusRule7 dvs)
	(testPappyParseoperand_3 dvs)
	(testPappyParseStarRule154 dvs)
	(testPappyParselerfu_word dvs)
	(testPappyParseek dvs)
	(testPappyParseStarRule155 dvs)
	(testPappyParsegihek_1 dvs)
	(testPappyParseStarRule156 dvs)
	(testPappyParsejek dvs)
	(testPappyParsejoik dvs)
	(testPappyParseinterval dvs)
	(testPappyParseStarRule157 dvs)
	(testPappyParseStarRule160 dvs)
	(testPappyParsegek dvs)
	(testPappyParseguhek dvs)
	(testPappyParsegik dvs)
	(testPappyParseStarRule168 dvs)
	(testPappyParseStarRule169 dvs)

testPappyDerivs3 dvs = TestPappyDerivs3
	(testPappyParsetense_modal dvs)
	(testPappyParsesimple_tense_modal dvs)
	(testPappyParsePlusRule8 dvs)
	(testPappyParseStarRule177 dvs)
	(testPappyParseStarRule178 dvs)
	(testPappyParsePlusRule9 dvs)
	(testPappyParsetime dvs)
	(testPappyParsezeha_pu dvs)
	(testPappyParsetime_offset dvs)
	(testPappyParsePlusRule10 dvs)
	(testPappyParseStarRule181 dvs)
	(testPappyParsespace dvs)
	(testPappyParsespace_offset dvs)
	(testPappyParsespace_interval dvs)
	(testPappyParseVEhA_VIhA dvs)
	(testPappyParsePlusRule11 dvs)
	(testPappyParseinterval_property dvs)
	(testPappyParsePlusRule12 dvs)
	(testPappyParseStarRule188 dvs)
	(testPappyParsePlusRule13 dvs)
	(testPappyParseStarRule189 dvs)
	(testPappyParsevocative dvs)
	(testPappyParsecoi_nai dvs)
	(testPappyParsePlusRule14 dvs)
	(testPappyParseindicator dvs)
	(testPappyParseStarRule190 dvs)
	(testPappyParseStarRule191 dvs)
	(testPappyParsePlusRule15 dvs)
	(testPappyParsePlusRule16 dvs)
	(testPappyParsepre_zei_bu dvs)
	(testPappyParseStarRule192 dvs)
	(testPappyParseStarRule193 dvs)
	(testPappyParsepost_clause dvs)

testPappyDerivs4 dvs = TestPappyDerivs4
	(testPappyParsepost_clause_no_ind dvs)
	(testPappyParseany_word_SA_handling dvs)
	(testPappyParseStarRule194 dvs)
	(testPappyParsePlusRule17 dvs)
	(testPappyParsesi_clause_single dvs)
	(testPappyParseerasable_clause dvs)
	(testPappyParseBRIVLA_pre dvs)
	(testPappyParsePlusRule18 dvs)
	(testPappyParseBAhE_clause_single dvs)
	(testPappyParseStarRule195 dvs)
	(testPappyParseStarRule196 dvs)
	(testPappyParseStarRule198 dvs)
	(testPappyParsePlusRule19 dvs)
	(testPappyParsecmene dvs)
	(testPappyParseStarRule200 dvs)
	(testPappyParsecmavo dvs)
	(testPappyParseStarRule202 dvs)
	(testPappyParseStarRule203 dvs)
	(testPappyParsestressed_extended_rafsi dvs)
	(testPappyParseextended_rafsi dvs)
	(testPappyParseStarRule205 dvs)
	(testPappyParseStarRule206 dvs)
	(testPappyParsebrivla_head dvs)
	(testPappyParseStarRule207 dvs)
	(testPappyParseCVV_final_rafsi dvs)
	(testPappyParseshort_final_rafsi dvs)
	(testPappyParsestressed_y_rafsi dvs)
	(testPappyParsestressed_y_less_rafsi dvs)
	(testPappyParsestressed_long_rafsi dvs)
	(testPappyParsey_rafsi dvs)
	(testPappyParsey_less_rafsi dvs)
	(testPappyParser_hyphen dvs)
	(testPappyParsefinal_syllable dvs)

testPappyDerivs5 dvs = TestPappyDerivs5
	(testPappyParsestressed_syllable dvs)
	(testPappyParsestressed_vowel dvs)
	(testPappyParseunstressed_syllable dvs)
	(testPappyParseStarRule208 dvs)
	(testPappyParseconsonantal_syllable dvs)
	(testPappyParsecoda dvs)
	(testPappyParseonset dvs)
	(testPappyParseglide dvs)
	(testPappyParsediphthong dvs)
	(testPappyParsevowel dvs)
	(testPappyParsePlusRule21 dvs)
	(testPappyParseinitial_pair dvs)
	(testPappyParseinitial dvs)
	(testPappyParsel dvs)
	(testPappyParsem dvs)
	(testPappyParsen dvs)
	(testPappyParser dvs)
	(testPappyParseb dvs)
	(testPappyParsed dvs)
	(testPappyParseg dvs)
	(testPappyParsev dvs)
	(testPappyParsej dvs)
	(testPappyParsez dvs)
	(testPappyParses dvs)
	(testPappyParsec dvs)
	(testPappyParsex dvs)
	(testPappyParsek dvs)
	(testPappyParsef dvs)
	(testPappyParsep dvs)
	(testPappyParset dvs)
	(testPappyParsedigit dvs)
	(testPappyParsepost_word dvs)
	(testPappyParsePlusRule22 dvs)

testPappyDerivs6 dvs = TestPappyDerivs6
	(testPappyParsePlusRule23 dvs)
	(testPappyParseStarRule236 dvs)
	(testPappyParseStarRule237 dvs)
	(testPappyParseA dvs)
	(testPappyParseBAI dvs)
	(testPappyParseBAhE dvs)
	(testPappyParseBEhO dvs)
	(testPappyParseBIhE dvs)
	(testPappyParseBIhI dvs)
	(testPappyParseBY dvs)
	(testPappyParseCAhA dvs)
	(testPappyParseCAI dvs)
	(testPappyParseCEhE dvs)
	(testPappyParseCOI dvs)
	(testPappyParseCUhE dvs)
	(testPappyParseDAhO dvs)
	(testPappyParseDOhU dvs)
	(testPappyParseFA dvs)
	(testPappyParseFAhA dvs)
	(testPappyParseFAhO dvs)
	(testPappyParseFEhE dvs)
	(testPappyParseFEhU dvs)
	(testPappyParseFIhO dvs)
	(testPappyParseFUhA dvs)
	(testPappyParseFUhE dvs)
	(testPappyParseFUhO dvs)
	(testPappyParseGA dvs)
	(testPappyParseGAhO dvs)
	(testPappyParseGEhU dvs)
	(testPappyParseGIhA dvs)
	(testPappyParseGOI dvs)
	(testPappyParseGOhA dvs)
	(testPappyParseGUhA dvs)

testPappyDerivs7 dvs = TestPappyDerivs7
	(testPappyParseJA dvs)
	(testPappyParseJOhI dvs)
	(testPappyParseJOI dvs)
	(testPappyParseKEhE dvs)
	(testPappyParseKOhA dvs)
	(testPappyParseKUhE dvs)
	(testPappyParseKUhO dvs)
	(testPappyParseLA dvs)
	(testPappyParseLAU dvs)
	(testPappyParseLAhE dvs)
	(testPappyParseLE dvs)
	(testPappyParseLEhU dvs)
	(testPappyParseLI dvs)
	(testPappyParseLIhU dvs)
	(testPappyParseLOhO dvs)
	(testPappyParseLOhU dvs)
	(testPappyParseLUhU dvs)
	(testPappyParseMAhO dvs)
	(testPappyParseMAI dvs)
	(testPappyParseMEhU dvs)
	(testPappyParseMOhE dvs)
	(testPappyParseMOhI dvs)
	(testPappyParseMOI dvs)
	(testPappyParseNA dvs)
	(testPappyParseNAhE dvs)
	(testPappyParseNAhU dvs)
	(testPappyParseNIhE dvs)
	(testPappyParseNIhO dvs)
	(testPappyParseNOI dvs)
	(testPappyParseNU dvs)
	(testPappyParseNUhA dvs)
	(testPappyParseNUhI dvs)
	(testPappyParseNUhU dvs)

testPappyDerivs8 dvs = TestPappyDerivs8
	(testPappyParsePA dvs)
	(testPappyParsePEhE dvs)
	(testPappyParsePEhO dvs)
	(testPappyParsePU dvs)
	(testPappyParseRAhO dvs)
	(testPappyParseROI dvs)
	(testPappyParseSE dvs)
	(testPappyParseSEI dvs)
	(testPappyParseSEhU dvs)
	(testPappyParseSI dvs)
	(testPappyParseSU dvs)
	(testPappyParseTAhE dvs)
	(testPappyParseTEhU dvs)
	(testPappyParseTO dvs)
	(testPappyParseTUhE dvs)
	(testPappyParseTUhU dvs)
	(testPappyParseUI dvs)
	(testPappyParseVA dvs)
	(testPappyParseVEhO dvs)
	(testPappyParseVUhU dvs)
	(testPappyParseVEhA dvs)
	(testPappyParseVIhA dvs)
	(testPappyParseVUhO dvs)
	(testPappyParsePlusRule24 dvs)
	(testPappyParseZAhO dvs)
	(testPappyParseZEhA dvs)
	(testPappyParseZI dvs)
	(testPappyParseZIhE dvs)
	(testPappyParseZOI dvs)
	(testPappyParseZOhU dvs)
	(testPappyParsedummyTail dvs)
	(testPappyParsedummy dvs)

testPappytest :: TestPappyDerivs -> Result TestPappyDerivs (Text)
testPappytest d =
  case testPappytext d of
    Parsed t d1 e1 ->
      case testPappyanyChar d1 of
        NoParse e3 ->
          Parsed ( t ) d1 (max e3 e1)
        Parsed _ _ e3 -> NoParse (max e3 e1)
    NoParse e1 -> NoParse e1

testPappyParseStarRule0 :: TestPappyDerivs -> Result TestPappyDerivs ([Clause])
testPappyParseStarRule0 d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case testPappyNAI_clause d of
        Parsed v d3 e3 ->
          case testPappyStarRule0 d3 of
            Parsed vs d5 e5 ->
              Parsed (v : vs) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_2 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
    pappyAlt1_2 e1 =
      Parsed ([]) d e1
    pappyAlt1_3 e1 = NoParse e1

testPappyParsetext :: TestPappyDerivs -> Result TestPappyDerivs (Text)
testPappyParsetext d =
  case pappyResult1 of
    Parsed _ d1 e1 ->
      case testPappyStarRule8 d1 of
        Parsed _ d3 e3 ->
          case pappyResult5 of
            Parsed _ d5 e5 ->
              case testPappyStarRule3 d5 of
                Parsed _ d7 e7 ->
                  case testPappyStarRule0 d7 of
                    Parsed n d9 e9 ->
                      case pappyResult11 of
                        Parsed tp2 d11 e11 ->
                          case pappyResult13 of
                            Parsed jj d13 e13 ->
                              case pappyResult15 of
                                Parsed t d15 e15 ->
                                  case pappyResult17 of
                                    Parsed f d17 e17 ->
                                      case pappyResult19 of
                                        Parsed _ d19 e19 ->
                                          Parsed ( if isSimpleText n tp2 jj t f then fromJust t else TopText n (fst tp2) (snd tp2) jj t f ) d19 (maximum [e19,e17,e15,e13,e11,e9,e7,e5,e3,e1])
                                        NoParse e19 -> NoParse (maximum [e19,e17,e15,e13,e11,e9,e7,e5,e3,e1])
                                      where
                                        pappyResult19 =
                                          case pappyResult21 of
                                            Parsed v21 d21 e21 -> Parsed (Just v21) d21 e21
                                            NoParse e21 -> Parsed (Nothing) d17 e21
                                          where
                                            pappyResult21 =
                                              case testPappyanyChar d17 of
                                                NoParse e23 ->
                                                  Parsed ( () ) d17 e23
                                                Parsed _ _ e23 -> NoParse e23
                                    NoParse e17 -> NoParse (maximum [e17,e15,e13,e11,e9,e7,e5,e3,e1])
                                  where
                                    pappyResult17 =
                                      case pappyResult19 of
                                        Parsed v19 d19 e19 -> Parsed (Just v19) d19 e19
                                        NoParse e19 -> Parsed (Nothing) d15 e19
                                      where
                                        pappyResult19 =
                                          case testPappyFAhO_clause d15 of
                                            Parsed f d21 e21 ->
                                              case testPappyStarRule192 d21 of
                                                Parsed _ d23 e23 ->
                                                  Parsed ( f ) d23 (max e23 e21)
                                                NoParse e23 -> NoParse (max e23 e21)
                                            NoParse e21 -> NoParse e21
                                NoParse e15 -> NoParse (maximum [e15,e13,e11,e9,e7,e5,e3,e1])
                              where
                                pappyResult15 =
                                  case testPappytext_1 d13 of
                                    Parsed v17 d17 e17 -> Parsed (Just v17) d17 e17
                                    NoParse e17 -> Parsed (Nothing) d13 e17
                            NoParse e13 -> NoParse (maximum [e13,e11,e9,e7,e5,e3,e1])
                          where
                            pappyResult13 =
                              case pappyResult15 of
                                Parsed v15 d15 e15 -> Parsed (Just v15) d15 e15
                                NoParse e15 -> Parsed (Nothing) d11 e15
                              where
                                pappyResult15 =
                                  case testPappytext_1 d11 of
                                    NoParse e17 ->
                                      case testPappyjoik_jek d11 of
                                        Parsed j d19 e19 ->
                                          Parsed ( j ) d19 (max e19 e17)
                                        NoParse e19 -> NoParse (max e19 e17)
                                    Parsed _ _ e17 -> NoParse e17
                        NoParse e11 -> NoParse (maximum [e11,e9,e7,e5,e3,e1])
                      where
                        pappyResult11 =
                          case pappyResult13 of
                            Parsed e d13 e13 ->
                              case testPappyStarRule188 d13 of
                                Parsed f d15 e15 ->
                                  Parsed ( (e, f) ) d15 (max e15 e13)
                                NoParse e15 -> NoParse (max e15 e13)
                            NoParse e13 -> NoParse e13
                          where
                            pappyResult13 =
                              pappyAlt15_1 (ParseError (testPappyPos d9) []) where
                                pappyAlt15_1 e15 =
                                  case testPappyPlusRule12 d9 of
                                    Parsed c d17 e17 ->
                                      Parsed ( Left c ) d17 (max e17 e15)
                                    NoParse e17 -> pappyAlt15_2 (max e17 e15)
                                pappyAlt15_2 e15 =
                                  case pappyResult17 of
                                    Parsed i d17 e17 ->
                                      Parsed ( Right i ) d17 (max e17 e15)
                                    NoParse e17 -> pappyAlt15_3 (max e17 e15)
                                  where
                                    pappyResult17 =
                                      case testPappyindicators d9 of
                                        Parsed v19 d19 e19 -> Parsed (Just v19) d19 e19
                                        NoParse e19 -> Parsed (Nothing) d9 e19
                                pappyAlt15_3 e15 = NoParse e15
                    NoParse e9 -> NoParse (maximum [e9,e7,e5,e3,e1])
                NoParse e7 -> NoParse (maximum [e7,e5,e3,e1])
            NoParse e5 -> NoParse (maximum [e5,e3,e1])
          where
            pappyResult5 =
              case pappyResult7 of
                Parsed v7 d7 e7 -> Parsed (Just v7) d7 e7
                NoParse e7 -> Parsed (Nothing) d3 e7
              where
                pappyResult7 =
                  case testPappyPlusRule17 d3 of
                    Parsed _ d9 e9 ->
                      Parsed ( () ) d9 e9
                    NoParse e9 -> NoParse e9
        NoParse e3 -> NoParse (max e3 e1)
    NoParse e1 -> NoParse e1
  where
    pappyResult1 =
      case testPappyspaces d of
        Parsed v3 d3 e3 -> Parsed (Just v3) d3 e3
        NoParse e3 -> Parsed (Nothing) d e3

testPappyParseStarRule3 :: TestPappyDerivs -> Result TestPappyDerivs ([ () ])
testPappyParseStarRule3 d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case testPappySI_clause d of
        Parsed v d3 e3 ->
          case testPappyStarRule3 d3 of
            Parsed vs d5 e5 ->
              Parsed (v : vs) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_2 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
    pappyAlt1_2 e1 =
      Parsed ([]) d e1
    pappyAlt1_3 e1 = NoParse e1

testPappyParsetext_1 :: TestPappyDerivs -> Result TestPappyDerivs (Text)
testPappyParsetext_1 d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case testPappyI_clause d of
        Parsed i d3 e3 ->
          case pappyResult5 of
            Parsed j d5 e5 ->
              case pappyResult7 of
                Parsed b d7 e7 ->
                  case testPappyStarRule188 d7 of
                    Parsed f d9 e9 ->
                      case pappyResult11 of
                        Parsed t d11 e11 ->
                          Parsed ( IText_1 i j b f t ) d11 (maximum [e11,e9,e7,e5,e3,e1])
                        NoParse e11 -> pappyAlt1_2 (maximum [e11,e9,e7,e5,e3,e1])
                      where
                        pappyResult11 =
                          case testPappytext_1 d9 of
                            Parsed v13 d13 e13 -> Parsed (Just v13) d13 e13
                            NoParse e13 -> Parsed (Nothing) d9 e13
                    NoParse e9 -> pappyAlt1_2 (maximum [e9,e7,e5,e3,e1])
                NoParse e7 -> pappyAlt1_2 (maximum [e7,e5,e3,e1])
              where
                pappyResult7 =
                  case pappyResult9 of
                    Parsed v9 d9 e9 -> Parsed (Just v9) d9 e9
                    NoParse e9 -> Parsed (Nothing) d5 e9
                  where
                    pappyResult9 =
                      case pappyResult11 of
                        Parsed s d11 e11 ->
                          case testPappyBO_clause d11 of
                            Parsed b d13 e13 ->
                              Parsed ( (s, b) ) d13 (max e13 e11)
                            NoParse e13 -> NoParse (max e13 e11)
                        NoParse e11 -> NoParse e11
                      where
                        pappyResult11 =
                          case testPappystag d5 of
                            Parsed v13 d13 e13 -> Parsed (Just v13) d13 e13
                            NoParse e13 -> Parsed (Nothing) d5 e13
            NoParse e5 -> pappyAlt1_2 (maximum [e5,e3,e1])
          where
            pappyResult5 =
              case pappyResult7 of
                Parsed v7 d7 e7 -> Parsed (Just v7) d7 e7
                NoParse e7 -> Parsed (Nothing) d3 e7
              where
                pappyResult7 =
                  pappyAlt9_1 (ParseError (testPappyPos d3) []) where
                    pappyAlt9_1 e9 =
                      case testPappyjek d3 of
                        Parsed v11 d11 e11 -> Parsed v11 d11 (max e11 e9)
                        NoParse e11 -> pappyAlt9_2 (max e11 e9)
                    pappyAlt9_2 e9 =
                      case testPappyjoik d3 of
                        Parsed v11 d11 e11 -> Parsed v11 d11 (max e11 e9)
                        NoParse e11 -> pappyAlt9_3 (max e11 e9)
                    pappyAlt9_3 e9 = NoParse e9
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
    pappyAlt1_2 e1 =
      case testPappyPlusRule2 d of
        Parsed n d3 e3 ->
          case testPappyStarRule188 d3 of
            Parsed f d5 e5 ->
              case testPappyStarRule8 d5 of
                Parsed _ d7 e7 ->
                  case pappyResult9 of
                    Parsed p d9 e9 ->
                      Parsed ( HeadNIhO n f p ) d9 (maximum [e9,e7,e5,e3,e1])
                    NoParse e9 -> pappyAlt1_3 (maximum [e9,e7,e5,e3,e1])
                  where
                    pappyResult9 =
                      case testPappyparagraphs d7 of
                        Parsed v11 d11 e11 -> Parsed (Just v11) d11 e11
                        NoParse e11 -> Parsed (Nothing) d7 e11
                NoParse e7 -> pappyAlt1_3 (maximum [e7,e5,e3,e1])
            NoParse e5 -> pappyAlt1_3 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_3 (max e3 e1)
    pappyAlt1_3 e1 =
      case testPappyparagraphs d of
        Parsed v3 d3 e3 -> Parsed v3 d3 (max e3 e1)
        NoParse e3 -> pappyAlt1_4 (max e3 e1)
    pappyAlt1_4 e1 = NoParse e1

testPappyParseparagraphs :: TestPappyDerivs -> Result TestPappyDerivs (Paragraphs)
testPappyParseparagraphs d =
  case pappyResult1 of
    Parsed p d1 e1 ->
      case pappyResult3 of
        Parsed n d3 e3 ->
          Parsed ( maybe p (uncurry3 $ NIhO p) n ) d3 (max e3 e1)
        NoParse e3 -> NoParse (max e3 e1)
      where
        pappyResult3 =
          case pappyResult5 of
            Parsed v5 d5 e5 -> Parsed (Just v5) d5 e5
            NoParse e5 -> Parsed (Nothing) d1 e5
          where
            pappyResult5 =
              case testPappyPlusRule2 d1 of
                Parsed n d7 e7 ->
                  case testPappyStarRule188 d7 of
                    Parsed f d9 e9 ->
                      case testPappyStarRule8 d9 of
                        Parsed _ d11 e11 ->
                          case testPappyparagraphs d11 of
                            Parsed p d13 e13 ->
                              Parsed ( (n, f, p) ) d13 (maximum [e13,e11,e9,e7])
                            NoParse e13 -> NoParse (maximum [e13,e11,e9,e7])
                        NoParse e11 -> NoParse (maximum [e11,e9,e7])
                    NoParse e9 -> NoParse (max e9 e7)
                NoParse e7 -> NoParse e7
    NoParse e1 -> NoParse e1
  where
    pappyResult1 =
      case pappyResult3 of
        Parsed s d3 e3 ->
          case testPappyStarRule9 d3 of
            Parsed i d5 e5 ->
              Parsed ( if null i then s else StatementI s i ) d5 (max e5 e3)
            NoParse e5 -> NoParse (max e5 e3)
        NoParse e3 -> NoParse e3
      where
        pappyResult3 =
          pappyAlt5_1 (ParseError (testPappyPos d) []) where
            pappyAlt5_1 e5 =
              case testPappystatement d of
                Parsed v7 d7 e7 -> Parsed v7 d7 (max e7 e5)
                NoParse e7 -> pappyAlt5_2 (max e7 e5)
            pappyAlt5_2 e5 =
              case testPappyfragment d of
                Parsed v7 d7 e7 -> Parsed v7 d7 (max e7 e5)
                NoParse e7 -> pappyAlt5_3 (max e7 e5)
            pappyAlt5_3 e5 = NoParse e5

testPappyParsePlusRule2 :: TestPappyDerivs -> Result TestPappyDerivs ([Clause])
testPappyParsePlusRule2 d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case testPappyNIhO_clause d of
        Parsed v d3 e3 ->
          case testPappyPlusRule2 d3 of
            Parsed vs d5 e5 ->
              Parsed (v : vs) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_2 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
    pappyAlt1_2 e1 =
      case testPappyNIhO_clause d of
        Parsed v d3 e3 ->
          Parsed ([v]) d3 (max e3 e1)
        NoParse e3 -> pappyAlt1_3 (max e3 e1)
    pappyAlt1_3 e1 = NoParse e1

testPappyParseStarRule8 :: TestPappyDerivs -> Result TestPappyDerivs ([ () ])
testPappyParseStarRule8 d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case pappyResult3 of
        Parsed v d3 e3 ->
          case testPappyStarRule8 d3 of
            Parsed vs d5 e5 ->
              Parsed (v : vs) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_2 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
      where
        pappyResult3 =
          case testPappyStarRule194 d of
            Parsed _ d5 e5 ->
              case testPappySU_clause d5 of
                Parsed _ d7 e7 ->
                  Parsed ( () ) d7 (max e7 e5)
                NoParse e7 -> NoParse (max e7 e5)
            NoParse e5 -> NoParse e5
    pappyAlt1_2 e1 =
      Parsed ([]) d e1
    pappyAlt1_3 e1 = NoParse e1

testPappyParseStarRule9 :: TestPappyDerivs -> Result TestPappyDerivs ([ (Clause, [Free], Maybe Statement) ])
testPappyParseStarRule9 d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case pappyResult3 of
        Parsed v d3 e3 ->
          case testPappyStarRule9 d3 of
            Parsed vs d5 e5 ->
              Parsed (v : vs) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_2 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
      where
        pappyResult3 =
          case testPappyI_clause d of
            Parsed i d5 e5 ->
              case testPappyjek d5 of
                NoParse e7 ->
                  case testPappyjoik d5 of
                    NoParse e9 ->
                      case testPappyjoik_jek d5 of
                        NoParse e11 ->
                          case testPappyStarRule188 d5 of
                            Parsed f d13 e13 ->
                              case pappyResult15 of
                                Parsed s d15 e15 ->
                                  Parsed ( (i, f, s) ) d15 (maximum [e15,e13,e11,e9,e7,e5])
                                NoParse e15 -> NoParse (maximum [e15,e13,e11,e9,e7,e5])
                              where
                                pappyResult15 =
                                  case pappyResult17 of
                                    Parsed v17 d17 e17 -> Parsed (Just v17) d17 e17
                                    NoParse e17 -> Parsed (Nothing) d13 e17
                                  where
                                    pappyResult17 =
                                      pappyAlt19_1 (ParseError (testPappyPos d13) []) where
                                        pappyAlt19_1 e19 =
                                          case testPappystatement d13 of
                                            Parsed v21 d21 e21 -> Parsed v21 d21 (max e21 e19)
                                            NoParse e21 -> pappyAlt19_2 (max e21 e19)
                                        pappyAlt19_2 e19 =
                                          case testPappyfragment d13 of
                                            Parsed v21 d21 e21 -> Parsed v21 d21 (max e21 e19)
                                            NoParse e21 -> pappyAlt19_3 (max e21 e19)
                                        pappyAlt19_3 e19 = NoParse e19
                            NoParse e13 -> NoParse (maximum [e13,e11,e9,e7,e5])
                        Parsed _ _ e11 -> NoParse (maximum [e11,e9,e7,e5])
                    Parsed _ _ e9 -> NoParse (maximum [e9,e7,e5])
                Parsed _ _ e7 -> NoParse (max e7 e5)
            NoParse e5 -> NoParse e5
    pappyAlt1_2 e1 =
      Parsed ([]) d e1
    pappyAlt1_3 e1 = NoParse e1

testPappyParsestatement :: TestPappyDerivs -> Result TestPappyDerivs (Statement)
testPappyParsestatement d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case testPappystatement_2 d of
        Parsed s d3 e3 ->
          case testPappyStarRule11 d3 of
            Parsed i d5 e5 ->
              Parsed ( if null i then s else IJoikJek s i ) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_2 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
    pappyAlt1_2 e1 =
      case testPappyprenex d of
        Parsed p d3 e3 ->
          case testPappystatement d3 of
            Parsed s d5 e5 ->
              Parsed ( let (t, z, f) = p in Prenex t z f s ) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_3 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_3 (max e3 e1)
    pappyAlt1_3 e1 = NoParse e1

testPappyParseStarRule11 :: TestPappyDerivs -> Result TestPappyDerivs ([ (Clause, JoikJek, [Free], Maybe Statement) ])
testPappyParseStarRule11 d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case pappyResult3 of
        Parsed v d3 e3 ->
          case testPappyStarRule11 d3 of
            Parsed vs d5 e5 ->
              Parsed (v : vs) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_2 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
      where
        pappyResult3 =
          case testPappyI_clause d of
            Parsed i d5 e5 ->
              case testPappyjoik_jek d5 of
                Parsed j d7 e7 ->
                  case pappyResult9 of
                    Parsed s d9 e9 ->
                      Parsed ( (i, fst j, snd j, s) ) d9 (maximum [e9,e7,e5])
                    NoParse e9 -> NoParse (maximum [e9,e7,e5])
                  where
                    pappyResult9 =
                      case testPappystatement_2 d7 of
                        Parsed v11 d11 e11 -> Parsed (Just v11) d11 e11
                        NoParse e11 -> Parsed (Nothing) d7 e11
                NoParse e7 -> NoParse (max e7 e5)
            NoParse e5 -> NoParse e5
    pappyAlt1_2 e1 =
      Parsed ([]) d e1
    pappyAlt1_3 e1 = NoParse e1

testPappyParsestatement_2 :: TestPappyDerivs -> Result TestPappyDerivs (Statement)
testPappyParsestatement_2 d =
  case pappyResult1 of
    Parsed s3 d1 e1 ->
      case pappyResult3 of
        Parsed ib d3 e3 ->
          Parsed ( maybe s3 ($ s3) ib ) d3 (max e3 e1)
        NoParse e3 -> NoParse (max e3 e1)
      where
        pappyResult3 =
          case pappyResult5 of
            Parsed v5 d5 e5 -> Parsed (Just v5) d5 e5
            NoParse e5 -> Parsed (Nothing) d1 e5
          where
            pappyResult5 =
              case testPappyI_clause d1 of
                Parsed i d7 e7 ->
                  case pappyResult9 of
                    Parsed j d9 e9 ->
                      case pappyResult11 of
                        Parsed t d11 e11 ->
                          case testPappyBO_clause d11 of
                            Parsed b d13 e13 ->
                              case testPappyStarRule188 d13 of
                                Parsed f d15 e15 ->
                                  case pappyResult17 of
                                    Parsed s d17 e17 ->
                                      Parsed ( \s3 -> maybe (IBO s3 i j t b f) (IBOStatement s3 i j t b f) s ) d17 (maximum [e17,e15,e13,e11,e9,e7])
                                    NoParse e17 -> NoParse (maximum [e17,e15,e13,e11,e9,e7])
                                  where
                                    pappyResult17 =
                                      case testPappystatement_2 d15 of
                                        Parsed v19 d19 e19 -> Parsed (Just v19) d19 e19
                                        NoParse e19 -> Parsed (Nothing) d15 e19
                                NoParse e15 -> NoParse (maximum [e15,e13,e11,e9,e7])
                            NoParse e13 -> NoParse (maximum [e13,e11,e9,e7])
                        NoParse e11 -> NoParse (maximum [e11,e9,e7])
                      where
                        pappyResult11 =
                          case testPappystag d9 of
                            Parsed v13 d13 e13 -> Parsed (Just v13) d13 e13
                            NoParse e13 -> Parsed (Nothing) d9 e13
                    NoParse e9 -> NoParse (max e9 e7)
                  where
                    pappyResult9 =
                      case pappyResult11 of
                        Parsed v11 d11 e11 -> Parsed (Just v11) d11 e11
                        NoParse e11 -> Parsed (Nothing) d7 e11
                      where
                        pappyResult11 =
                          pappyAlt13_1 (ParseError (testPappyPos d7) []) where
                            pappyAlt13_1 e13 =
                              case testPappyjek d7 of
                                Parsed v15 d15 e15 -> Parsed v15 d15 (max e15 e13)
                                NoParse e15 -> pappyAlt13_2 (max e15 e13)
                            pappyAlt13_2 e13 =
                              case testPappyjoik d7 of
                                Parsed v15 d15 e15 -> Parsed v15 d15 (max e15 e13)
                                NoParse e15 -> pappyAlt13_3 (max e15 e13)
                            pappyAlt13_3 e13 = NoParse e13
                NoParse e7 -> NoParse e7
    NoParse e1 -> NoParse e1
  where
    pappyResult1 =
      pappyAlt3_1 (ParseError (testPappyPos d) []) where
        pappyAlt3_1 e3 =
          case testPappysentence d of
            Parsed v5 d5 e5 -> Parsed v5 d5 (max e5 e3)
            NoParse e5 -> pappyAlt3_2 (max e5 e3)
        pappyAlt3_2 e3 =
          case pappyResult5 of
            Parsed tag d5 e5 ->
              case testPappyTUhE_clause d5 of
                Parsed tuhe d7 e7 ->
                  case testPappyStarRule188 d7 of
                    Parsed f d9 e9 ->
                      case testPappytext_1 d9 of
                        Parsed text d11 e11 ->
                          case pappyResult13 of
                            Parsed tuhu d13 e13 ->
                              case testPappyStarRule188 d13 of
                                Parsed g d15 e15 ->
                                  Parsed ( TUhE tag tuhe f text tuhu g ) d15 (maximum [e15,e13,e11,e9,e7,e5,e3])
                                NoParse e15 -> pappyAlt3_3 (maximum [e15,e13,e11,e9,e7,e5,e3])
                            NoParse e13 -> pappyAlt3_3 (maximum [e13,e11,e9,e7,e5,e3])
                          where
                            pappyResult13 =
                              case pappyResult15 of
                                Parsed v15 d15 e15 -> Parsed (Just v15) d15 e15
                                NoParse e15 -> Parsed (Nothing) d11 e15
                              where
                                pappyResult15 =
                                  case testPappyTUhU_pre d11 of
                                    Parsed p d17 e17 ->
                                      case testPappypost_clause d17 of
                                        Parsed q d19 e19 ->
                                          Parsed ( (fst p, snd p, q) ) d19 (max e19 e17)
                                        NoParse e19 -> NoParse (max e19 e17)
                                    NoParse e17 -> NoParse e17
                        NoParse e11 -> pappyAlt3_3 (maximum [e11,e9,e7,e5,e3])
                    NoParse e9 -> pappyAlt3_3 (maximum [e9,e7,e5,e3])
                NoParse e7 -> pappyAlt3_3 (maximum [e7,e5,e3])
            NoParse e5 -> pappyAlt3_3 (max e5 e3)
          where
            pappyResult5 =
              case testPappytag d of
                Parsed v7 d7 e7 -> Parsed (Just v7) d7 e7
                NoParse e7 -> Parsed (Nothing) d e7
        pappyAlt3_3 e3 = NoParse e3

testPappyParsefragment :: TestPappyDerivs -> Result TestPappyDerivs (Fragment)
testPappyParsefragment d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case testPappyprenex d of
        Parsed p d3 e3 ->
          Parsed ( uncurry3 FPrenex p ) d3 (max e3 e1)
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
    pappyAlt1_2 e1 =
      case testPappyPlusRule3 d of
        Parsed t d3 e3 ->
          case pappyResult5 of
            Parsed v d5 e5 ->
              case testPappyStarRule188 d5 of
                Parsed f d7 e7 ->
                  Parsed ( FTermsVAU t v f ) d7 (maximum [e7,e5,e3,e1])
                NoParse e7 -> pappyAlt1_3 (maximum [e7,e5,e3,e1])
            NoParse e5 -> pappyAlt1_3 (maximum [e5,e3,e1])
          where
            pappyResult5 =
              case testPappyVAU_clause d3 of
                Parsed v7 d7 e7 -> Parsed (Just v7) d7 e7
                NoParse e7 -> Parsed (Nothing) d3 e7
        NoParse e3 -> pappyAlt1_3 (max e3 e1)
    pappyAlt1_3 e1 =
      case testPappyek d of
        Parsed e d3 e3 ->
          case testPappyStarRule188 d3 of
            Parsed f d5 e5 ->
              Parsed ( FEk e f ) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_4 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_4 (max e3 e1)
    pappyAlt1_4 e1 =
      case testPappygihek d of
        Parsed g d3 e3 ->
          case testPappyStarRule188 d3 of
            Parsed f d5 e5 ->
              Parsed ( FGihek g f ) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_5 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_5 (max e3 e1)
    pappyAlt1_5 e1 =
      case testPappyquantifier d of
        Parsed q d3 e3 ->
          Parsed ( FQuantifier q ) d3 (max e3 e1)
        NoParse e3 -> pappyAlt1_6 (max e3 e1)
    pappyAlt1_6 e1 =
      case testPappyNA_clause d of
        Parsed n d3 e3 ->
          case testPappyJA_clause d3 of
            NoParse e5 ->
              case testPappyStarRule188 d3 of
                Parsed f d7 e7 ->
                  Parsed ( FNA n f ) d7 (maximum [e7,e5,e3,e1])
                NoParse e7 -> pappyAlt1_7 (maximum [e7,e5,e3,e1])
            Parsed _ _ e5 -> pappyAlt1_7 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_7 (max e3 e1)
    pappyAlt1_7 e1 =
      case testPappyrelative_clause d of
        Parsed r d3 e3 ->
          Parsed ( FRelativeClause r ) d3 (max e3 e1)
        NoParse e3 -> pappyAlt1_8 (max e3 e1)
    pappyAlt1_8 e1 =
      case testPappylinks d of
        Parsed l d3 e3 ->
          Parsed ( FLinks l ) d3 (max e3 e1)
        NoParse e3 -> pappyAlt1_9 (max e3 e1)
    pappyAlt1_9 e1 =
      case testPappylinkargs d of
        Parsed l d3 e3 ->
          Parsed ( FLinkargs l ) d3 (max e3 e1)
        NoParse e3 -> pappyAlt1_10 (max e3 e1)
    pappyAlt1_10 e1 = NoParse e1

testPappyprenex :: TestPappyDerivs -> Result TestPappyDerivs ( ([Term], Clause, [Free]) )
testPappyprenex d =
  case testPappyPlusRule3 d of
    Parsed t d1 e1 ->
      case pappyResult3 of
        Parsed z d3 e3 ->
          case testPappyStarRule188 d3 of
            Parsed f d5 e5 ->
              Parsed ( (t, z, f) ) d5 (maximum [e5,e3,e1])
            NoParse e5 -> NoParse (maximum [e5,e3,e1])
        NoParse e3 -> NoParse (max e3 e1)
      where
        pappyResult3 =
          case testPappyZOhU_pre d1 of
            Parsed p d5 e5 ->
              case testPappypost_clause d5 of
                Parsed q d7 e7 ->
                  Parsed ( (fst p, snd p, q) ) d7 (max e7 e5)
                NoParse e7 -> NoParse (max e7 e5)
            NoParse e5 -> NoParse e5
    NoParse e1 -> NoParse e1

testPappyParsesentence :: TestPappyDerivs -> Result TestPappyDerivs (Sentence)
testPappyParsesentence d =
  case pappyResult1 of
    Parsed h d1 e1 ->
      case testPappyStarRule21 d1 of
        Parsed _ d3 e3 ->
          case testPappybridi_tail d3 of
            Parsed bt d5 e5 ->
              Parsed ( maybe bt (\(ts, c, f) -> TermsBridiTail ts c f bt) h ) d5 (maximum [e5,e3,e1])
            NoParse e5 -> NoParse (maximum [e5,e3,e1])
        NoParse e3 -> NoParse (max e3 e1)
    NoParse e1 -> NoParse e1
  where
    pappyResult1 =
      case pappyResult3 of
        Parsed v3 d3 e3 -> Parsed (Just v3) d3 e3
        NoParse e3 -> Parsed (Nothing) d e3
      where
        pappyResult3 =
          case testPappyPlusRule3 d of
            Parsed t d5 e5 ->
              case testPappyStarRule21 d5 of
                Parsed _ d7 e7 ->
                  case pappyResult9 of
                    Parsed c d9 e9 ->
                      case testPappyStarRule188 d9 of
                        Parsed f d11 e11 ->
                          Parsed ( (t, c, f) ) d11 (maximum [e11,e9,e7,e5])
                        NoParse e11 -> NoParse (maximum [e11,e9,e7,e5])
                    NoParse e9 -> NoParse (maximum [e9,e7,e5])
                  where
                    pappyResult9 =
                      case testPappyCU_clause d7 of
                        Parsed v11 d11 e11 -> Parsed (Just v11) d11 e11
                        NoParse e11 -> Parsed (Nothing) d7 e11
                NoParse e7 -> NoParse (max e7 e5)
            NoParse e5 -> NoParse e5

testPappyParseStarRule21 :: TestPappyDerivs -> Result TestPappyDerivs ([ () ])
testPappyParseStarRule21 d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case pappyResult3 of
        Parsed v d3 e3 ->
          case testPappyStarRule21 d3 of
            Parsed vs d5 e5 ->
              Parsed (v : vs) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_2 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
      where
        pappyResult3 =
          case testPappybridi_tail_start d of
            Parsed _ d5 e5 ->
              case testPappyStarRule26 d5 of
                Parsed _ d7 e7 ->
                  case testPappySA_clause d7 of
                    Parsed _ d9 e9 ->
                      case testPappybridi_tail d9 of
                        Parsed _ _ e11 ->
                          Parsed ( () ) d9 (maximum [e11,e9,e7,e5])
                        NoParse e11 -> NoParse (maximum [e11,e9,e7,e5])
                    NoParse e9 -> NoParse (maximum [e9,e7,e5])
                NoParse e7 -> NoParse (max e7 e5)
            NoParse e5 -> NoParse e5
    pappyAlt1_2 e1 =
      Parsed ([]) d e1
    pappyAlt1_3 e1 = NoParse e1

testPappyParseStarRule23 :: TestPappyDerivs -> Result TestPappyDerivs ([ () ])
testPappyParseStarRule23 d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case pappyResult3 of
        Parsed v d3 e3 ->
          case testPappyStarRule23 d3 of
            Parsed vs d5 e5 ->
              Parsed (v : vs) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_2 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
      where
        pappyResult3 =
          case testPappysentence_start d of
            NoParse e5 ->
              case pappyResult7 of
                Parsed _ d7 e7 ->
                  Parsed ( () ) d7 (max e7 e5)
                NoParse e7 -> NoParse (max e7 e5)
              where
                pappyResult7 =
                  pappyAlt9_1 (ParseError (testPappyPos d) []) where
                    pappyAlt9_1 e9 =
                      case testPappypre_zei_bu d of
                        Parsed _ d11 e11 ->
                          Parsed ( () ) d11 (max e11 e9)
                        NoParse e11 -> pappyAlt9_2 (max e11 e9)
                    pappyAlt9_2 e9 =
                      case testPappySA_clause d of
                        Parsed _ d11 e11 ->
                          case testPappysentence_start d11 of
                            NoParse e13 ->
                              Parsed ( () ) d11 (maximum [e13,e11,e9])
                            Parsed _ _ e13 -> pappyAlt9_3 (maximum [e13,e11,e9])
                        NoParse e11 -> pappyAlt9_3 (max e11 e9)
                    pappyAlt9_3 e9 = NoParse e9
            Parsed _ _ e5 -> NoParse e5
    pappyAlt1_2 e1 =
      Parsed ([]) d e1
    pappyAlt1_3 e1 = NoParse e1

testPappysentence_start :: TestPappyDerivs -> Result TestPappyDerivs ( () )
testPappysentence_start d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case testPappyI_pre d of
        Parsed _ d3 e3 ->
          Parsed ( () ) d3 (max e3 e1)
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
    pappyAlt1_2 e1 =
      case testPappyNIhO_pre d of
        Parsed _ d3 e3 ->
          Parsed ( () ) d3 (max e3 e1)
        NoParse e3 -> pappyAlt1_3 (max e3 e1)
    pappyAlt1_3 e1 = NoParse e1

testPappyParsesubsentence :: TestPappyDerivs -> Result TestPappyDerivs (Sentence)
testPappyParsesubsentence d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case testPappysentence d of
        Parsed v3 d3 e3 -> Parsed v3 d3 (max e3 e1)
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
    pappyAlt1_2 e1 =
      case testPappyprenex d of
        Parsed p d3 e3 ->
          case testPappysubsentence d3 of
            Parsed s d5 e5 ->
              Parsed ( uncurry3 PrenexSentence p s ) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_3 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_3 (max e3 e1)
    pappyAlt1_3 e1 = NoParse e1

testPappyParsebridi_tail :: TestPappyDerivs -> Result TestPappyDerivs (Sentence)
testPappyParsebridi_tail d =
  case pappyResult1 of
    Parsed b d1 e1 ->
      case pappyResult3 of
        Parsed g d3 e3 ->
          Parsed ( maybe b (\(g, t, ke, f, b, kehe, h, (u, v, i)) ->
		GihekKE b g t ke f b kehe h u v i) g ) d3 (max e3 e1)
        NoParse e3 -> NoParse (max e3 e1)
      where
        pappyResult3 =
          case pappyResult5 of
            Parsed v5 d5 e5 -> Parsed (Just v5) d5 e5
            NoParse e5 -> Parsed (Nothing) d1 e5
          where
            pappyResult5 =
              case testPappygihek d1 of
                Parsed g d7 e7 ->
                  case pappyResult9 of
                    Parsed t d9 e9 ->
                      case testPappyKE_clause d9 of
                        Parsed ke d11 e11 ->
                          case testPappyStarRule188 d11 of
                            Parsed f d13 e13 ->
                              case testPappybridi_tail d13 of
                                Parsed b d15 e15 ->
                                  case pappyResult17 of
                                    Parsed kehe d17 e17 ->
                                      case testPappyStarRule188 d17 of
                                        Parsed h d19 e19 ->
                                          case testPappytail_terms d19 of
                                            Parsed tts d21 e21 ->
                                              Parsed ( (g, t, ke, f, b, kehe, h, tts) ) d21 (maximum [e21,e19,e17,e15,e13,e11,e9,e7])
                                            NoParse e21 -> NoParse (maximum [e21,e19,e17,e15,e13,e11,e9,e7])
                                        NoParse e19 -> NoParse (maximum [e19,e17,e15,e13,e11,e9,e7])
                                    NoParse e17 -> NoParse (maximum [e17,e15,e13,e11,e9,e7])
                                  where
                                    pappyResult17 =
                                      case testPappyKEhE_clause d15 of
                                        Parsed v19 d19 e19 -> Parsed (Just v19) d19 e19
                                        NoParse e19 -> Parsed (Nothing) d15 e19
                                NoParse e15 -> NoParse (maximum [e15,e13,e11,e9,e7])
                            NoParse e13 -> NoParse (maximum [e13,e11,e9,e7])
                        NoParse e11 -> NoParse (maximum [e11,e9,e7])
                    NoParse e9 -> NoParse (max e9 e7)
                  where
                    pappyResult9 =
                      case testPappystag d7 of
                        Parsed v11 d11 e11 -> Parsed (Just v11) d11 e11
                        NoParse e11 -> Parsed (Nothing) d7 e11
                NoParse e7 -> NoParse e7
    NoParse e1 -> NoParse e1
  where
    pappyResult1 =
      case testPappybridi_tail_2 d of
        Parsed b d3 e3 ->
          case testPappyStarRule27 d3 of
            Parsed g d5 e5 ->
              Parsed ( if null g then b else GihekSentence b g ) d5 (max e5 e3)
            NoParse e5 -> NoParse (max e5 e3)
        NoParse e3 -> NoParse e3

testPappyParseStarRule26 :: TestPappyDerivs -> Result TestPappyDerivs ([ () ])
testPappyParseStarRule26 d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case pappyResult3 of
        Parsed v d3 e3 ->
          case testPappyStarRule26 d3 of
            Parsed vs d5 e5 ->
              Parsed (v : vs) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_2 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
      where
        pappyResult3 =
          pappyAlt5_1 (ParseError (testPappyPos d) []) where
            pappyAlt5_1 e5 =
              case testPappyterm d of
                Parsed _ d7 e7 ->
                  Parsed ( () ) d7 (max e7 e5)
                NoParse e7 -> pappyAlt5_2 (max e7 e5)
            pappyAlt5_2 e5 =
              case testPappybridi_tail_start d of
                NoParse e7 ->
                  case pappyResult9 of
                    Parsed _ d9 e9 ->
                      Parsed ( () ) d9 (maximum [e9,e7,e5])
                    NoParse e9 -> pappyAlt5_3 (maximum [e9,e7,e5])
                  where
                    pappyResult9 =
                      pappyAlt11_1 (ParseError (testPappyPos d) []) where
                        pappyAlt11_1 e11 =
                          case testPappypre_zei_bu d of
                            Parsed _ d13 e13 ->
                              Parsed ( () ) d13 (max e13 e11)
                            NoParse e13 -> pappyAlt11_2 (max e13 e11)
                        pappyAlt11_2 e11 =
                          case testPappySA_clause d of
                            Parsed _ d13 e13 ->
                              case testPappybridi_tail_start d13 of
                                NoParse e15 ->
                                  Parsed ( () ) d13 (maximum [e15,e13,e11])
                                Parsed _ _ e15 -> pappyAlt11_3 (maximum [e15,e13,e11])
                            NoParse e13 -> pappyAlt11_3 (max e13 e11)
                        pappyAlt11_3 e11 = NoParse e11
                Parsed _ _ e7 -> pappyAlt5_3 (max e7 e5)
            pappyAlt5_3 e5 = NoParse e5
    pappyAlt1_2 e1 =
      Parsed ([]) d e1
    pappyAlt1_3 e1 = NoParse e1

testPappyParsebridi_tail_start :: TestPappyDerivs -> Result TestPappyDerivs ( () )
testPappyParsebridi_tail_start d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case testPappyME_clause d of
        Parsed _ d3 e3 ->
          Parsed ( () ) d3 (max e3 e1)
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
    pappyAlt1_2 e1 =
      case testPappyNUhA_clause d of
        Parsed _ d3 e3 ->
          Parsed ( () ) d3 (max e3 e1)
        NoParse e3 -> pappyAlt1_3 (max e3 e1)
    pappyAlt1_3 e1 =
      case testPappyNU_clause d of
        Parsed _ d3 e3 ->
          Parsed ( () ) d3 (max e3 e1)
        NoParse e3 -> pappyAlt1_4 (max e3 e1)
    pappyAlt1_4 e1 =
      case testPappyNA_clause d of
        Parsed _ d3 e3 ->
          case testPappyKU_clause d3 of
            NoParse e5 ->
              Parsed ( () ) d3 (maximum [e5,e3,e1])
            Parsed _ _ e5 -> pappyAlt1_5 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_5 (max e3 e1)
    pappyAlt1_5 e1 =
      case testPappyNAhE_clause d of
        Parsed _ d3 e3 ->
          case testPappyBO_clause d3 of
            NoParse e5 ->
              Parsed ( () ) d3 (maximum [e5,e3,e1])
            Parsed _ _ e5 -> pappyAlt1_6 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_6 (max e3 e1)
    pappyAlt1_6 e1 =
      case testPappyselbri d of
        Parsed _ d3 e3 ->
          Parsed ( () ) d3 (max e3 e1)
        NoParse e3 -> pappyAlt1_7 (max e3 e1)
    pappyAlt1_7 e1 =
      case testPappytag d of
        Parsed _ d3 e3 ->
          case testPappybridi_tail_start d3 of
            Parsed _ d5 e5 ->
              Parsed ( () ) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_8 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_8 (max e3 e1)
    pappyAlt1_8 e1 =
      case testPappyKE_clause d of
        Parsed _ d3 e3 ->
          case testPappybridi_tail_start d3 of
            Parsed _ d5 e5 ->
              Parsed ( () ) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_9 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_9 (max e3 e1)
    pappyAlt1_9 e1 =
      case testPappybridi_tail d of
        Parsed _ d3 e3 ->
          Parsed ( () ) d3 (max e3 e1)
        NoParse e3 -> pappyAlt1_10 (max e3 e1)
    pappyAlt1_10 e1 = NoParse e1

testPappyParseStarRule27 :: TestPappyDerivs -> Result TestPappyDerivs ([ (Gihek, [Free], Sentence, [Term], Maybe Clause, [Free]) ])
testPappyParseStarRule27 d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case pappyResult3 of
        Parsed v d3 e3 ->
          case testPappyStarRule27 d3 of
            Parsed vs d5 e5 ->
              Parsed (v : vs) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_2 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
      where
        pappyResult3 =
          case testPappygihek d of
            Parsed g d5 e5 ->
              case pappyResult7 of
                NoParse e7 ->
                  case pappyResult9 of
                    NoParse e9 ->
                      case testPappyStarRule188 d5 of
                        Parsed f d11 e11 ->
                          case testPappybridi_tail_2 d11 of
                            Parsed b d13 e13 ->
                              case testPappytail_terms d13 of
                                Parsed tvi d15 e15 ->
                                  Parsed ( let (t, v, i) = tvi in (g, f, b, t, v, i) ) d15 (maximum [e15,e13,e11,e9,e7,e5])
                                NoParse e15 -> NoParse (maximum [e15,e13,e11,e9,e7,e5])
                            NoParse e13 -> NoParse (maximum [e13,e11,e9,e7,e5])
                        NoParse e11 -> NoParse (maximum [e11,e9,e7,e5])
                    Parsed _ _ e9 -> NoParse (maximum [e9,e7,e5])
                  where
                    pappyResult9 =
                      case pappyResult11 of
                        Parsed _ d11 e11 ->
                          case testPappyKE_clause d11 of
                            Parsed _ d13 e13 ->
                              Parsed ( () ) d13 (max e13 e11)
                            NoParse e13 -> NoParse (max e13 e11)
                        NoParse e11 -> NoParse e11
                      where
                        pappyResult11 =
                          case testPappystag d5 of
                            Parsed v13 d13 e13 -> Parsed (Just v13) d13 e13
                            NoParse e13 -> Parsed (Nothing) d5 e13
                Parsed _ _ e7 -> NoParse (max e7 e5)
              where
                pappyResult7 =
                  case pappyResult9 of
                    Parsed _ d9 e9 ->
                      case testPappyBO_clause d9 of
                        Parsed _ d11 e11 ->
                          Parsed ( () ) d11 (max e11 e9)
                        NoParse e11 -> NoParse (max e11 e9)
                    NoParse e9 -> NoParse e9
                  where
                    pappyResult9 =
                      case testPappystag d5 of
                        Parsed v11 d11 e11 -> Parsed (Just v11) d11 e11
                        NoParse e11 -> Parsed (Nothing) d5 e11
            NoParse e5 -> NoParse e5
    pappyAlt1_2 e1 =
      Parsed ([]) d e1
    pappyAlt1_3 e1 = NoParse e1

testPappyParsebridi_tail_2 :: TestPappyDerivs -> Result TestPappyDerivs (Sentence)
testPappyParsebridi_tail_2 d =
  case pappyResult1 of
    Parsed b3 d1 e1 ->
      case pappyResult3 of
        Parsed g d3 e3 ->
          Parsed ( maybe b3 (\(h, s, bo, f, bt, (t, v, i)) -> GihekBO b3 h s bo f bt t v i) g ) d3 (max e3 e1)
        NoParse e3 -> NoParse (max e3 e1)
      where
        pappyResult3 =
          case pappyResult5 of
            Parsed v5 d5 e5 -> Parsed (Just v5) d5 e5
            NoParse e5 -> Parsed (Nothing) d1 e5
          where
            pappyResult5 =
              case testPappygihek d1 of
                Parsed g d7 e7 ->
                  case pappyResult9 of
                    Parsed s d9 e9 ->
                      case testPappyBO_clause d9 of
                        Parsed bo d11 e11 ->
                          case testPappyStarRule188 d11 of
                            Parsed f d13 e13 ->
                              case testPappybridi_tail_2 d13 of
                                Parsed bt d15 e15 ->
                                  case testPappytail_terms d15 of
                                    Parsed t d17 e17 ->
                                      Parsed ( (g, s, bo, f, bt, t) ) d17 (maximum [e17,e15,e13,e11,e9,e7])
                                    NoParse e17 -> NoParse (maximum [e17,e15,e13,e11,e9,e7])
                                NoParse e15 -> NoParse (maximum [e15,e13,e11,e9,e7])
                            NoParse e13 -> NoParse (maximum [e13,e11,e9,e7])
                        NoParse e11 -> NoParse (maximum [e11,e9,e7])
                    NoParse e9 -> NoParse (max e9 e7)
                  where
                    pappyResult9 =
                      case testPappystag d7 of
                        Parsed v11 d11 e11 -> Parsed (Just v11) d11 e11
                        NoParse e11 -> Parsed (Nothing) d7 e11
                NoParse e7 -> NoParse e7
    NoParse e1 -> NoParse e1
  where
    pappyResult1 =
      pappyAlt3_1 (ParseError (testPappyPos d) []) where
        pappyAlt3_1 e3 =
          case testPappyselbri d of
            Parsed s d5 e5 ->
              case testPappytail_terms d5 of
                Parsed tvf d7 e7 ->
                  Parsed ( case tvf of ([], Nothing, []) -> Selbri s; (t, v, f) -> SelbriTailTerms s t v f ) d7 (maximum [e7,e5,e3])
                NoParse e7 -> pappyAlt3_2 (maximum [e7,e5,e3])
            NoParse e5 -> pappyAlt3_2 (max e5 e3)
        pappyAlt3_2 e3 =
          case testPappygek_sentence d of
            Parsed v5 d5 e5 -> Parsed v5 d5 (max e5 e3)
            NoParse e5 -> pappyAlt3_3 (max e5 e3)
        pappyAlt3_3 e3 = NoParse e3

testPappyParsegek_sentence :: TestPappyDerivs -> Result TestPappyDerivs (Sentence)
testPappyParsegek_sentence d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case testPappygek d of
        Parsed gek d3 e3 ->
          case testPappysubsentence d3 of
            Parsed s d5 e5 ->
              case testPappygik d5 of
                Parsed gik d7 e7 ->
                  case testPappysubsentence d7 of
                    Parsed t d9 e9 ->
                      case testPappytail_terms d9 of
                        Parsed tts d11 e11 ->
                          Parsed ( uncurry3 (GekSentence gek s gik t) tts ) d11 (maximum [e11,e9,e7,e5,e3,e1])
                        NoParse e11 -> pappyAlt1_2 (maximum [e11,e9,e7,e5,e3,e1])
                    NoParse e9 -> pappyAlt1_2 (maximum [e9,e7,e5,e3,e1])
                NoParse e7 -> pappyAlt1_2 (maximum [e7,e5,e3,e1])
            NoParse e5 -> pappyAlt1_2 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
    pappyAlt1_2 e1 =
      case pappyResult3 of
        Parsed t d3 e3 ->
          case testPappyKE_clause d3 of
            Parsed ke d5 e5 ->
              case testPappyStarRule188 d5 of
                Parsed f d7 e7 ->
                  case testPappygek_sentence d7 of
                    Parsed gs d9 e9 ->
                      case pappyResult11 of
                        Parsed kehe d11 e11 ->
                          case testPappyStarRule188 d11 of
                            Parsed g d13 e13 ->
                              Parsed ( KEGekSentence t ke f gs kehe g ) d13 (maximum [e13,e11,e9,e7,e5,e3,e1])
                            NoParse e13 -> pappyAlt1_3 (maximum [e13,e11,e9,e7,e5,e3,e1])
                        NoParse e11 -> pappyAlt1_3 (maximum [e11,e9,e7,e5,e3,e1])
                      where
                        pappyResult11 =
                          case testPappyKEhE_clause d9 of
                            Parsed v13 d13 e13 -> Parsed (Just v13) d13 e13
                            NoParse e13 -> Parsed (Nothing) d9 e13
                    NoParse e9 -> pappyAlt1_3 (maximum [e9,e7,e5,e3,e1])
                NoParse e7 -> pappyAlt1_3 (maximum [e7,e5,e3,e1])
            NoParse e5 -> pappyAlt1_3 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_3 (max e3 e1)
      where
        pappyResult3 =
          case testPappytag d of
            Parsed v5 d5 e5 -> Parsed (Just v5) d5 e5
            NoParse e5 -> Parsed (Nothing) d e5
    pappyAlt1_3 e1 =
      case testPappyNA_clause d of
        Parsed n d3 e3 ->
          case testPappyStarRule188 d3 of
            Parsed f d5 e5 ->
              case testPappygek_sentence d5 of
                Parsed gs d7 e7 ->
                  Parsed ( NAGekSentence n f gs ) d7 (maximum [e7,e5,e3,e1])
                NoParse e7 -> pappyAlt1_4 (maximum [e7,e5,e3,e1])
            NoParse e5 -> pappyAlt1_4 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_4 (max e3 e1)
    pappyAlt1_4 e1 = NoParse e1

testPappytail_terms :: TestPappyDerivs -> Result TestPappyDerivs ( ([Term], Maybe Clause, [Free]) )
testPappytail_terms d =
  case pappyResult1 of
    Parsed t d1 e1 ->
      case pappyResult3 of
        Parsed v d3 e3 ->
          case testPappyStarRule188 d3 of
            Parsed f d5 e5 ->
              Parsed ( (fromMaybe [] t, v, f) ) d5 (maximum [e5,e3,e1])
            NoParse e5 -> NoParse (maximum [e5,e3,e1])
        NoParse e3 -> NoParse (max e3 e1)
      where
        pappyResult3 =
          case testPappyVAU_clause d1 of
            Parsed v5 d5 e5 -> Parsed (Just v5) d5 e5
            NoParse e5 -> Parsed (Nothing) d1 e5
    NoParse e1 -> NoParse e1
  where
    pappyResult1 =
      case testPappyPlusRule3 d of
        Parsed v3 d3 e3 -> Parsed (Just v3) d3 e3
        NoParse e3 -> Parsed (Nothing) d e3

testPappyParsePlusRule3 :: TestPappyDerivs -> Result TestPappyDerivs ([Term])
testPappyParsePlusRule3 d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case testPappyterms_1 d of
        Parsed v d3 e3 ->
          case testPappyPlusRule3 d3 of
            Parsed vs d5 e5 ->
              Parsed (v : vs) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_2 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
    pappyAlt1_2 e1 =
      case testPappyterms_1 d of
        Parsed v d3 e3 ->
          Parsed ([v]) d3 (max e3 e1)
        NoParse e3 -> pappyAlt1_3 (max e3 e1)
    pappyAlt1_3 e1 = NoParse e1

testPappyParseStarRule34 :: TestPappyDerivs -> Result TestPappyDerivs ([ (Clause, [Free], JoikJek, [Free], Term) ])
testPappyParseStarRule34 d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case pappyResult3 of
        Parsed v d3 e3 ->
          case testPappyStarRule34 d3 of
            Parsed vs d5 e5 ->
              Parsed (v : vs) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_2 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
      where
        pappyResult3 =
          case testPappyStarRule35 d of
            Parsed _ d5 e5 ->
              case testPappyPEhE_clause d5 of
                Parsed p d7 e7 ->
                  case testPappyStarRule188 d7 of
                    Parsed f d9 e9 ->
                      case testPappyjoik_jek d9 of
                        Parsed j d11 e11 ->
                          case testPappyterms_2 d11 of
                            Parsed t d13 e13 ->
                              Parsed ( (p, f, fst j, snd j, t) ) d13 (maximum [e13,e11,e9,e7,e5])
                            NoParse e13 -> NoParse (maximum [e13,e11,e9,e7,e5])
                        NoParse e11 -> NoParse (maximum [e11,e9,e7,e5])
                    NoParse e9 -> NoParse (maximum [e9,e7,e5])
                NoParse e7 -> NoParse (max e7 e5)
            NoParse e5 -> NoParse e5
    pappyAlt1_2 e1 =
      Parsed ([]) d e1
    pappyAlt1_3 e1 = NoParse e1

testPappyterms_1 :: TestPappyDerivs -> Result TestPappyDerivs (Term)
testPappyterms_1 d =
  case testPappyterms_2 d of
    Parsed t d1 e1 ->
      case testPappyStarRule34 d1 of
        Parsed pfjt d3 e3 ->
          Parsed ( if null pfjt then t else TermsPEhETerms t pfjt ) d3 (max e3 e1)
        NoParse e3 -> NoParse (max e3 e1)
    NoParse e1 -> NoParse e1

testPappyParseStarRule35 :: TestPappyDerivs -> Result TestPappyDerivs ([ () ])
testPappyParseStarRule35 d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case pappyResult3 of
        Parsed v d3 e3 ->
          case testPappyStarRule35 d3 of
            Parsed vs d5 e5 ->
              Parsed (v : vs) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_2 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
      where
        pappyResult3 =
          case testPappyPEhE_clause d of
            Parsed _ d5 e5 ->
              case testPappyStarRule40 d5 of
                Parsed _ d7 e7 ->
                  case testPappySA_clause d7 of
                    Parsed _ d9 e9 ->
                      Parsed ( () ) d9 (maximum [e9,e7,e5])
                    NoParse e9 -> NoParse (maximum [e9,e7,e5])
                NoParse e7 -> NoParse (max e7 e5)
            NoParse e5 -> NoParse e5
    pappyAlt1_2 e1 =
      Parsed ([]) d e1
    pappyAlt1_3 e1 = NoParse e1

testPappyParseStarRule37 :: TestPappyDerivs -> Result TestPappyDerivs ([ (Clause, [Free], Term) ])
testPappyParseStarRule37 d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case pappyResult3 of
        Parsed v d3 e3 ->
          case testPappyStarRule37 d3 of
            Parsed vs d5 e5 ->
              Parsed (v : vs) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_2 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
      where
        pappyResult3 =
          case testPappyStarRule38 d of
            Parsed _ d5 e5 ->
              case testPappyCEhE_clause d5 of
                Parsed c d7 e7 ->
                  case testPappyStarRule188 d7 of
                    Parsed f d9 e9 ->
                      case testPappyterm d9 of
                        Parsed t d11 e11 ->
                          Parsed ( (c, f, t) ) d11 (maximum [e11,e9,e7,e5])
                        NoParse e11 -> NoParse (maximum [e11,e9,e7,e5])
                    NoParse e9 -> NoParse (maximum [e9,e7,e5])
                NoParse e7 -> NoParse (max e7 e5)
            NoParse e5 -> NoParse e5
    pappyAlt1_2 e1 =
      Parsed ([]) d e1
    pappyAlt1_3 e1 = NoParse e1

testPappyterms_2 :: TestPappyDerivs -> Result TestPappyDerivs (Term)
testPappyterms_2 d =
  case testPappyterm d of
    Parsed t d1 e1 ->
      case testPappyStarRule37 d1 of
        Parsed cft d3 e3 ->
          Parsed ( if null cft then t else TermCEhETerm t cft ) d3 (max e3 e1)
        NoParse e3 -> NoParse (max e3 e1)
    NoParse e1 -> NoParse e1

testPappyParseStarRule38 :: TestPappyDerivs -> Result TestPappyDerivs ([ () ])
testPappyParseStarRule38 d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case pappyResult3 of
        Parsed v d3 e3 ->
          case testPappyStarRule38 d3 of
            Parsed vs d5 e5 ->
              Parsed (v : vs) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_2 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
      where
        pappyResult3 =
          case testPappyCEhE_clause d of
            Parsed _ d5 e5 ->
              case testPappyStarRule41 d5 of
                Parsed _ d7 e7 ->
                  case testPappySA_clause d7 of
                    Parsed _ d9 e9 ->
                      Parsed ( () ) d9 (maximum [e9,e7,e5])
                    NoParse e9 -> NoParse (maximum [e9,e7,e5])
                NoParse e7 -> NoParse (max e7 e5)
            NoParse e5 -> NoParse e5
    pappyAlt1_2 e1 =
      Parsed ([]) d e1
    pappyAlt1_3 e1 = NoParse e1

testPappyParseStarRule40 :: TestPappyDerivs -> Result TestPappyDerivs ([ () ])
testPappyParseStarRule40 d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case pappyResult3 of
        Parsed v d3 e3 ->
          case testPappyStarRule40 d3 of
            Parsed vs d5 e5 ->
              Parsed (v : vs) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_2 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
      where
        pappyResult3 =
          case testPappyPEhE_clause d of
            NoParse e5 ->
              case pappyResult7 of
                Parsed _ d7 e7 ->
                  Parsed ( () ) d7 (max e7 e5)
                NoParse e7 -> NoParse (max e7 e5)
              where
                pappyResult7 =
                  pappyAlt9_1 (ParseError (testPappyPos d) []) where
                    pappyAlt9_1 e9 =
                      case testPappypre_zei_bu d of
                        Parsed _ d11 e11 ->
                          Parsed ( () ) d11 (max e11 e9)
                        NoParse e11 -> pappyAlt9_2 (max e11 e9)
                    pappyAlt9_2 e9 =
                      case testPappySA_clause d of
                        Parsed _ d11 e11 ->
                          case testPappyPEhE_clause d11 of
                            NoParse e13 ->
                              Parsed ( () ) d11 (maximum [e13,e11,e9])
                            Parsed _ _ e13 -> pappyAlt9_3 (maximum [e13,e11,e9])
                        NoParse e11 -> pappyAlt9_3 (max e11 e9)
                    pappyAlt9_3 e9 = NoParse e9
            Parsed _ _ e5 -> NoParse e5
    pappyAlt1_2 e1 =
      Parsed ([]) d e1
    pappyAlt1_3 e1 = NoParse e1

testPappyParseStarRule41 :: TestPappyDerivs -> Result TestPappyDerivs ([ () ])
testPappyParseStarRule41 d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case pappyResult3 of
        Parsed v d3 e3 ->
          case testPappyStarRule41 d3 of
            Parsed vs d5 e5 ->
              Parsed (v : vs) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_2 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
      where
        pappyResult3 =
          case testPappyCEhE_clause d of
            NoParse e5 ->
              case pappyResult7 of
                Parsed _ d7 e7 ->
                  Parsed ( () ) d7 (max e7 e5)
                NoParse e7 -> NoParse (max e7 e5)
              where
                pappyResult7 =
                  pappyAlt9_1 (ParseError (testPappyPos d) []) where
                    pappyAlt9_1 e9 =
                      case testPappypre_zei_bu d of
                        Parsed _ d11 e11 ->
                          Parsed ( () ) d11 (max e11 e9)
                        NoParse e11 -> pappyAlt9_2 (max e11 e9)
                    pappyAlt9_2 e9 =
                      case testPappySA_clause d of
                        Parsed _ d11 e11 ->
                          case testPappyCEhE_clause d11 of
                            NoParse e13 ->
                              Parsed ( () ) d11 (maximum [e13,e11,e9])
                            Parsed _ _ e13 -> pappyAlt9_3 (maximum [e13,e11,e9])
                        NoParse e11 -> pappyAlt9_3 (max e11 e9)
                    pappyAlt9_3 e9 = NoParse e9
            Parsed _ _ e5 -> NoParse e5
    pappyAlt1_2 e1 =
      Parsed ([]) d e1
    pappyAlt1_3 e1 = NoParse e1

testPappyParseStarRule42 :: TestPappyDerivs -> Result TestPappyDerivs ([ () ])
testPappyParseStarRule42 d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case pappyResult3 of
        Parsed v d3 e3 ->
          case testPappyStarRule42 d3 of
            Parsed vs d5 e5 ->
              Parsed (v : vs) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_2 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
      where
        pappyResult3 =
          case testPappyterm_start d of
            Parsed _ d5 e5 ->
              case testPappyStarRule46 d5 of
                Parsed _ d7 e7 ->
                  case testPappySA_clause d7 of
                    Parsed _ d9 e9 ->
                      case testPappyterm_1 d9 of
                        Parsed _ _ e11 ->
                          Parsed ( () ) d9 (maximum [e11,e9,e7,e5])
                        NoParse e11 -> NoParse (maximum [e11,e9,e7,e5])
                    NoParse e9 -> NoParse (maximum [e9,e7,e5])
                NoParse e7 -> NoParse (max e7 e5)
            NoParse e5 -> NoParse e5
    pappyAlt1_2 e1 =
      Parsed ([]) d e1
    pappyAlt1_3 e1 = NoParse e1

testPappyterm :: TestPappyDerivs -> Result TestPappyDerivs (Term)
testPappyterm d =
  case testPappyStarRule42 d of
    Parsed _ d1 e1 ->
      case testPappyterm_1 d1 of
        Parsed t d3 e3 ->
          Parsed ( t ) d3 (max e3 e1)
        NoParse e3 -> NoParse (max e3 e1)
    NoParse e1 -> NoParse e1

testPappyParseterm_1 :: TestPappyDerivs -> Result TestPappyDerivs (Term)
testPappyParseterm_1 d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case testPappysumti d of
        Parsed v3 d3 e3 -> Parsed v3 d3 (max e3 e1)
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
    pappyAlt1_2 e1 =
      case testPappygek d of
        NoParse e3 ->
          case pappyResult5 of
            Parsed t d5 e5 ->
              case pappyResult7 of
                Parsed s d7 e7 ->
                  Parsed ( TagSumti t s ) d7 (maximum [e7,e5,e3,e1])
                NoParse e7 -> pappyAlt1_3 (maximum [e7,e5,e3,e1])
              where
                pappyResult7 =
                  pappyAlt9_1 (ParseError (testPappyPos d5) []) where
                    pappyAlt9_1 e9 =
                      case testPappysumti d5 of
                        Parsed v11 d11 e11 -> Parsed v11 d11 (max e11 e9)
                        NoParse e11 -> pappyAlt9_2 (max e11 e9)
                    pappyAlt9_2 e9 =
                      case pappyResult11 of
                        Parsed k d11 e11 ->
                          case testPappyStarRule188 d11 of
                            Parsed f d13 e13 ->
                              Parsed ( KU k f ) d13 (maximum [e13,e11,e9])
                            NoParse e13 -> pappyAlt9_3 (maximum [e13,e11,e9])
                        NoParse e11 -> pappyAlt9_3 (max e11 e9)
                      where
                        pappyResult11 =
                          case testPappyKU_clause d5 of
                            Parsed v13 d13 e13 -> Parsed (Just v13) d13 e13
                            NoParse e13 -> Parsed (Nothing) d5 e13
                    pappyAlt9_3 e9 = NoParse e9
            NoParse e5 -> pappyAlt1_3 (maximum [e5,e3,e1])
          where
            pappyResult5 =
              pappyAlt7_1 (ParseError (testPappyPos d) []) where
                pappyAlt7_1 e7 =
                  case testPappytag d of
                    Parsed v9 d9 e9 -> Parsed v9 d9 (max e9 e7)
                    NoParse e9 -> pappyAlt7_2 (max e9 e7)
                pappyAlt7_2 e7 =
                  case testPappyFA_clause d of
                    Parsed fa d9 e9 ->
                      case testPappyStarRule188 d9 of
                        Parsed f d11 e11 ->
                          Parsed ( FA fa f ) d11 (maximum [e11,e9,e7])
                        NoParse e11 -> pappyAlt7_3 (maximum [e11,e9,e7])
                    NoParse e9 -> pappyAlt7_3 (max e9 e7)
                pappyAlt7_3 e7 = NoParse e7
        Parsed _ _ e3 -> pappyAlt1_3 (max e3 e1)
    pappyAlt1_3 e1 =
      pappyAlt3_1 e1 where
        pappyAlt3_1 e3 =
          case testPappygek d of
            Parsed g d5 e5 ->
              case testPappyterms_gik_terms d5 of
                Parsed tgt d7 e7 ->
                  Parsed ( Gek g tgt ) d7 (maximum [e7,e5,e3])
                NoParse e7 -> pappyAlt3_2 (maximum [e7,e5,e3])
            NoParse e5 -> pappyAlt3_2 (max e5 e3)
        pappyAlt3_2 e3 =
          case testPappyNUhI_clause d of
            Parsed nuhi d5 e5 ->
              case testPappyStarRule188 d5 of
                Parsed f d7 e7 ->
                  case testPappygek d7 of
                    Parsed gek d9 e9 ->
                      case testPappyPlusRule3 d9 of
                        Parsed t d11 e11 ->
                          case pappyResult13 of
                            Parsed nuhu d13 e13 ->
                              case testPappyStarRule188 d13 of
                                Parsed g d15 e15 ->
                                  case testPappygik d15 of
                                    Parsed gik d17 e17 ->
                                      case testPappyPlusRule3 d17 of
                                        Parsed u d19 e19 ->
                                          case pappyResult21 of
                                            Parsed nuhu2 d21 e21 ->
                                              case testPappyStarRule188 d21 of
                                                Parsed h d23 e23 ->
                                                  Parsed ( NUhIGek nuhi f gek t nuhu g gik u nuhu2 h ) d23 (maximum [e23,e21,e19,e17,e15,e13,e11,e9,e7,e5,e3])
                                                NoParse e23 -> pappyAlt3_3 (maximum [e23,e21,e19,e17,e15,e13,e11,e9,e7,e5,e3])
                                            NoParse e21 -> pappyAlt3_3 (maximum [e21,e19,e17,e15,e13,e11,e9,e7,e5,e3])
                                          where
                                            pappyResult21 =
                                              case testPappyNUhU_clause d19 of
                                                Parsed v23 d23 e23 -> Parsed (Just v23) d23 e23
                                                NoParse e23 -> Parsed (Nothing) d19 e23
                                        NoParse e19 -> pappyAlt3_3 (maximum [e19,e17,e15,e13,e11,e9,e7,e5,e3])
                                    NoParse e17 -> pappyAlt3_3 (maximum [e17,e15,e13,e11,e9,e7,e5,e3])
                                NoParse e15 -> pappyAlt3_3 (maximum [e15,e13,e11,e9,e7,e5,e3])
                            NoParse e13 -> pappyAlt3_3 (maximum [e13,e11,e9,e7,e5,e3])
                          where
                            pappyResult13 =
                              case testPappyNUhU_clause d11 of
                                Parsed v15 d15 e15 -> Parsed (Just v15) d15 e15
                                NoParse e15 -> Parsed (Nothing) d11 e15
                        NoParse e11 -> pappyAlt3_3 (maximum [e11,e9,e7,e5,e3])
                    NoParse e9 -> pappyAlt3_3 (maximum [e9,e7,e5,e3])
                NoParse e7 -> pappyAlt3_3 (maximum [e7,e5,e3])
            NoParse e5 -> pappyAlt3_3 (max e5 e3)
        pappyAlt3_3 e3 =
          case testPappyNUhI_clause d of
            Parsed nuhi d5 e5 ->
              case testPappyStarRule188 d5 of
                Parsed f d7 e7 ->
                  case testPappyPlusRule3 d7 of
                    Parsed t d9 e9 ->
                      case pappyResult11 of
                        Parsed nuhu d11 e11 ->
                          case testPappyStarRule188 d11 of
                            Parsed g d13 e13 ->
                              Parsed ( NUhI nuhi f t nuhu g ) d13 (maximum [e13,e11,e9,e7,e5,e3])
                            NoParse e13 -> pappyAlt3_4 (maximum [e13,e11,e9,e7,e5,e3])
                        NoParse e11 -> pappyAlt3_4 (maximum [e11,e9,e7,e5,e3])
                      where
                        pappyResult11 =
                          case testPappyNUhU_clause d9 of
                            Parsed v13 d13 e13 -> Parsed (Just v13) d13 e13
                            NoParse e13 -> Parsed (Nothing) d9 e13
                    NoParse e9 -> pappyAlt3_4 (maximum [e9,e7,e5,e3])
                NoParse e7 -> pappyAlt3_4 (maximum [e7,e5,e3])
            NoParse e5 -> pappyAlt3_4 (max e5 e3)
        pappyAlt3_4 e3 = pappyAlt1_4 e3
    pappyAlt1_4 e1 =
      case testPappyNA_clause d of
        Parsed n d3 e3 ->
          case testPappyKU_clause d3 of
            Parsed k d5 e5 ->
              case testPappyStarRule188 d5 of
                Parsed f d7 e7 ->
                  Parsed ( NAKU n k f ) d7 (maximum [e7,e5,e3,e1])
                NoParse e7 -> pappyAlt1_5 (maximum [e7,e5,e3,e1])
            NoParse e5 -> pappyAlt1_5 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_5 (max e3 e1)
    pappyAlt1_5 e1 = NoParse e1

testPappyParseStarRule46 :: TestPappyDerivs -> Result TestPappyDerivs ([ () ])
testPappyParseStarRule46 d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case pappyResult3 of
        Parsed v d3 e3 ->
          case testPappyStarRule46 d3 of
            Parsed vs d5 e5 ->
              Parsed (v : vs) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_2 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
      where
        pappyResult3 =
          case testPappyterm_start d of
            NoParse e5 ->
              case pappyResult7 of
                Parsed _ d7 e7 ->
                  Parsed ( () ) d7 (max e7 e5)
                NoParse e7 -> NoParse (max e7 e5)
              where
                pappyResult7 =
                  pappyAlt9_1 (ParseError (testPappyPos d) []) where
                    pappyAlt9_1 e9 =
                      case testPappypre_zei_bu d of
                        Parsed _ d11 e11 ->
                          Parsed ( () ) d11 (max e11 e9)
                        NoParse e11 -> pappyAlt9_2 (max e11 e9)
                    pappyAlt9_2 e9 =
                      case testPappySA_clause d of
                        Parsed _ d11 e11 ->
                          case testPappyterm_start d11 of
                            NoParse e13 ->
                              Parsed ( () ) d11 (maximum [e13,e11,e9])
                            Parsed _ _ e13 -> pappyAlt9_3 (maximum [e13,e11,e9])
                        NoParse e11 -> pappyAlt9_3 (max e11 e9)
                    pappyAlt9_3 e9 = NoParse e9
            Parsed _ _ e5 -> NoParse e5
    pappyAlt1_2 e1 =
      Parsed ([]) d e1
    pappyAlt1_3 e1 = NoParse e1

testPappyParseterm_start :: TestPappyDerivs -> Result TestPappyDerivs ( () )
testPappyParseterm_start d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case testPappyterm_1 d of
        Parsed _ d3 e3 ->
          Parsed ( () ) d3 (max e3 e1)
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
    pappyAlt1_2 e1 =
      case testPappyLA_clause d of
        Parsed _ d3 e3 ->
          Parsed ( () ) d3 (max e3 e1)
        NoParse e3 -> pappyAlt1_3 (max e3 e1)
    pappyAlt1_3 e1 =
      case testPappyLE_clause d of
        Parsed _ d3 e3 ->
          Parsed ( () ) d3 (max e3 e1)
        NoParse e3 -> pappyAlt1_4 (max e3 e1)
    pappyAlt1_4 e1 =
      case testPappyLI_clause d of
        Parsed _ d3 e3 ->
          Parsed ( () ) d3 (max e3 e1)
        NoParse e3 -> pappyAlt1_5 (max e3 e1)
    pappyAlt1_5 e1 =
      case testPappyLU_clause d of
        Parsed _ d3 e3 ->
          Parsed ( () ) d3 (max e3 e1)
        NoParse e3 -> pappyAlt1_6 (max e3 e1)
    pappyAlt1_6 e1 =
      case testPappyLAhE_clause d of
        Parsed _ d3 e3 ->
          Parsed ( () ) d3 (max e3 e1)
        NoParse e3 -> pappyAlt1_7 (max e3 e1)
    pappyAlt1_7 e1 =
      case testPappyquantifier d of
        Parsed _ d3 e3 ->
          case testPappyterm_start d3 of
            Parsed _ d5 e5 ->
              Parsed ( () ) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_8 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_8 (max e3 e1)
    pappyAlt1_8 e1 =
      case testPappygek d of
        Parsed _ d3 e3 ->
          case testPappysumti d3 of
            Parsed _ d5 e5 ->
              case testPappygik d5 of
                Parsed _ d7 e7 ->
                  Parsed ( () ) d7 (maximum [e7,e5,e3,e1])
                NoParse e7 -> pappyAlt1_9 (maximum [e7,e5,e3,e1])
            NoParse e5 -> pappyAlt1_9 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_9 (max e3 e1)
    pappyAlt1_9 e1 =
      case testPappyFA_clause d of
        Parsed _ d3 e3 ->
          Parsed ( () ) d3 (max e3 e1)
        NoParse e3 -> pappyAlt1_10 (max e3 e1)
    pappyAlt1_10 e1 =
      case testPappytag d of
        Parsed _ d3 e3 ->
          case testPappyterm_start d3 of
            Parsed _ d5 e5 ->
              Parsed ( () ) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_11 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_11 (max e3 e1)
    pappyAlt1_11 e1 = NoParse e1

testPappyParseterms_gik_terms :: TestPappyDerivs -> Result TestPappyDerivs (TermsGikTerms)
testPappyParseterms_gik_terms d =
  case testPappyterm d of
    Parsed t1 d1 e1 ->
      case pappyResult3 of
        Parsed tgt d3 e3 ->
          case testPappyterm d3 of
            Parsed t2 d5 e5 ->
              Parsed ( TGT t1 tgt t2 ) d5 (maximum [e5,e3,e1])
            NoParse e5 -> NoParse (maximum [e5,e3,e1])
        NoParse e3 -> NoParse (max e3 e1)
      where
        pappyResult3 =
          pappyAlt5_1 (ParseError (testPappyPos d1) []) where
            pappyAlt5_1 e5 =
              case testPappygik d1 of
                Parsed g d7 e7 ->
                  Parsed ( Gik g ) d7 (max e7 e5)
                NoParse e7 -> pappyAlt5_2 (max e7 e5)
            pappyAlt5_2 e5 =
              case testPappyterms_gik_terms d1 of
                Parsed v7 d7 e7 -> Parsed v7 d7 (max e7 e5)
                NoParse e7 -> pappyAlt5_3 (max e7 e5)
            pappyAlt5_3 e5 = NoParse e5
    NoParse e1 -> NoParse e1

testPappyParsesumti :: TestPappyDerivs -> Result TestPappyDerivs (Sumti)
testPappyParsesumti d =
  case pappyResult1 of
    Parsed s d1 e1 ->
      case pappyResult3 of
        Parsed vr d3 e3 ->
          Parsed ( maybe s (\(v, f, r) -> VUhO s v f r) vr ) d3 (max e3 e1)
        NoParse e3 -> NoParse (max e3 e1)
      where
        pappyResult3 =
          case pappyResult5 of
            Parsed v5 d5 e5 -> Parsed (Just v5) d5 e5
            NoParse e5 -> Parsed (Nothing) d1 e5
          where
            pappyResult5 =
              case pappyResult7 of
                Parsed v d7 e7 ->
                  case testPappyStarRule188 d7 of
                    Parsed f d9 e9 ->
                      case testPappyrelative_clauses d9 of
                        Parsed r d11 e11 ->
                          Parsed ( (v, f, r) ) d11 (maximum [e11,e9,e7])
                        NoParse e11 -> NoParse (maximum [e11,e9,e7])
                    NoParse e9 -> NoParse (max e9 e7)
                NoParse e7 -> NoParse e7
              where
                pappyResult7 =
                  case testPappyVUhO_pre d1 of
                    Parsed p d9 e9 ->
                      case testPappypost_clause d9 of
                        Parsed q d11 e11 ->
                          Parsed ( (fst p, snd p, q) ) d11 (max e11 e9)
                        NoParse e11 -> NoParse (max e11 e9)
                    NoParse e9 -> NoParse e9
    NoParse e1 -> NoParse e1
  where
    pappyResult1 =
      case pappyResult3 of
        Parsed s2 d3 e3 ->
          case pappyResult5 of
            Parsed s d5 e5 ->
              Parsed ( maybe s2 (\((je, f), t, k, g, s, l, h) -> JoikEkKESumti s2 je f t k g s l h) s ) d5 (max e5 e3)
            NoParse e5 -> NoParse (max e5 e3)
          where
            pappyResult5 =
              case pappyResult7 of
                Parsed v7 d7 e7 -> Parsed (Just v7) d7 e7
                NoParse e7 -> Parsed (Nothing) d3 e7
              where
                pappyResult7 =
                  case testPappyjoik_ek d3 of
                    Parsed je d9 e9 ->
                      case pappyResult11 of
                        Parsed t d11 e11 ->
                          case testPappyKE_clause d11 of
                            Parsed k d13 e13 ->
                              case testPappyStarRule188 d13 of
                                Parsed f d15 e15 ->
                                  case testPappysumti d15 of
                                    Parsed s d17 e17 ->
                                      case pappyResult19 of
                                        Parsed l d19 e19 ->
                                          case testPappyStarRule188 d19 of
                                            Parsed g d21 e21 ->
                                              Parsed ( (je, t, k, f, s, l, g) ) d21 (maximum [e21,e19,e17,e15,e13,e11,e9])
                                            NoParse e21 -> NoParse (maximum [e21,e19,e17,e15,e13,e11,e9])
                                        NoParse e19 -> NoParse (maximum [e19,e17,e15,e13,e11,e9])
                                      where
                                        pappyResult19 =
                                          case testPappyKEhE_clause d17 of
                                            Parsed v21 d21 e21 -> Parsed (Just v21) d21 e21
                                            NoParse e21 -> Parsed (Nothing) d17 e21
                                    NoParse e17 -> NoParse (maximum [e17,e15,e13,e11,e9])
                                NoParse e15 -> NoParse (maximum [e15,e13,e11,e9])
                            NoParse e13 -> NoParse (maximum [e13,e11,e9])
                        NoParse e11 -> NoParse (max e11 e9)
                      where
                        pappyResult11 =
                          case testPappystag d9 of
                            Parsed v13 d13 e13 -> Parsed (Just v13) d13 e13
                            NoParse e13 -> Parsed (Nothing) d9 e13
                    NoParse e9 -> NoParse e9
        NoParse e3 -> NoParse e3
      where
        pappyResult3 =
          case testPappysumti_3 d of
            Parsed s d5 e5 ->
              case testPappyStarRule55 d5 of
                Parsed ss d7 e7 ->
                  Parsed ( if null ss then s else JoikEkSumti s ss ) d7 (max e7 e5)
                NoParse e7 -> NoParse (max e7 e5)
            NoParse e5 -> NoParse e5

testPappyParseStarRule55 :: TestPappyDerivs -> Result TestPappyDerivs ([ (JoikEk, [Free], Sumti) ])
testPappyParseStarRule55 d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case pappyResult3 of
        Parsed v d3 e3 ->
          case testPappyStarRule55 d3 of
            Parsed vs d5 e5 ->
              Parsed (v : vs) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_2 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
      where
        pappyResult3 =
          case testPappyjoik_ek d of
            Parsed jf d5 e5 ->
              case testPappysumti_3 d5 of
                Parsed s d7 e7 ->
                  Parsed ( (fst jf, snd jf, s) ) d7 (max e7 e5)
                NoParse e7 -> NoParse (max e7 e5)
            NoParse e5 -> NoParse e5
    pappyAlt1_2 e1 =
      Parsed ([]) d e1
    pappyAlt1_3 e1 = NoParse e1

testPappyParsesumti_3 :: TestPappyDerivs -> Result TestPappyDerivs (Sumti)
testPappyParsesumti_3 d =
  case testPappysumti_4 d of
    Parsed s4 d1 e1 ->
      case pappyResult3 of
        Parsed s3 d3 e3 ->
          Parsed ( maybe s4 (\((je, f), t, b, g, s) -> JoikEkBOSumti s4 je f t b g s) s3 ) d3 (max e3 e1)
        NoParse e3 -> NoParse (max e3 e1)
      where
        pappyResult3 =
          case pappyResult5 of
            Parsed v5 d5 e5 -> Parsed (Just v5) d5 e5
            NoParse e5 -> Parsed (Nothing) d1 e5
          where
            pappyResult5 =
              case testPappyjoik_ek d1 of
                Parsed je d7 e7 ->
                  case pappyResult9 of
                    Parsed t d9 e9 ->
                      case testPappyBO_clause d9 of
                        Parsed b d11 e11 ->
                          case testPappyStarRule188 d11 of
                            Parsed f d13 e13 ->
                              case testPappysumti_3 d13 of
                                Parsed s d15 e15 ->
                                  Parsed ( (je, t, b, f, s) ) d15 (maximum [e15,e13,e11,e9,e7])
                                NoParse e15 -> NoParse (maximum [e15,e13,e11,e9,e7])
                            NoParse e13 -> NoParse (maximum [e13,e11,e9,e7])
                        NoParse e11 -> NoParse (maximum [e11,e9,e7])
                    NoParse e9 -> NoParse (max e9 e7)
                  where
                    pappyResult9 =
                      case testPappystag d7 of
                        Parsed v11 d11 e11 -> Parsed (Just v11) d11 e11
                        NoParse e11 -> Parsed (Nothing) d7 e11
                NoParse e7 -> NoParse e7
    NoParse e1 -> NoParse e1

testPappyParsesumti_4 :: TestPappyDerivs -> Result TestPappyDerivs (Sumti)
testPappyParsesumti_4 d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case pappyResult3 of
        Parsed q d3 e3 ->
          case testPappysumti_6 d3 of
            Parsed s d5 e5 ->
              case pappyResult7 of
                Parsed r d7 e7 ->
                  Parsed ( if isNothing q && isNothing r then s else OuterQuantifier q s r ) d7 (maximum [e7,e5,e3,e1])
                NoParse e7 -> pappyAlt1_2 (maximum [e7,e5,e3,e1])
              where
                pappyResult7 =
                  case testPappyrelative_clauses d5 of
                    Parsed v9 d9 e9 -> Parsed (Just v9) d9 e9
                    NoParse e9 -> Parsed (Nothing) d5 e9
            NoParse e5 -> pappyAlt1_2 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
      where
        pappyResult3 =
          case testPappyquantifier d of
            Parsed v5 d5 e5 -> Parsed (Just v5) d5 e5
            NoParse e5 -> Parsed (Nothing) d e5
    pappyAlt1_2 e1 =
      case testPappyquantifier d of
        Parsed q d3 e3 ->
          case testPappyselbri d3 of
            Parsed s d5 e5 ->
              case pappyResult7 of
                Parsed k d7 e7 ->
                  case testPappyStarRule188 d7 of
                    Parsed f d9 e9 ->
                      case pappyResult11 of
                        Parsed r d11 e11 ->
                          Parsed ( SQuantifierSelbri q s k f r ) d11 (maximum [e11,e9,e7,e5,e3,e1])
                        NoParse e11 -> pappyAlt1_3 (maximum [e11,e9,e7,e5,e3,e1])
                      where
                        pappyResult11 =
                          case testPappyrelative_clauses d9 of
                            Parsed v13 d13 e13 -> Parsed (Just v13) d13 e13
                            NoParse e13 -> Parsed (Nothing) d9 e13
                    NoParse e9 -> pappyAlt1_3 (maximum [e9,e7,e5,e3,e1])
                NoParse e7 -> pappyAlt1_3 (maximum [e7,e5,e3,e1])
              where
                pappyResult7 =
                  case testPappyKU_clause d5 of
                    Parsed v9 d9 e9 -> Parsed (Just v9) d9 e9
                    NoParse e9 -> Parsed (Nothing) d5 e9
            NoParse e5 -> pappyAlt1_3 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_3 (max e3 e1)
    pappyAlt1_3 e1 =
      case testPappygek d of
        Parsed ge d3 e3 ->
          case testPappysumti d3 of
            Parsed s d5 e5 ->
              case testPappygik d5 of
                Parsed gi d7 e7 ->
                  case testPappysumti_4 d7 of
                    Parsed s4 d9 e9 ->
                      Parsed ( GekSumti ge s gi s4 ) d9 (maximum [e9,e7,e5,e3,e1])
                    NoParse e9 -> pappyAlt1_4 (maximum [e9,e7,e5,e3,e1])
                NoParse e7 -> pappyAlt1_4 (maximum [e7,e5,e3,e1])
            NoParse e5 -> pappyAlt1_4 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_4 (max e3 e1)
    pappyAlt1_4 e1 = NoParse e1

testPappyParsesumti_6 :: TestPappyDerivs -> Result TestPappyDerivs (Sumti)
testPappyParsesumti_6 d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case pappyResult3 of
        Parsed zo d3 e3 ->
          case testPappyStarRule188 d3 of
            Parsed f d5 e5 ->
              Parsed ( let (pre, z, w, q) = zo in ZO pre z w q f ) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_2 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
      where
        pappyResult3 =
          case pappyResult5 of
            Parsed p d5 e5 ->
              case testPappypost_clause d5 of
                Parsed q d7 e7 ->
                  Parsed ( let (pre, z, w) = p in (pre, z, w, q) ) d7 (max e7 e5)
                NoParse e7 -> NoParse (max e7 e5)
            NoParse e5 -> NoParse e5
          where
            pappyResult5 =
              case testPappypre_clause d of
                Parsed p d7 e7 ->
                  case testPappyZO d7 of
                    Parsed z d9 e9 ->
                      case pappyResult11 of
                        Parsed _ d11 e11 ->
                          case testPappyany_word d11 of
                            Parsed w d13 e13 ->
                              case pappyResult15 of
                                Parsed _ d15 e15 ->
                                  Parsed ( (p, z, w) ) d15 (maximum [e15,e13,e11,e9,e7])
                                NoParse e15 -> NoParse (maximum [e15,e13,e11,e9,e7])
                              where
                                pappyResult15 =
                                  case testPappyspaces d13 of
                                    Parsed v17 d17 e17 -> Parsed (Just v17) d17 e17
                                    NoParse e17 -> Parsed (Nothing) d13 e17
                            NoParse e13 -> NoParse (maximum [e13,e11,e9,e7])
                        NoParse e11 -> NoParse (maximum [e11,e9,e7])
                      where
                        pappyResult11 =
                          case testPappyspaces d9 of
                            Parsed v13 d13 e13 -> Parsed (Just v13) d13 e13
                            NoParse e13 -> Parsed (Nothing) d9 e13
                    NoParse e9 -> NoParse (max e9 e7)
                NoParse e7 -> NoParse e7
    pappyAlt1_2 e1 =
      case pappyResult3 of
        Parsed z d3 e3 ->
          case testPappyStarRule188 d3 of
            Parsed f d5 e5 ->
              Parsed ( let (pre, zoi, ws, q) = z in ZOI pre zoi ws q f ) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_3 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_3 (max e3 e1)
      where
        pappyResult3 =
          case pappyResult5 of
            Parsed p d5 e5 ->
              case testPappypost_clause d5 of
                Parsed q d7 e7 ->
                  Parsed ( let (pre, z, ws) = p in (pre, z, ws, q) ) d7 (max e7 e5)
                NoParse e7 -> NoParse (max e7 e5)
            NoParse e5 -> NoParse e5
          where
            pappyResult5 =
              case testPappypre_clause d of
                Parsed p d7 e7 ->
                  case testPappyZOI d7 of
                    Parsed z d9 e9 ->
                      case pappyResult11 of
                        Parsed _ d11 e11 ->
                          case testPappyChar d11 of
                            Parsed w d13 e13 ->
                              case ( w == '\NUL' ) of
                                True ->
                                  case pappyResult17 of
                                    Parsed s d17 e17 ->
                                      case testPappyStarRule198 d17 of
                                        Parsed ws d19 e19 ->
                                          case testPappyChar d19 of
                                            Parsed v d21 e21 ->
                                              case ( v == '\NUL' ) of
                                                True ->
                                                  case pappyResult25 of
                                                    Parsed _ d25 e25 ->
                                                      Parsed ( (p, z, maybe ws (: ws) s) ) d25 (maximum [e25,e21,e19,e17,e13,e11,e9,e7])
                                                    NoParse e25 -> NoParse (maximum [e25,e21,e19,e17,e13,e11,e9,e7])
                                                  where
                                                    pappyResult25 =
                                                      case testPappyspaces d21 of
                                                        Parsed v27 d27 e27 -> Parsed (Just v27) d27 e27
                                                        NoParse e27 -> Parsed (Nothing) d21 e27
                                                False -> NoParse (maximum [e21,e19,e17,e13,e11,e9,e7])
                                            NoParse e21 -> NoParse (maximum [e21,e19,e17,e13,e11,e9,e7])
                                        NoParse e19 -> NoParse (maximum [e19,e17,e13,e11,e9,e7])
                                    NoParse e17 -> NoParse (maximum [e17,e13,e11,e9,e7])
                                  where
                                    pappyResult17 =
                                      case testPappyspaces d13 of
                                        Parsed v19 d19 e19 -> Parsed (Just v19) d19 e19
                                        NoParse e19 -> Parsed (Nothing) d13 e19
                                False -> NoParse (maximum [e13,e11,e9,e7])
                            NoParse e13 -> NoParse (maximum [e13,e11,e9,e7])
                        NoParse e11 -> NoParse (maximum [e11,e9,e7])
                      where
                        pappyResult11 =
                          case testPappyspaces d9 of
                            Parsed v13 d13 e13 -> Parsed (Just v13) d13 e13
                            NoParse e13 -> Parsed (Nothing) d9 e13
                    NoParse e9 -> NoParse (max e9 e7)
                NoParse e7 -> NoParse e7
    pappyAlt1_3 e1 =
      case pappyResult3 of
        Parsed l d3 e3 ->
          case testPappyStarRule188 d3 of
            Parsed f d5 e5 ->
              Parsed ( let (p, lohu, ws, lehu, q) = l in LOhU p lohu ws lehu q f ) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_4 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_4 (max e3 e1)
      where
        pappyResult3 =
          case pappyResult5 of
            Parsed lp d5 e5 ->
              case testPappypost_clause d5 of
                Parsed q d7 e7 ->
                  Parsed ( let (p, lohu, ws, lehu) = lp in (p, lohu, ws, lehu, q) ) d7 (max e7 e5)
                NoParse e7 -> NoParse (max e7 e5)
            NoParse e5 -> NoParse e5
          where
            pappyResult5 =
              case testPappypre_clause d of
                Parsed p d7 e7 ->
                  case testPappyLOhU d7 of
                    Parsed lohu d9 e9 ->
                      case pappyResult11 of
                        Parsed _ d11 e11 ->
                          case testPappyStarRule196 d11 of
                            Parsed ws d13 e13 ->
                              case testPappyLEhU_pre d13 of
                                Parsed lehu d15 e15 ->
                                  case pappyResult17 of
                                    Parsed _ d17 e17 ->
                                      Parsed ( (p, lohu, ws, lehu) ) d17 (maximum [e17,e15,e13,e11,e9,e7])
                                    NoParse e17 -> NoParse (maximum [e17,e15,e13,e11,e9,e7])
                                  where
                                    pappyResult17 =
                                      case testPappyspaces d15 of
                                        Parsed v19 d19 e19 -> Parsed (Just v19) d19 e19
                                        NoParse e19 -> Parsed (Nothing) d15 e19
                                NoParse e15 -> NoParse (maximum [e15,e13,e11,e9,e7])
                            NoParse e13 -> NoParse (maximum [e13,e11,e9,e7])
                        NoParse e11 -> NoParse (maximum [e11,e9,e7])
                      where
                        pappyResult11 =
                          case testPappyspaces d9 of
                            Parsed v13 d13 e13 -> Parsed (Just v13) d13 e13
                            NoParse e13 -> Parsed (Nothing) d9 e13
                    NoParse e9 -> NoParse (max e9 e7)
                NoParse e7 -> NoParse e7
    pappyAlt1_4 e1 =
      case testPappylerfu_string d of
        Parsed l d3 e3 ->
          case testPappyMOI_clause d3 of
            NoParse e5 ->
              case pappyResult7 of
                Parsed b d7 e7 ->
                  case testPappyStarRule188 d7 of
                    Parsed f d9 e9 ->
                      Parsed ( LerfuString l b f ) d9 (maximum [e9,e7,e5,e3,e1])
                    NoParse e9 -> pappyAlt1_5 (maximum [e9,e7,e5,e3,e1])
                NoParse e7 -> pappyAlt1_5 (maximum [e7,e5,e3,e1])
              where
                pappyResult7 =
                  case testPappyBOI_clause d3 of
                    Parsed v9 d9 e9 -> Parsed (Just v9) d9 e9
                    NoParse e9 -> Parsed (Nothing) d3 e9
            Parsed _ _ e5 -> pappyAlt1_5 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_5 (max e3 e1)
    pappyAlt1_5 e1 =
      case testPappyLU_clause d of
        Parsed lu d3 e3 ->
          case testPappytext d3 of
            Parsed t d5 e5 ->
              case pappyResult7 of
                Parsed lihu d7 e7 ->
                  case testPappyStarRule188 d7 of
                    Parsed f d9 e9 ->
                      Parsed ( LU lu t lihu f ) d9 (maximum [e9,e7,e5,e3,e1])
                    NoParse e9 -> pappyAlt1_6 (maximum [e9,e7,e5,e3,e1])
                NoParse e7 -> pappyAlt1_6 (maximum [e7,e5,e3,e1])
              where
                pappyResult7 =
                  case pappyResult9 of
                    Parsed v9 d9 e9 -> Parsed (Just v9) d9 e9
                    NoParse e9 -> Parsed (Nothing) d5 e9
                  where
                    pappyResult9 =
                      case pappyResult11 of
                        Parsed p d11 e11 ->
                          case testPappypost_clause d11 of
                            Parsed q d13 e13 ->
                              Parsed ( (fst p, snd p, q) ) d13 (max e13 e11)
                            NoParse e13 -> NoParse (max e13 e11)
                        NoParse e11 -> NoParse e11
                      where
                        pappyResult11 =
                          case testPappypre_clause d5 of
                            Parsed p d13 e13 ->
                              case testPappyLIhU d13 of
                                Parsed l d15 e15 ->
                                  case pappyResult17 of
                                    Parsed _ d17 e17 ->
                                      Parsed ( (p, l) ) d17 (maximum [e17,e15,e13])
                                    NoParse e17 -> NoParse (maximum [e17,e15,e13])
                                  where
                                    pappyResult17 =
                                      case testPappyspaces d15 of
                                        Parsed v19 d19 e19 -> Parsed (Just v19) d19 e19
                                        NoParse e19 -> Parsed (Nothing) d15 e19
                                NoParse e15 -> NoParse (max e15 e13)
                            NoParse e13 -> NoParse e13
            NoParse e5 -> pappyAlt1_6 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_6 (max e3 e1)
    pappyAlt1_6 e1 =
      case testPappyLAhE_NAhE d of
        Parsed lnbf d3 e3 ->
          case pappyResult5 of
            Parsed r d5 e5 ->
              case testPappysumti d5 of
                Parsed s d7 e7 ->
                  case pappyResult9 of
                    Parsed l d9 e9 ->
                      case testPappyStarRule188 d9 of
                        Parsed g d11 e11 ->
                          Parsed ( let (ln, b, f) = lnbf in LAhE_NAhE ln  b f r s l g ) d11 (maximum [e11,e9,e7,e5,e3,e1])
                        NoParse e11 -> pappyAlt1_7 (maximum [e11,e9,e7,e5,e3,e1])
                    NoParse e9 -> pappyAlt1_7 (maximum [e9,e7,e5,e3,e1])
                  where
                    pappyResult9 =
                      case testPappyLUhU_clause d7 of
                        Parsed v11 d11 e11 -> Parsed (Just v11) d11 e11
                        NoParse e11 -> Parsed (Nothing) d7 e11
                NoParse e7 -> pappyAlt1_7 (maximum [e7,e5,e3,e1])
            NoParse e5 -> pappyAlt1_7 (maximum [e5,e3,e1])
          where
            pappyResult5 =
              case testPappyrelative_clauses d3 of
                Parsed v7 d7 e7 -> Parsed (Just v7) d7 e7
                NoParse e7 -> Parsed (Nothing) d3 e7
        NoParse e3 -> pappyAlt1_7 (max e3 e1)
    pappyAlt1_7 e1 =
      case pappyResult3 of
        Parsed k d3 e3 ->
          case testPappyStarRule188 d3 of
            Parsed f d5 e5 ->
              Parsed ( KOhA k f ) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_8 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_8 (max e3 e1)
      where
        pappyResult3 =
          case testPappyKOhA_pre d of
            Parsed p d5 e5 ->
              case testPappypost_clause d5 of
                Parsed q d7 e7 ->
                  Parsed ( (fst p, snd p, q) ) d7 (max e7 e5)
                NoParse e7 -> NoParse (max e7 e5)
            NoParse e5 -> NoParse e5
    pappyAlt1_8 e1 =
      case testPappyLA_clause d of
        Parsed l d3 e3 ->
          case testPappyStarRule188 d3 of
            Parsed f d5 e5 ->
              case pappyResult7 of
                Parsed r d7 e7 ->
                  case testPappyPlusRule12 d7 of
                    Parsed c d9 e9 ->
                      case testPappyStarRule188 d9 of
                        Parsed g d11 e11 ->
                          Parsed ( LA l f r c g ) d11 (maximum [e11,e9,e7,e5,e3,e1])
                        NoParse e11 -> pappyAlt1_9 (maximum [e11,e9,e7,e5,e3,e1])
                    NoParse e9 -> pappyAlt1_9 (maximum [e9,e7,e5,e3,e1])
                NoParse e7 -> pappyAlt1_9 (maximum [e7,e5,e3,e1])
              where
                pappyResult7 =
                  case testPappyrelative_clauses d5 of
                    Parsed v9 d9 e9 -> Parsed (Just v9) d9 e9
                    NoParse e9 -> Parsed (Nothing) d5 e9
            NoParse e5 -> pappyAlt1_9 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_9 (max e3 e1)
    pappyAlt1_9 e1 =
      case pappyResult3 of
        Parsed l d3 e3 ->
          case testPappyStarRule188 d3 of
            Parsed f d5 e5 ->
              case pappyResult7 of
                Parsed s d7 e7 ->
                  case pappyResult9 of
                    Parsed k d9 e9 ->
                      case testPappyStarRule188 d9 of
                        Parsed g d11 e11 ->
                          Parsed ( LALE l f s k g ) d11 (maximum [e11,e9,e7,e5,e3,e1])
                        NoParse e11 -> pappyAlt1_10 (maximum [e11,e9,e7,e5,e3,e1])
                    NoParse e9 -> pappyAlt1_10 (maximum [e9,e7,e5,e3,e1])
                  where
                    pappyResult9 =
                      case testPappyKU_clause d7 of
                        Parsed v11 d11 e11 -> Parsed (Just v11) d11 e11
                        NoParse e11 -> Parsed (Nothing) d7 e11
                NoParse e7 -> pappyAlt1_10 (maximum [e7,e5,e3,e1])
              where
                pappyResult7 =
                  pappyAlt9_1 (ParseError (testPappyPos d5) []) where
                    pappyAlt9_1 e9 =
                      case pappyResult11 of
                        Parsed s6 d11 e11 ->
                          case testPappysumti_tail_1 d11 of
                            Parsed st d13 e13 ->
                              Parsed ( maybe st (\(s, r) -> SumtiSumtiTail s r st) s6 ) d13 (maximum [e13,e11,e9])
                            NoParse e13 -> pappyAlt9_2 (maximum [e13,e11,e9])
                        NoParse e11 -> pappyAlt9_2 (max e11 e9)
                      where
                        pappyResult11 =
                          case pappyResult13 of
                            Parsed v13 d13 e13 -> Parsed (Just v13) d13 e13
                            NoParse e13 -> Parsed (Nothing) d5 e13
                          where
                            pappyResult13 =
                              case testPappysumti_6 d5 of
                                Parsed s d15 e15 ->
                                  case pappyResult17 of
                                    Parsed r d17 e17 ->
                                      Parsed ( (s, r) ) d17 (max e17 e15)
                                    NoParse e17 -> NoParse (max e17 e15)
                                  where
                                    pappyResult17 =
                                      case testPappyrelative_clauses d15 of
                                        Parsed v19 d19 e19 -> Parsed (Just v19) d19 e19
                                        NoParse e19 -> Parsed (Nothing) d15 e19
                                NoParse e15 -> NoParse e15
                    pappyAlt9_2 e9 =
                      case testPappyrelative_clauses d5 of
                        Parsed r d11 e11 ->
                          case testPappysumti_tail_1 d11 of
                            Parsed s d13 e13 ->
                              Parsed ( RelativeClausesSumtiTail r s ) d13 (maximum [e13,e11,e9])
                            NoParse e13 -> pappyAlt9_3 (maximum [e13,e11,e9])
                        NoParse e11 -> pappyAlt9_3 (max e11 e9)
                    pappyAlt9_3 e9 = NoParse e9
            NoParse e5 -> pappyAlt1_10 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_10 (max e3 e1)
      where
        pappyResult3 =
          pappyAlt5_1 (ParseError (testPappyPos d) []) where
            pappyAlt5_1 e5 =
              case testPappyLA_clause d of
                Parsed v7 d7 e7 -> Parsed v7 d7 (max e7 e5)
                NoParse e7 -> pappyAlt5_2 (max e7 e5)
            pappyAlt5_2 e5 =
              case testPappyLE_clause d of
                Parsed v7 d7 e7 -> Parsed v7 d7 (max e7 e5)
                NoParse e7 -> pappyAlt5_3 (max e7 e5)
            pappyAlt5_3 e5 = NoParse e5
    pappyAlt1_10 e1 =
      case pappyResult3 of
        Parsed l d3 e3 ->
          Parsed ( let (li, f, m, loho, g) = l in LI li f m loho g ) d3 (max e3 e1)
        NoParse e3 -> pappyAlt1_11 (max e3 e1)
      where
        pappyResult3 =
          case testPappyLI_clause d of
            Parsed li d5 e5 ->
              case testPappyStarRule188 d5 of
                Parsed f d7 e7 ->
                  case testPappymex d7 of
                    Parsed m d9 e9 ->
                      case pappyResult11 of
                        Parsed loho d11 e11 ->
                          case testPappyStarRule188 d11 of
                            Parsed g d13 e13 ->
                              Parsed ( (li, f, m, loho, g) ) d13 (maximum [e13,e11,e9,e7,e5])
                            NoParse e13 -> NoParse (maximum [e13,e11,e9,e7,e5])
                        NoParse e11 -> NoParse (maximum [e11,e9,e7,e5])
                      where
                        pappyResult11 =
                          case pappyResult13 of
                            Parsed v13 d13 e13 -> Parsed (Just v13) d13 e13
                            NoParse e13 -> Parsed (Nothing) d9 e13
                          where
                            pappyResult13 =
                              case pappyResult15 of
                                Parsed p d15 e15 ->
                                  case testPappypost_clause d15 of
                                    Parsed q d17 e17 ->
                                      Parsed ( (fst p, snd p, q) ) d17 (max e17 e15)
                                    NoParse e17 -> NoParse (max e17 e15)
                                NoParse e15 -> NoParse e15
                              where
                                pappyResult15 =
                                  case testPappypre_clause d9 of
                                    Parsed p d17 e17 ->
                                      case testPappyLOhO d17 of
                                        Parsed l d19 e19 ->
                                          case pappyResult21 of
                                            Parsed _ d21 e21 ->
                                              Parsed ( (p, l) ) d21 (maximum [e21,e19,e17])
                                            NoParse e21 -> NoParse (maximum [e21,e19,e17])
                                          where
                                            pappyResult21 =
                                              case testPappyspaces d19 of
                                                Parsed v23 d23 e23 -> Parsed (Just v23) d23 e23
                                                NoParse e23 -> Parsed (Nothing) d19 e23
                                        NoParse e19 -> NoParse (max e19 e17)
                                    NoParse e17 -> NoParse e17
                    NoParse e9 -> NoParse (maximum [e9,e7,e5])
                NoParse e7 -> NoParse (max e7 e5)
            NoParse e5 -> NoParse e5
    pappyAlt1_11 e1 = NoParse e1

testPappyParseLAhE_NAhE :: TestPappyDerivs -> Result TestPappyDerivs ( (Clause, Maybe Clause, [Free]) )
testPappyParseLAhE_NAhE d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case testPappyLAhE_clause d of
        Parsed l d3 e3 ->
          case testPappyStarRule188 d3 of
            Parsed f d5 e5 ->
              Parsed ( (l, Nothing, f) ) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_2 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_2 (max e3 e1)
    pappyAlt1_2 e1 =
      case testPappyNAhE_clause d of
        Parsed n d3 e3 ->
          case testPappyBO_clause d3 of
            Parsed b d5 e5 ->
              case testPappyStarRule188 d5 of
                Parsed f d7 e7 ->
                  Parsed ( (n, Just b, f) ) d7 (maximum [e7,e5,e3,e1])
                NoParse e7 -> pappyAlt1_3 (maximum [e7,e5,e3,e1])
            NoParse e5 -> pappyAlt1_3 (maximum [e5,e3,e1])
        NoParse e3 -> pappyAlt1_3 (max e3 e1)
    pappyAlt1_3 e1 = NoParse e1

testPappysumti_tail_1 :: TestPappyDerivs -> Result TestPappyDerivs (SumtiTail)
testPappysumti_tail_1 d =
  pappyAlt1_1 (ParseError (testPappyPos d) []) where
    pappyAlt1_1 e1 =
      case testPappyselbri d of
        Parsed s d3 e3 ->
          case pappyResult5 of
            Parsed r d5 e5 ->
              Parsed ( SelbriRelativeClauses s r ) d5 (maximum [e5,e3,e1])
            NoParse e5 -> pappyAlt1_2 (maximum [e5,e3,e1])
          where
            pappyResult5 =
              case testPappyrelative_clauses d3 of
                Parsed v7 d7 e7 -> Parsed (Just v7) d7