rtk 0.11 → 0.12
raw patch · 37 files changed
+7557/−4651 lines, 37 filesdep ~HUnitdep ~basedep ~containersPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: HUnit, base, containers, directory, filepath, syb, template-haskell, time
API changes (from Hackage documentation)
- ASTAdapter: convertGrammar :: Grammar -> InitialGrammar
- ASTAdapter: parseWithGenerated :: String -> Either Diagnostic InitialGrammar
- ASTAdapter: scanTokensGenerated :: String -> Either Diagnostic [String]
- Debug: printInitialGrammar :: DebugOptions -> InitialGrammar -> IO ()
- Debug: traceRuleInitial :: DebugOptions -> String -> String -> InitialGrammar -> IO Bool
- Parser: happyIn20 :: t20 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
- Parser: happyIn21 :: t21 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
- Parser: happyOut20 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> t20
- Parser: happyOut21 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> t21
- Parser: happyReduce_38 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
- Parser: happyReduce_39 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
- Parser: happyReduction_38 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 (Maybe a)
- Parser: happyReduction_39 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 a t21 -> p -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 (Maybe a)
- Parser: idPos :: PosToken -> SourcePos
- Parser: idStr :: PosToken -> String
- Parser: isLeafClause :: IClause -> Bool
- Parser: mkAlt :: [IClause] -> IClause
- Parser: mkSeq :: [IClause] -> IClause
- Parser: unliftGroupElem :: IClause -> IClause
- Parser: unliftGroupLeaf :: IClause -> IClause
- Parser: unliftGroupOp :: IClause -> IClause
- Syntax: IAlt :: [IClause] -> IClause
- Syntax: IDot :: IClause
- Syntax: IId :: ID -> IClause
- Syntax: IIgnore :: IClause -> IClause
- Syntax: ILifted :: IClause -> IClause
- Syntax: IOpt :: IClause -> IClause
- Syntax: IPlus :: IClause -> Maybe IClause -> IClause
- Syntax: IRegExpLit :: String -> IClause
- Syntax: IRule :: Maybe String -> Maybe String -> String -> IClause -> [IOption] -> Maybe SourcePos -> IRule
- Syntax: ISeq :: [IClause] -> IClause
- Syntax: IStar :: IClause -> Maybe IClause -> IClause
- Syntax: IStrLit :: String -> IClause
- Syntax: InitialGrammar :: String -> String -> [IRule] -> InitialGrammar
- Syntax: OShortcuts :: [ID] -> IOption
- Syntax: OSymmacro :: IOption
- Syntax: [getIClause] :: IRule -> IClause
- Syntax: [getIDataFunc] :: IRule -> Maybe String
- Syntax: [getIDataTypeName] :: IRule -> Maybe String
- Syntax: [getIGrammarName] :: InitialGrammar -> String
- Syntax: [getIRuleName] :: IRule -> String
- Syntax: [getIRuleOptions] :: IRule -> [IOption]
- Syntax: [getIRulePos] :: IRule -> Maybe SourcePos
- Syntax: [getIRules] :: InitialGrammar -> [IRule]
- Syntax: [getIdStr] :: IClause -> ID
- Syntax: [getImports] :: InitialGrammar -> String
- Syntax: addRuleOptions :: [IOption] -> IRule -> IRule
- Syntax: data IClause
- Syntax: data IOption
- Syntax: data IRule
- Syntax: data InitialGrammar
- Syntax: instance Data.Data.Data Syntax.IClause
- Syntax: instance Data.Data.Data Syntax.IOption
- Syntax: instance Data.Data.Data Syntax.IRule
- Syntax: instance Data.Data.Data Syntax.InitialGrammar
- Syntax: instance GHC.Classes.Eq Syntax.IClause
- Syntax: instance GHC.Classes.Eq Syntax.IOption
- Syntax: instance GHC.Classes.Eq Syntax.IRule
- Syntax: instance GHC.Classes.Eq Syntax.InitialGrammar
- Syntax: instance GHC.Show.Show Syntax.IClause
- Syntax: instance GHC.Show.Show Syntax.IOption
- Syntax: instance GHC.Show.Show Syntax.IRule
- Syntax: instance GHC.Show.Show Syntax.InitialGrammar
- Syntax: showClause :: IClause -> String
- Syntax: showDelim :: Maybe IClause -> String
+ Debug: printParsedGrammar :: DebugOptions -> Grammar -> IO ()
+ Debug: traceRuleParsed :: DebugOptions -> String -> String -> Grammar -> IO Bool
+ DebugOptions: [debugPpSpec] :: DebugOptions -> Bool
+ DebugOptions: [generatePp] :: DebugOptions -> Bool
+ DebugOptions: [ppLayoutBlock] :: DebugOptions -> Bool
+ Frontend: altElems :: Clause -> [Clause]
+ Frontend: clausePos :: Clause -> Maybe SourcePos
+ Frontend: cleanGrammarTokens :: Grammar -> Grammar
+ Frontend: grammarImports :: Grammar -> String
+ Frontend: grammarName :: Grammar -> String
+ Frontend: grammarRules :: Grammar -> [Rule]
+ Frontend: mapGrammarRules :: ([Rule] -> [Rule]) -> Grammar -> Grammar
+ Frontend: namePos :: Name -> Maybe SourcePos
+ Frontend: nameText :: Name -> String
+ Frontend: parseWithGenerated :: String -> Either Diagnostic Grammar
+ Frontend: ruleClause :: Rule -> Clause
+ Frontend: ruleFunc :: Rule -> Maybe String
+ Frontend: ruleName :: Rule -> String
+ Frontend: ruleOptions :: Rule -> [Option]
+ Frontend: rulePos :: Rule -> Maybe SourcePos
+ Frontend: ruleTypeName :: Rule -> Maybe String
+ Frontend: scanTokensGenerated :: String -> Either Diagnostic [String]
+ Frontend: seqElems :: Clause -> [Clause]
+ Frontend: showClause :: Clause -> String
+ Frontend: showClauseSeq :: [Clause] -> String
+ Frontend: sourcePosOf :: RtkPos -> Maybe SourcePos
+ Frontend: strLitText :: StrLit -> String
+ GenAST: findRuleDataTypeName :: RulesMap -> String -> ID -> Either Diagnostic ID
+ GenAST: needGenereateAlt :: STSeq -> Bool
+ GenAST: normalRulesNamed :: [SyntaxRuleGroup] -> [(ID, SyntaxTopClause)]
+ GenAST: rulesMap :: NormalGrammar -> RulesMap
+ GenAST: type RulesMap = Map ID ID
+ GenPP: PPBlock :: PPLayout
+ GenPP: PPFlat :: PPLayout
+ GenPP: data PPLayout
+ GenPP: genPP :: PPLayout -> NormalGrammar -> Either Diagnostic String
+ GenPP: instance GHC.Classes.Eq GenPP.PPLayout
+ GenPP: instance GHC.Show.Show GenPP.PPLayout
+ Grammar: literalTokenText :: LClause -> Maybe String
+ Parser: bigStrText :: PosToken -> String
+ Parser: mkMany :: (RtkPos -> Clause -> Clause) -> (RtkPos -> Clause -> Clause -> Clause) -> Clause -> Maybe Clause -> Clause
+ Parser: mkName :: PosToken -> Name
+ Parser: mkRule :: [Option] -> Rule -> Rule
+ Parser: mkStr :: PosToken -> StrLit
+ Parser: posOf :: PosToken -> RtkPos
+ Parser: rexText :: PosToken -> String
- Debug: showGrammarStats :: DebugOptions -> InitialGrammar -> NormalGrammar -> IO ()
+ Debug: showGrammarStats :: DebugOptions -> Grammar -> NormalGrammar -> IO ()
- DebugOptions: DebugOptions :: FilePath -> FilePath -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Maybe String -> Maybe DebugStage -> Bool -> Bool -> Bool -> Bool -> Maybe String -> Bool -> Bool -> DebugOptions
+ DebugOptions: DebugOptions :: FilePath -> FilePath -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Maybe String -> Maybe DebugStage -> Bool -> Bool -> Bool -> Bool -> Maybe String -> Bool -> Bool -> DebugOptions
- Normalize: normalizeTopLevelClauses :: InitialGrammar -> Either Diagnostic NormalGrammar
+ Normalize: normalizeTopLevelClauses :: Grammar -> Either Diagnostic NormalGrammar
- Parser: HappyAbsSyn :: HappyAny -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: HappyAbsSyn :: HappyAny -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyDoAction :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyDoAction :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyDoParse :: Happy_Int -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyDoParse :: Happy_Int -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyFail :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyFail :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyFixupFailed :: PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyFixupFailed :: PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyGoto :: Int# -> Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyGoto :: Int# -> Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyIn10 :: t10 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: happyIn10 :: t10 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyIn11 :: t11 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: happyIn11 :: t11 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyIn12 :: t12 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: happyIn12 :: t12 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyIn13 :: t13 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: happyIn13 :: t13 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyIn14 :: t14 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: happyIn14 :: t14 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyIn15 :: t15 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: happyIn15 :: t15 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyIn16 :: t16 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: happyIn16 :: t16 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyIn17 :: t17 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: happyIn17 :: t17 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyIn18 :: t18 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: happyIn18 :: t18 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyIn19 :: t19 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: happyIn19 :: t19 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyIn5 :: t5 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: happyIn5 :: t5 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyIn6 :: t6 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: happyIn6 :: t6 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyIn7 :: t7 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: happyIn7 :: t7 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyIn8 :: t8 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: happyIn8 :: t8 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyIn9 :: t9 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: happyIn9 :: t9 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyInTok :: PosToken -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: happyInTok :: PosToken -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyMonad2Reduce :: Int# -> Int# -> (HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> t -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))) -> Happy_Int -> t -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyMonad2Reduce :: Int# -> Int# -> (HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> t -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))) -> Happy_Int -> t -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyMonadReduce :: Int# -> Int# -> (HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> PosToken -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))) -> Happy_Int -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyMonadReduce :: Int# -> Int# -> (HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> PosToken -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))) -> Happy_Int -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyNewToken :: Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyNewToken :: Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyOut10 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> t10
+ Parser: happyOut10 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> t10
- Parser: happyOut11 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> t11
+ Parser: happyOut11 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> t11
- Parser: happyOut12 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> t12
+ Parser: happyOut12 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> t12
- Parser: happyOut13 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> t13
+ Parser: happyOut13 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> t13
- Parser: happyOut14 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> t14
+ Parser: happyOut14 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> t14
- Parser: happyOut15 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> t15
+ Parser: happyOut15 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> t15
- Parser: happyOut16 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> t16
+ Parser: happyOut16 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> t16
- Parser: happyOut17 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> t17
+ Parser: happyOut17 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> t17
- Parser: happyOut18 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> t18
+ Parser: happyOut18 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> t18
- Parser: happyOut19 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> t19
+ Parser: happyOut19 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> t19
- Parser: happyOut5 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> t5
+ Parser: happyOut5 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> t5
- Parser: happyOut6 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> t6
+ Parser: happyOut6 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> t6
- Parser: happyOut7 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> t7
+ Parser: happyOut7 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> t7
- Parser: happyOut8 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> t8
+ Parser: happyOut8 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> t8
- Parser: happyOut9 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> t9
+ Parser: happyOut9 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> t9
- Parser: happyOutTok :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> PosToken
+ Parser: happyOutTok :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> PosToken
- Parser: happyReduce :: Int# -> Int# -> (HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))) -> Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce :: Int# -> Int# -> (HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))) -> Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduceArr :: Array Int (Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)))
+ Parser: happyReduceArr :: Array Int (Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)))
- Parser: happyReduce_1 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_1 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_10 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_10 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_11 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_11 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_12 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_12 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_13 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_13 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_14 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_14 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_15 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_15 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_16 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_16 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_17 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_17 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_18 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_18 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_19 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_19 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_2 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_2 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_20 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_20 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_21 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_21 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_22 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_22 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_23 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_23 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_24 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_24 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_25 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_25 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_26 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_26 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_27 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_27 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_28 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_28 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_29 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_29 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_3 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_3 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_30 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_30 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_31 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_31 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_32 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_32 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_33 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_33 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_34 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_34 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_35 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_35 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_36 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_36 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_37 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_37 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_4 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_4 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_5 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_5 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_6 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_6 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_7 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_7 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_8 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_8 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduce_9 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyReduce_9 :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyReduction_1 :: HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21) -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21)
+ Parser: happyReduction_1 :: HappyStk (HappyAbsSyn Grammar [Rule] t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19) -> HappyStk (HappyAbsSyn Grammar [Rule] t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19)
- Parser: happyReduction_10 :: HappyStk (HappyAbsSyn t5 t6 t7 t8 t9 IOption [ID] t12 t13 t14 t15 t16 t17 t18 t19 t20 t21) -> HappyStk (HappyAbsSyn t5 t6 t7 t8 t9 IOption [ID] t12 t13 t14 t15 t16 t17 t18 t19 t20 t21)
+ Parser: happyReduction_10 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 [a] t12 t13 t14 t15 t16 t17 t18 t19 -> HappyAbsSyn t5 t6 t7 t8 t9 [a] t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyReduction_11 :: p -> HappyAbsSyn t5 t6 t7 t8 t9 IOption t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: happyReduction_11 :: HappyAbsSyn t5 t6 t7 t8 t9 [a] t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyReduction_12 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t11 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: happyReduction_12 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> p -> HappyAbsSyn t5 t6 t7 t8 t9 t10 [Name] t12 t13 t14 t15 t16 t17 t18 t19 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 [Name] t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyReduction_13 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 [a] t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: happyReduction_13 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 [Name] t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyReduction_14 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> p -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 [String] t13 t14 t15 t16 t17 t18 t19 t20 t21 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 [String] t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: happyReduction_14 :: HappyStk (HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 Rule Clause t14 t15 t16 t17 t18 t19) -> HappyStk (HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 Rule Clause t14 t15 t16 t17 t18 t19)
- Parser: happyReduction_15 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 [String] t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: happyReduction_15 :: HappyStk (HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 Rule Clause t14 t15 t16 t17 t18 t19) -> HappyStk (HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 Rule Clause t14 t15 t16 t17 t18 t19)
- Parser: happyReduction_16 :: HappyStk (HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 IRule IClause t15 t16 t17 t18 t19 t20 t21) -> HappyStk (HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 IRule IClause t15 t16 t17 t18 t19 t20 t21)
+ Parser: happyReduction_16 :: HappyStk (HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 Rule Clause t14 t15 t16 t17 t18 t19) -> HappyStk (HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 Rule Clause t14 t15 t16 t17 t18 t19)
- Parser: happyReduction_17 :: HappyStk (HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 IRule IClause t15 t16 t17 t18 t19 t20 t21) -> HappyStk (HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 IRule IClause t15 t16 t17 t18 t19 t20 t21)
+ Parser: happyReduction_17 :: HappyStk (HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 Rule Clause t14 t15 t16 t17 t18 t19) -> HappyStk (HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 Rule Clause t14 t15 t16 t17 t18 t19)
- Parser: happyReduction_18 :: HappyStk (HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 IRule IClause t15 t16 t17 t18 t19 t20 t21) -> HappyStk (HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 IRule IClause t15 t16 t17 t18 t19 t20 t21)
+ Parser: happyReduction_18 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 Clause t15 t16 t17 t18 t19 -> p -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 Clause t14 t15 t16 t17 t18 t19 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 Clause t14 t15 t16 t17 t18 t19
- Parser: happyReduction_19 :: HappyStk (HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 IRule IClause t15 t16 t17 t18 t19 t20 t21) -> HappyStk (HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 IRule IClause t15 t16 t17 t18 t19 t20 t21)
+ Parser: happyReduction_19 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t13 t15 t16 t17 t18 t19 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyReduction_2 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> p -> HappyAbsSyn t5 String t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: happyReduction_2 :: HappyStk (HappyAbsSyn Grammar [Rule] t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19) -> HappyStk (HappyAbsSyn Grammar [Rule] t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19)
- Parser: happyReduction_20 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 [IClause] t16 t17 t18 t19 t20 t21 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 IClause t15 t16 t17 t18 t19 t20 t21
+ Parser: happyReduction_20 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 Clause t16 t17 t18 t19 -> p -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 Clause t15 t16 t17 t18 t19
- Parser: happyReduction_21 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 a t17 t18 t19 t20 t21 -> p -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 [a] t16 t17 t18 t19 t20 t21 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 [a] t16 t17 t18 t19 t20 t21
+ Parser: happyReduction_21 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t14 t16 t17 t18 t19 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyReduction_22 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 a t17 t18 t19 t20 t21 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 [a] t16 t17 t18 t19 t20 t21
+ Parser: happyReduction_22 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 Clause t17 t18 t19 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 Clause t16 t17 t18 t19 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 Clause t16 t17 t18 t19
- Parser: happyReduction_23 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 [IClause] t18 t19 t20 t21 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 IClause t17 t18 t19 t20 t21
+ Parser: happyReduction_23 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t15 t17 t18 t19 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyReduction_24 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 a t19 t20 t21 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 [a] t18 t19 t20 t21 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 [a] t18 t19 t20 t21
+ Parser: happyReduction_24 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 Clause t18 t19 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 Clause t17 t18 t19
- Parser: happyReduction_25 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 a t19 t20 t21 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 [a] t18 t19 t20 t21
+ Parser: happyReduction_25 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 Clause t18 t19 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 Clause t17 t18 t19
- Parser: happyReduction_26 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 IClause t20 t21 -> p -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 IClause t19 t20 t21
+ Parser: happyReduction_26 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t16 t18 t19 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyReduction_27 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 IClause t20 t21 -> p -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 IClause t19 t20 t21
+ Parser: happyReduction_27 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 (Maybe Clause) -> p -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 Clause t19 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 Clause t18 t19
- Parser: happyReduction_28 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 IClause t20 t21 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 IClause t19 t20 t21
+ Parser: happyReduction_28 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 (Maybe Clause) -> p -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 Clause t19 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 Clause t18 t19
- Parser: happyReduction_29 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 (Maybe IClause) -> p -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 IClause t21 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 IClause t20 t21
+ Parser: happyReduction_29 :: p -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 Clause t19 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 Clause t18 t19
- Parser: happyReduction_3 :: HappyAbsSyn t5 String t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: happyReduction_3 :: HappyAbsSyn t5 t6 a t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> HappyAbsSyn t5 [a] t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> HappyAbsSyn t5 [a] t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyReduction_30 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 (Maybe IClause) -> p -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 IClause t21 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 IClause t20 t21
+ Parser: happyReduction_30 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t17 t19 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyReduction_31 :: p -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 IClause t21 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 IClause t20 t21
+ Parser: happyReduction_31 :: p -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t18 t14 t15 t16 t17 t18 t19 -> p -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyReduction_32 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t19 t21 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: happyReduction_32 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 Clause t19
- Parser: happyReduction_33 :: p -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 IClause t15 t16 t17 t18 t19 t20 t21 -> p -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 IClause t21
+ Parser: happyReduction_33 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 Clause t19
- Parser: happyReduction_34 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 IClause t21
+ Parser: happyReduction_34 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 Clause t19
- Parser: happyReduction_35 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 IClause t21
+ Parser: happyReduction_35 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 Clause t19
- Parser: happyReduction_36 :: p -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 IClause t21
+ Parser: happyReduction_36 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 (Maybe a)
- Parser: happyReduction_37 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 IClause t21
+ Parser: happyReduction_37 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 a t19 -> p -> HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 (Maybe a)
- Parser: happyReduction_4 :: HappyAbsSyn t5 t6 t7 a t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> HappyAbsSyn t5 t6 [a] t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: happyReduction_4 :: HappyAbsSyn t5 [a] t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyReduction_5 :: HappyAbsSyn t5 t6 t7 a t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> HappyAbsSyn t5 t6 [a] t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> HappyAbsSyn t5 t6 [a] t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: happyReduction_5 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 Rule t13 t14 t15 t16 t17 t18 t19 -> HappyAbsSyn t5 t6 t7 [Option] t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> HappyAbsSyn t5 t6 Rule t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyReduction_6 :: HappyAbsSyn t5 t6 [a] t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: happyReduction_6 :: HappyAbsSyn t5 t6 t7 t8 a t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> HappyAbsSyn t5 t6 t7 [a] t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> HappyAbsSyn t5 t6 t7 [a] t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyReduction_7 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 IRule t14 t15 t16 t17 t18 t19 t20 t21 -> HappyAbsSyn t5 t6 t7 t8 [IOption] t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> HappyAbsSyn t5 t6 t7 IRule t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: happyReduction_7 :: HappyAbsSyn t5 t6 t7 [a] t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyReduction_8 :: HappyAbsSyn t5 t6 t7 t8 t9 a t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> HappyAbsSyn t5 t6 t7 t8 [a] t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 -> HappyAbsSyn t5 t6 t7 t8 [a] t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: happyReduction_8 :: HappyStk (HappyAbsSyn t5 t6 t7 t8 Option IdList t11 t12 t13 t14 t15 t16 t17 t18 t19) -> HappyStk (HappyAbsSyn t5 t6 t7 t8 Option IdList t11 t12 t13 t14 t15 t16 t17 t18 t19)
- Parser: happyReduction_9 :: HappyAbsSyn t5 t6 t7 t8 [a] t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: happyReduction_9 :: HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 -> HappyAbsSyn t5 t6 t7 t8 Option t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: happyResume :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyResume :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyShift :: Happy_Int -> Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyShift :: Happy_Int -> Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happySpecReduce_0 :: Int# -> HappyAbsSyn InitialGrammar String [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause) -> Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happySpecReduce_0 :: Int# -> HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause) -> Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happySpecReduce_1 :: Int# -> (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause) -> HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happySpecReduce_1 :: Int# -> (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause) -> HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happySpecReduce_2 :: Int# -> (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause) -> HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause) -> HappyAbsSyn InitialGrammar String [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happySpecReduce_2 :: Int# -> (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause) -> HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause) -> HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happySpecReduce_3 :: Int# -> (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause) -> HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause) -> HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [String] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause) -> HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [String] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happySpecReduce_3 :: Int# -> (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause) -> HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause) -> HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause) -> HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: happyTryFixup :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn InitialGrammar [Char] [IRule] IRule [IOption] IOption [ID] [ID] IRule IClause [IClause] IClause [IClause] IClause IClause IClause (Maybe IClause))
+ Parser: happyTryFixup :: Int# -> PosToken -> Happy_Int -> Happy_IntList -> HappyStk (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause)) -> [PosToken] -> Either Diagnostic (HappyAbsSyn Grammar [Rule] Rule [Option] Option IdList [Name] Rule Clause Clause Clause Clause Clause Clause (Maybe Clause))
- Parser: newtype HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+ Parser: newtype HappyAbsSyn t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19
- Parser: parse :: [PosToken] -> Either Diagnostic InitialGrammar
+ Parser: parse :: [PosToken] -> Either Diagnostic Grammar
- StringLiterals: normalizeStringLiterals :: InitialGrammar -> InitialGrammar
+ StringLiterals: normalizeStringLiterals :: Grammar -> Grammar
- Syntax: type LClause = IClause
+ Syntax: type LClause = Clause
Files
- CHANGELOG.md +226/−3
- Debug.hs +50/−48
- DebugOptions.hs +28/−0
- GenAST.hs +13/−1
- GenPP.hs +461/−0
- GenX.hs +79/−38
- GenY.hs +1/−2
- Grammar.hs +14/−0
- Lexer.x +11/−4
- Normalize.hs +426/−276
- Parser.y +88/−105
- README.md +60/−0
- StringLiterals.hs +48/−18
- Syntax.hs +18/−58
- TokenProcessing.hs +19/−17
- app/main.hs +32/−8
- rtk.cabal +44/−21
- src/generated/ASTAdapter.hs +0/−167
- src/generated/Frontend.hs +260/−0
- test-grammars/block.pg +35/−0
- test-grammars/grammar.pg +55/−31
- test-grammars/java.pg +282/−56
- test/GoldenTests.hs +3/−2
- test/TestSupport.hs +36/−15
- test/UnitTests.hs +316/−36
- test/golden/block/BlockLexer.x +118/−0
- test/golden/block/BlockPP.hs +86/−0
- test/golden/block/BlockParser.y +254/−0
- test/golden/block/BlockQQ.hs +205/−0
- test/golden/grammar/GrammarLexer.x +26/−33
- test/golden/grammar/GrammarParser.y +125/−167
- test/golden/grammar/GrammarQQ.hs +21/−51
- test/golden/java/JavaLexer.x +354/−304
- test/golden/java/JavaParser.y +3308/−2947
- test/golden/java/JavaQQ.hs +398/−243
- test/golden/p/PPP.hs +45/−0
- test/golden/sandbox/SandboxPP.hs +12/−0
CHANGELOG.md view
@@ -5,8 +5,220 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased]+## [0.12] - 2026-07-02 +### Changed+- Widened GHC support: the boot-library bounds now span GHC 9.4 through 9.14+ (`base < 4.23`, `template-haskell < 2.25`, `containers < 0.9`,+ `time < 1.16`). The endpoints are CI-tested — the pinned 9.4.7 toolchain+ runs the full battery and the newest-GHC canary builds `-Werror` and runs+ the cabal suites on 9.14.1. 0.11 capped `base` at 4.19 (GHC 9.6), which+ made the package uninstallable on current compilers and failed Hackage's+ own doc builder (GHC 9.8). Version bounds are now also stated once per+ dependency instead of repeated across components, per Hackage guidance —+ the executable's own stale `base < 4.19` copy is exactly the drift this+ prevents++### Added+- Block layout for generated pretty-printers (task 9b), the "pretty" layer on+ top of 9a's correct-not-pretty printer. `rtk --generate-pp --pp-layout=block`+ emits a `<Name>PP.hs` that indents and line-breaks bracket-structured+ languages so the output reads like hand-written source; `--pp-layout=flat`+ (the default) keeps 9a's one-line-per-construct output byte-for-byte.+ Indentation is derived purely structurally from *block lists* — statement /+ declaration lists (an `STMany` with no separator over a statement-shaped+ element, or a `;`-separated list) — which wrap their elements in an+ indented, line-broken block. The flanking delimiters (`{` `}` for C/Java,+ `begin` `end` for PL/0) need no special handling and there is no bracket+ charset baked into rtk: they render inline and the list supplies the indent,+ so a grammar with no block lists simply degrades to flat. The generated+ module stays dependency-free (it carries an in-module ~20-line layout+ engine; no `pretty`/`prettyprinter` pulled into users' code).++ Correctness is inherited and unbreakable: layout is whitespace, every corpus+ grammar ignores whitespace, so block layout cannot change the parse —+ `parse (print ast) == ast` holds by construction. The round-trip test+ (`make test-pp`) gains block-mode cases (a small bracket grammar `block.pg`+ and the c-compiler tutorial `c.pg`) that stay green, and `block.pg` opts into+ a block-mode PP golden (`test/golden/block/BlockPP.hs`, gated through+ `TestSupport.ppGoldenGrammars`) so the indented output is pinned and+ reviewable. A forward guard (`GenPP.layoutSensitive`, `TODO(#95)`) falls back+ to flat should a layout-sensitive (offside) lexer ever land (task 12); it is+ a no-op today.++ Honest scope — this is heuristic readability for bracket/terminator+ languages, not universal beauty. `c.pg` and `block.pg` read idiomatically;+ PL/0 reads well bar a minor wart (its top-level `procedure` list, being a+ no-separator block list, indents one level); Java's statement/class bodies+ indent correctly but its top-level preamble (package/import/type decls,+ which are not a single broken list) runs together and multi-line doc-comment+ tokens disturb the indentation, so Java is best left on flat for now. All of+ these still round-trip green in block mode — only quality varies, never+ correctness. Alignment, operator-aware wrapping and configurable width are+ explicitly out of scope (later opt-in layers).+- Pretty-printer generation (task 9), the "emit" third of "Rewrite ToolKit".+ `rtk --generate-pp <grammar> <out>` emits an opt-in fifth artifact+ `<Name>PP.hs`: a module of `pp<Type>` functions that turn the AST RTK+ generates for a grammar back into source text. `--debug-pp-spec` dumps the+ printer to stdout. The generated module depends only on `base` (it imports+ its grammar's `<Name>Parser` AST and `Data.List`) — no rtk imports, no new+ packages, the same dependency discipline as the generated lexer/parser/+ quasi-quoter. The flag is off by default, so the default invocation is+ byte-for-byte unchanged and non-users see zero golden churn.++ v1 is correctness-first, not pretty: exactly one space between tokens, no+ indentation or alignment, and parenthesization is whatever the grammar's+ own structure produces (no precedence/paren-insertion engine). The single+ guarantee is the semantic round-trip `parse (print ast) == ast` — NOT+ byte-faithful reproduction; comments and the original whitespace are lost+ (the AST is lossy). That guarantee is enforced by a generated round-trip+ test over a corpus (`make test-pp`, wired into CI): it parses each fragment,+ prints, reparses, and asserts equality. 7b's position-transparent `RtkPos`+ makes the reparsed AST (different source positions) compare `==` to the+ original with no stripping, so under-parenthesization or a dropped token+ becomes a failing test rather than a silently wrong program. The grammars+ `p` and `sandbox` opt in to a PP golden snapshot (`<Name>PP.hs` in+ `test/golden/`, gated through `TestSupport.ppGoldenGrammars` and compiled+ by `make test-compile-goldens`); every other grammar stays opted out.++ Dogfooding capstone: the printer RTK generates for its own grammar language+ (`grammar.pg`) compiles and round-trips representative grammar ASTs — string+ literals, regexes, typed/func/lifted rules, repetition/option/delimiter+ forms and an imports block — so **RTK prints its own language**. Known v1+ limitation: `grammar.pg`'s *own source* does not fully round-trip, because+ its `str`/`regexplit`/`bigstr` rules use repetition over an+ un-parenthesized alternation (e.g. `([^\\'] | backslash .)*`), which a+ structural printer without a paren engine re-associates on reparse. This is+ precisely the under-parenthesization the round-trip oracle is built to+ catch; auto-parenthesization is a deliberately separate later task.++ Supersedes #84 (predated the 8a–8c AST migration and pursued a "smart"+ layout-hint design out of scope for the correctness-first v1).++### Changed+- The pipeline computes directly over the generated AST (task 8c): the+ historic `InitialGrammar`/`IRule`/`IClause` types — the hand-written+ parsed-grammar representation dating back to the original `Parser.y` —+ are retired. String-literal normalization, clause normalization and the+ lexical-clause translation in GenX now consume `GrammarParser`'s+ `Grammar`/`Rule`/`Clause` (compiled from the `test/golden/grammar/`+ snapshot), the same types the compiled-in `GrammarQQ` quotes produce, so+ normalization-level rewrites can be expressed as quasi-quoted patterns+ (task 8d). The hand-written reference front end stays as the equivalence+ oracle: `Parser.y`'s actions construct generated-AST values (same+ constructors, spines and first-symbol positions), and the AST-equality+ suite now also projects and compares the position of every node, since+ `RtkPos` is equality-transparent. The `ASTAdapter` conversion layer is+ replaced by `src/generated/Frontend.hs` (parse entry points, generated-AST+ helpers, and the now-shared token-text cleanup: both lexers keep raw token+ text and a single `cleanGrammarTokens` pass strips delimiters and+ processes escapes after parsing). Generated artifacts are byte-identical+ for every corpus grammar. The bootstrap coupling is now structural — a+ grammar.pg change that reshapes the AST breaks the in-tree build until the+ snapshot is re-accepted and the pipeline's matches are fixed; see+ "Changing the grammar language" in BOOTSTRAP.md+- Normalization diagnostics point at the offending CLAUSE instead of the+ rule header: the generated AST carries a source position on every node,+ so errors like "a lifted (,) clause cannot be mixed with other clauses",+ "repetition over the lexical rule ...", and the constructor-label checks+ (case, reserved prefixes, duplicates — including the "first used at"+ cross-reference) now report the line and column of the clause or label+ itself, still with the rule named as context++### Added+- Rewrites as quasi-quoted patterns (task 8d) — the headline: the "rewrite+ toolkit" finally means it. Every generated `<Name>QQ` now comes with a+ documented, tested rewrite recipe ("Rewriting parsed Java" in+ docs/java-quasi-quotation-tests.md, exercised by `make+ test-java-rewrite`): a rewrite is an ordinary function whose match arms+ are quasi-quoted patterns and whose results are quasi-quoted+ expressions, applied to every node of any AST value with SYB's+ `everywhere`/`extT` — the packages generated code already depends on, so+ there is no new API surface and no change to generated artifacts. The+ same patterns drive queries via `everything`/`mkQ`. rtk eats this+ cooking: its own pipeline now matches clause shapes with its own+ compiled-in quoter — `Frontend.altElems`/`seqElems` flatten the `'|'`+ and juxtaposition spines by matching `[clause| $cl1 | $cl2 |]` /+ `[clause| $cl1 $cl2 |]`, `StringLiterals` picks string literals out of+ syntax rules with `[clause| $StrLit:s |]`, and `Normalize`'s+ repetition/option shaping matches `[clause| $cl1 * ~ $cl2 |]`-style+ patterns — each conversion landed golden-neutral (artifacts+ byte-identical, bootstrap fixed point intact). Steps where the+ constructor spelling reads better (wildcard tests, scalar-`Name`+ binders, state-threading plumbing) deliberately stay plain; the+ conversion record and the discovered pattern-matching boundaries live+ in docs/qq-grammar-rewrites-plan.md §8d+- Named constructors (task 8a): an alternative may carry a leading label —+ `Expr = Add: Expr '+' Term | Term ;` — that names its generated AST+ constructor (`Add RtkPos Expr Term`) instead of the positional+ `Ctr__<Rule>__<index>` default, so code and quasi-quote patterns written+ against generated ASTs survive alternative reordering and insertion. The+ label binds tighter than `|`, scopes over one alternative's sequence, and+ works inside parenthesized groups (naming the extracted group's+ constructor, including under repetition through the list-proxy+ machinery). Unlabeled alternatives keep today's generated names+ byte-for-byte. Misuse is rejected with positioned diagnostics: names+ must start uppercase, the generated-name prefixes `Ctr__`/`Anti_` are+ reserved, explicit names must be unique across the whole grammar (all+ constructors share one generated Haskell module, and the shared-type+ constructor deduplication in GenAST would otherwise silently merge+ duplicates), and lifted (`,Rule`) alternatives — which produce no+ constructor — cannot be named, nor can anything in a lexical rule.+ Surface syntax chosen over a trailing `@ctor(Name)` annotation after+ proving LALR feasibility: the labeled grammar.pg's generated parser has+ 0 happy conflicts (as before) and the reference `Parser.y` keeps exactly+ its 4 pre-existing state-6 reduce/reduce conflicts+- The generated quasi-quoter for RTK's own grammar language (`GrammarQQ`) is+ compiled into rtk, beside `GrammarLexer`/`GrammarParser` in the snapshot+ front-end component — possible since 0.11 made generated quasi-quoters+ dependency-light (`template-haskell`, a GHC boot library, is the only+ dependency the quasi-quoter adds). Grammar fragments can now be quoted+ in-tree, and the unit suite smoke-tests it: `[clause| Name * |]` parses at+ rtk's own compile time, `$cl`-style metavariables splice and bind through+ the `Anti_*` constructors in both expression and pattern context. The+ quotes produce the generated AST types, not the pipeline's+ `InitialGrammar`; migrating the pipeline onto the generated AST so+ normalization rewrites can be quasi-quoted is the follow-up (tasks 8c/8d+ in docs/qq-grammar-rewrites-plan.md)+- PL/0 compiler tutorial (`tutorials/pl0-compiler/`): the language of Brian+ Callahan's "Let's write a compiler" tutorial series, at the series'+ parts 1-3 ("validator") milestone. Baseline Wirth PL/0 — empty statements+ via `StatementOpt`, unary signs, `{ ... }` comments — generated from+ `pl0.pg` into a conflict-free Happy parser that is byte-identical under+ both front ends. Ships a validator driver (`Main.hs`), a valid/invalid+ test corpus with positioned-diagnostic checks (`run_tests.sh`), and a+ quasi-quotation test suite (`TestQQ.hs`) exercising construction,+ splicing, pattern matching with metavariables (a miniature PL/0 → C code+ generator) and SYB-based AST rewrite rules; wired into CI via+ `make -C tutorials/pl0-compiler test`+- Lisp interpreter tutorial (`tutorials/lisp-interpreter/`): Peter+ Norvig's lis.py ported to RTK — the reader is generated from a 15-line+ grammar (`scheme.pg`), and the interpreter's special-form dispatch and+ macro expansion (`let`, `when`, `unless`, `and`, `or`) are written as+ quasi-quotation patterns; `make -C tutorials/lisp-interpreter test`+ (wired into CI) runs Norvig's own test cases plus the examples, and the+ tutorial's README is a section-by-section walkthrough against the+ original essay++### Changed+- grammar.pg names every constructor-producing alternative (`RuleSimple`,+ `Star`, `Labeled`, `Ref`, ...), so the generated grammar front end's AST+ reads like prose and `src/generated/ASTAdapter.hs` no longer references+ any positional `Ctr__*` constructor — the ergonomics prerequisite for+ retiring `InitialGrammar` (task 8c). The two `?`-rules whose+ empty/present alternatives are synthesized (and therefore unnameable) —+ `ImportsOpt` and `OptDelim` — are restructured away: the imports block is+ inlined into `Grammar`'s two alternatives (`GrammarDef`/`GrammarImports`)+ and the `~` delimiter into `Star`/`StarDelim`/`Plus`/`PlusDelim`. The+ accepted language is unchanged; only grammar.pg's own AST shape moved++### Fixed+- The reference lexer (`Lexer.x`) now accepts underscores in identifiers,+ as grammar.pg's `id = [a-zA-Z][A-Za-z0-9_]*` has always specified; it+ used to stop at the first `_` with a lexical error while the generated+ (default) front end accepted the name — an invisible front-end+ divergence until label names like `Mk_1` exercised it+ ## [0.11] - 2026-06-12 Highlights: RTK is now self-hosting by default — grammar files are parsed@@ -47,8 +259,8 @@ `<Name>Lexer.x`/`<Name>Parser.y` pair and typechecks the result with `ghc -fno-code`. The golden suite diffs text only and sat green while the debug-test and t1 snapshots did not compile; the gate closes that- test-architecture hole (QQ goldens join once the regex-posix dependency- is dropped, task 8b)+ test-architecture hole (the `<Name>QQ.hs` goldens are gated too, since+ generated quasi-quoters dropped their regex dependency — see Fixed) - Source positions in generated ASTs: every constructor that generated parsers build (except the quasi-quotation-only `Anti_*` splice constructors) now stores the position of its alternative's first symbol@@ -288,6 +500,17 @@ declaration context compiled into nonsense. Both now `fail` in `TH.Q`, making the misuse a GHC compile error at the splice site ("this quasi-quoter cannot be used in a type/declaration context")+- A `$name` metavariable at the end of a line (or of the whole quote body)+ silently stayed unrewritten, failing with a confusing parse error at the+ `$`: the generated quasi-quoter's metavariable scan used regex-posix,+ whose default newline option made the terminator class never match `\n`.+ The scan is now a plain character function with the documented semantics+ preserved (`$$` escapes, explicit `$Type:name` passthrough, the+ unknown-metavariable error). Generated QQ modules consequently import no+ regex packages at all — `regex-posix`/`regex-base` (which were never+ declared rtk dependencies and compiled only as transitive flukes) are+ gone from every user's generated-code dependency footprint, and the+ README/cabal generated-code dependency lists shrank accordingly - Writing into a missing output directory no longer escapes as a raw `IOException`: `rtk g.pg /tmp/does/not/exist` now creates the directory and succeeds; IO failures that remain (no permission, a file where the
Debug.hs view
@@ -6,14 +6,14 @@ -- * Pipeline stage debugging , printTokens- , printInitialGrammar+ , printParsedGrammar , printNormalGrammar , printComparison -- * Single-rule pipeline trace , traceRuleTokens , traceRuleTokensUnavailable- , traceRuleInitial+ , traceRuleParsed , traceRuleNormal -- * Statistics and analysis@@ -40,10 +40,12 @@ , Color(..) ) where +import qualified GrammarParser as GP import qualified Lexer as L import Syntax import DebugOptions import Diagnostics (showSourcePos)+import Frontend (grammarName, grammarRules, rulePos, ruleName, ruleTypeName) import Text.Show.Pretty (ppShow) import Control.Monad (when) import Data.Char (toLower)@@ -118,12 +120,12 @@ putStrLn "" putStrLn $ ppShow tokens --- | Debug initial grammar (after parsing)-printInitialGrammar :: DebugOptions -> InitialGrammar -> IO ()-printInitialGrammar opts grammar = do- debugSection opts "PARSER OUTPUT - INITIAL GRAMMAR"- putStrLn $ "Grammar name: " ++ getIGrammarName grammar- putStrLn $ "Number of rules: " ++ show (length $ getIRules grammar)+-- | Debug the parsed grammar (the generated AST, after parsing)+printParsedGrammar :: DebugOptions -> GP.Grammar -> IO ()+printParsedGrammar opts grammar = do+ debugSection opts "PARSER OUTPUT - PARSED GRAMMAR"+ putStrLn $ "Grammar name: " ++ grammarName grammar+ putStrLn $ "Number of rules: " ++ show (length $ grammarRules grammar) putStrLn "" putStrLn $ ppShow grammar @@ -158,19 +160,19 @@ -- | Header shared by all stages of a rule trace traceSection :: DebugOptions -> String -> String -> IO ()-traceSection opts ruleName stage =- debugSection opts $ "RULE TRACE: '" ++ ruleName ++ "' - " ++ stage+traceSection opts targetRule stage =+ debugSection opts $ "RULE TRACE: '" ++ targetRule ++ "' - " ++ stage -- | Token-stage view of a rule trace: every place the rule name is mentioned -- in the source, as Id tokens with their positions. Returns whether the rule -- was found at this stage. traceRuleTokens :: DebugOptions -> String -> [L.PosToken] -> IO Bool-traceRuleTokens opts ruleName tokens = do- traceSection opts ruleName "Tokens"- let mentions = [pos | L.PosToken pos (L.Id name) <- tokens, name == ruleName]+traceRuleTokens opts targetRule tokens = do+ traceSection opts targetRule "Tokens"+ let mentions = [pos | L.PosToken pos (L.Id name) <- tokens, name == targetRule] if null mentions then do- reportNotFoundAtStage opts ruleName [n | L.PosToken _ (L.Id n) <- tokens]+ reportNotFoundAtStage opts targetRule [n | L.PosToken _ (L.Id n) <- tokens] return False else do putStrLn $ "Mentioned " ++ show (length mentions) ++ " time(s) in the token stream:"@@ -179,30 +181,30 @@ return True where showMention (L.AlexPn _ line col) =- " line " ++ show line ++ ", column " ++ show col ++ ": Id " ++ show ruleName+ " line " ++ show line ++ ", column " ++ show col ++ ": Id " ++ show targetRule -- | Under --use-generated the front end has no separate token stream to -- inspect, so the token stage of a rule trace is just a note. traceRuleTokensUnavailable :: DebugOptions -> String -> IO ()-traceRuleTokensUnavailable opts ruleName = do- traceSection opts ruleName "Tokens"+traceRuleTokensUnavailable opts targetRule = do+ traceSection opts targetRule "Tokens" putStrLn "Token stage is internal to the generated front end; trace continues after parsing." putStrLn "" --- | InitialGrammar-stage view of a rule trace (after parse, after--- string-norm): the IRules whose rule name or data type name matches, each+-- | Parsed-grammar-stage view of a rule trace (after parse, after+-- string-norm): the rules whose rule name or data type name matches, each -- headed by its source position.-traceRuleInitial :: DebugOptions -> String -> String -> InitialGrammar -> IO Bool-traceRuleInitial opts ruleName stage grammar = do- traceSection opts ruleName stage- let rules = getIRules grammar+traceRuleParsed :: DebugOptions -> String -> String -> GP.Grammar -> IO Bool+traceRuleParsed opts targetRule stage grammar = do+ traceSection opts targetRule stage+ let rules = grammarRules grammar matches = filter matchesRule rules- matchesRule r = getIRuleName r == ruleName- || getIDataTypeName r == Just ruleName+ matchesRule r = ruleName r == targetRule+ || ruleTypeName r == Just targetRule if null matches then do- reportNotFoundAtStage opts ruleName- (map getIRuleName rules ++ mapMaybe getIDataTypeName rules)+ reportNotFoundAtStage opts targetRule+ (map ruleName rules ++ mapMaybe ruleTypeName rules) return False else do mapM_ printMatch matches@@ -210,8 +212,8 @@ where printMatch rule = do debugSubSection opts $- "Rule '" ++ getIRuleName rule ++ "' ("- ++ maybe "no position" showSourcePos (getIRulePos rule) ++ ")"+ "Rule '" ++ ruleName rule ++ "' ("+ ++ maybe "no position" showSourcePos (rulePos rule) ++ ")" putStrLn $ ppShow rule putStrLn "" @@ -220,18 +222,18 @@ -- type name or by a contained rule name) plus any matching lexical rule, -- shown compactly, with the full structure in pretty format. traceRuleNormal :: DebugOptions -> String -> String -> NormalGrammar -> IO Bool-traceRuleNormal opts ruleName stage grammar = do- traceSection opts ruleName stage+traceRuleNormal opts targetRule stage grammar = do+ traceSection opts targetRule stage let groups = getSyntaxRuleGroups grammar lRules = getLexicalRules grammar proxyRules = getProxyRules (getGrammarInfo grammar) matchingGroups = filter groupMatches groups- groupMatches g = getSDataTypeName g == ruleName- || any ((== ruleName) . getSRuleName) (getSRules g)- matchingLexical = filter ((== ruleName) . getLRuleName) lRules+ groupMatches g = getSDataTypeName g == targetRule+ || any ((== targetRule) . getSRuleName) (getSRules g)+ matchingLexical = filter ((== targetRule) . getLRuleName) lRules if null matchingGroups && null matchingLexical then do- reportNotFoundAtStage opts ruleName $+ reportNotFoundAtStage opts targetRule $ map getSDataTypeName groups ++ concatMap (map getSRuleName . getSRules) groups ++ map getLRuleName lRules@@ -256,10 +258,10 @@ -- renames things (Rule_N, ListElem_*, tok_*), so suggestions keep the trace -- usable across stages. reportNotFoundAtStage :: DebugOptions -> String -> [String] -> IO ()-reportNotFoundAtStage opts ruleName names = do+reportNotFoundAtStage opts targetRule names = do withColor (debugColor opts) Yellow $- "Rule '" ++ ruleName ++ "' is not present at this stage.\n"- let suggestions = take 5 (nearMatches ruleName names)+ "Rule '" ++ targetRule ++ "' is not present at this stage.\n"+ let suggestions = take 5 (nearMatches targetRule names) when (not (null suggestions)) $ do putStrLn "Near matches:" mapM_ (putStrLn . (" - " ++)) suggestions@@ -279,11 +281,11 @@ ------------------------------------------------------------------------------- -- | Show comprehensive grammar statistics-showGrammarStats :: DebugOptions -> InitialGrammar -> NormalGrammar -> IO ()+showGrammarStats :: DebugOptions -> GP.Grammar -> NormalGrammar -> IO () showGrammarStats opts iGrammar nGrammar = do debugSection opts "GRAMMAR STATISTICS" - let iRules = getIRules iGrammar+ let iRules = grammarRules iGrammar sRuleGroups = getSyntaxRuleGroups nGrammar lRules = getLexicalRules nGrammar aRules = getAntiRules nGrammar@@ -296,7 +298,7 @@ putStrLn $ "Grammar name: " ++ getNGrammarName nGrammar putStrLn "" putStrLn "=== Rule Counts ==="- putStrLn $ " Initial rules: " ++ show (length iRules)+ putStrLn $ " Parsed rules: " ++ show (length iRules) putStrLn $ " Syntax rule groups: " ++ show (length sRuleGroups) putStrLn $ " Total syntax rules: " ++ show totalSyntaxRules putStrLn $ " Lexical rules: " ++ show (length lRules)@@ -364,7 +366,7 @@ extractStringLiterals :: [LexicalRule] -> [String] extractStringLiterals = mapMaybe extractFromRule where- extractFromRule (LexicalRule _ _ _ (IStrLit s)) = Just s+ extractFromRule (LexicalRule _ _ _ (GP.Lit _ (GP.Str _ s))) = Just s extractFromRule _ = Nothing -- | Helper: Find duplicates in a list@@ -575,9 +577,9 @@ -- | Check if a rule group is left-recursive isLeftRecursive :: [SyntaxRuleGroup] -> SyntaxRuleGroup -> Bool isLeftRecursive _ grp =- let ruleName = getSDataTypeName grp+ let typeName = getSDataTypeName grp firstSymbols = concatMap (getFirstSymbols . getSClause) (getSRules grp)- in ruleName `elem` firstSymbols+ in typeName `elem` firstSymbols where getFirstSymbols (STAltOfSeq seqs) = concatMap getFirstFromSeq seqs getFirstSymbols (STMany _ sc _) = getFirstFromSimple sc@@ -610,14 +612,14 @@ -- | Expand a rule by inlining all references showExpandedRule :: DebugOptions -> NormalGrammar -> String -> IO ()-showExpandedRule opts grammar ruleName = do- debugSection opts $ "EXPANDED RULE: " ++ ruleName+showExpandedRule opts grammar targetRule = do+ debugSection opts $ "EXPANDED RULE: " ++ targetRule let sRuleGroups = getSyntaxRuleGroups grammar- maybeGroup = lookup ruleName $ map (\g -> (getSDataTypeName g, g)) sRuleGroups+ maybeGroup = lookup targetRule $ map (\g -> (getSDataTypeName g, g)) sRuleGroups case maybeGroup of- Nothing -> putStrLn $ " Rule '" ++ ruleName ++ "' not found."+ Nothing -> putStrLn $ " Rule '" ++ targetRule ++ "' not found." Just grp -> do putStrLn $ " Type: " ++ getSDataTypeName grp putStrLn $ " Rules: " ++ show (length $ getSRules grp)
DebugOptions.hs view
@@ -39,7 +39,13 @@ , debugParserSpec :: Bool , debugLexerSpec :: Bool , debugQQSpec :: Bool+ , debugPpSpec :: Bool + -- Optional generators (off by default, so non-users see zero churn)+ , generatePp :: Bool+ -- Pretty-printer layout: False = flat (9a default), True = block (9b)+ , ppLayoutBlock :: Bool+ -- Analysis and statistics , showStats :: Bool , analyzeConflicts :: Bool@@ -78,6 +84,9 @@ , debugParserSpec = False , debugLexerSpec = False , debugQQSpec = False+ , debugPpSpec = False+ , generatePp = False+ , ppLayoutBlock = False , showStats = False , analyzeConflicts = False , showRuleGraph = False@@ -93,6 +102,12 @@ , profileStages = False } +-- | Parse the --pp-layout value into the block? flag.+parsePpLayout :: String -> Maybe Bool+parsePpLayout "flat" = Just False+parsePpLayout "block" = Just True+parsePpLayout _ = Nothing+ -- | Parse debug stage from string parseStage :: String -> Maybe DebugStage parseStage "lex" = Just StageLex@@ -153,6 +168,19 @@ <*> switch ( long "debug-qq-spec" <> help "Print generated quasiquoter code" )+ <*> switch+ ( long "debug-pp-spec"+ <> help "Print generated pretty-printer code" )++ -- Optional generators+ <*> switch+ ( long "generate-pp"+ <> help "Also generate <Name>PP.hs, a pretty-printer over the AST (opt-in)" )+ <*> option (maybeReader parsePpLayout)+ ( long "pp-layout"+ <> metavar "flat|block"+ <> value False+ <> help "Pretty-printer layout: flat (default, one line) or block (indented)" ) -- Analysis and statistics <*> switch
GenAST.hs view
@@ -1,4 +1,16 @@-module GenAST (genAST, isAntiConstructor)+module GenAST+ ( genAST+ , isAntiConstructor+ -- Shared with GenPP: the group->combined-clause view, the rule->type map+ -- and its lookup, and the "this alternative produces a constructor" test.+ -- GenPP walks the same constructor set as genAST, so it reuses the same+ -- primitives rather than re-deriving them.+ , normalRulesNamed+ , RulesMap+ , rulesMap+ , findRuleDataTypeName+ , needGenereateAlt+ ) where import Syntax
+ GenPP.hs view
@@ -0,0 +1,461 @@+-- | The pretty-printer generator: the "emit" third of "Rewrite ToolKit".+-- @--generate-pp@ runs this over a 'NormalGrammar' to produce @\<Name\>PP.hs@,+-- a module of @pp\<Type\>@ functions that turn the AST RTK generates for a+-- grammar back into source text.+--+-- Two layouts are baked at generation time ('PPLayout'):+--+-- * 'PPFlat' (task 9a, the default): correctness-first, NOT pretty. Exactly+-- one space between tokens, no indentation, no alignment, and no+-- parentheses of the generator's own.+--+-- * 'PPBlock' (task 9b): adds indentation and line breaks so output for+-- bracket-structured languages reads like hand-written source. Layout is+-- derived structurally - indentation comes purely from /block lists/+-- (statement\/declaration lists: an 'STMany' with no separator or a @;@+-- separator), which wrap their elements in an indented, line-broken+-- block. The flanking delimiters (@{@ @}@ for C\/Java, @begin@ @end@ for+-- PL\/0) need no special handling: they render inline around the list and+-- the list supplies the indent, so there is no bracket charset baked into+-- rtk and a grammar with no block lists simply degrades to flat output.+--+-- BOTH layouts keep the same guarantee and the same dependency discipline:+-- the only promise is the semantic round-trip @parse (print ast) == ast@ (the+-- AST is lossy - comments and the original whitespace are gone, so+-- byte-faithful reproduction is impossible and never implied), and the+-- generated module depends only on @base@ (it imports its grammar's+-- @\<Name\>Parser@ AST types, "Data.List", and an in-module ~20-line layout+-- engine for block mode). Layout is whitespace, and every grammar in the+-- corpus ignores whitespace, so block layout cannot change the parse - the+-- 9a round-trip test proves it stays green. The 'layoutSensitive' guard makes+-- that assumption explicit and falls back to flat should a layout-sensitive+-- grammar ever exist (TODO(#95)/task 12).+--+-- The structure mirrors "GenAST": the same group-to-constructor view+-- ('normalRulesNamed'), the same rule-to-type map ('rulesMap') and the same+-- "this alternative produces a constructor" test ('needGenereateAlt'), so the+-- printer walks exactly the constructor set the AST declares. Terminal text+-- for fixed-literal tokens is reconstructed with the shared+-- 'literalTokenText' helper that "GenY" also uses.+module GenPP (genPP, PPLayout(..))+ where++import Text.PrettyPrint+import qualified Data.Map as Map+import qualified Data.Set as Set++import Syntax+import Grammar (literalTokenText)+import GenAST (isAntiConstructor, normalRulesNamed, RulesMap, rulesMap,+ findRuleDataTypeName, needGenereateAlt)+import Diagnostics (Diagnostic(..))++-- | Layout selected at generation time (@--pp-layout=flat|block@).+data PPLayout = PPFlat | PPBlock+ deriving (Eq, Show)++-- | Token name -> its lexical rule, for reconstructing terminal text and for+-- telling a payload token (a leaf carrying a stored value) apart from a+-- nonterminal reference.+type LexMap = Map.Map String LexicalRule++genPP :: PPLayout -> NormalGrammar -> Either Diagnostic String+genPP PPFlat grammar = genPPFlat grammar+genPP PPBlock grammar+ -- Forward guard (TODO(#95)/task 12): block layout assumes the lexer+ -- ignores whitespace. That holds for every grammar today; if a+ -- layout-sensitive (offside/indentation) lexer ever lands, block layout+ -- could change the token stream and thus the parse, so fall back to flat+ -- with a one-line note instead of silently emitting a wrong program.+ | layoutSensitive grammar = withNote <$> genPPFlat grammar+ | otherwise = genPPBlock grammar+ where+ withNote = insertNote+ ("-- NOTE: block layout was requested but the grammar's lexer is "+ ++ "layout-sensitive; emitting flat layout (whitespace would change "+ ++ "the parse).")++-- | Whether the grammar's lexer is sensitive to whitespace/indentation. There+-- is no way to express offside or indentation lexing in the grammar language+-- yet (issue #95 / task 12), so this is always 'False' for now; the guard+-- above is the place to teach block layout to bow out once that changes.+layoutSensitive :: NormalGrammar -> Bool+layoutSensitive _ = False -- TODO(#95): detect offside/indentation-sensitive lexers++-- | Splice an extra comment line in right after the provenance banner (the+-- first line) of a generated module. Only used by the layout-sensitive+-- fallback, which is unreachable today.+insertNote :: String -> String -> String+insertNote note src = case lines src of+ (banner : rest) -> unlines (banner : note : rest)+ [] -> src++--------------------------------------------------------------------------------+-- Flat layout (task 9a): byte-for-byte the original generator.+--------------------------------------------------------------------------------++genPPFlat :: NormalGrammar -> Either Diagnostic String+genPPFlat grammar = do+ bodies <- mapM (genPPRule rmap lmap) (normalRulesNamed (getSyntaxRuleGroups grammar))+ return $ render $ vcat (header : map (\d -> text "" $$ d) bodies)+ where+ name = getNGrammarName grammar+ rmap = rulesMap grammar+ lmap = mkLexMap grammar+ -- intercalate is the only base import the printer ever needs, and only+ -- list-typed rules use it; omit it otherwise so the module stays+ -- import-clean (no unused import even under -Werror).+ usesIntercalate = grammarHasList grammar+ header = vcat $+ [ text (provenanceBanner name)+ , text "-- v1 pretty-printer (task 9): correctness-first, not pretty. Emits exactly"+ , text "-- one space between tokens, with no indentation or alignment. The only"+ , text "-- guarantee is the semantic round-trip parse (print ast) == ast; comments"+ , text "-- and the original whitespace are not recovered (the AST is lossy)."+ , text ("module " ++ name ++ "PP where")+ , text ("import " ++ name ++ "Parser")+ ] ++ [ text "import Data.List (intercalate)" | usesIntercalate ]++genPPRule :: RulesMap -> LexMap -> (ID, SyntaxTopClause) -> Either Diagnostic Doc+genPPRule rmap lmap (typeName, clause) = case clause of+ STMany _ cl msep -> genPPList rmap lmap typeName cl msep+ STOpt cl -> genPPOpt rmap lmap typeName cl+ STAltOfSeq seqs -> genPPData rmap lmap typeName seqs++ppSig :: String -> Doc+ppSig typeName =+ text ("pp" ++ typeName) <+> text "::" <+> text typeName <+> text "->" <+> text "String"++-- A data type: one equation per constructor (exactly the alternatives that+-- produce one, by the same test GenAST uses). Anti_* constructors carry no+-- leading RtkPos field, so their pattern skips the wildcard.+genPPData :: RulesMap -> LexMap -> ID -> [STSeq] -> Either Diagnostic Doc+genPPData rmap lmap typeName seqs = do+ arms <- mapM genArm (filter needGenereateAlt seqs)+ return $ vcat (ppSig typeName : arms)+ where+ genArm (STSeq ctor clauses) = do+ exprs <- genExprs rmap lmap clauses+ let lhs = text ("pp" ++ typeName) <+> parens (armPattern ctor clauses)+ return $ lhs <+> text "=" <+> unwordsExpr exprs++-- A list alias (type T = [Elem]): join the element printer with the+-- separator's reconstructed literal (space-padded so it stays its own token),+-- or a plain space when the list has no separator.+genPPList :: RulesMap -> LexMap -> ID -> SyntaxSimpleClause+ -> Maybe SyntaxSimpleClause -> Either Diagnostic Doc+genPPList rmap lmap typeName elemCl msep = do+ elemPP <- elemPrinter rmap lmap elemCl+ let sepText = case msep of+ Just sc -> " " ++ ignoreLiteral lmap (clauseId sc) ++ " "+ Nothing -> " "+ body = text ("pp" ++ typeName) <+> text "xs" <+> text "="+ <+> text "intercalate" <+> text (show sepText)+ <+> parens (text "map" <+> elemPP <+> text "xs")+ return $ vcat [ppSig typeName, body]++-- An optional alias (type T = Maybe Elem): print the element when present,+-- nothing when absent.+genPPOpt :: RulesMap -> LexMap -> ID -> SyntaxSimpleClause -> Either Diagnostic Doc+genPPOpt rmap lmap typeName elemCl = do+ elemPP <- elemPrinter rmap lmap elemCl+ let body = text ("pp" ++ typeName) <+> text "=" <+> text "maybe"+ <+> text (show "") <+> elemPP+ return $ vcat [ppSig typeName, body]++-- The expressions one alternative's clauses emit, left to right. Each is a+-- Haskell String expression; the arm 'unwords' them. SSId clauses consume a+-- field variable (x1, x2, ...) in order; SSIgnore clauses emit a fixed+-- literal and consume none.+genExprs :: RulesMap -> LexMap -> [SyntaxSimpleClause] -> Either Diagnostic [Doc]+genExprs rmap lmap = go 1+ where+ go :: Int -> [SyntaxSimpleClause] -> Either Diagnostic [Doc]+ go _ [] = Right []+ go i (c : cs) = case c of+ SSIgnore x -> (text (show (ignoreLiteral lmap x)) :) <$> go i cs+ SSId x -> do e <- idExpr rmap lmap x ("x" ++ show i)+ rest <- go (i + 1) cs+ return (e : rest)+ -- A lifted clause never reaches a constructor-producing alternative:+ -- an all-lifted sequence is filtered out by needGenereateAlt, and a+ -- sequence mixing a lifted clause with others is rejected upstream+ -- (Grammar.isClauseSeqLifted). So this is a pipeline bug, not a gap.+ SSLifted x -> Left (ppInternal ("lifted clause '" ++ x+ ++ "' survived into a printable constructor"))++-- The expression for one SSId field: a payload token contributes its stored+-- value; a nonterminal recurses through the printer of its rule's type.+idExpr :: RulesMap -> LexMap -> ID -> String -> Either Diagnostic Doc+idExpr rmap lmap x var = case Map.lookup x lmap of+ Just lr -> Right (leafExpr lr var)+ Nothing -> do+ ty <- findRuleDataTypeName rmap x x+ return $ parens (text ("pp" ++ ty) <+> text var)++-- The printer to map/maybe over a list or optional element: the element is a+-- nonterminal (a list/option over a value-less token is rejected upstream),+-- so this is just its type's printer.+elemPrinter :: RulesMap -> LexMap -> SyntaxSimpleClause -> Either Diagnostic Doc+elemPrinter rmap lmap cl = case cl of+ SSId x -> resolve x+ SSLifted x -> resolve x+ SSIgnore x -> Left (ppInternal ("list/optional element is the ignored token '"+ ++ x ++ "'"))+ where+ resolve x = case Map.lookup x lmap of+ Just lr -> Right (leafFun lr)+ Nothing -> do ty <- findRuleDataTypeName rmap x x+ return $ text ("pp" ++ ty)++-- A payload token leaf as an expression over its bound variable: a String+-- payload is emitted verbatim, anything else via 'show' (best effort; a+-- non-String token type round-trips only when 'show' reproduces its source).+leafExpr :: LexicalRule -> String -> Doc+leafExpr LexicalRule{ getLRuleDataType = "String" } var = text var+leafExpr LexicalRule{} var = parens (text "show" <+> text var)+leafExpr MacroRule{} var = text var++-- The same leaf as a function, for map/maybe over a token element.+leafFun :: LexicalRule -> Doc+leafFun LexicalRule{ getLRuleDataType = "String" } = text "id"+leafFun LexicalRule{} = text "show"+leafFun MacroRule{} = text "id"++unwordsExpr :: [Doc] -> Doc+unwordsExpr exprs = text "unwords" <+> brackets (hcat (punctuate (text ", ") exprs))++--------------------------------------------------------------------------------+-- Block layout (task 9b): indentation driven structurally by block lists.+--------------------------------------------------------------------------------++-- The set of types whose top clause is a block list (an STMany with no+-- separator or a ';' separator). A field of such a type renders as an+-- indented, line-broken block; this set is what lets the per-clause walk stay+-- delimiter-agnostic - it splices lay<Type> and the list type supplies the+-- indentation.+genPPBlock :: NormalGrammar -> Either Diagnostic String+genPPBlock grammar = do+ bodies <- mapM (genBlockRule rmap lmap blocky) named+ return $ render $ vcat (header : engineDoc : map (\d -> text "" $$ d) bodies)+ where+ name = getNGrammarName grammar+ rmap = rulesMap grammar+ lmap = mkLexMap grammar+ named = normalRulesNamed (getSyntaxRuleGroups grammar)+ blocky = blockyTypes lmap named+ usesIntercalate = grammarHasList grammar+ header = vcat $+ [ text (provenanceBanner name)+ , text "-- Block-layout pretty-printer (task 9b): indentation and line breaks for"+ , text "-- bracket-structured languages. Layout comes structurally from block lists"+ , text "-- (statement/declaration lists), so it adds no parentheses and no charset is"+ , text "-- baked in. The only guarantee is the semantic round-trip parse (print ast)"+ , text "-- == ast; comments and the original whitespace are not recovered (lossy)."+ , text ("module " ++ name ++ "PP where")+ , text ("import " ++ name ++ "Parser")+ ] ++ [ text "import Data.List (intercalate)" | usesIntercalate ]+ engineDoc = text "" $$ vcat (map text ppEngine)++genBlockRule :: RulesMap -> LexMap -> Set.Set ID -> (ID, SyntaxTopClause) -> Either Diagnostic Doc+genBlockRule rmap lmap blocky (typeName, clause) = case clause of+ STMany _ cl msep -> genBlockList rmap lmap blocky typeName cl msep+ STOpt cl -> genBlockOpt rmap lmap typeName cl+ STAltOfSeq seqs -> genBlockData rmap lmap typeName seqs++-- The types whose values are statement/declaration-shaped: a type some of+-- whose constructors contain a statement-terminator literal (';'). A+-- no-separator list of such a type is a block list (each element wants its+-- own line); a no-separator list of anything else stays inline. This keeps+-- statement and field-declaration lists breaking while leaving inline+-- repetitions - modifier lists ('public' 'static' ...) and dotted-name+-- continuations ('.' id)* - on one line. (';' is the statement terminator+-- the layout heuristic already recognizes; ';'-separated lists are blocks+-- regardless, see isBlockSep.)+blockyTypes :: LexMap -> [(ID, SyntaxTopClause)] -> Set.Set ID+blockyTypes lmap named = Set.fromList+ [ ty | (ty, STAltOfSeq seqs) <- named+ , any hasTerminator (filter needGenereateAlt seqs) ]+ where+ hasTerminator (STSeq _ clauses) = any isTerminator clauses+ isTerminator (SSIgnore x) = ignoreLiteral lmap x `elem` terminatorLiterals+ isTerminator _ = False++-- Statement-terminator literals recognized by the block-layout heuristic.+terminatorLiterals :: [String]+terminatorLiterals = [";"]++-- The public String entry (ppRender . lay) plus the type's signature, shared+-- by every block-mode rule. lay<Type> :: <Type> -> [PpItem] does the work;+-- pp<Type> :: <Type> -> String renders it, so callers (and the round-trip+-- test) use the same pp<Type> name in either layout.+blockEntry :: String -> [Doc]+blockEntry typeName =+ [ ppSig typeName+ , text ("pp" ++ typeName) <+> text "=" <+> text "ppRender ." <+> text ("lay" ++ typeName)+ , laySig typeName+ ]++laySig :: String -> Doc+laySig typeName =+ text ("lay" ++ typeName) <+> text "::" <+> text typeName <+> text "-> [PpItem]"++genBlockData :: RulesMap -> LexMap -> ID -> [STSeq] -> Either Diagnostic Doc+genBlockData rmap lmap typeName seqs = do+ arms <- mapM genArm (filter needGenereateAlt seqs)+ return $ vcat (blockEntry typeName ++ arms)+ where+ genArm (STSeq ctor clauses) = do+ pieces <- mapM (blockPiece rmap lmap) (numberFields clauses)+ let lhs = text ("lay" ++ typeName) <+> parens (armPattern ctor clauses)+ return $ lhs <+> text "=" <+> concatExpr pieces++-- A block list indents and line-breaks its elements; an inline list (any+-- other separator, e.g. ',') stays on one line like flat mode. An empty list+-- emits nothing in either case, so an empty '{ }'/'begin end' stays inline.+genBlockList :: RulesMap -> LexMap -> Set.Set ID -> ID -> SyntaxSimpleClause+ -> Maybe SyntaxSimpleClause -> Either Diagnostic Doc+genBlockList rmap lmap blocky typeName elemCl msep = do+ elemFun <- blockElemFun rmap lmap elemCl+ let sepText = fmap (ignoreLiteral lmap . clauseId) msep+ elemTy = Map.lookup (clauseId elemCl) rmap+ elemBlocky = maybe False (`Set.member` blocky) elemTy+ elems = "(map " ++ elemFun ++ " xs)"+ body+ | isBlockSep elemBlocky sepText =+ let between = case sepText of+ Just s | s /= "" -> "[PpTok " ++ show s ++ ", PpBreak]"+ _ -> "[PpBreak]"+ in "lay" ++ typeName ++ " xs = if null xs then [] else [PpOpen] ++ intercalate "+ ++ between ++ " " ++ elems ++ " ++ [PpClose]"+ | otherwise =+ "lay" ++ typeName ++ " xs = intercalate [PpTok "+ ++ show (maybe "" id sepText) ++ "] " ++ elems+ return $ vcat (blockEntry typeName ++ [text body])++genBlockOpt :: RulesMap -> LexMap -> ID -> SyntaxSimpleClause -> Either Diagnostic Doc+genBlockOpt rmap lmap typeName elemCl = do+ elemFun <- blockElemFun rmap lmap elemCl+ return $ vcat (blockEntry typeName ++ [text ("lay" ++ typeName ++ " = maybe [] " ++ elemFun)])++-- The function to map/maybe over a list or optional element in block mode: a+-- nonterminal's lay<Type>, or a [PpItem]-producing lambda for a token leaf (a+-- list/option over a value-less token is rejected upstream).+blockElemFun :: RulesMap -> LexMap -> SyntaxSimpleClause -> Either Diagnostic String+blockElemFun rmap lmap cl = case cl of+ SSId x -> resolve x+ SSLifted x -> resolve x+ SSIgnore x -> Left (ppInternal ("list/optional element is the ignored token '"+ ++ x ++ "'"))+ where+ resolve x = case Map.lookup x lmap of+ Just LexicalRule{ getLRuleDataType = "String" } -> Right "(\\v -> [PpTok v])"+ Just LexicalRule{} -> Right "(\\v -> [PpTok (show v)])"+ Just MacroRule{} -> Right "(\\v -> [PpTok v])"+ Nothing -> do ty <- findRuleDataTypeName rmap x x+ return ("lay" ++ ty)++-- Whether a list lays out as a block (indented, one element per line). A ';'+-- separator always means a statement list. A separatorless list is a block+-- only when its elements are themselves multi-token ('blockyTypes'); a+-- separatorless list of single-token keywords (modifiers) stays inline. Any+-- other separator (notably ',') stays inline.+isBlockSep :: Bool -> Maybe String -> Bool+isBlockSep _ (Just ";") = True+isBlockSep elemBlocky Nothing = elemBlocky+isBlockSep _ _ = False++-- One clause as a [PpItem] expression for block mode (mirrors genExprs but+-- builds layout items): a fixed literal is a PpTok, a payload token its+-- stored value, a nonterminal a spliced lay<Type>.+blockPiece :: RulesMap -> LexMap -> (Int, SyntaxSimpleClause) -> Either Diagnostic Doc+blockPiece _ lmap (_, SSIgnore x) = Right $ text ("[PpTok " ++ show (ignoreLiteral lmap x) ++ "]")+blockPiece rmap lmap (i, SSId x) = case Map.lookup x lmap of+ Just lr -> Right (leafItems lr ("x" ++ show i))+ Nothing -> do ty <- findRuleDataTypeName rmap x x+ return $ text ("lay" ++ ty) <+> text ("x" ++ show i)+blockPiece _ _ (_, SSLifted x) =+ Left (ppInternal ("lifted clause '" ++ x ++ "' survived into a printable constructor"))++-- A payload token leaf as a [PpItem]: String verbatim, otherwise via show.+leafItems :: LexicalRule -> String -> Doc+leafItems LexicalRule{ getLRuleDataType = "String" } var = text ("[PpTok " ++ var ++ "]")+leafItems LexicalRule{} var = text ("[PpTok (show " ++ var ++ ")]")+leafItems MacroRule{} var = text ("[PpTok " ++ var ++ "]")++concatExpr :: [Doc] -> Doc+concatExpr [] = text "[]"+concatExpr pieces = text "concat" <+> brackets (hcat (punctuate (text ", ") pieces))++-- The block-layout engine, emitted verbatim into the generated module. It+-- depends only on base. render walks the item stream once tracking indent+-- depth: PpOpen indents and arms a new line, PpClose dedents and arms a new+-- line, PpBreak arms a new line at the current indent. Directives only arm a+-- pending line (the indentation is written when the next token appears), so+-- consecutive directives collapse to one line break and a trailing directive+-- emits nothing - no blank lines, no trailing whitespace.+ppEngine :: [String]+ppEngine =+ [ "data PpItem = PpTok String | PpOpen | PpClose | PpBreak"+ , "ppRender :: [PpItem] -> String"+ , "ppRender = start"+ , " where"+ , " start [] = \"\""+ , " start (PpTok s : r) = s ++ inLine 0 r"+ , " start (PpOpen : r) = fresh 1 r"+ , " start (PpClose : r) = fresh 0 r"+ , " start (PpBreak : r) = fresh 0 r"+ , " inLine _ [] = \"\""+ , " inLine n (PpTok s : r) = ' ' : s ++ inLine n r"+ , " inLine n (PpOpen : r) = fresh (n + 1) r"+ , " inLine n (PpClose : r) = fresh (max 0 (n - 1)) r"+ , " inLine n (PpBreak : r) = fresh n r"+ , " fresh _ [] = \"\""+ , " fresh n (PpTok s : r) = '\\n' : (replicate (n * 2) ' ' ++ s) ++ inLine n r"+ , " fresh n (PpOpen : r) = fresh (n + 1) r"+ , " fresh n (PpClose : r) = fresh (max 0 (n - 1)) r"+ , " fresh n (PpBreak : r) = fresh n r"+ ]++--------------------------------------------------------------------------------+-- Shared helpers+--------------------------------------------------------------------------------++mkLexMap :: NormalGrammar -> LexMap+mkLexMap grammar = Map.fromList [ (getLRuleName r, r) | r <- getLexicalRules grammar ]++grammarHasList :: NormalGrammar -> Bool+grammarHasList grammar = any isListClause (normalRulesNamed (getSyntaxRuleGroups grammar))+ where isListClause (_, STMany{}) = True+ isListClause _ = False++-- The constructor pattern for an alternative: the constructor, the leading+-- RtkPos wildcard (every non-Anti_ constructor has one) and a field variable+-- per SSId clause, in order.+armPattern :: ConstructorName -> [SyntaxSimpleClause] -> Doc+armPattern ctor clauses = hsep (text ctor : map text (posPat ++ vars))+ where nFields = length [ () | SSId{} <- clauses ]+ vars = [ "x" ++ show i | i <- [1 .. nFields] ]+ posPat = if isAntiConstructor ctor then [] else ["_"]++-- The source text of a fixed-literal token (keyword/punctuation). A token+-- whose clause is not a bare literal - or a name that is no lexical rule at+-- all (an ignored !nonterminal) - has no recoverable spelling, so its name is+-- the fallback; such a gap surfaces as a round-trip failure, by design.+ignoreLiteral :: LexMap -> ID -> String+ignoreLiteral lmap x =+ maybe x id (Map.lookup x lmap >>= literalTokenText . getLClause)++clauseId :: SyntaxSimpleClause -> ID+clauseId (SSId n) = n+clauseId (SSLifted n) = n+clauseId (SSIgnore n) = n++numberFields :: [SyntaxSimpleClause] -> [(Int, SyntaxSimpleClause)]+numberFields = go 1+ where go _ [] = []+ go i (c@SSId{} : cs) = (i, c) : go (i + 1) cs+ go i (c : cs) = (i, c) : go i cs++ppInternal :: String -> Diagnostic+ppInternal msg = Diagnostic Nothing Nothing ("rtk internal error (GenPP): " ++ msg)
GenX.hs view
@@ -2,21 +2,26 @@ module GenX (genX, isAlexEscape) where +import qualified GrammarParser as GP+ import Syntax import Diagnostics (Diagnostic(..))+import Frontend (altElems, nameText, seqElems, showClause, strLitText) import Text.PrettyPrint hiding ((<>)) import qualified Data.Set as S import Data.Maybe (catMaybes) import Grammar import StrQuote -getMacroIdsFromClause :: IClause -> S.Set String-getMacroIdsFromClause (IId s) = S.singleton s-getMacroIdsFromClause (IOpt clause) = getMacroIdsFromClause clause-getMacroIdsFromClause (IPlus clause _) = getMacroIdsFromClause clause-getMacroIdsFromClause (IStar clause _) = getMacroIdsFromClause clause-getMacroIdsFromClause (ISeq clauses) = S.unions $ map getMacroIdsFromClause clauses-getMacroIdsFromClause (IAlt clauses) = S.unions $ map getMacroIdsFromClause clauses+getMacroIdsFromClause :: LClause -> S.Set String+getMacroIdsFromClause (GP.Ref _ n) = S.singleton (nameText n)+getMacroIdsFromClause (GP.Opt _ clause) = getMacroIdsFromClause clause+getMacroIdsFromClause (GP.Plus _ clause) = getMacroIdsFromClause clause+getMacroIdsFromClause (GP.PlusDelim _ clause _) = getMacroIdsFromClause clause+getMacroIdsFromClause (GP.Star _ clause) = getMacroIdsFromClause clause+getMacroIdsFromClause (GP.StarDelim _ clause _) = getMacroIdsFromClause clause+getMacroIdsFromClause (GP.Seq _ l r) = getMacroIdsFromClause l `S.union` getMacroIdsFromClause r+getMacroIdsFromClause (GP.Alt _ l r) = getMacroIdsFromClause l `S.union` getMacroIdsFromClause r getMacroIdsFromClause _ = S.empty getMacroIdsHelper :: LexicalRule -> S.Set String@@ -44,7 +49,7 @@ where lineFor (LexicalRule {getLRuleName = name, getLClause = cl}) | name `S.member` macroIds = do- d <- translateClause name sMacroIds cl+ d <- translateRuleClause name sMacroIds cl return $ Just $ (text "@" <> text name) <+> text "=" <+> d | otherwise = return Nothing lineFor (MacroRule {getLRuleName = name, getLClause = cl}) = do@@ -120,7 +125,7 @@ -- into a structured position - the same encoding the rtk grammar lexer uses rtkError ((AlexPn _ line column), _, _, str) len = alexError $ (show line) ++ ":" ++ (show column) ++ ":lexical error. Following chars: " ++ (take 10 str) |]- funs = text funs_text + funs = text funs_text footer = vcat [text "{", adt, funs , text "}"] nl = text "" @@ -139,7 +144,7 @@ toks <- mapM makeToken lexical_rules return $ text "tokens" <+> text ":-" <+> vcat (toks ++ [text ". { rtkError }"]) where makeToken LexicalRule { getLRuleDataType = data_type, getLRuleFunc = func, getLRuleName = name, getLClause = cl } = do- cld <- translateClause name smacroIds cl+ cld <- translateRuleClause name smacroIds cl return $ cld <+> makeProduction name data_type func makeToken (MacroRule _ _) = return empty makeProduction name data_type func =@@ -149,6 +154,11 @@ "Ignore" -> text ";" _ -> text "{ simple1 $ " <+> token_name <+> text "." <+> (parens $ text func) <+> text "}" +-- Alex quoted strings are literal: backslash is not an escape character+-- inside "..." (e.g. "\" matches a single backslash, "\'" matches a+-- backslash followed by a quote), so only the string terminator '"' needs+-- rewriting. Do not "fix" this to escape backslashes: doubling them+-- changes what the token matches. backquoteStr :: String -> String backquoteStr s = concat (map (\chr -> if (case chr of '"' -> True@@ -178,14 +188,17 @@ lexErr :: ID -> String -> Either Diagnostic a lexErr rname msg = Left $ Diagnostic Nothing (Just ("in lexical rule '" ++ rname ++ "'")) msg -translateClauseForMacro :: ID -> IClause -> Either Diagnostic Doc-translateClauseForMacro _ (IStrLit s) = Right $ text s-translateClauseForMacro _ (IRegExpLit re) = Right $ brackets $ text $ backquoteStrInBrackets re-translateClauseForMacro rname (ISeq cls) = do- ds <- mapM (translateClauseForMacro rname) cls+-- A @symmacro definition. Mirrors the rule-clause translation but renders+-- alternations bare (no parentheses) and rejects everything that is not a+-- literal, a regex or a grouping of those.+translateClauseForMacro :: ID -> LClause -> Either Diagnostic Doc+translateClauseForMacro _ (GP.Lit _ s) = Right $ text (strLitText s)+translateClauseForMacro _ (GP.Regex _ re) = Right $ brackets $ text $ backquoteStrInBrackets re+translateClauseForMacro rname c@GP.Seq{} = do+ ds <- mapM (translateClauseForMacro rname) (seqElems c) return $ hsep $ punctuate (text " ") ds-translateClauseForMacro rname (IAlt clauses) = do- ds <- mapM (translateClauseForMacro rname) clauses+translateClauseForMacro rname c@GP.Alt{} = do+ ds <- mapM (translateClauseForMacro rname) (altElems c) return $ hsep $ punctuate (text "|") ds translateClauseForMacro rname cl = lexErr rname $ "cannot translate clause to a lexer macro definition: " ++ showClause cl @@ -202,29 +215,57 @@ isAlexEscape "\\v" = True -- vertical tab isAlexEscape _ = False -translateClause :: ID -> S.Set ID -> IClause -> Either Diagnostic Doc-translateClause _ sMacroIds (IId name) | name `S.member` sMacroIds =- Right $ text "$" <> text name-translateClause _ _ (IId name) =- Right $ text "@" <> text name-translateClause _ _ (IStrLit s)- | isAlexEscape s = Right $ text s -- output bare escape: \n, \t, etc.- | otherwise = Right $ doubleQuotes $ text $ backquoteStr s-translateClause _ _ (IDot) = Right $ text "."-translateClause _ _ (IRegExpLit re) = Right $ brackets $ text $ backquoteStrInBrackets re-translateClause rname sMacroIds (IStar cl Nothing) = (<> text "*") <$> translateClause rname sMacroIds cl--- a* ~x --> (a(x a)*)?-translateClause rname _ (IStar _ (Just _)) = lexErr rname "star (*) clauses with delimiters (~) are not supported in lexical rules"-translateClause rname sMacroIds (IPlus cl Nothing) = (<> text "+") <$> translateClause rname sMacroIds cl-translateClause rname _ (IPlus _ (Just _)) = lexErr rname "plus (+) clauses with delimiters (~) are not supported in lexical rules"-translateClause rname sMacroIds (IAlt clauses) = do- ds <- mapM (translateClause rname sMacroIds) clauses+-- The whole clause of a lexical rule. A user rule's clause renders as a+-- parenthesized alternation (the same canonical wrapping the retired+-- IClause front half applied to every rule); the synthesized keyword rules+-- (string-literal tokens, start-wrapper dummies) have a bare literal clause+-- and render as a bare quoted string.+translateRuleClause :: ID -> S.Set ID -> LClause -> Either Diagnostic Doc+translateRuleClause rname sMacroIds cl = case cl of+ GP.Lit{} -> translateItem rname sMacroIds cl+ _ -> translateTop rname sMacroIds cl++-- A clause in rule (or parenthesized-group) position: a parenthesized+-- alternation of space-separated sequences.+translateTop :: ID -> S.Set ID -> LClause -> Either Diagnostic Doc+translateTop rname sMacroIds c = do+ ds <- mapM (translateAlt rname sMacroIds) (altElems c) return $ parens $ hsep $ punctuate (text "|") ds-translateClause rname sMacroIds (ISeq clauses) = do- ds <- mapM (translateClause rname sMacroIds) clauses++translateAlt :: ID -> S.Set ID -> LClause -> Either Diagnostic Doc+translateAlt rname sMacroIds alt = do+ ds <- mapM (translateElem rname sMacroIds) (seqElems alt) return $ hsep $ punctuate (text " ") ds-translateClause rname sMacroIds (IOpt clause) = (<+> text "?") <$> translateClause rname sMacroIds clause-translateClause rname _ cl = lexErr rname $ "cannot translate clause to lexer spec: " ++ showClause cl++translateElem :: ID -> S.Set ID -> LClause -> Either Diagnostic Doc+translateElem rname sMacroIds c = case c of+ GP.Star _ cl -> (<> text "*") <$> translateItem rname sMacroIds cl+ GP.StarDelim{} -> lexErr rname "star (*) clauses with delimiters (~) are not supported in lexical rules"+ GP.Plus _ cl -> (<> text "+") <$> translateItem rname sMacroIds cl+ GP.PlusDelim{} -> lexErr rname "plus (+) clauses with delimiters (~) are not supported in lexical rules"+ GP.Opt _ cl -> (<+> text "?") <$> translateItem rname sMacroIds cl+ GP.Lifted{} -> cannotTranslate rname c+ GP.Ignored{} -> cannotTranslate rname c+ GP.Labeled{} -> cannotTranslate rname c+ GP.Anti_Clause{} -> cannotTranslate rname c+ _ -> translateItem rname sMacroIds c++-- An item (a repetition operand or a sequence element): a leaf, or a+-- parenthesized group.+translateItem :: ID -> S.Set ID -> LClause -> Either Diagnostic Doc+translateItem _ sMacroIds (GP.Ref _ n)+ | nameText n `S.member` sMacroIds = Right $ text "$" <> text (nameText n)+ | otherwise = Right $ text "@" <> text (nameText n)+translateItem _ _ (GP.Lit _ s)+ | isAlexEscape lit = Right $ text lit -- output bare escape: \n, \t, etc.+ | otherwise = Right $ doubleQuotes $ text $ backquoteStr lit+ where lit = strLitText s+translateItem _ _ (GP.Dot _) = Right $ text "."+translateItem _ _ (GP.Regex _ re) = Right $ brackets $ text $ backquoteStrInBrackets re+translateItem rname sMacroIds c = translateTop rname sMacroIds c++cannotTranslate :: ID -> LClause -> Either Diagnostic a+cannotTranslate rname cl = lexErr rname $ "cannot translate clause to lexer spec: " ++ showClause cl joinAlts :: [Doc] -> Doc joinAlts alts = vcat $ punctuate (text " |") (filter (not.isEmpty) alts)
GenY.hs view
@@ -160,8 +160,7 @@ "Ignore" -> empty "Keyword" -> (text "showRtkToken L." <> text (tokenName name)) <+> text "=" <+> text (show (keywordText cl)) _ -> (text "showRtkToken (L." <> text (tokenName name)) <+> text "v) =" <+> text (show (name ++ " ")) <+> text "++ show v"- where keywordText (IStrLit s) = "'" ++ s ++ "'"- keywordText _ = name+ where keywordText cl' = maybe name (\s -> "'" ++ s ++ "'") (literalTokenText cl') genShowToken (MacroRule _ _) = empty genRule :: ListRuleSet -> PayloadTokenSet -> SyntaxRule -> Doc
Grammar.hs view
@@ -2,6 +2,20 @@ import Syntax +import qualified GrammarParser as GP++-- | The verbatim source text of a fixed-literal lexical rule - a keyword or+-- punctuation token. String literals normalize to such rules, whose clause is+-- a bare 'GP.Lit', and that literal's content is the token's only spelling.+-- This is the one place terminal text is reconstructed from a lexical clause;+-- both the generated parser's error messages ('GenY.genShowToken') and the+-- generated pretty-printer ('GenPP') reuse it. A rule whose clause is not a+-- bare literal has no single spelling, so 'Nothing' is returned and callers+-- fall back to the rule name.+literalTokenText :: LClause -> Maybe String+literalTokenText (GP.Lit _ (GP.Str _ s)) = Just s+literalTokenText _ = Nothing+ normalRules :: [SyntaxRuleGroup] -> [SyntaxRule] normalRules groups = concat $ map getSRules groups
Lexer.x view
@@ -9,7 +9,10 @@ $digit = 0-9 $alpha = [a-zA-Z]-$alphaDigit = [a-zA-Z0-9]+-- grammar.pg's id rule is [a-zA-Z][A-Za-z0-9_]*: underscores continue an+-- identifier. The reference lexer follows the spec (it used to reject '_',+-- a divergence the generated front end never had).+$alphaDigit = [a-zA-Z0-9_] $dq = " $squote = ' $notsq = [^']@@ -40,12 +43,16 @@ "$" { simple Dollar } ")" { simple RParen } "(" { simple LParen }- $squote ($notsq | "\'")* $squote { simple1 $ StrLit . (reverse.drop 1.reverse.drop 1) }- "[" ([^\]]|"\]")* "]" { simple1 $ RegExpLit . (reverse.drop 1.reverse.drop 1) }+ -- Literal tokens keep the FULL match (delimiters and escape pairs+ -- intact), exactly like the generated lexer: the shared+ -- Frontend.cleanGrammarTokens pass strips delimiters and processes+ -- escapes on the parsed AST, so the cleanup logic exists only once.+ $squote ([^'\\] | \\ .)* $squote { simple1 StrLit }+ "[" ([^\]]|"\]")* "]" { simple1 RegExpLit } "*" { simple Star } "+" { simple Plus } $alpha $alphaDigit* { simple1 Id }- $dq $dq $dq ($notdq|$dq $notdq | $dq $dq $notdq | [\n])* $dq $dq $dq { simple1 $ BigStr . (reverse.(drop 3).reverse.(drop 3))} + $dq $dq $dq ($notdq|$dq $notdq | $dq $dq $notdq | [\n])* $dq $dq $dq { simple1 BigStr } . { rtkError } {
Normalize.hs view
@@ -1,10 +1,21 @@ {-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE QuasiQuotes #-}+-- | Clause normalization: from the parsed grammar (the GENERATED AST,+-- 'GP.Grammar') down to the 'NormalGrammar' the code generators consume. module Normalize(normalizeTopLevelClauses, fillConstructorNames) where +import qualified GrammarParser as GP+import GrammarQQ (clause)+ import Syntax-import Diagnostics (Diagnostic(..), showSourcePos)-import Grammar (isNotIgnored)+import Diagnostics (Diagnostic(..), SourcePos, showSourcePos)+import Frontend (altElems, clausePos, grammarImports, grammarName, grammarRules,+ nameText, namePos, ruleClause, ruleFunc, ruleName, ruleOptions,+ rulePos, ruleTypeName, seqElems, showClause, showClauseSeq)+import Grammar (isClauseSeqLifted, isNotIgnored)+import Data.Char (isUpper)+import Control.Monad (foldM, foldM_) import Data.Generics import Data.Maybe import qualified Data.Map as M@@ -12,8 +23,12 @@ import qualified Data.Set as S import Control.Lens -import Control.Monad.State.Strict hiding (lift)-import Control.Monad.State.Strict (lift)+-- explicit import list: mtl 2.2 re-exports all of Control.Monad from this+-- module while mtl >= 2.3 (GHC 9.6's toolchain) does not, so an open import+-- makes the Control.Monad import above unused on one compiler and required+-- on the other - either way fatal under -Werror+import Control.Monad.State.Strict (State, StateT, gets, lift, modify,+ runState, runStateT) -- In the normal form top level clause of the non-lexical rule can be the following: -- 1. simple_clause *@@ -21,7 +36,7 @@ -- 3. simple_clause ? -- 4. Seq [simple_clause] -- 5. alternative of sequences of simple_clause--- +-- -- simple_clause is one of the following: -- 1. id -- 2. Ignore simple_clause@@ -40,7 +55,9 @@ -- type name -> rules that receive the $Type:var -- splice alternative (see computeQQAttachPoints) _qqAttachPoints :: M.Map ID (S.Set ID),- _currentRule :: Maybe IRule+ -- name and position of the rule being normalized,+ -- as error context and position fallback+ _currentRule :: Maybe (ID, Maybe SourcePos) } $(makeLenses ''NormalizationState)@@ -49,17 +66,29 @@ -- under the state transformer. type Normalization a = StateT NormalizationState (Either Diagnostic) a --- Report a grammar error as a Diagnostic, attaching the rule being normalized--- (its name as context and its source position, when known) when the problem--- was found.-normError :: String -> Normalization a-normError msg = do+setCurrentRule :: GP.Rule -> Normalization ()+setCurrentRule r = currentRule .= Just (ruleName r, rulePos r)++-- Report a grammar error as a Diagnostic at the given position (the+-- offending clause's, when known - the generated AST carries a position on+-- every node), attaching the rule being normalized as context; the rule's+-- header position is the fallback when the node carries none.+normErrorWith :: Maybe SourcePos -> String -> Normalization a+normErrorWith mpos msg = do ctx <- gets _currentRule let diag = case ctx of- Just r -> Diagnostic (getIRulePos r) (Just ("in rule '" ++ getIRuleName r ++ "'")) msg- Nothing -> Diagnostic Nothing Nothing msg+ Just (rn, rpos) -> Diagnostic (maybe rpos Just mpos) (Just ("in rule '" ++ rn ++ "'")) msg+ Nothing -> Diagnostic mpos Nothing msg lift (Left diag) +-- A rule-level error: positioned at the current rule's header.+normError :: String -> Normalization a+normError = normErrorWith Nothing++-- A clause-level error: positioned at the offending clause.+normErrorAt :: GP.Clause -> String -> Normalization a+normErrorAt c = normErrorWith (clausePos c)+ newNamePrefixed :: String -> Normalization String newNamePrefixed prefix = do n <- gets _nameCounter@@ -70,13 +99,13 @@ newName = newNamePrefixed "Rule_" saveProxyRuleName :: ID -> Normalization ()-saveProxyRuleName ruleName = do- proxyRuleNames %= S.insert ruleName+saveProxyRuleName ruleName0 = do+ proxyRuleNames %= S.insert ruleName0 return () addRule :: ID -> ID -> SyntaxTopClause -> Normalization ()-addRule tdName ruleName clause = do- let doAdd rs = Just $ (SyntaxRule ruleName clause) : (maybe [] id rs)+addRule tdName ruleName0 clause0 = do+ let doAdd rs = Just $ (SyntaxRule ruleName0 clause0) : (maybe [] id rs) normSRules %= M.alter doAdd tdName return () @@ -94,12 +123,13 @@ addQQLexRule tdName = do -- Use deterministic name based on type name, not counter let termKindName = "qq_" ++ tdName- addLexicalRule $ LexicalRule "String" "(tail . dropWhile (/= ':'))" termKindName- (IAlt [ISeq [IStrLit "$",- IStrLit tdName,- IStrLit ":",- IRegExpLit "a-zA-Z_",- IStar (IRegExpLit "A-Za-z0-9_") Nothing]])+ np = GP.rtkNoPos+ lit s = GP.Lit np (GP.Str np s)+ cl = foldl1 (GP.Seq np)+ [ lit "$", lit tdName, lit ":"+ , GP.Regex np "a-zA-Z_"+ , GP.Star np (GP.Regex np "A-Za-z0-9_") ]+ addLexicalRule $ LexicalRule "String" "(tail . dropWhile (/= ':'))" termKindName cl return termKindName -- Cached version of addQQLexRule that reuses existing QQ lex rules for the same type@@ -134,23 +164,23 @@ return constr addRuleWithQQ :: ID -> ID -> SyntaxTopClause -> Normalization ()-addRuleWithQQ tdName ruleName clause = do- case clause of+addRuleWithQQ tdName ruleName0 clause0 = do+ case clause0 of STAltOfSeq altseqs -> case L.find (\(STSeq _ ssc) -> case ssc of (SSLifted _ : _) -> True _ -> False) altseqs of- Just _ -> addRule tdName ruleName clause+ Just _ -> addRule tdName ruleName0 clause0 Nothing -> qqAdd altseqs STMany opType (SSId rule) mcl -> do -- For list rules, look up the actual type data name for the element rule -- This handles cases where the element rule has a shared type (e.g., Expression : AddExpr) typeMap <- use ruleToTypeName let elemTypeName = M.findWithDefault rule rule typeMap- newRule <- addListProxyRule elemTypeName rule ruleName- addRule tdName ruleName $ STMany opType (SSId newRule) mcl- _ -> addRule tdName ruleName clause+ newRule <- addListProxyRule elemTypeName rule ruleName0+ addRule tdName ruleName0 $ STMany opType (SSId newRule) mcl+ _ -> addRule tdName ruleName0 clause0 where qqAdd altseqs = do -- The QQ machinery (lexical rule, anti rule) is created at the first -- eligible rule of the type, as before; but the splice alternative@@ -163,14 +193,14 @@ qqLexRule <- addQQLexRuleCached tdName -- Use cached version constr <- addAntiRuleCached tdName False -- Use cached version attachMap <- use qqAttachPoints- let attachHere = S.member ruleName $ M.findWithDefault S.empty tdName attachMap+ let attachHere = S.member ruleName0 $ M.findWithDefault S.empty tdName attachMap if attachHere- then addRule tdName ruleName $ STAltOfSeq (STSeq constr [SSId qqLexRule] : altseqs)- else addRule tdName ruleName clause+ then addRule tdName ruleName0 $ STAltOfSeq (STSeq constr [SSId qqLexRule] : altseqs)+ else addRule tdName ruleName0 clause0 addListProxyRule :: ID -> ID -> ID -> Normalization ID addListProxyRule tdName elemRuleName listName = do- ruleName <- newNamePrefixed $ "ListElem_" ++ listName+ ruleName0 <- newNamePrefixed $ "ListElem_" ++ listName -- The QQ token is named after the LIST rule (e.g. $RuleList:xs for -- "RuleList = Rule*"), because GenQ's anti functions for isList rules -- splice whole lists: in patterns the anti node binds the entire list,@@ -179,50 +209,192 @@ -- since the token parses in element position within the list. qqLexRule <- addQQLexRuleCached listName constr <- addAntiRuleCached tdName True- addRule tdName ruleName $ STAltOfSeq [STSeq constr [SSId qqLexRule], STSeq "" [SSLifted elemRuleName]]- return ruleName+ addRule tdName ruleName0 $ STAltOfSeq [STSeq constr [SSId qqLexRule], STSeq "" [SSLifted elemRuleName]]+ return ruleName0 -extractClause :: IClause -> Normalization ID+extractClause :: GP.Clause -> Normalization ID extractClause cl = do- ruleName <- newName- cl1 <- checkNormalClause cl- addRule ruleName ruleName cl1- saveProxyRuleName ruleName- return $ ruleName+ ruleName0 <- newName+ cl1 <- checkClause cl+ addRule ruleName0 ruleName0 cl1+ saveProxyRuleName ruleName0+ return $ ruleName0 extractSClause :: SyntaxTopClause -> Normalization ID extractSClause cl = do- ruleName <- newName- addRule ruleName ruleName cl- saveProxyRuleName ruleName- return $ ruleName+ ruleName0 <- newName+ addRule ruleName0 ruleName0 cl+ saveProxyRuleName ruleName0+ return $ ruleName0 -processRuleOptions :: IRule -> Normalization ()-processRuleOptions IRule{getIDataTypeName=dtn, getIRuleName=rn, getIRuleOptions=ropts} = do- let dtName = (maybe rn Prelude.id dtn)+processRuleOptions :: GP.Rule -> Normalization ()+processRuleOptions r = do+ let dtName = fromMaybe (ruleName r) (ruleTypeName r) mapM_ (\ opt -> case opt of- OShortcuts lst -> mapM_ (\ shortcut -> do- addShortcut shortcut dtName- return ()) lst- OSymmacro -> return () -- Handle symmacro option- ) ropts+ GP.Shortcuts _ ids -> mapM_ (\ shortcut -> do+ addShortcut (nameText shortcut) dtName+ return ()) ids+ GP.Symmacro _ -> return () -- Handle symmacro option+ GP.Anti_Option v -> error $ "Normalize: quasi-quotation-only Option"+ ++ " cannot come from a grammar file: $" ++ v+ ) (ruleOptions r) -checkSimpleClause :: IClause -> Normalization SyntaxSimpleClause-checkSimpleClause (IId idName) = return $ SSId idName-checkSimpleClause (ILifted (IId idName)) = return $ SSLifted idName-checkSimpleClause (IIgnore c1) = do- newC1 <- checkSimpleClause c1+isSymmacroOption :: GP.Option -> Bool+isSymmacroOption GP.Symmacro{} = True+isSymmacroOption _ = False++--------------------------------------------------------------------------------+-- Clause normalization over the generated AST.+--+-- The functions below dispatch on POSITION, because the generated AST has no+-- canonicalizing wrappers: an Alt/Seq node in rule (or group) position is+-- the rule's own alternation/sequence, while the same node in element+-- position can only have come from a parenthesized group (grammar.pg's+-- 'Clause5 = '(' ,Clause ')'' lifts the group, the parentheses leave no+-- node) and is extracted into a proxy rule. Optional clauses desugar inline+-- - 'c?' becomes an alternation with an empty alternative - since the+-- generated AST cannot represent empty sequences (the old removeOpts+-- pre-pass rewrote them on the retired IClause representation).+--+-- Repetition and option shapes are matched with rtk's own quasi-quoter+-- ([clause| $cl1 * ~ $cl2 |] is the shape in grammar syntax; see Frontend's+-- module notes for the metavariable convention). The constructor spelling+-- stays where it reads better: wildcard tests like GP.Lifted{}, and arms+-- that bind a scalar Name, which the quoter cannot (grammar.pg's Name+-- splices are list-shaped, registered by IdList).+--------------------------------------------------------------------------------++-- A clause in rule (or parenthesized-group) position: an alternation of+-- sequences.+checkClause :: GP.Clause -> Normalization SyntaxTopClause+checkClause c = case altElems c of+ [alt] -> checkSingleAlt alt+ alts -> STAltOfSeq <$> mapM checkAltSeq alts++-- A sole alternative: a repetition or option here shapes the whole rule+-- (STMany / the desugared option), everything else is a one-alternative+-- alternation.+checkSingleAlt :: GP.Clause -> Normalization SyntaxTopClause+checkSingleAlt (GP.Labeled _ n body) = do+ s <- checkNamedSeq n body+ return $ STAltOfSeq [s]+checkSingleAlt alt = case seqElems alt of+ [el] -> checkSoleElement el+ els -> do+ s <- checkSeqOf els+ return $ STAltOfSeq [s]++checkSoleElement :: GP.Clause -> Normalization SyntaxTopClause+checkSoleElement c = case c of+ [clause| $cl1 * |] -> STMany STStar <$> checkRepeated cl1 <*> pure Nothing+ [clause| $cl1 * ~ $cl2 |] -> STMany STStar <$> checkRepeated cl1 <*> (Just <$> checkSimple cl2)+ [clause| $cl1 + |] -> STMany STPlus <$> checkRepeated cl1 <*> pure Nothing+ [clause| $cl1 + ~ $cl2 |] -> STMany STPlus <$> checkRepeated cl1 <*> (Just <$> checkSimple cl2)+ [clause| $cl1 ? |] -> desugarOpt cl1+ GP.Lifted{} -> checkLiftedAlone c+ GP.Ignored{} -> checkIgnoredAlone c+ GP.Ref _ n -> return $ STAltOfSeq [STSeq "" [SSId (nameText n)]]+ -- group spines reach here only through extractClause; checkClause+ -- re-flattens them+ GP.Alt{} -> checkClause c+ GP.Seq{} -> checkClause c+ GP.Labeled{} -> checkClause c+ _ -> normErrorAt c $ "this clause cannot be used in a syntax rule: " ++ showClause c+ ++ " (regular expressions and '.' are only allowed in lexical rules)"++-- c? desugars to ( | c): an empty alternative plus the optional clause.+desugarOpt :: GP.Clause -> Normalization SyntaxTopClause+desugarOpt el = do+ c1 <- checkSimple el+ return $ STAltOfSeq [STSeq "" [], STSeq "" [c1]]++-- A lifted (,) clause names the single rule whose value becomes this rule's+-- value, so it must reference one rule, not a repetition. Lifting a list/plus+-- (e.g. "Foo = ,Bar* ;") is not implemented: it would otherwise slip through to+-- GenAST.genSimpleItem and die there ("lifted rules are not yet implemented").+-- (',Bar?' is fine: the option desugars into a proxy rule and the proxy is+-- lifted.)+checkLiftedAlone :: GP.Clause -> Normalization SyntaxTopClause+checkLiftedAlone c@(GP.Lifted _ body)+ | isStarPlus body =+ normErrorAt c "a lifted (,) clause is not supported under *, + or ?"+ | otherwise = do+ c1 <- checkSimple body+ case c1 of+ SSId idName -> return $ STAltOfSeq [STSeq "" [SSLifted idName]]+ _ -> normErrorAt c $ "lifted (,) cannot be applied to: " ++ showClause body+checkLiftedAlone c = normErrorAt c $ "lifted (,) cannot be applied to: " ++ showClause c++checkIgnoredAlone :: GP.Clause -> Normalization SyntaxTopClause+checkIgnoredAlone c@(GP.Ignored _ body) = do+ c1 <- checkSimple body+ case c1 of+ SSId idName -> return $ STAltOfSeq [STSeq "" [SSIgnore idName]]+ _ -> normErrorAt c $ "ignore (!) cannot be applied to: " ++ showClause body+checkIgnoredAlone c = normErrorAt c $ "ignore (!) cannot be applied to: " ++ showClause c++isStarPlus :: GP.Clause -> Bool+isStarPlus GP.Star{} = True+isStarPlus GP.StarDelim{} = True+isStarPlus GP.Plus{} = True+isStarPlus GP.PlusDelim{} = True+isStarPlus _ = False++-- One alternative of a multi-alternative rule.+checkAltSeq :: GP.Clause -> Normalization STSeq+checkAltSeq (GP.Labeled _ n body) = checkNamedSeq n body+checkAltSeq alt = checkSeqOf (seqElems alt)++checkSeqOf :: [GP.Clause] -> Normalization STSeq+checkSeqOf els = do+ cs1 <- mapM checkSimple els+ checkLiftedInSeq els cs1+ return $ STSeq "" cs1++-- A named alternative ("Star: Clause5 '*'"): the body normalizes exactly+-- like the same alternative would unlabeled, and the user's name replaces+-- the generated Ctr__ one. Note this means a label always produces a+-- constructor: a sole "R = L: A* ;" alternative is a data declaration whose+-- L wraps the (proxied) list, where the unlabeled spelling would have made+-- R a bare list alias. Only a lifted (,) alternative cannot be named - it+-- passes another rule's value through and produces no constructor, so a+-- name on it would silently vanish (GenY ignores names on lifted+-- alternatives, GenAST filters them from the data declaration).+checkNamedSeq :: GP.Name -> GP.Clause -> Normalization STSeq+checkNamedSeq n body = do+ STSeq _ cs1 <- checkSeqOf (seqElems body)+ if isClauseSeqLifted cs1+ then normErrorWith (namePos n) $+ "the lifted (,) alternative '" ++ showClauseSeq (seqElems body)+ ++ "' passes another rule's value through and produces no constructor,"+ ++ " so it cannot be named '" ++ nameText n ++ "': remove the label or the ','"+ else return $ STSeq (nameText n) cs1++-- A lifted (,) clause must be the only non-ignored clause of its sequence.+-- Check it here, where the offending clause is still known, instead of failing+-- without context during code generation (see isClauseSeqLifted)+checkLiftedInSeq :: [GP.Clause] -> [SyntaxSimpleClause] -> Normalization ()+checkLiftedInSeq orig cs =+ case filter isNotIgnored cs of+ [SSLifted _] -> return ()+ cs1 | any isLifted cs1 ->+ normErrorWith (firstLiftedPos orig) $+ "a lifted (,) clause cannot be mixed with other clauses in a sequence: "+ ++ showClauseSeq orig+ _ -> return ()+ where isLifted SSLifted{} = True+ isLifted _ = False+ firstLiftedPos os = listToMaybe [ p | o@GP.Lifted{} <- os, Just p <- [clausePos o] ]++checkSimple :: GP.Clause -> Normalization SyntaxSimpleClause+checkSimple (GP.Ref _ n) = return $ SSId (nameText n)+checkSimple (GP.Lifted _ (GP.Ref _ n)) = return $ SSLifted (nameText n)+checkSimple c@(GP.Ignored _ body) = do+ newC1 <- checkSimple body case newC1 of SSId idName -> return $ SSIgnore idName- _ -> normError $ "ignore (!) cannot be applied to: " ++ showClause c1-checkSimpleClause c = extractClause c >>= return . SSId---- A repetition/option clause: cannot be the body of a lifted (,) clause.-isRepetition :: IClause -> Bool-isRepetition IStar{} = True-isRepetition IPlus{} = True-isRepetition IOpt{} = True-isRepetition _ = False+ _ -> normErrorAt c $ "ignore (!) cannot be applied to: " ++ showClause body+checkSimple c = extractClause c >>= return . SSId -- The repeated element of a * or + clause must be a syntax rule: the rule's -- value is a list of the element's values, and the element's splice support@@ -233,144 +405,129 @@ -- produces a bare token payload with no data declaration. Both used to slip -- through to the generators and emit uncompilable Haskell (issue #28), as -- did a lifted (,) element, which crashed GenAST. Reject them here, where--- the offending rule is still known. The delimiter is unrestricted: it is+-- the offending clause is still known. The delimiter is unrestricted: it is -- matched and dropped, so any clause works there.-checkRepeatedClause :: IClause -> Normalization SyntaxSimpleClause-checkRepeatedClause c = do- c1 <- checkSimpleClause c+checkRepeated :: GP.Clause -> Normalization SyntaxSimpleClause+checkRepeated c = do+ c1 <- checkSimple c case c1 of -- Not rendered via showClause: a string literal is already replaced by -- its internal token name (tok_..._N) at this stage, which would leak -- into the message; the rule context and position locate the clause.- SSIgnore _ -> normError $ "repetition of an item that produces no value:"+ SSIgnore _ -> normErrorAt c $ "repetition of an item that produces no value:" ++ " the repeated item is a string literal or !-ignored clause," ++ " which is matched but dropped;" ++ " wrap the item in a syntax rule and repeat that rule instead" SSId name | isLexicalRule name ->- normError $ "repetition over the lexical rule '" ++ name ++ "' is not supported:"+ normErrorAt c $ "repetition over the lexical rule '" ++ name ++ "' is not supported:" ++ " wrap it in a syntax rule (Item = " ++ name ++ " ;) and repeat Item" ++ " to give the list elements a data type"- SSLifted _ -> normError "a lifted (,) clause is not supported under *, + or ?"+ SSLifted _ -> normErrorAt c "a lifted (,) clause is not supported under *, + or ?" _ -> return c1 -checkNormalClause :: IClause -> Normalization SyntaxTopClause-checkNormalClause (IStar c mc) = do- c1 <- checkRepeatedClause c- c2l <- mapM checkSimpleClause (maybeToList mc)- return $ STMany STStar c1 (listToMaybe c2l)-checkNormalClause (IPlus c mc) = do- c1 <- checkRepeatedClause c- c2l <- mapM checkSimpleClause (maybeToList mc)- return $ STMany STPlus c1 (listToMaybe c2l)-checkNormalClause (IOpt c) = do- c1 <- checkSimpleClause c- return $ STOpt c1-checkNormalClause (IAlt [c]) = do- checkNormalClause c-checkNormalClause (IAlt cs) = do- cs1 <- mapM checkNormalClauseSeq cs- return $ STAltOfSeq cs1-checkNormalClause (ISeq [c]) = do- checkNormalClause c-checkNormalClause tc@(ISeq _) = do- c1 <- checkNormalClauseSeq tc- return $ STAltOfSeq [c1]--- A lifted (,) clause names the single rule whose value becomes this rule's--- value, so it must reference one rule, not a repetition. Lifting a list/plus--- (e.g. "Foo = ,Bar* ;") is not implemented: it would otherwise slip through to--- GenAST.genSimpleItem and die there ("lifted rules are not yet implemented").--- (IOpt is desugared by removeOpts before normalization, so only * and + reach--- here as repetitions.)-checkNormalClause (ILifted c)- | isRepetition c =- normError "a lifted (,) clause is not supported under *, + or ?"- | otherwise = do- c1 <- checkSimpleClause c- case c1 of- SSId idName -> return $ STAltOfSeq [STSeq "" [SSLifted idName]]- _ -> normError $ "lifted (,) cannot be applied to: " ++ showClause c-checkNormalClause (IIgnore c) = do- c1 <- checkSimpleClause c- case c1 of- SSId idName -> return $ STAltOfSeq [STSeq "" [SSIgnore idName]]- _ -> normError $ "ignore (!) cannot be applied to: " ++ showClause c-checkNormalClause (IId idName) = do- return $ STAltOfSeq [STSeq "" [SSId idName]]-checkNormalClause c = normError $ "this clause cannot be used in a syntax rule: " ++ showClause c- ++ " (regular expressions and '.' are only allowed in lexical rules)"--checkNormalClauseSeq :: IClause -> Normalization STSeq-checkNormalClauseSeq (ISeq cs) = do- cs1 <- mapM checkSimpleClause cs- checkLiftedInSeq cs cs1- return $ STSeq "" cs1-checkNormalClauseSeq ic = do- c1 <- checkSimpleClause ic- return $ STSeq "" [c1]---- A lifted (,) clause must be the only non-ignored clause of its sequence.--- Check it here, where the offending rule is still known, instead of failing--- without context during code generation (see isClauseSeqLifted)-checkLiftedInSeq :: [IClause] -> [SyntaxSimpleClause] -> Normalization ()-checkLiftedInSeq orig cs =- case filter isNotIgnored cs of- [SSLifted _] -> return ()- cs1 | any isLifted cs1 -> normError $ "a lifted (,) clause cannot be mixed with other clauses in a sequence: "- ++ showClause (ISeq orig)- _ -> return ()- where isLifted SSLifted{} = True- isLifted _ = False--normalizeRule :: IRule -> Normalization ()-normalizeRule r@IRule{getIDataTypeName=dtn, getIRuleName=rn, getIClause=cl, getIDataFunc=_, getIRuleOptions=_} | not (isLexicalRule rn) = do+normalizeRule :: GP.Rule -> Normalization ()+normalizeRule r | not (isLexicalRule rn) = do processRuleOptions r- newCl <- checkNormalClause cl- addRuleWithQQ (maybe rn Prelude.id dtn) rn newCl-normalizeRule r@IRule{getIDataTypeName=dtn, getIDataFunc=df, getIRuleName=rn, getIClause=cl, getIRuleOptions=_} | (isLexicalRule rn) = do- let (dtn1, df1) = case (dtn, df) of+ newCl <- checkClause (ruleClause r)+ addRuleWithQQ (fromMaybe rn (ruleTypeName r)) rn newCl+ where rn = ruleName r+normalizeRule r = do+ let rn = ruleName r+ (dtn1, df1) = case (ruleTypeName r, ruleFunc r) of (Nothing, Nothing) -> ("String", "id") (Just d, Nothing) -> (d, "read") (Just d, Just f) -> (d, f) (Nothing, Just f) -> ("String", f)- if (OSymmacro `elem` (getIRuleOptions r))+ if any isSymmacroOption (ruleOptions r) then- addLexicalRule $ MacroRule rn cl+ addLexicalRule $ MacroRule rn (ruleClause r) else- addLexicalRule $ LexicalRule dtn1 df1 rn cl-normalizeRule r = error $ "normalizeRule: unexpected rule pattern: " ++ show r+ addLexicalRule $ LexicalRule dtn1 df1 rn (ruleClause r) -- Build a map from rule name to type data name for all rules in the grammar. -- This is needed to look up the correct type when processing list rules.-buildRuleToTypeMap :: InitialGrammar -> M.Map ID ID-buildRuleToTypeMap grammar = M.fromList $ map ruleMapping $ getIRules grammar+buildRuleToTypeMap :: [GP.Rule] -> M.Map ID ID+buildRuleToTypeMap rules = M.fromList $ map ruleMapping rules where- ruleMapping r = (getIRuleName r, maybe (getIRuleName r) id (getIDataTypeName r))+ ruleMapping r = (ruleName r, fromMaybe (ruleName r) (ruleTypeName r)) -- A rule name may be defined only once: addRule would otherwise silently -- merge the definitions into one rule group, turning an (almost certainly -- accidental) duplicate into extra alternatives (issue #20). Checked on the -- input rules, so the synthesized start wrapper added later by addStartGroup -- - which legitimately reuses the start rule's name - is exempt.-checkDuplicateRuleNames :: [IRule] -> Normalization ()+checkDuplicateRuleNames :: [GP.Rule] -> Normalization () checkDuplicateRuleNames = go M.empty where go _ [] = return () go seen (r : rest) =- case M.lookup (getIRuleName r) seen of- Nothing -> go (M.insert (getIRuleName r) r seen) rest+ case M.lookup (ruleName r) seen of+ Nothing -> go (M.insert (ruleName r) r seen) rest Just firstDef -> do- currentRule .= Just r- normError $ "rule '" ++ getIRuleName r ++ "' is defined more than once"+ setCurrentRule r+ normError $ "rule '" ++ ruleName r ++ "' is defined more than once" ++ firstDefinedAt firstDef- firstDefinedAt r = case getIRulePos r of+ firstDefinedAt r = case rulePos r of Just pos -> " (first definition at " ++ showSourcePos pos ++ ")" Nothing -> "" +-- Explicit constructor names ("Name: ..." alternative labels) are validated+-- up front, while the offending label and its position are still known:+--+-- * the name must be constructor-shaped (start with an uppercase letter;+-- the lexer already restricts it to [A-Za-z0-9_]*);+-- * the generated-name conventions are reserved: 'Ctr__' (Normalize fills+-- unnamed alternatives with such names) and 'Anti_' (the quasi-quotation+-- splice constructors built by addAntiRuleCached);+-- * explicit names must be unique across the WHOLE grammar, not just their+-- own rule: all constructors land in one generated Haskell module, and a+-- duplicate within a shared-type group would additionally be merged+-- silently by GenAST's constructor-name deduplication (which exists for+-- the Anti_ alternatives), dropping one of the user's alternatives;+-- * lexical rules carry no AST constructors, so labels there are rejected+-- rather than silently ignored.+checkCtorLabels :: [GP.Rule] -> Normalization ()+checkCtorLabels = foldM_ checkRule M.empty+ where+ checkRule seen r = do+ setCurrentRule r+ foldM (checkName r) seen (ctorLabels (ruleClause r))+ ctorLabels :: GP.Clause -> [GP.Name]+ ctorLabels = everything (++) ([] `mkQ` label)+ where label (GP.Labeled _ n _) = [n]+ label _ = []+ checkName r seen nm+ | isLexicalRule (ruleName r) =+ labelError nm $ "a constructor name ('" ++ n ++ ":') cannot appear in a lexical rule:"+ ++ " tokens carry no AST constructors"+ | not (startsUpper n) =+ labelError nm $ "constructor name '" ++ n ++ "' must start with an uppercase letter"+ | "Ctr__" `L.isPrefixOf` n =+ labelError nm $ "constructor name '" ++ n ++ "' uses the reserved prefix 'Ctr__'"+ ++ " (rtk generates such names for unnamed alternatives)"+ | "Anti_" `L.isPrefixOf` n =+ labelError nm $ "constructor name '" ++ n ++ "' uses the reserved prefix 'Anti_'"+ ++ " (rtk generates such names for quasi-quotation splices)"+ | Just firstUse <- M.lookup n seen =+ labelError nm $ "constructor name '" ++ n ++ "' is already used"+ ++ inRule firstUse+ ++ ": explicit constructor names must be unique across the grammar"+ ++ " (all constructors share one generated Haskell module)"+ | otherwise = return $ M.insert n (ruleName r, namePos nm) seen+ where n = nameText nm+ labelError nm = normErrorWith (namePos nm)+ startsUpper (ch : _) = isUpper ch+ startsUpper [] = False+ inRule (rn, mpos) = " in rule '" ++ rn ++ "'"+ ++ case mpos of+ Just pos -> " (at " ++ showSourcePos pos ++ ")"+ Nothing -> ""+ -- Every bare-name reference inside a clause.-allIdRefs :: IClause -> [ID]+allIdRefs :: GP.Clause -> [ID] allIdRefs = everything (++) ([] `mkQ` idRef)- where idRef (IId n) = [n]- idRef _ = []+ where idRef (GP.Ref _ n) = [nameText n]+ idRef _ = [] -- A declared type may exist only through rule annotations ("T : Rule = ..."), -- with no rule named T - a "pure type group". A reference to such a bare type@@ -388,7 +545,7 @@ -- -- A lifted alternative passes the annotated rule's value through, so the -- cover adds a nonterminal for T without adding an AST constructor. It is--- synthesized on the InitialGrammar, before any normalization bookkeeping,+-- synthesized on the parsed rule list, before any normalization bookkeeping, -- so it flows through buildRuleToTypeMap and computeQQAttachPoints exactly -- like a hand-written cover: its alternatives are unit edges r_i -> T, the -- annotated rules therefore cover the always-demanded T, and a $T:var@@ -405,34 +562,32 @@ -- start type, no synthesized cover joining the group, and no list-element -- proxy added into it by a repetition over a start-typed element. Grammars -- that demand no cover are returned untouched, output byte for byte.-synthesizeTypeCovers :: InitialGrammar -> InitialGrammar-synthesizeTypeCovers grammar- | null covers = grammar- | otherwise = grammar { getIRules = getIRules grammar ++ covers }+synthesizeTypeCovers :: [GP.Rule] -> [GP.Rule]+synthesizeTypeCovers rules+ | null covers = rules+ | otherwise = rules ++ covers where- rules = getIRules grammar- synRules = [ r | r <- rules, not (isLexicalRule (getIRuleName r)) ]- ruleNames = S.fromList (map getIRuleName rules)- ruleTypeOf r = maybe (getIRuleName r) Prelude.id (getIDataTypeName r)- typeOfName = M.fromList [ (getIRuleName r, ruleTypeOf r) | r <- synRules ]+ synRules = [ r | r <- rules, not (isLexicalRule (ruleName r)) ]+ ruleNames = S.fromList (map ruleName rules)+ ruleTypeOf r = fromMaybe (ruleName r) (ruleTypeName r)+ typeOfName = M.fromList [ (ruleName r, ruleTypeOf r) | r <- synRules ] -- declared types and each type's annotated rules, in declaration order- declaredTypes = L.nub [ t | r <- synRules, Just t <- [getIDataTypeName r] ]- rulesOfType t = [ getIRuleName r | r <- synRules, getIDataTypeName r == Just t ]+ declaredTypes = L.nub [ t | r <- synRules, Just t <- [ruleTypeName r] ]+ rulesOfType t = [ ruleName r | r <- synRules, ruleTypeName r == Just t ] pureTypes = [ t | t <- declaredTypes, not (t `S.member` ruleNames) ] - referenced = S.fromList $ concatMap (allIdRefs . getIClause) synRules+ referenced = S.fromList $ concatMap (allIdRefs . ruleClause) synRules demanded | aliasStart = [ t | t <- pureTypes, t `S.member` referenced ] | otherwise = pureTypes -- the start wrapper references every type covers = map coverRule demanded- coverRule t = IRule { getIDataTypeName = Just t- , getIDataFunc = Nothing- , getIRuleName = t- , getIClause = IAlt [ ILifted (IId r) | r <- rulesOfType t ]- , getIRuleOptions = []- , getIRulePos = Nothing }+ coverRule t = GP.RuleTyped np (ident t) (ident t)+ (foldl1 (GP.Alt np)+ [ GP.Lifted np (GP.Ref np (ident r)) | r <- rulesOfType t ])+ np = GP.rtkNoPos+ ident = GP.Ident np aliasStart = case synRules of [] -> True -- no wrappers (normalization rejects the grammar first)@@ -441,31 +596,25 @@ in case [ r | r <- synRules, ruleTypeOf r == firstID ] of -- a cover joins the group when the start type is itself a -- referenced pure type- [r] -> isTopRepetition (getIClause r)+ [r] -> isTopRepetition (ruleClause r) && not (firstID `elem` pureTypes && firstID `S.member` referenced) && all ((/= Just firstID) . topRepetitionElemType) synRules _ -> False - isTopRepetition c = case unwrapSingleton c of- IStar{} -> True- IPlus{} -> True- _ -> False+ isTopRepetition = isStarPlus -- The type of the element a top-level repetition rule collects: such a -- rule gets a ListElem proxy added into the ELEMENT type's group (see -- addRuleWithQQ/addListProxyRule). A non-reference element is extracted -- into a fresh proxy group of its own and can never hit the start group.- topRepetitionElemType r = case unwrapSingleton (getIClause r) of- IStar c _ -> elemType c- IPlus c _ -> elemType c- _ -> Nothing- where elemType (IId e) = Just (M.findWithDefault e e typeOfName)- elemType _ = Nothing-- -- mirrors checkNormalClause's singleton unwrapping- unwrapSingleton (IAlt [c]) = unwrapSingleton c- unwrapSingleton (ISeq [c]) = unwrapSingleton c- unwrapSingleton c = c+ topRepetitionElemType r = case ruleClause r of+ [clause| $cl1 * |] -> elemType cl1+ [clause| $cl1 * ~ $Clause:_delim |] -> elemType cl1+ [clause| $cl1 + |] -> elemType cl1+ [clause| $cl1 + ~ $Clause:_delim |] -> elemType cl1+ _ -> Nothing+ where elemType (GP.Ref _ n) = Just (M.findWithDefault (nameText n) (nameText n) typeOfName)+ elemType _ = Nothing -- Decide, for every data type, which of its rules receive the $Type:var -- splice alternative ("attach points"). A type declared by a single rule@@ -506,87 +655,90 @@ -- least as available as before: when no rule is named after the type, every -- rule of the group counts as demanded; and when the greedy cover cannot -- cover anything, every candidate becomes an attach point.-computeQQAttachPoints :: InitialGrammar -> M.Map ID (S.Set ID)-computeQQAttachPoints grammar = M.fromList $ map attachFor groups+computeQQAttachPoints :: [GP.Rule] -> M.Map ID (S.Set ID)+computeQQAttachPoints rules = M.fromList $ map attachFor groups where- synRules = [ r | r <- getIRules grammar, not (isLexicalRule (getIRuleName r)) ]- ruleTypeOf r = maybe (getIRuleName r) Prelude.id (getIDataTypeName r)+ synRules = [ r | r <- rules, not (isLexicalRule (ruleName r)) ]+ ruleTypeOf r = fromMaybe (ruleName r) (ruleTypeName r) groupNames = L.nub $ map ruleTypeOf synRules groups = [ (t, [ r | r <- synRules, ruleTypeOf r == t ]) | t <- groupNames ]- groupOfRule = M.fromList [ (getIRuleName r, ruleTypeOf r) | r <- synRules ]+ groupOfRule = M.fromList [ (ruleName r, ruleTypeOf r) | r <- synRules ] -- Rule-level nullability, by fixpoint. Lexical rules (and unknown names) -- never match the empty input.- clausesByName = M.fromListWith (flip (++)) [ (getIRuleName r, [getIClause r]) | r <- synRules ]+ clausesByName = M.fromListWith (flip (++)) [ (ruleName r, [ruleClause r]) | r <- synRules ] nullableRules = fixNullable S.empty fixNullable env = let env' = S.fromList [ n | (n, cls) <- M.toList clausesByName , any (clauseNullable env) cls ] in if env' == env then env else fixNullable env' clauseNullable env c = case c of- IId n -> S.member n env- IStrLit _ -> False- IDot -> False- IRegExpLit _ -> False- IStar _ _ -> True- IOpt _ -> True- IPlus c1 _ -> clauseNullable env c1- IAlt cs -> any (clauseNullable env) cs- ISeq cs -> all (clauseNullable env) cs- ILifted c1 -> clauseNullable env c1- IIgnore c1 -> clauseNullable env c1+ GP.Ref _ n -> S.member (nameText n) env+ GP.Lit _ _ -> False+ GP.Dot _ -> False+ GP.Regex _ _ -> False+ GP.Star _ _ -> True+ GP.StarDelim _ _ _ -> True+ GP.Opt _ _ -> True+ GP.Plus _ c1 -> clauseNullable env c1+ GP.PlusDelim _ c1 _ -> clauseNullable env c1+ GP.Alt _ l r -> clauseNullable env l || clauseNullable env r+ GP.Seq _ l r -> clauseNullable env l && clauseNullable env r+ GP.Lifted _ c1 -> clauseNullable env c1+ GP.Ignored _ c1 -> clauseNullable env c1+ GP.Labeled _ _ c1 -> clauseNullable env c1+ GP.Anti_Clause _ -> False isNullable = clauseNullable nullableRules - -- The alternatives a clause normalizes to, mirroring checkNormalClause:- -- singleton wrappers unwrap, a top-level option contributes an empty- -- alternative (removeOpts), everything else is a single alternative.- unwrapTop (IAlt [c]) = unwrapTop c- unwrapTop (ISeq [c]) = unwrapTop c- unwrapTop c = c- topAlts c = case unwrapTop c of- IAlt cs -> cs- IOpt c1 -> [ISeq [], ISeq [c1]]- c' -> [c']+ -- The alternatives a clause normalizes to, as element lists (the empty+ -- list is the empty alternative an option desugars to). Mirrors+ -- checkClause/desugarOpt.+ topAlts :: GP.Clause -> [[GP.Clause]]+ topAlts c = case c of+ GP.Alt{} -> map seqElems (altElems c)+ [clause| $cl1 ? |] -> [[], [cl1]]+ _ -> [seqElems c] -- The non-nullable core of an alternative: Just n for a nonterminal -- whose value passes through (a plain or lifted reference), Nothing for- -- anything opaque (tokens, ignored or repeated material, nested- -- alternatives, which normalize to proxy rules).+ -- anything opaque (tokens, ignored or repeated material, parenthesized+ -- groups, which normalize to proxy rules). coreElems c | isNullable c = [] | otherwise = case c of- ISeq cs -> concatMap coreElems cs- IId n -> [Just n]- ILifted c1 -> coreElems c1- _ -> [Nothing]- unitTarget alt = case coreElems alt of+ GP.Ref _ n -> [Just (nameText n)]+ GP.Lifted _ c1 -> coreElems c1+ _ -> [Nothing]+ unitTarget alt = case concatMap coreElems alt of [Just n] -> Just n _ -> Nothing -- Mirror of the addRuleWithQQ guard: would this clause get the splice -- alternative at all? (STMany rules take the list-proxy path; a leading -- lifted (,) clause suppresses the alternative.)- eligibleClause c = case unwrapTop c of- IStar{} -> False- IPlus{} -> False- ILifted _ -> False- c' -> not $ any altLeadsLifted (topAlts c')- altLeadsLifted (ISeq (c:_)) = liftedIdHead c- altLeadsLifted c = liftedIdHead c- liftedIdHead (ILifted (IId _)) = True- liftedIdHead _ = False+ eligibleClause c = case c of+ GP.Star{} -> False+ GP.StarDelim{} -> False+ GP.Plus{} -> False+ GP.PlusDelim{} -> False+ GP.Lifted{} -> False+ _ -> not $ any altLeadsLifted (topAlts c)+ altLeadsLifted (e : _) = liftedIdHead e+ altLeadsLifted [] = False+ liftedIdHead (GP.Lifted _ (GP.Ref _ _)) = True+ liftedIdHead _ = False - attachFor (t, [r]) = (t, S.singleton (getIRuleName r))+ attachFor (t, [r]) = (t, S.singleton (ruleName r)) attachFor (t, rs) = (t, picked) where- names = L.nub $ map getIRuleName rs -- in declaration order+ names = L.nub $ map ruleName rs -- in declaration order nameSet = S.fromList names -- lift graph: source -> targets it reduces to by a unit production edges = M.fromListWith S.union- [ (src, S.singleton (getIRuleName r))+ [ (src, S.singleton (ruleName r)) | r <- rs- , alt <- topAlts (getIClause r)+ , alt <- topAlts (ruleClause r) , Just src <- [unitTarget alt] , src `S.member` nameSet ] closureOf n0 = go (S.singleton n0) [n0]@@ -599,9 +751,9 @@ -- rules of this group demanded by some position of the grammar demandRefs r alt =- let refs = filter (`S.member` nameSet) (allIdRefs alt)+ let refs = filter (`S.member` nameSet) (concatMap allIdRefs alt) in case unitTarget alt of- Just n | M.lookup (getIRuleName r) groupOfRule == Just t+ Just n | M.lookup (ruleName r) groupOfRule == Just t , n `S.member` nameSet -> L.delete n refs _ -> refs demanded@@ -609,12 +761,12 @@ | otherwise = nameSet -- no rule carries the type name: -- assume everything is demanded where demanded0 = S.fromList [ ref | r <- synRules- , alt <- topAlts (getIClause r)+ , alt <- topAlts (ruleClause r) , ref <- demandRefs r alt ] candidates = [ n | n <- names- , any (eligibleClause . getIClause)- [ r | r <- rs, getIRuleName r == n ] ]+ , any (eligibleClause . ruleClause)+ [ r | r <- rs, ruleName r == n ] ] greedy uncovered acc | S.null uncovered = reverse acc@@ -638,13 +790,13 @@ -- the old attach-everywhere ns -> S.fromList ns -doNM :: InitialGrammar -> Normalization ()-doNM grammar = do- let grammar0 = everywhereBut (False `mkQ` (isLexicalRule . getIRuleName)) (mkT removeOpts) grammar- checkDuplicateRuleNames $ getIRules grammar0- mapM_ (\r -> do currentRule .= Just r+doNM :: [GP.Rule] -> Normalization ()+doNM rules = do+ checkDuplicateRuleNames rules+ checkCtorLabels rules+ mapM_ (\r -> do setCurrentRule r normalizeRule r)- $ getIRules grammar0+ rules currentRule .= Nothing postNormalizeGrammar @@ -717,8 +869,9 @@ dummy]) $ filterProxyRules proxyRules rules newTokens = map (\(_, name) -> LexicalRule { getLRuleDataType = "Keyword", getLRuleFunc = "",- getLRuleName = name, getLClause = (IStrLit name)}) $ M.toList ruleToStartInfo- + getLRuleName = name,+ getLClause = GP.Lit GP.rtkNoPos (GP.Str GP.rtkNoPos name)}) $ M.toList ruleToStartInfo+ qqRule = SyntaxRule (fromMaybe (error "Internal error: start rule name is not set in grammar info") (getStartRuleName info)) $ STAltOfSeq rulesClauses@@ -740,29 +893,30 @@ getGrammarInfo = info { getNameCounter = counter, getRuleToStartInfo = ruleToStartInfo }} [] -> error "Grammar must have at least one rule group" -normalizeTopLevelClauses :: InitialGrammar -> Either Diagnostic NormalGrammar-normalizeTopLevelClauses grammar0 =- let grammar = synthesizeTypeCovers grammar0 in- case getIRules grammar of+normalizeTopLevelClauses :: GP.Grammar -> Either Diagnostic NormalGrammar+normalizeTopLevelClauses g0 =+ let gname = grammarName g0+ rules = synthesizeTypeCovers (grammarRules g0) in+ case rules of [] -> Left $ Diagnostic Nothing Nothing $- "grammar '" ++ getIGrammarName grammar ++ "' contains no rules"- (firstIRule:_) -> do- let firstID = maybe (getIRuleName firstIRule) Prelude.id (getIDataTypeName firstIRule)- ruleTypeMap = buildRuleToTypeMap grammar- attachPoints = computeQQAttachPoints grammar+ "grammar '" ++ gname ++ "' contains no rules"+ (firstRule:_) -> do+ let firstID = fromMaybe (ruleName firstRule) (ruleTypeName firstRule)+ ruleTypeMap = buildRuleToTypeMap rules+ attachPoints = computeQQAttachPoints rules (_, NormalizationState nrs nls counter antiRules shortcuts proxyRules _ _ _ _ _) <-- runStateT (doNM grammar) (NormalizationState M.empty [] 0 [] [] S.empty M.empty M.empty ruleTypeMap attachPoints Nothing)+ runStateT (doNM rules) (NormalizationState M.empty [] 0 [] [] S.empty M.empty M.empty ruleTypeMap attachPoints Nothing) firstRuleGroupRules <- case M.lookup firstID nrs of Just rs -> Right rs- Nothing -> Left $ Diagnostic (getIRulePos firstIRule) Nothing $- "the first rule ('" ++ getIRuleName firstIRule+ Nothing -> Left $ Diagnostic (rulePos firstRule) Nothing $+ "the first rule ('" ++ ruleName firstRule ++ "') must be a syntax rule (its name must start with an uppercase letter)," ++ " because it defines the start symbol of the grammar" let nrs1 = M.delete firstID nrs firstGroup = SyntaxRuleGroup firstID firstRuleGroupRules otherGroups = map (\ (k,v) -> SyntaxRuleGroup k v) $ M.toList nrs1 groups = firstGroup : otherGroups- return $ addStartGroup $ NormalGrammar (getIGrammarName grammar) groups nls antiRules shortcuts (getImports grammar) (GrammarInfo (Just firstID) M.empty counter proxyRules)+ return $ addStartGroup $ NormalGrammar gname groups nls antiRules shortcuts (grammarImports g0) (GrammarInfo (Just firstID) M.empty counter proxyRules) data FillNameState = FillNameState { nameCtr :: Int, nameBase :: String } type FillName a = State FillNameState a@@ -786,7 +940,3 @@ where newrules = map (\r -> doRename (getSDataTypeName r) r) rules doRename n dat = let (dat1, (FillNameState _ _)) = runState (everywhereM (mkM (fillConstructorName n)) dat) (FillNameState 0 n) in dat1--removeOpts :: IClause -> IClause-removeOpts (IOpt c) = IAlt [ISeq [], ISeq [c]]-removeOpts a = a
Parser.y view
@@ -1,9 +1,10 @@ { module Parser where -import qualified Lexer as L (Token(..), PosToken(..), AlexPosn(..), alexScanTokens)+import qualified Lexer as L (Token(..), PosToken(..), AlexPosn(..))+import qualified GrammarLexer as GL (AlexPosn(..))+import qualified GrammarParser as GP import Diagnostics (Diagnostic(..), SourcePos(..))-import Syntax import Data.List (intercalate) }@@ -33,140 +34,127 @@ '@shortcuts' { L.PosToken _ L.Shortcuts } '@symmacro' { L.PosToken _ L.Symmacro } id { L.PosToken _ (L.Id _) }-str { L.PosToken _ (L.StrLit $$) }-rexplit { L.PosToken _ (L.RegExpLit $$) }-bigstr { L.PosToken _ (L.BigStr $$) }+str { L.PosToken _ (L.StrLit _) }+rexplit { L.PosToken _ (L.RegExpLit _) }+bigstr { L.PosToken _ (L.BigStr _) } eof { L.PosToken _ L.EndOfFile } %% -Grammar : grammar str ';' ImportsOpt Rules eof { InitialGrammar $2 $4 (reverse $5) }+-- The reference parser builds the GENERATED AST (GrammarParser's types)+-- directly: same constructors, same binary Alt/Seq spines, same+-- first-symbol positions as the parser RTK generates from grammar.pg. The+-- AST-equality test suite holds the two front ends to it for every corpus+-- grammar, source positions included (projected explicitly, since RtkPos is+-- equality-transparent). Token text stays raw here too; the shared+-- Frontend.cleanGrammarTokens pass strips delimiters and escapes after+-- parsing. -ImportsOpt : imports bigstr { $2 }- | {- empty -} { "" }+Grammar : grammar str ';' Rules eof { GP.GrammarDef (posOf $1) (mkStr $2) (reverse $4) }+ | grammar str ';' imports bigstr Rules eof { GP.GrammarImports (posOf $1) (mkStr $2) (bigStrText $5) (reverse $6) } -Rules : RuleWithOptions { [$1] }- | Rules RuleWithOptions { $2 : $1 }+Rules : Rules RuleWithOptions { $2 : $1 } | {- empty -} { [] } -RuleWithOptions : OptionsList Rule { addRuleOptions (reverse $1) $2 }+RuleWithOptions : OptionsList Rule { mkRule (reverse $1) $2 } OptionsList : OptionsList Option { $2 : $1 } | {- empty -} { [] } -Option : '@shortcuts' '(' IdListOpt ')' { OShortcuts (reverse $3)}- | '@symmacro' { OSymmacro }+Option : '@shortcuts' '(' IdListOpt ')' { GP.Shortcuts (posOf $1) $3 }+ | '@symmacro' { GP.Symmacro (posOf $1) } -IdListOpt : IdList { $1 }- | {- empty -} { [] } +IdListOpt : IdList { reverse $1 }+ | {- empty -} { [] } -IdList : IdList ',' id { idStr $3 : $1}- | id { [idStr $1] }+IdList : IdList ',' id { mkName $3 : $1}+ | id { [mkName $1] } -Rule : id '=' ClauseAlt ';' { IRule Nothing Nothing (idStr $1) $3 [] (Just (idPos $1)) }- | id ':' id '=' ClauseAlt ';' { IRule (Just (idStr $1)) Nothing (idStr $3) $5 [] (Just (idPos $1)) }- | id '.' id ':' id '=' ClauseAlt ';' { IRule (Just (idStr $1)) (Just (idStr $3)) (idStr $5) $7 [] (Just (idPos $1)) }+Rule : id '=' ClauseAlt ';' { GP.RuleSimple (posOf $1) (mkName $1) $3 }+ | id ':' id '=' ClauseAlt ';' { GP.RuleTyped (posOf $1) (mkName $1) (mkName $3) $5 }+ | id '.' id ':' id '=' ClauseAlt ';' { GP.RuleTypedFunc (posOf $1) (mkName $1) (mkName $3) (mkName $5) $7 } -- a rule's position is where the rule starts: for the '.' form that is -- the dot itself, matching the first-symbol positions captured by -- generated parsers- | '.' id ':' id '=' ClauseAlt ';' { IRule Nothing (Just (idStr $2)) (idStr $4) $6 [] (Just (idPos $1)) }--ClauseAlt : ClauseAlt1 { mkAlt (reverse $1) }+ | '.' id ':' id '=' ClauseAlt ';' { GP.RuleFunc (posOf $1) (mkName $2) (mkName $4) $6 } -ClauseAlt1 : ClauseAlt1 '|' ClauseSeq { $3 : $1 }- | ClauseSeq { [$1] }+ClauseAlt : ClauseAlt '|' ClauseSeqL { GP.Alt (GP.rtkPosOf $1) $1 $3 }+ | ClauseSeqL { $1 } -ClauseSeq : ClauseSeq1 { mkSeq (reverse $1) }+-- A named alternative: "Star: Clause5 '*'" names the alternative's AST+-- constructor. The label binds tighter than '|' and scopes over the whole+-- sequence, mirroring grammar.pg's Clause1 rule. No conflict with the+-- 'Type ':' Name '='' rule-header forms: ':' never follows a clause symbol+-- (clauses are fenced off by '=' ... ';'), so on ':' the parser always+-- shifts toward the label.+ClauseSeqL : id ':' ClauseSeq { GP.Labeled (posOf $1) (mkName $1) $3 }+ | ClauseSeq { $1 } -- A sequence has at least one element: grammar.pg's clause syntax cannot -- derive an empty alternative, and the reference parser must define the same -- language-ClauseSeq1 : ClauseSeq1 ClausePre { $2 : $1 }- | ClausePre { [$1] }+ClauseSeq : ClauseSeq ClausePre { GP.Seq (GP.rtkPosOf $1) $1 $2 }+ | ClausePre { $1 } -ClausePre : ',' ClausePost { ILifted (unliftGroupOp $2) }- | '!' ClausePost { IIgnore (unliftGroupOp $2) }- | ClausePost { unliftGroupElem $1 }+ClausePre : ',' ClausePost { GP.Lifted (posOf $1) $2 }+ | '!' ClausePost { GP.Ignored (posOf $1) $2 }+ | ClausePost { $1 } -ClausePost : ClauseItem '*' OptDelim { IStar $1 $3 }- | ClauseItem '+' OptDelim { IPlus $1 $3 }- | ClauseItem '?' { IOpt $1 }+ClausePost : ClauseItem '*' OptDelim { mkMany GP.Star GP.StarDelim $1 $3 }+ | ClauseItem '+' OptDelim { mkMany GP.Plus GP.PlusDelim $1 $3 }+ | ClauseItem '?' { GP.Opt (GP.rtkPosOf $1) $1 } | ClauseItem { $1 } --ClauseItem : '(' ClauseAlt ')' { unliftGroupLeaf $2 }- | id { IId (idStr $1) }- | str { IStrLit $1 }- | '.' { IDot }- | rexplit { IRegExpLit $1 }+-- Parentheses are pure grouping, exactly like grammar.pg's+-- 'Clause5 = '(' ,Clause ')'': the group content passes through and no node+-- records the parentheses themselves.+ClauseItem : '(' ClauseAlt ')' { $2 }+ | id { GP.Ref (posOf $1) (mkName $1) }+ | str { GP.Lit (posOf $1) (mkStr $1) }+ | '.' { GP.Dot (posOf $1) }+ | rexplit { GP.Regex (posOf $1) (rexText $1) } OptDelim : {- empty -} { Nothing } | '~' ClauseItem { Just $2 } { --- grammar.pg, the authoritative definition of the grammar language, treats--- parentheses as pure grouping: its 'Clause5 = '(' ,Clause ')'' lifts the--- group, so the generated front end records no node for the parentheses--- themselves. The reference parser mirrors that with the helpers below, which--- reproduce exactly what the lifted parse trees look like after--- ASTAdapter flattens them (the AST-equality test suite holds the two front--- ends to it for every corpus grammar):------ * a group around a single leaf collapses to the leaf (every position);--- * in sequence-element position, a group around a single repetition,--- option, lifted or ignored clause collapses to that clause;--- * a pure-sequence group at the head of a sequence merges into it (the--- juxtaposition spine is left-recursive, so only the head merges);--- * an alternation group that is the whole first alternative merges into--- the enclosing alternation (the '|' spine is left-recursive too).+-- The generated AST's positions are GrammarLexer's AlexPosn wrapped in+-- RtkPos; rebuild them from the hand-written lexer's identical AlexPosn.+posOf :: L.PosToken -> GP.RtkPos+posOf (L.PosToken (L.AlexPn a line col) _) = GP.RtkPos (GL.AlexPn a line col) --- Group content that collapses everywhere parentheses themselves may appear-isLeafClause :: IClause -> Bool-isLeafClause (IId _) = True-isLeafClause (IStrLit _) = True-isLeafClause IDot = True-isLeafClause (IRegExpLit _) = True-isLeafClause _ = False+mkName :: L.PosToken -> GP.Name+mkName t@(L.PosToken _ (L.Id s)) = GP.Ident (posOf t) s+mkName t = error $ "Internal error: identifier token expected, but got: " ++ show t --- In item position (operand of '*'/'+'/'?' and the '~' delimiter) only a--- single-leaf group collapses-unliftGroupLeaf :: IClause -> IClause-unliftGroupLeaf (IAlt [ISeq [c]]) | isLeafClause c = c-unliftGroupLeaf c = c+mkStr :: L.PosToken -> GP.StrLit+mkStr t@(L.PosToken _ (L.StrLit s)) = GP.Str (posOf t) s+mkStr t = error $ "Internal error: string literal token expected, but got: " ++ show t --- Under ',' and '!' a group around one repetition or option collapses too-unliftGroupOp :: IClause -> IClause-unliftGroupOp (IAlt [ISeq [c]]) | isOpClause c = c- where isOpClause IStar{} = True- isOpClause IPlus{} = True- isOpClause IOpt{} = True- isOpClause _ = False-unliftGroupOp c = c+rexText :: L.PosToken -> String+rexText (L.PosToken _ (L.RegExpLit s)) = s+rexText t = error $ "Internal error: regex literal token expected, but got: " ++ show t --- In sequence-element position lifted and ignored content collapses as well-unliftGroupElem :: IClause -> IClause-unliftGroupElem (IAlt [ISeq [c]]) | isElemClause c = c- where isElemClause IStar{} = True- isElemClause IPlus{} = True- isElemClause IOpt{} = True- isElemClause ILifted{} = True- isElemClause IIgnore{} = True- isElemClause _ = False-unliftGroupElem c = c+bigStrText :: L.PosToken -> String+bigStrText (L.PosToken _ (L.BigStr s)) = s+bigStrText t = error $ "Internal error: big string token expected, but got: " ++ show t --- A pure-sequence group at the head of a sequence merges into it-mkSeq :: [IClause] -> IClause-mkSeq (IAlt [ISeq xs] : rest) = ISeq (xs ++ rest)-mkSeq cs = ISeq cs+-- Options wrap the rule only when present, like grammar.pg's+-- 'Rule = RuleWithOptions: OptionList Rule1 | ,Rule1' (OptionList is+-- non-empty there); the wrapper's position is the first option's.+mkRule :: [GP.Option] -> GP.Rule -> GP.Rule+mkRule [] r = r+mkRule opts@(o : _) r = GP.RuleWithOptions (GP.rtkPosOf o) opts r --- An alternation group as the whole first alternative merges into the--- enclosing alternation (a single-alternative group cannot reach here: mkSeq--- has already merged it into its alternative's sequence)-mkAlt :: [IClause] -> IClause-mkAlt (ISeq [IAlt alts] : rest) = IAlt (alts ++ rest)-mkAlt alts = IAlt alts+-- A repetition node: plain or with a '~' delimiter, positioned at the+-- repeated clause's first symbol like the generated parser's actions.+mkMany :: (GP.RtkPos -> GP.Clause -> GP.Clause)+ -> (GP.RtkPos -> GP.Clause -> GP.Clause -> GP.Clause)+ -> GP.Clause -> Maybe GP.Clause -> GP.Clause+mkMany plain _ c Nothing = plain (GP.rtkPosOf c) c+mkMany _ delimited c (Just d) = delimited (GP.rtkPosOf c) c d parseError :: [L.PosToken] -> Either Diagnostic a parseError [] = Left $ Diagnostic Nothing Nothing "unexpected end of input; expected a grammar definition"@@ -180,7 +168,9 @@ alexPosToSourcePos :: L.AlexPosn -> SourcePos alexPosToSourcePos (L.AlexPn _ line col) = SourcePos line col --- Render a token the way it appears in the grammar source, for error messages+-- Render a token the way it appears in the grammar source, for error+-- messages. Literal tokens carry their raw text (delimiters included), so+-- they render as-is. showToken :: L.Token -> String showToken L.Grammar = "keyword 'grammar'" showToken L.Imports = "keyword 'imports'"@@ -188,8 +178,8 @@ showToken L.RlEnd = "';'" showToken L.OrClause = "'|'" showToken L.Dot = "'.'"-showToken (L.RegExpLit s) = "regular expression [" ++ s ++ "]"-showToken (L.StrLit s) = "string literal '" ++ s ++ "'"+showToken (L.RegExpLit s) = "regular expression " ++ s+showToken (L.StrLit s) = "string literal " ++ s showToken (L.BigStr _) = "multi-line string" showToken (L.Id s) = "identifier '" ++ s ++ "'" showToken L.Star = "'*'"@@ -205,11 +195,4 @@ showToken L.Shortcuts = "'@shortcuts'" showToken L.Symmacro = "'@symmacro'" showToken L.EndOfFile = "end of input"--idStr :: L.PosToken -> String-idStr (L.PosToken _ (L.Id s)) = s-idStr t = error $ "Internal error: identifier token expected, but got: " ++ show t--idPos :: L.PosToken -> SourcePos-idPos (L.PosToken (L.AlexPn _ line col) _) = SourcePos line col }
README.md view
@@ -1,5 +1,7 @@ # RTK - Rewrite ToolKit +[](https://hackage.haskell.org/package/rtk)+ RTK generates parser and rewrite facilities from grammar specifications. It produces Alex lexer and Happy parser files, with support for quasi-quotation to embed parsed syntax directly in Haskell code. ## Features@@ -40,6 +42,27 @@ happy <Grammar>Parser.y --ghc -o <Grammar>Parser.hs ``` +#### Optional: a pretty-printer (`--generate-pp`)++`--generate-pp` writes a fifth, opt-in artifact `<Grammar>PP.hs`: a+`base`-only module of `pp<Type>` functions that turn a parsed AST back into+source text. It guarantees only the *semantic* round-trip+`parse (print ast) == ast`, never byte-faithful reproduction: comments and the+original whitespace are lost because the AST is lossy. The flag is off by+default, so output is unchanged unless you ask for it.++Two layouts are available via `--pp-layout`:++- `flat` (default) — one space between tokens, no indentation; correct, not+ pretty.+- `block` — indents and line-breaks bracket-structured languages (C-like+ braces, PL/0-style `begin`/`end`) so output reads like hand-written source.+ Indentation is derived structurally from statement/declaration lists, so it+ adds no parentheses and degrades to flat for grammars without such lists.++Layout is whitespace, so `block` never changes the parse — it is heuristic+readability, and the round-trip guarantee holds in either mode.+ ### Using the generated code The generated modules are compiled as part of *your* project, so your project@@ -58,6 +81,13 @@ build-depends: base, array, syb, containers, template-haskell ``` +The quasi-quoter is also the rewrite facility: quasi-quoted patterns as+match arms plus SYB's `everywhere`/`everything` rewrite and query parsed+ASTs with no further API — see "Rewriting parsed Java" in+[docs/java-quasi-quotation-tests.md](docs/java-quasi-quotation-tests.md)+for the worked recipe (rtk's own pipeline and the+write-you-a-haskell tutorial use the same shape).+ ## Grammar Format Grammar files use a simple specification format. Each file starts with a@@ -82,6 +112,31 @@ Ignore: ws = [ \t\n]+ ; ``` +### Named constructors++By default the constructor generated for an alternative is positional+(`Ctr__<Rule>__<index>`), so inserting or reordering alternatives silently+renames constructors. An alternative may opt in to a stable name with a+leading label:++```+Expr = Add: Expr '+' Term+ | Sub: Expr '-' Term+ | Term ;+```++generates `data Expr = Add RtkPos Expr Term | Sub RtkPos Expr Term |+Ctr__Expr__0 RtkPos Term | ...` — code and quasi-quote patterns written+against `Add`/`Sub` survive grammar edits. The label binds tighter than `|`+and names exactly one alternative; it also works inside parenthesized+groups (`(Pair: key '=' value)*` names the extracted group's constructor).+Unlabeled alternatives keep their generated names. Explicit names must+start with an uppercase letter, must be unique across the whole grammar+(all constructors share one generated module), must avoid the reserved+`Ctr__`/`Anti_` prefixes, and cannot name a lifted (`,Rule`) alternative —+it passes a value through and produces no constructor. rtk rejects each of+these with a positioned diagnostic.+ See `test-grammars/grammar.pg` for the grammar language described in itself — that file is the authoritative definition of the grammar language: rtk parses your grammar with the parser it generated from it (self-hosting).@@ -92,6 +147,11 @@ - `java.pg` - Java language grammar - `grammar.pg` - Grammar for the grammar language itself (bootstrap) - `haskell.pg` - Haskell subset grammar++The `tutorials/` directory contains self-contained projects built with RTK,+including a C compiler and a port of Peter Norvig's lis.py Lisp interpreter+(quasi-quotation for special-form dispatch and macro expansion); see+[tutorials/README.md](tutorials/README.md). ## Building from Source
StringLiterals.hs view
@@ -1,7 +1,12 @@+{-# LANGUAGE QuasiQuotes #-} module StringLiterals (normalizeStringLiterals) where -import Syntax+import qualified GrammarParser as GP+import GrammarQQ (clause)++import Frontend (mapGrammarRules, ruleName, strLitText)+import Syntax (isLexicalRule) import Data.Char import Data.Generics import qualified Data.Map as Map@@ -55,24 +60,49 @@ return tokName Just tokName -> return tokName -normalizeClause :: IClause -> StringLiteralsNormalization IClause-normalizeClause (IStrLit str) = do- tokName <- addStrLit str- return $ IIgnore (IId tokName)+-- A string literal in a syntax rule - the quasi-quoted pattern is "a clause+-- that is just a string literal" - becomes an ignored reference to a shared+-- keyword token. The replacement is built by hand, not quoted: it must keep+-- the literal's source position so later normalization diagnostics still+-- point at the literal, and a quote would embed its own compile-time+-- position instead.+normalizeClause :: GP.Clause -> StringLiteralsNormalization GP.Clause+normalizeClause c@[clause| $StrLit:s |] = do+ tokName <- addStrLit (strLitText s)+ let p = GP.rtkPosOf c+ return $ GP.Ignored p (GP.Ref p (GP.Ident p tokName)) normalizeClause c = return c -normalizeRule :: IRule -> StringLiteralsNormalization IRule-normalizeRule r@IRule{getIRuleName=rn, getIClause=cl} | not (isLexicalRule rn) = do- newCl <- everywhereM (mkM normalizeClause) cl- return r{getIClause = newCl}-normalizeRule r = return r+normalizeRule :: GP.Rule -> StringLiteralsNormalization GP.Rule+normalizeRule r@GP.Anti_Rule{} = return r+normalizeRule r | isLexicalRule (ruleName r) = return r+normalizeRule (GP.RuleWithOptions p opts r) = GP.RuleWithOptions p opts <$> normalizeRule r+normalizeRule (GP.RuleSimple p n c) = GP.RuleSimple p n <$> normalizeClauseTree c+normalizeRule (GP.RuleTyped p t n c) = GP.RuleTyped p t n <$> normalizeClauseTree c+normalizeRule (GP.RuleTypedFunc p t f n c) = GP.RuleTypedFunc p t f n <$> normalizeClauseTree c+normalizeRule (GP.RuleFunc p f n c) = GP.RuleFunc p f n <$> normalizeClauseTree c -doSLNM :: InitialGrammar -> StringLiteralsNormalization InitialGrammar-doSLNM grammar = do- newGr <- everywhereM (mkM normalizeRule) grammar- return newGr+normalizeClauseTree :: GP.Clause -> StringLiteralsNormalization GP.Clause+normalizeClauseTree = everywhereM (mkM normalizeClause) -normalizeStringLiterals :: InitialGrammar -> InitialGrammar-normalizeStringLiterals grammar = let (InitialGrammar nm imports rules, StringLiteralsNormalizationState m _) = runState (doSLNM grammar) (StringLiteralsNormalizationState Map.empty 0)- slRules sm = map (\ (k, v) -> IRule (Just "Keyword") (Just "id") v (IStrLit k) [] Nothing) $ Map.toList sm- in InitialGrammar nm imports (rules ++ slRules m)+doSLNM :: GP.Grammar -> StringLiteralsNormalization GP.Grammar+doSLNM (GP.GrammarDef p n rules) = GP.GrammarDef p n <$> mapM normalizeRule rules+doSLNM (GP.GrammarImports p n imp rules) = GP.GrammarImports p n imp <$> mapM normalizeRule rules+doSLNM g = return g++-- | Replace every string literal in the syntax rules by an ignored keyword+-- token (one shared token per distinct literal) and append the synthesized+-- keyword rules - Keyword-typed lexical rules whose clause is the literal.+normalizeStringLiterals :: GP.Grammar -> GP.Grammar+normalizeStringLiterals grammar =+ let (grammar1, StringLiteralsNormalizationState m _) =+ runState (doSLNM grammar) (StringLiteralsNormalizationState Map.empty 0)+ slRules sm = map (uncurry keywordRule) $ Map.toList sm+ in mapGrammarRules (++ slRules m) grammar1++keywordRule :: String -> String -> GP.Rule+keywordRule lit tokName =+ GP.RuleTypedFunc np (ident "Keyword") (ident "id") (ident tokName)+ (GP.Lit np (GP.Str np lit))+ where np = GP.rtkNoPos+ ident = GP.Ident np
Syntax.hs view
@@ -1,73 +1,28 @@--- | The core data types of the grammar-processing pipeline: the parsed--- grammar ('InitialGrammar' and its clauses), the normalized grammar--- ('NormalGrammar' and friends) that the code generators consume, and the--- pure helpers over them.+-- | The normalized-grammar data types: 'NormalGrammar' and friends, the+-- representation the code generators ('GenX', 'GenY', 'GenAST', 'GenQ')+-- consume, plus the pure helpers over them. ----- These types used to live in the footer of the hand-written @Parser.y@.--- They are owned by the pipeline, not by any particular front end: both the--- hand-written parser and the generated one (via @ASTAdapter@) produce an--- 'InitialGrammar', and everything downstream is front-end agnostic.+-- The parsed-grammar half of the pipeline has no types of its own anymore:+-- since task 8c the front half computes directly over the GENERATED AST+-- ('GrammarParser''s @Grammar@\/@Rule@\/@Clause@, compiled from the+-- @test/golden/grammar/@ snapshot; helpers in "Frontend"). The historic+-- @InitialGrammar@\/@IRule@\/@IClause@ types are retired. The one place the+-- generated AST threads into THIS module is 'LClause': lexical rules keep+-- their clause unnormalized so 'GenX' can translate it to an Alex+-- specification. module Syntax where import Data.Char (isLower) import Data.Data (Data)-import Data.List (intercalate) import qualified Data.Map as M import qualified Data.Set as S -import Diagnostics (SourcePos)--data InitialGrammar = InitialGrammar { getIGrammarName :: String, getImports :: String, getIRules :: [IRule] }- deriving (Eq, Show, Data)--data IRule = IRule { getIDataTypeName :: (Maybe String),- getIDataFunc :: (Maybe String),- getIRuleName :: String,- getIClause :: IClause,- getIRuleOptions :: [IOption],- getIRulePos :: (Maybe SourcePos)}- deriving (Eq, Show, Data)--data IOption = OShortcuts [ID] | OSymmacro- deriving (Eq, Show, Data)--addRuleOptions :: [IOption] -> IRule -> IRule-addRuleOptions opts rule = rule{ getIRuleOptions = opts ++ (getIRuleOptions rule)}+import qualified GrammarParser as GP type ConstructorName = String type ID = String -data IClause = IId { getIdStr :: ID }- | IStrLit String- | IDot- | IRegExpLit String- | IStar IClause (Maybe IClause)- | IPlus IClause (Maybe IClause)- | IAlt [IClause]- | ISeq [IClause]- | IOpt IClause- | ILifted IClause- | IIgnore IClause- deriving (Eq, Show, Data)---- Render a clause the way it appears in the grammar source, for error messages-showClause :: IClause -> String-showClause (IId name) = name-showClause (IStrLit s) = "'" ++ s ++ "'"-showClause IDot = "."-showClause (IRegExpLit s) = "[" ++ s ++ "]"-showClause (IStar c md) = showClause c ++ "*" ++ showDelim md-showClause (IPlus c md) = showClause c ++ "+" ++ showDelim md-showClause (IAlt cs) = "(" ++ intercalate " | " (map showClause cs) ++ ")"-showClause (ISeq cs) = unwords (map showClause cs)-showClause (IOpt c) = showClause c ++ "?"-showClause (ILifted c) = "," ++ showClause c-showClause (IIgnore c) = "!" ++ showClause c--showDelim :: Maybe IClause -> String-showDelim = maybe "" (\d -> " ~ " ++ showClause d)- -- | The first line of every generated artifact (lexer spec, parser spec, -- quasi-quoter module). The banner names the grammar, not the grammar file: -- a file path would make the generated output - and with it every golden@@ -136,7 +91,12 @@ | MacroRule { getLRuleName :: String, getLClause :: LClause} deriving (Eq, Show, Data) -type LClause = IClause+-- | A lexical rule's clause stays unnormalized all the way to 'GenX': it is+-- the generated front end's clause type (token text already cleaned by+-- @Frontend.cleanGrammarTokens@). Synthesized rules (keyword tokens, QQ+-- splice tokens, start-wrapper dummies) build their clauses with+-- 'GP.rtkNoPos' positions.+type LClause = GP.Clause isLexicalRule :: String -> Bool isLexicalRule [] = False
TokenProcessing.hs view
@@ -6,24 +6,20 @@ import Lexer (Token(..), PosToken(..)) --- | Process tokens after lexical analysis--- This applies escape sequence handling and concatenates multi-line strings+-- | Process tokens after lexical analysis: concatenate adjacent multi-line+-- string blocks. Escape handling no longer happens here: both lexers keep+-- the raw token text, and the single 'unBackQuote' pass runs on the parsed+-- AST (see @Frontend.cleanGrammarTokens@) so the cleanup logic is shared by+-- both front ends. processTokens :: [PosToken] -> [PosToken]-processTokens = catBigstrs . map processEscapes---- | Process escape sequences in string and regex tokens-processEscapes :: PosToken -> PosToken-processEscapes (PosToken pos tok) = PosToken pos (processEscapesTok tok)--processEscapesTok :: Token -> Token-processEscapesTok (StrLit s) = StrLit (unBackQuote s)-processEscapesTok (RegExpLit s) = RegExpLit (unBackQuote s)-processEscapesTok tok = tok+processTokens = catBigstrs -- | Handle backslash escape sequences -- Preserves \\n, \\t, \\r, \\f, \\v as-is (for grammar rules); this must stay -- exactly the set that GenX.isAlexEscape emits bare into the generated lexer--- Removes backslash from other escaped characters+-- Removes backslash from other escaped characters.+-- Applied to string and regex literal CONTENT by Frontend.cleanGrammarTokens,+-- after parsing, for both front ends. unBackQuote :: String -> String unBackQuote ('\\':'n':xs) = '\\':'n' : unBackQuote xs unBackQuote ('\\':'t':xs) = '\\':'t' : unBackQuote xs@@ -34,12 +30,18 @@ unBackQuote (c:xs) = c : unBackQuote xs unBackQuote [] = [] --- | Concatenate adjacent BigStr tokens with newlines--- This handles multi-line triple-quoted strings--- The merged token keeps the position of the first part+-- | Concatenate adjacent BigStr tokens with newlines.+-- This handles multi-line triple-quoted strings. Tokens carry the raw text+-- (including the @"""@ delimiters), so the merge drops the closing delimiter+-- of the first block and the opening delimiter of the second; the merged+-- token is again a well-delimited block. It keeps the position of the first+-- part. catBigstrs :: [PosToken] -> [PosToken] catBigstrs (PosToken pos (BigStr s1) : toks) = case catBigstrs toks of- (PosToken _ (BigStr s2) : toks') -> (PosToken pos (BigStr (s1 ++ ('\n' : s2))) : toks')+ (PosToken _ (BigStr s2) : toks') -> (PosToken pos (BigStr (mergeBigstrs s1 s2)) : toks') _ -> PosToken pos (BigStr s1) : toks catBigstrs (tok : toks) = tok : catBigstrs toks catBigstrs [] = []++mergeBigstrs :: String -> String -> String+mergeBigstrs s1 s2 = take (length s1 - 3) s1 ++ ('\n' : drop 3 s2)
app/main.hs view
@@ -1,7 +1,7 @@ import Lexer import Parser (parse) import Syntax-import ASTAdapter (parseWithGenerated, scanTokensGenerated)+import Frontend (cleanGrammarTokens, parseWithGenerated, scanTokensGenerated) import Diagnostics (Diagnostic (..), renderDiagnostic) import TokenProcessing import StringLiterals@@ -9,6 +9,7 @@ import GenY import GenX import GenQ+import GenPP import DebugOptions import qualified Debug as D import Control.Monad (when)@@ -83,15 +84,17 @@ when (debugStage opts == Just StageLex) exitAfterDebug - -- Stage 2: Parsing- (eGrammar, maybeT2) <- runStage opts "Parsing" $ parse tokens+ -- Stage 2: Parsing (plus the shared token-text cleanup;+ -- the generated front end applies the same pass inside+ -- parseWithGenerated)+ (eGrammar, maybeT2) <- runStage opts "Parsing" $ fmap cleanGrammarTokens (parse tokens) g <- orDie opts eGrammar return (g, [maybeT1, maybeT1_5, maybeT2]) when (debugParse opts) $- D.printInitialGrammar opts grammar+ D.printParsedGrammar opts grammar - traceRule $ \name -> D.traceRuleInitial opts name "After Parse" grammar+ traceRule $ \name -> D.traceRuleParsed opts name "After Parse" grammar when (debugStage opts == Just StageParse) exitAfterDebug@@ -102,7 +105,7 @@ when (debugStringNorm opts) $ D.printComparison opts "Before String Normalization" grammar "After String Normalization" grammar0 - traceRule $ \name -> D.traceRuleInitial opts name "After String Normalization" grammar0+ traceRule $ \name -> D.traceRuleParsed opts name "After String Normalization" grammar0 when (debugStage opts == Just StageStringNorm) exitAfterDebug@@ -186,6 +189,19 @@ (eQ, maybeT8) <- runStage opts "QuasiQuoter (Q) Generation" $ genQ grammar2 q_content <- orDie opts eQ + -- Optional fifth generator (task 9): the pretty-printer. Generated only+ -- when --generate-pp (or a --debug-pp-spec dump) is requested, so the+ -- default invocation stays byte-for-byte unchanged.+ let ppRequested = generatePp opts || debugPpSpec opts+ ppLayout = if ppLayoutBlock opts then PPBlock else PPFlat+ (mPpContent, maybeT9) <-+ if ppRequested+ then do+ (ePp, t) <- runStage opts "PrettyPrinter (PP) Generation" $ genPP ppLayout grammar2+ pp <- orDie opts ePp+ return (Just pp, t)+ else return (Nothing, Nothing)+ -- Debug generated specs if requested when (debugParserSpec opts) $ do D.debugSection opts "GENERATED HAPPY PARSER SPECIFICATION"@@ -199,9 +215,13 @@ D.debugSection opts "GENERATED QUASIQUOTER CODE" putStrLn q_content + when (debugPpSpec opts) $ do+ D.debugSection opts "GENERATED PRETTY-PRINTER CODE"+ maybe (return ()) putStrLn mPpContent+ -- Write output files (unless we're only validating). A spec dump still -- writes the files; validation alone suppresses them.- let specDumpRequested = any id [debugParserSpec opts, debugLexerSpec opts, debugQQSpec opts]+ let specDumpRequested = any id [debugParserSpec opts, debugLexerSpec opts, debugQQSpec opts, debugPpSpec opts] when (not (validateGrammar opts) || specDumpRequested) $ do let dir = outputDir opts -- A missing output directory is created on the fly; any remaining@@ -213,6 +233,9 @@ writeFile (dir ++ "/" ++ grammar_name ++ "Parser.y") y_content writeFile (dir ++ "/" ++ grammar_name ++ "Lexer.x") x_content writeFile (dir ++ "/" ++ grammar_name ++ "QQ.hs") q_content+ -- --generate-pp adds the fifth artifact; never written otherwise+ when (generatePp opts) $+ maybe (return ()) (writeFile (dir ++ "/" ++ grammar_name ++ "PP.hs")) mPpContent case written of Left e -> orDie opts $ Left $ Diagnostic Nothing Nothing $ "cannot write generated files: " ++ show (e :: IOException)@@ -220,7 +243,7 @@ -- Show timing profile if requested when (profileStages opts) $ do- let allTimings = catMaybes (frontEndTimings ++ [maybeT3, maybeT4, maybeT5, maybeT6, maybeT7, maybeT8])+ let allTimings = catMaybes (frontEndTimings ++ [maybeT3, maybeT4, maybeT5, maybeT6, maybeT7, maybeT8, maybeT9]) when (not $ null allTimings) $ D.showTimingInfo opts allTimings @@ -228,6 +251,7 @@ when (not $ any id [debugTokens opts, debugParse opts, debugStringNorm opts, debugClauseNorm opts, debugConstructors opts, debugParserSpec opts, debugLexerSpec opts, debugQQSpec opts,+ debugPpSpec opts, showStats opts, validateGrammar opts, isJust (debugRule opts)]) $ do putStrLn $ "Successfully generated files for " ++ grammar_name
rtk.cabal view
@@ -1,6 +1,6 @@ Cabal-Version: 2.4 Name: rtk-Version: 0.11+Version: 0.12 Synopsis: Parser and rewrite facility generator from grammar specifications Description: RTK (Rewrite ToolKit) generates Alex lexer and Happy parser files from grammar specifications. It supports quasi-quotation@@ -18,7 +18,7 @@ Bug-Reports: https://github.com/prozak/rtk/issues Category: Language, Development Build-Type: Simple-Tested-With: GHC == 9.4.7 || == 9.6.4+Tested-With: GHC == 9.4.7 || == 9.6.4 || == 9.14.1 Extra-Source-Files: CHANGELOG.md@@ -42,14 +42,24 @@ -- previous rtk binary like every self-hosting compiler's stage files). -- Compiling the snapshot directly means `make accept-golden` keeps the build -- input of the default front end in sync by construction.--- GrammarQQ deliberately stays out: compiling the generated quasi-quoter--- would pull Template Haskell into the bootstrap build path.+-- GrammarQQ, the generated quasi-quoter, is compiled in beside them+-- (task 8b): generated quasi-quoters need no regex packages anymore, only+-- template-haskell (a GHC boot library), so rtk's own code and tests can+-- quote grammar fragments ([clause| ... |]) against the generated AST. -- Separate component because generated alex code trips -Wunused-matches -- (happy output carries its own -w; alex output does not suppress that one), -- and the snapshot must not be edited to placate the linter. Library generated-frontend Import: warnings ghc-options: -Wno-unused-matches+ -- GrammarQQ's quote projections (get<Type>) deliberately match only the+ -- start wrapper's constructor for their type - the quote pipeline cannot+ -- produce anything else - and generated QQ internals carry no signatures;+ -- the metavariable scanner's local 'rule' shadows the top-level 'rule'+ -- quoter. Same policy as -Wno-unused-matches above: generated code, not+ -- edited to placate the linter.+ ghc-options: -Wno-incomplete-patterns -Wno-missing-signatures+ -Wno-name-shadowing -- The snapshot's splice-token actions use 'tail', which GHC >= 9.8 warns -- about on every use (-Wx-partial, on by default). Same policy as -- -Wno-unused-matches above: generated code, not edited to placate the@@ -60,13 +70,16 @@ Hs-Source-Dirs: test/golden/grammar Exposed-Modules: GrammarLexer,- GrammarParser+ GrammarParser,+ GrammarQQ Build-Depends:- base >= 4.17 && < 4.19,+ base >= 4.17 && < 4.23, array >= 0.5 && < 0.6, syb >= 0.7 && < 0.8, -- grammar.pg's imports section pulls in Data.Map- containers >= 0.6 && < 0.7+ containers >= 0.6 && < 0.9,+ -- the generated quasi-quoter builds TH splices+ template-haskell >= 2.19 && < 2.25 Build-Tool-Depends: happy:happy == 2.2.*, alex:alex == 3.5.* Default-Extensions: DeriveDataTypeable, StandaloneDeriving @@ -82,6 +95,7 @@ TokenProcessing, Grammar, GenAST,+ GenPP, GenQ, GenX, GenY,@@ -90,14 +104,14 @@ StringLiterals, DebugOptions, Debug,- ASTAdapter+ Frontend Build-Depends: generated-frontend,- base >= 4.17 && < 4.19,+ base >= 4.17 && < 4.23, array >= 0.5 && < 0.6, syb >= 0.7 && < 0.8,- template-haskell >= 2.19 && < 2.21,- containers >= 0.6 && < 0.7,+ template-haskell >= 2.19 && < 2.25,+ containers >= 0.6 && < 0.9, mtl >= 2.2 && < 2.4, pretty >= 1.1 && < 1.2, pretty-show >= 1.10 && < 1.11,@@ -106,7 +120,7 @@ haskell-src-meta >= 0.8 && < 0.9, lens >= 5.2 && < 5.4, optparse-applicative >= 0.18 && < 0.20,- time >= 1.12 && < 1.13,+ time >= 1.12 && < 1.16, ansi-terminal >= 1.0 && < 1.2 -- CI pins the exact tool versions (alex-3.5.4.2, happy-2.2 in -- .github/workflows/ci.yml); these ranges must stay compatible with them.@@ -117,7 +131,10 @@ Import: warnings Main-is: main.hs Hs-Source-Dirs: app- Build-Depends: base >= 4.17 && < 4.19,+ -- Version bounds live where a dependency first appears (the libraries+ -- above, or here for directory); per Hackage guidance they are stated+ -- once, so components below use bare names for already-bounded packages.+ Build-Depends: base, directory >= 1.3 && < 1.4, rtk ghc-options: -rtsopts@@ -132,13 +149,16 @@ Hs-Source-Dirs: test Other-Modules: TestSupport Build-Depends:- base >= 4.17 && < 4.19,+ base, rtk,+ -- the compiled-in snapshot front end, for the GrammarQQ+ -- smoke test (its quoters produce the generated AST types)+ generated-frontend, HUnit >= 1.6 && < 1.7,- containers >= 0.6 && < 0.7,- directory >= 1.3 && < 1.4,+ containers,+ directory, filepath >= 1.4 && < 1.6,- syb >= 0.7 && < 0.8+ syb -- Golden tests: generated .x/.y/QQ.hs output for every grammar under -- test-grammars/ is compared against snapshots in test/golden/.@@ -151,8 +171,11 @@ Hs-Source-Dirs: test Other-Modules: TestSupport Build-Depends:- base >= 4.17 && < 4.19,+ base, rtk,- HUnit >= 1.6 && < 1.7,- directory >= 1.3 && < 1.4,- filepath >= 1.4 && < 1.6+ -- the parsed-grammar type in TestSupport's signatures is+ -- the generated AST (GrammarParser.Grammar)+ generated-frontend,+ HUnit,+ directory,+ filepath
− src/generated/ASTAdapter.hs
@@ -1,167 +0,0 @@--- | The self-hosted front end: parse a grammar source with the lexer and--- parser that RTK generated from @test-grammars/grammar.pg@, and convert the--- resulting generated AST to the hand-written 'InitialGrammar' that the rest--- of the pipeline consumes.------ The generated modules ('GrammarLexer', 'GrammarParser') are compiled--- straight from the checked-in golden snapshot in @test/golden/grammar/@, so--- @make accept-golden@ keeps this front end in sync with the generators by--- construction.------ The conversion is plain total pattern matching on the generated--- constructors. It has to replicate two things the hand-written front end--- does between lexing and parsing:------ * the hand-written lexer strips literal delimiters from token text--- (quotes around @'str'@, brackets around @[regex]@, triple quotes around--- @\"\"\"bigstr\"\"\"@) while the generated lexer keeps the full match,--- so 'convertGrammar' strips them here;------ * 'TokenProcessing.processTokens' applies 'unBackQuote' to string and--- regex literals, so 'convertGrammar' applies the same exported function--- to those leaves.------ Every generated constructor (except the quasi-quotation-only @Anti_*@--- ones) carries the source position of its first symbol in its first field;--- the adapter maps the rule constructors' position into 'getIRulePos', so--- diagnostics under the default front end point at real source locations,--- the same ones the hand-written reference front end records.-module ASTAdapter- ( parseWithGenerated- , scanTokensGenerated- , convertGrammar- ) where--import qualified GrammarLexer as GL-import qualified GrammarParser as GP--import Diagnostics (Diagnostic, SourcePos(..), diagnosticFromPositioned)-import Syntax (IClause(..), IOption(..), IRule(..), InitialGrammar(..),- addRuleOptions)-import TokenProcessing (unBackQuote)---- | Lex and parse a grammar source with the generated front end and adapt the--- result. The generated lexer and parser encode error positions as--- @\"LINE:COL:message\"@ (the same encoding the hand-written lexer uses), so--- their failures are split back into a positioned 'Diagnostic' here and--- render with the same GNU-style @FILE:LINE:COL:@ prefix as the hand-written--- front end's.-parseWithGenerated :: String -> Either Diagnostic InitialGrammar-parseWithGenerated src =- case GL.scanTokens src >>= GP.parseGrammar of- Left msg -> Left (diagnosticFromPositioned msg)- Right g -> Right (convertGrammar g)---- | The generated lexer's token stream, rendered one token per line for--- @--debug-tokens@. The generated front end has no separate token--- post-processing stage (the adapter strips delimiters and escapes during--- AST conversion), so this is the stream exactly as the parser consumes it.-scanTokensGenerated :: String -> Either Diagnostic [String]-scanTokensGenerated src =- case GL.scanTokens src of- Left msg -> Left (diagnosticFromPositioned msg)- Right toks -> Right (map show toks)---- | Convert the generated AST to the hand-written 'InitialGrammar'.-convertGrammar :: GP.Grammar -> InitialGrammar-convertGrammar (GP.Ctr__Grammar__11 _ gname imports rules) =- InitialGrammar { getIGrammarName = strLit gname- , getImports = importsOpt imports- , getIRules = map rule rules- }-convertGrammar g = qqOnly "Grammar" g--rule :: GP.Rule -> IRule-rule (GP.Ctr__Rule__0 p n c) = mkRule p Nothing Nothing n c-rule (GP.Ctr__Rule__1 p t n c) = mkRule p (Just (name t)) Nothing n c-rule (GP.Ctr__Rule__2 p t f n c) = mkRule p (Just (name t)) (Just (name f)) n c-rule (GP.Ctr__Rule__3 p f n c) = mkRule p Nothing (Just (name f)) n c-rule (GP.Ctr__Rule__4 _ opts r) = addRuleOptions (map option opts) (rule r)-rule r@GP.Anti_Rule{} = qqOnly "Rule" r--mkRule :: GP.RtkPos -> Maybe String -> Maybe String -> GP.Name -> GP.Clause -> IRule-mkRule p dataType dataFunc n c =- IRule dataType dataFunc (name n) (topClause c) [] (Just (sourcePos p))---- | The position of a rule's first token, as the hand-written parser's--- 'SourcePos' (the hand-written front end records the same token's position).-sourcePos :: GP.RtkPos -> SourcePos-sourcePos (GP.RtkPos (GL.AlexPn _ line col)) = SourcePos line col--option :: GP.Option -> IOption-option (GP.Ctr__Option__0 _ ids) = OShortcuts (map name ids)-option (GP.Ctr__Option__1 _) = OSymmacro-option o@GP.Anti_Option{} = qqOnly "Option" o--importsOpt :: GP.ImportsOpt -> String-importsOpt (GP.Ctr__ImportsOpt__0 _) = ""-importsOpt (GP.Ctr__ImportsOpt__1 _ (GP.Ctr__Rule_0__0 _ big)) = stripEnds 3 big-importsOpt i@GP.Anti_ImportsOpt{} = qqOnly "ImportsOpt" i---- | A clause in alternative position: a rule's right-hand side or a--- parenthesized group. The hand-written parser always wraps these as an--- alternative of sequences, even degenerate ones, so this does too.-topClause :: GP.Clause -> IClause-topClause c = IAlt [ ISeq (map preClause (seqElems alt)) | alt <- altElems c ]---- | Flatten the left-recursive @'|'@ spine into source-order alternatives.--- The right operand of each node is a single alternative, never another--- alternation (parenthesized alternations stay as elements and get wrapped--- by 'itemClause').-altElems :: GP.Clause -> [GP.Clause]-altElems (GP.Ctr__Clause__14 _ l r) = altElems l ++ [r]-altElems c = [c]---- | Flatten the left-recursive juxtaposition spine of one alternative.-seqElems :: GP.Clause -> [GP.Clause]-seqElems (GP.Ctr__Clause__12 _ l r) = seqElems l ++ [r]-seqElems c = [c]--preClause :: GP.Clause -> IClause-preClause (GP.Ctr__Clause__9 _ c) = ILifted (postClause c)-preClause (GP.Ctr__Clause__10 _ c) = IIgnore (postClause c)-preClause c = postClause c--postClause :: GP.Clause -> IClause-postClause (GP.Ctr__Clause__5 _ c d) = IStar (itemClause c) (delim d)-postClause (GP.Ctr__Clause__6 _ c d) = IPlus (itemClause c) (delim d)-postClause (GP.Ctr__Clause__7 _ c) = IOpt (itemClause c)-postClause c = itemClause c---- | A clause in item position: a leaf, or — when it is still a sequence,--- alternation, lift, ignore or repetition — a construct that can only have--- come from a parenthesized group, which the hand-written parser represents--- as a nested @IAlt [ISeq …]@. The generated parser drops the parentheses--- themselves, so redundant parens around a single leaf normalize away.-itemClause :: GP.Clause -> IClause-itemClause (GP.Ctr__Clause__1 _ n) = IId (name n)-itemClause (GP.Ctr__Clause__2 _ s) = IStrLit (strLit s)-itemClause (GP.Ctr__Clause__3 _) = IDot-itemClause (GP.Ctr__Clause__4 _ s) = IRegExpLit (unBackQuote (stripEnds 1 s))-itemClause c@GP.Anti_Clause{} = qqOnly "Clause" c-itemClause c = topClause c--delim :: GP.OptDelim -> Maybe IClause-delim (GP.Ctr__OptDelim__0 _) = Nothing-delim (GP.Ctr__OptDelim__1 _ (GP.Ctr__Rule_4__0 _ c)) = Just (itemClause c)-delim d@GP.Anti_OptDelim{} = qqOnly "OptDelim" d--name :: GP.Name -> String-name (GP.Ctr__Name__0 _ s) = s-name n@GP.Anti_Name{} = qqOnly "Name" n--strLit :: GP.StrLit -> String-strLit (GP.Ctr__StrLit__0 _ s) = unBackQuote (stripEnds 1 s)-strLit s@GP.Anti_StrLit{} = qqOnly "StrLit" s---- | Drop @n@ delimiter characters from both ends of a token's text.-stripEnds :: Int -> String -> String-stripEnds n s = take (length s - 2 * n) (drop n s)---- | The generated grammar also contains constructors that only quasi-quote--- splices can produce: @Anti_*@ metavariables and the @Ctr__Grammar__0..10@--- start-rule wrappers around dummy tokens. Parsing a grammar source file--- cannot reach them, so they are an internal error rather than a diagnostic.-qqOnly :: Show a => String -> a -> b-qqOnly ty v = error $ "ASTAdapter: quasi-quotation-only " ++ ty- ++ " constructor cannot come from a grammar file: " ++ show v
+ src/generated/Frontend.hs view
@@ -0,0 +1,260 @@+{-# LANGUAGE QuasiQuotes #-}+-- | The front-end surface of the pipeline. Since task 8c the pipeline+-- computes directly over the GENERATED AST ('GrammarParser''s types, compiled+-- from the @test/golden/grammar/@ snapshot): there is no separate+-- hand-written grammar representation anymore. This module hosts what both+-- front ends share:+--+-- * the default (self-hosted) entry points: 'parseWithGenerated' lexes and+-- parses a grammar source with the lexer\/parser RTK generated from+-- @test-grammars/grammar.pg@;+--+-- * 'cleanGrammarTokens', the ONE implementation of token-level cleanup.+-- Both lexers keep the full token text (quotes around @'str'@, brackets+-- around @[regex]@, triple quotes around @\"\"\"bigstr\"\"\"@, escape+-- pairs intact), and both front ends run this pass right after parsing:+-- it strips the literal delimiters and applies+-- 'TokenProcessing.unBackQuote' to string and regex leaves. The escape+-- logic is not duplicated anywhere else.+--+-- * the accessors and spine flatteners the pipeline stages+-- ('StringLiterals', 'Normalize', the generators, 'Debug') use to+-- compute over @GP.Grammar@\/@GP.Rule@\/@GP.Clause@ values, including+-- position projection into the diagnostics' 'SourcePos'.+--+-- Every generated constructor (except the quasi-quotation-only @Anti_*@+-- ones) carries the source position of its first symbol in its first field,+-- so diagnostics can point at the offending clause, not just the rule+-- header. Positions are equality-transparent ('GP.RtkPos'), which is why the+-- AST-equality harness projects them explicitly via 'sourcePosOf'.+--+-- Clause-shape matches here and in the later pipeline stages are written+-- with rtk's own generated quasi-quoter where that reads better than the+-- constructor spelling (task 8d): a @[clause| ... |]@ pattern is the clause+-- shape in grammar syntax, with @$cl...@ metavariables binding sub-clauses+-- (the names resolve through grammar.pg's @\@shortcuts@ table, so they must+-- start with a declared shortcut such as @cl@, or use the explicit+-- @$Clause:name@ form) and every position wildcarded.+module Frontend+ ( -- * Parsing entry points (the generated front end)+ parseWithGenerated+ , scanTokensGenerated+ -- * Token-level cleanup shared by both front ends+ , cleanGrammarTokens+ -- * Grammar accessors+ , grammarName+ , grammarImports+ , grammarRules+ , mapGrammarRules+ -- * Rule accessors+ , ruleName+ , ruleTypeName+ , ruleFunc+ , ruleClause+ , ruleOptions+ , rulePos+ -- * Clause helpers+ , altElems+ , seqElems+ , nameText+ , strLitText+ , showClause+ , showClauseSeq+ -- * Positions+ , sourcePosOf+ , clausePos+ , namePos+ ) where++import Data.Generics (everywhere, extT, mkT)+import Data.List (intercalate)++import qualified GrammarLexer as GL+import qualified GrammarParser as GP+import GrammarQQ (clause)++import Diagnostics (Diagnostic, SourcePos(..), diagnosticFromPositioned)+import TokenProcessing (unBackQuote)++-- | Lex and parse a grammar source with the generated front end and clean the+-- token text. The generated lexer and parser encode error positions as+-- @\"LINE:COL:message\"@ (the same encoding the hand-written lexer uses), so+-- their failures are split back into a positioned 'Diagnostic' here and+-- render with the same GNU-style @FILE:LINE:COL:@ prefix as the hand-written+-- front end's.+parseWithGenerated :: String -> Either Diagnostic GP.Grammar+parseWithGenerated src =+ case GL.scanTokens src >>= GP.parseGrammar of+ Left msg -> Left (diagnosticFromPositioned msg)+ Right g -> Right (cleanGrammarTokens g)++-- | The generated lexer's token stream, rendered one token per line for+-- @--debug-tokens@. Token text is the raw match ('cleanGrammarTokens' runs+-- on the AST after parsing), so this is the stream exactly as the parser+-- consumes it.+scanTokensGenerated :: String -> Either Diagnostic [String]+scanTokensGenerated src =+ case GL.scanTokens src of+ Left msg -> Left (diagnosticFromPositioned msg)+ Right toks -> Right (map show toks)++-- | Strip literal delimiters and process escapes on every token-text leaf of+-- a parsed grammar: quotes around string literals, brackets around regex+-- literals (both with 'unBackQuote' applied to the content) and the triple+-- quotes around the @imports@ block. Both front ends apply this right after+-- parsing; everything downstream sees clean text.+cleanGrammarTokens :: GP.Grammar -> GP.Grammar+cleanGrammarTokens = everywhere (mkT cleanStr `extT` cleanClause `extT` cleanTop)+ where+ cleanStr (GP.Str p s) = GP.Str p (unBackQuote (stripEnds 1 s))+ cleanStr s = s+ cleanClause (GP.Regex p s) = GP.Regex p (unBackQuote (stripEnds 1 s))+ cleanClause c = c+ cleanTop (GP.GrammarImports p n imp rs) = GP.GrammarImports p n (stripEnds 3 imp) rs+ cleanTop g = g++-- | Drop @n@ delimiter characters from both ends of a token's text.+stripEnds :: Int -> String -> String+stripEnds n s = take (length s - 2 * n) (drop n s)++--------------------------------------------------------------------------------+-- Grammar accessors+--------------------------------------------------------------------------------++grammarName :: GP.Grammar -> String+grammarName (GP.GrammarDef _ n _) = strLitText n+grammarName (GP.GrammarImports _ n _ _) = strLitText n+grammarName g = qqOnly "Grammar" g++grammarImports :: GP.Grammar -> String+grammarImports (GP.GrammarImports _ _ imp _) = imp+grammarImports (GP.GrammarDef _ _ _) = ""+grammarImports g = qqOnly "Grammar" g++grammarRules :: GP.Grammar -> [GP.Rule]+grammarRules (GP.GrammarDef _ _ rs) = rs+grammarRules (GP.GrammarImports _ _ _ rs) = rs+grammarRules g = qqOnly "Grammar" g++mapGrammarRules :: ([GP.Rule] -> [GP.Rule]) -> GP.Grammar -> GP.Grammar+mapGrammarRules f (GP.GrammarDef p n rs) = GP.GrammarDef p n (f rs)+mapGrammarRules f (GP.GrammarImports p n imp rs) = GP.GrammarImports p n imp (f rs)+mapGrammarRules _ g = qqOnly "Grammar" g++--------------------------------------------------------------------------------+-- Rule accessors (transparent over the RuleWithOptions wrapper)+--------------------------------------------------------------------------------++ruleName :: GP.Rule -> String+ruleName (GP.RuleSimple _ n _) = nameText n+ruleName (GP.RuleTyped _ _ n _) = nameText n+ruleName (GP.RuleTypedFunc _ _ _ n _) = nameText n+ruleName (GP.RuleFunc _ _ n _) = nameText n+ruleName (GP.RuleWithOptions _ _ r) = ruleName r+ruleName r = qqOnly "Rule" r++ruleTypeName :: GP.Rule -> Maybe String+ruleTypeName (GP.RuleSimple _ _ _) = Nothing+ruleTypeName (GP.RuleTyped _ t _ _) = Just (nameText t)+ruleTypeName (GP.RuleTypedFunc _ t _ _ _) = Just (nameText t)+ruleTypeName (GP.RuleFunc _ _ _ _) = Nothing+ruleTypeName (GP.RuleWithOptions _ _ r) = ruleTypeName r+ruleTypeName r = qqOnly "Rule" r++ruleFunc :: GP.Rule -> Maybe String+ruleFunc (GP.RuleSimple _ _ _) = Nothing+ruleFunc (GP.RuleTyped _ _ _ _) = Nothing+ruleFunc (GP.RuleTypedFunc _ _ f _ _) = Just (nameText f)+ruleFunc (GP.RuleFunc _ f _ _) = Just (nameText f)+ruleFunc (GP.RuleWithOptions _ _ r) = ruleFunc r+ruleFunc r = qqOnly "Rule" r++ruleClause :: GP.Rule -> GP.Clause+ruleClause (GP.RuleSimple _ _ c) = c+ruleClause (GP.RuleTyped _ _ _ c) = c+ruleClause (GP.RuleTypedFunc _ _ _ _ c) = c+ruleClause (GP.RuleFunc _ _ _ c) = c+ruleClause (GP.RuleWithOptions _ _ r) = ruleClause r+ruleClause r = qqOnly "Rule" r++ruleOptions :: GP.Rule -> [GP.Option]+ruleOptions (GP.RuleWithOptions _ opts r) = opts ++ ruleOptions r+ruleOptions _ = []++-- | A rule's position is where the rule header starts (for the @.Func:@ form+-- that is the dot itself), skipping the options wrapper - the same position+-- the pipeline reported back when it tracked rule positions explicitly.+rulePos :: GP.Rule -> Maybe SourcePos+rulePos (GP.RuleWithOptions _ _ r) = rulePos r+rulePos r = sourcePosOf (GP.rtkPosOf r)++--------------------------------------------------------------------------------+-- Clause helpers+--------------------------------------------------------------------------------++-- | Flatten the left-recursive @'|'@ spine into source-order alternatives.+-- The right operand of each node is a single alternative, never another+-- alternation (parenthesized alternations stay as elements).+altElems :: GP.Clause -> [GP.Clause]+altElems [clause| $cl1 | $cl2 |] = altElems cl1 ++ [cl2]+altElems c = [c]++-- | Flatten the left-recursive juxtaposition spine of one alternative.+seqElems :: GP.Clause -> [GP.Clause]+seqElems [clause| $cl1 $cl2 |] = seqElems cl1 ++ [cl2]+seqElems c = [c]++nameText :: GP.Name -> String+nameText (GP.Ident _ s) = s+nameText n@GP.Anti_Name{} = qqOnly "Name" n++strLitText :: GP.StrLit -> String+strLitText (GP.Str _ s) = s+strLitText s@GP.Anti_StrLit{} = qqOnly "StrLit" s++-- Render a clause the way it appears in the grammar source, for error messages+showClause :: GP.Clause -> String+showClause (GP.Ref _ n) = nameText n+showClause (GP.Lit _ s) = "'" ++ strLitText s ++ "'"+showClause (GP.Dot _) = "."+showClause (GP.Regex _ s) = "[" ++ s ++ "]"+showClause (GP.Star _ c) = showClause c ++ "*"+showClause (GP.StarDelim _ c d) = showClause c ++ "* ~ " ++ showClause d+showClause (GP.Plus _ c) = showClause c ++ "+"+showClause (GP.PlusDelim _ c d) = showClause c ++ "+ ~ " ++ showClause d+showClause (GP.Opt _ c) = showClause c ++ "?"+showClause (GP.Lifted _ c) = "," ++ showClause c+showClause (GP.Ignored _ c) = "!" ++ showClause c+showClause (GP.Labeled _ n c) = nameText n ++ ": " ++ showClause c+showClause c@GP.Alt{} = "(" ++ intercalate " | " (map showClause (altElems c)) ++ ")"+showClause c@GP.Seq{} = showClauseSeq (seqElems c)+showClause (GP.Anti_Clause v) = "$" ++ v++-- | Render one alternative's element list (a flattened sequence).+showClauseSeq :: [GP.Clause] -> String+showClauseSeq = unwords . map showClause++--------------------------------------------------------------------------------+-- Positions+--------------------------------------------------------------------------------++-- | Project a generated-AST position into the diagnostics' 'SourcePos'.+-- 'GP.rtkNoPos' (synthesized nodes, @Anti_*@ splices) projects to 'Nothing'.+sourcePosOf :: GP.RtkPos -> Maybe SourcePos+sourcePosOf (GP.RtkPos (GL.AlexPn _ line col))+ | line <= 0 = Nothing+ | otherwise = Just (SourcePos line col)++clausePos :: GP.Clause -> Maybe SourcePos+clausePos = sourcePosOf . GP.rtkPosOf++namePos :: GP.Name -> Maybe SourcePos+namePos = sourcePosOf . GP.rtkPosOf++-- | The generated grammar also contains constructors that only quasi-quote+-- splices can produce: @Anti_*@ metavariables and the start-rule wrappers+-- around dummy tokens. Parsing a grammar source file cannot reach them, so+-- they are an internal error rather than a diagnostic.+qqOnly :: Show a => String -> a -> b+qqOnly ty v = error $ "Frontend: quasi-quotation-only " ++ ty+ ++ " constructor cannot come from a grammar file: " ++ show v
+ test-grammars/block.pg view
@@ -0,0 +1,35 @@+grammar 'Block';++# A small bracket-structured grammar that exercises block-mode pretty layout+# (task 9b). It mirrors the shape of the c-compiler tutorial's c.pg: a function+# whose body is a brace-enclosed statement LIST, with statements that can+# nest another brace-enclosed block. Block-mode layout (--pp-layout=block)+# indents the statement lists - the indentation comes purely from the lists,+# not from the '{' '}' literals, so the same machinery indents begin/end-style+# blocks too (see pl0.pg). The flat default stays one line per construct.++Program = Prog: Function ;++Function = Func: 'fn' Ident '(' ParamList ')' Block ;++# A comma-separated list: an inline list (block mode keeps it on one line).+ParamList = Ident* ~ ',' ;++Block = Blk: '{' StatementList '}' ;++# A no-separator list of statements: a block list (block mode breaks and+# indents its elements).+StatementList = Statement* ;++Statement = Assign: Ident '=' Exp ';'+ | Return: 'return' Exp ';'+ | Nested: Block ;++Exp = Var: Ident+ | Num: num ;++Ident = Name: id ;++id = [a-zA-Z_][a-zA-Z0-9_]* ;+Int: num = [0-9]+ ;+Ignore: ws = [ \t\n\r]+ ;
test-grammars/grammar.pg view
@@ -10,72 +10,96 @@ """ /*-Grammar rules section. These rules are started with capital letter-*/--/* a */+Grammar rules section. These rules are started with capital letter. -Grammar = 'grammar' StrLit ';' ImportsOpt RuleList ;+An alternative may carry a constructor name: 'Star: Clause5 '*'' makes the+generated AST constructor for that alternative 'Star' instead of the+positional default 'Ctr__<Rule>__<index>'. Every constructor-producing+alternative below is named, so the generated front end's AST reads like+prose and survives alternative reordering. Lifted (,Rule1) alternatives+pass another rule's value through, produce no constructor, and therefore+carry no name.+*/ -ImportsOpt = ('imports' bigstr)? ;+Grammar = GrammarDef: 'grammar' StrLit ';' RuleList+ | GrammarImports: 'grammar' StrLit ';' 'imports' bigstr RuleList ; RuleList = Rule *; @shortcuts(r)-Rule = OptionList Rule1+Rule = RuleWithOptions: OptionList Rule1 | ,Rule1 ; -Rule: Rule1 = Name '=' Clause ';' - | Name ':' Name '=' Clause ';'- | Name '.' Name ':' Name '=' Clause ';'- | '.' Name ':' Name '=' Clause ';' ;+Rule: Rule1 = RuleSimple: Name '=' Clause ';'+ | RuleTyped: Name ':' Name '=' Clause ';'+ | RuleTypedFunc: Name '.' Name ':' Name '=' Clause ';'+ | RuleFunc: '.' Name ':' Name '=' Clause ';' ; OptionList = Option+ ; -Option = '@shortcuts' '(' IdList ')' | '@symmacro' ;+Option = Shortcuts: '@shortcuts' '(' IdList ')'+ | Symmacro: '@symmacro' ; IdList = Name* ~ ',' ; @shortcuts(cl)-Clause = Clause '|' Clause2- | ,Clause2;+Clause = Alt: Clause '|' Clause1+ | ,Clause1 ; -Clause: Clause2 = Clause2 Clause3- | ,Clause3 ;+# The constructor-name label itself: it binds tighter than '|' and scopes+# over the whole juxtaposition sequence (one alternative). The bare ':'+# token cannot collide with the rule-header forms above because clauses are+# fenced off by '=' ... ';'.+Clause: Clause1 = Labeled: Name ':' Clause2+ | ,Clause2 ; -Clause: Clause3 = ',' Clause4 - | '!' Clause4+Clause: Clause2 = Seq: Clause2 Clause3+ | ,Clause3 ;++Clause: Clause3 = Lifted: ',' Clause4+ | Ignored: '!' Clause4 | ,Clause4 ; -Clause: Clause4 = Clause5 '*' OptDelim- | Clause5 '+' OptDelim- | Clause5 '?'+Clause: Clause4 = Star: Clause5 '*'+ | StarDelim: Clause5 '*' '~' Clause5+ | Plus: Clause5 '+'+ | PlusDelim: Clause5 '+' '~' Clause5+ | Opt: Clause5 '?' | ,Clause5 ; Clause: Clause5 = '(' ,Clause ')'- | Name- | StrLit- | '.'- | regexplit ;--OptDelim = ('~' Clause5)? ;+ | Ref: Name+ | Lit: StrLit+ | Dot: '.'+ | Regex: regexplit ; -StrLit = str ;-Name = id ;+StrLit = Str: str ;+Name = Ident: id ; /* Lexical rules section. These rules are started with regular letter */ id = [a-zA-Z][A-Za-z0-9_]* ;-str = '\'' ([^'] | '\\\'')* '\'' ;+# String literals consume escape pairs atomically (backslash + any char),+# so a literal ending in a backslash ('\\') lexes correctly instead of the+# trailing backslash absorbing the closing quote under maximal munch.+# The backslash class lives in the shared 'backslash' macro below (the same+# convention as java.pg): inline, a class ending in a backslash trips the+# regexplit rule's own escaped-']' alternative and overruns; and the negated+# class is spelled [^\\'] so it does not end in a backslash either. This+# grammar's own front end lexes all of this before the fix takes effect (the+# bootstrap stage: accept the regenerated snapshot, rebuild, and only then+# do '\\' string literals lex in other grammars).+str = '\'' ([^\\'] | backslash .)* '\'' ; @symmacro dq = '"' ; # production would not be generated for symmacro @symmacro ndq = [^"] ;+@symmacro+backslash = [\\] ; bigstr = dq dq dq (ndq|dq ndq| dq dq ndq |[\n])* dq dq dq; regexplit = '[' ([^\]] | '\\]')* ']' ; Ignore: ws = [ \t\n]+ ; Ignore: comment = '#' .* [\n] ; Ignore: comment1 = '/*' ([^\*]|[\*][^\/]|[\n])* '*/';-
test-grammars/java.pg view
@@ -1,10 +1,10 @@ grammar 'Java'; # ============================================================================-# LALR conflict inventory (happy: 17 shift/reduce, 0 reduce/reduce)+# LALR conflict inventory (happy: 13 shift/reduce, 0 reduce/reduce) # ============================================================================ # Every remaining conflict is a shift/reduce whose default resolution (shift)-# is the correct Java reading. They fall into seven families; the items+# is the correct Java reading. They fall into six families; the items # identify the automaton state (happy -i state numbers move with every # grammar change, the items do not): #@@ -15,16 +15,7 @@ # this if and hand the 'else' to an enclosing one. Shifting is the JLS # 14.5 rule. See IfStatement. #-# 2. catch/finally attach to the nearest try - 1 state, 4 conflicts:-# 'catch', 'finally' and their splice tokens qq_CatchList, qq_OptFinally,-# against reduce OptFinally -> empty. Items:-# TryStatement -> 'try' Statement CatchList . OptFinally-# CatchList -> CatchList . ('catch' '(' Parameter ')' Statement)-# In 'try try { } catch (E e) { } finally { }' each clause could extend-# the inner try (shift) or close it and attach to the outer one (reduce).-# Java attaches both to the nearest try.-#-# 3. Member id vs empty TypeParameters - 2 states (a type body after+# 2. Member id vs empty TypeParameters - 2 states (a type body after # ModifierList, and the MemberDeclaration QQ entry), 1 conflict each on # id, against reduce TypeParameters -> empty. Items: # MemberDeclaration -> . id MemberAfterFirstId@@ -34,7 +25,7 @@ # (reduce). No input is lost: id MemberAfterFirstId derives everything # the empty-TypeParameters generic alternative would. #-# 4. Greedy CompoundName '.' - 1 state, 1 conflict on '.', against reduce+# 3. Greedy CompoundName '.' - 1 state, 1 conflict on '.', against reduce # CompoundName -> id CompoundNameTail . Item: # CompoundNameTail -> CompoundNameTail . ('.' id) # 'a.b.c' extends the unreduced name instead of reducing 'a' early and@@ -48,7 +39,7 @@ # type positions (package, throws, extends, after 'new', ...) parse the # name in a twin state without them and without the conflict. #-# 5. Bracket-list shifts on '[' - 5 states, 1 conflict each:+# 4. Bracket-list shifts on '[' - 5 states, 1 conflict each: # - after CompoundName in an expression, at statement start, and in a # cast head (reduce: the call-parens option ('(' Arglist ')')? -> # empty, i.e. commit to the bare name as a complete primary). Items:@@ -64,9 +55,9 @@ # access/sizing) or greedily extends the dims list; no input is lost. # See the NOTEs at Dims and PrimaryNoPostfix. #-# 6. '<' commits to type arguments - 2 states, 1 conflict each on '<':+# 5. '<' commits to type arguments - 2 states, 1 conflict each on '<': # after CompoundName at statement start and in a cast head (reduce: bare--# name primary, as in family 5). Standard for LALR Java parsers; see the+# name primary, as in family 4). Standard for LALR Java parsers; see the # NOTE at TypeArguments. Only the cast-head state loses real input # ('(a < b)' as a parenthesized primary, see KNOWN LIMITATION at # CastExpression); the other rejects only semantically invalid Java@@ -81,16 +72,31 @@ # operator, an operand start reduces RelationalOp). See the NOTEs at # RelationalExpression and ShiftOp. #-# 7. QQ bootstrap dummy bracket - 1 state, 1 conflict. The quasi-quoter+# 6. QQ bootstrap dummy bracket - 1 state, 1 conflict. The quasi-quoter # wraps a quote body in a per-rule dummy-token pair, and the whole-file # entry 'Java -> DUMMY . Java DUMMY' lets a second opening DUMMY (shift)-# compete with deriving an empty CompilationUnit ((Package)? -> empty)-# right before the closing DUMMY (reduce). Only a completely empty-# [java| |] quote is affected (it fails to parse); any non-empty quote-# has a real token after the opening DUMMY.+# compete with deriving an empty CompilationUnit (OptDocComment -> empty,+# the unit's first nullable) right before the closing DUMMY (reduce).+# Only a completely empty [java| |] quote is affected (it fails to+# parse); any non-empty quote has a real token after the opening DUMMY. #-# The cast-vs-paren decision one token AFTER ')' is conflict-free; see-# CastExpression.+# A seventh family - catch/finally attaching to the nearest try, 1 state,+# 4 conflicts - dissolved when try/catch/finally bodies were tightened from+# Statement to StatementBlock (JLS 14.20): 'try try { } catch ...' is no+# longer derivable, so the clauses' owner is always explicit. See+# TryStatement. The cast-vs-paren decision one token AFTER ')' is+# conflict-free; see CastExpression. Lambda expressions and method+# references add ZERO conflicts: '->' and '::' are fresh tokens that no+# reduce lookahead contains, so every lambda head and reference form is+# decided by a plain shift - see the NOTEs at AssignmentExpression and+# PostfixExpression. The Phase 4g batch - anonymous class bodies, array+# creation with initializers, the 'default' modifier, annotation value+# arrays, generic members with primitive/void returns, enum-constant doc+# comments, and the package-info/multi-type CompilationUnit left-factoring+# - also adds ZERO conflicts; each construct's NOTE explains why (anchor+# tokens, shared nonterminals, or '{' never following a complete+# expression). Only the family-6 item moved: the empty unit's first+# nullable is now OptDocComment instead of the retired (Package)? option. # ============================================================================ Java = CompilationUnit ;@@ -100,12 +106,34 @@ TypeDeclaration = OptDocComment ModifierList TypeDeclRest ; +TypeDeclarationList = (TypeDeclaration)* ;+ ImportList = (ImportStatement)*;++# A compilation unit may open with a doc comment and annotations that+# belong to the 'package' line (package-info.java, JLS 7.4.1) - or, when+# there is no package line, to the first type declaration. The two cannot+# be told apart before the token after them, and giving each its own+# nullable doc position would epsilon-reduce one against the other+# (reduce/reduce). So the leading 'OptDocComment ModifierList' is parsed+# ONCE, shared, and CompilationUnitRest's anchor token says what it+# belongs to: 'package' (UnitPackageFirst - the package's), a type-start+# token (UnitTypeFirst - the first type's, which therefore does NOT+# re-parse its own leading doc/modifiers; types after the first are full+# TypeDeclarations again), or 'import' (UnitImportsFirst - a dangling doc+# nothing claims). Sharing ModifierList (not a bare AnnotationList) keeps+# the '@'-extension machinery in one item set; that it also accepts+# modifier keywords before 'package' is parser-level tolerance (javac's+# job). TypeDeclarationList replaces the old (TypeDeclaration)?: a unit+# may hold any number of top-level types (JLS 7.3). CompilationUnit =- (Package)?- ImportList- (TypeDeclaration)? ;+ OptDocComment ModifierList (CompilationUnitRest)? ; +CompilationUnitRest =+ UnitPackageFirst: Package ImportList TypeDeclarationList+ | UnitImportsFirst: ImportStatement ImportList TypeDeclarationList+ | UnitTypeFirst: TypeDeclRest TypeDeclarationList ;+ Package = 'package' CompoundName ';' ; @@ -115,7 +143,7 @@ # Import names have their own LEFT-recursive spelling instead of reusing # CompoundName: the on-demand form would need CompoundName reduced on # lookahead '.' (to then shift '.' '*'), but that reduce loses to the greedy-# name-extension shift (family 4), which made the star branch unreachable+# name-extension shift (family 3), which made the star branch unreachable # ('import a.b.*;' never parsed). Left recursion keeps both '.' # continuations in one item set, so the token AFTER each '.' (id vs '*') # picks the branch - no early commitment, no conflict.@@ -134,19 +162,34 @@ AnnotationArguments = AnnotationElement (',' AnnotationElement)* ; -# Explicit alternatives (not (id '=')? Expression) so LALR keeps both items+# Explicit alternatives (not (id '=')? ElementValue) so LALR keeps both items # alive after shifting id; otherwise values starting with an identifier, e.g.-# @Retention(RetentionPolicy.RUNTIME), fail. ConditionalExpression is the JLS-# ElementValue level; full Expression would make @Foo(a = b) ambiguous.-AnnotationElement = id '=' ConditionalExpression | ConditionalExpression ;+# @Retention(RetentionPolicy.RUNTIME), fail.+AnnotationElement = id '=' ElementValue | ElementValue ; +# JLS 9.7.1 ElementValue: ConditionalExpression is the JLS expression level+# (full Expression would make @Foo(a = b) ambiguous); a nested annotation+# and the brace-enclosed value array are anchored on '@' and '{', tokens no+# expression can start with, so the three alternatives never compete.+ElementValue =+ ConditionalExpression+ | Annotation+ | ElementValueArrayInitializer ;++# '{' (values...)? '}' with an optional trailing comma (JLS 9.7.1), e.g.+# @Target({ ElementType.METHOD, ElementType.FIELD }). After a ',' the next+# token picks between another value and the closing '}' (the trailing-comma+# case), the same deferred decision as EnumConstantList's trailing ','.+ElementValueArrayInitializer =+ '{' (ElementValue (',' ElementValue)* (',')?)? '}' ;+ AnnotationList = Annotation* ; # Exactly ONE ModifierList is parsed per declaration, owned by the enclosing # declaration rule (TypeDeclaration at the top level, FieldDeclaration inside # a type body). The class/interface/enum/@interface rules must NOT start with # their own nullable ModifierList: after the enclosing list, every token that-# can extend a ModifierList (the 10 modifier keywords, '@', and the splice+# can extend a ModifierList (the 11 modifier keywords, '@', and the splice # tokens qq_Modifier/qq_Annotation/qq_ModifierList) used to conflict between # extending the outer list and epsilon-starting the inner one - 14 # shift/reduce conflicts whose shift put all modifiers on the outer list and@@ -193,8 +236,14 @@ # ModifierList against FieldDeclaration's nullable OptDocComment → r/r). AnnotationTypeElement = FieldDeclaration ; -# Enum declaration-EnumConstant = AnnotationList id ('(' Arglist ')')? ('{' FieldDeclarationList '}')? ;+# Enum declaration. A constant may carry a doc comment (JLS 8.9.1 puts+# annotations there; the doc comment is standard style). The OptDocComment+# is safe: inside an enum body every constant position (after '{' or a+# separating ',') expects only an EnumConstant, so the doccomment shift and+# the epsilon-reduce on '@'/id compete with nothing - the trailing-comma+# branch reduces on '}'/';' only, and FieldDeclaration's own OptDocComment+# sits behind the ';' that ends the constant list.+EnumConstant = OptDocComment AnnotationList id ('(' Arglist ')')? ('{' FieldDeclarationList '}')? ; EnumConstantList = EnumConstant (',' EnumConstant)* (',')? ; @@ -246,9 +295,20 @@ # - Primitive type keyword → definitely method/field # - TypeParameters → definitely method (generic) # - id → could be constructor or reference type method/field+#+# The primitive-return generic alternative ('<T> void m()', JLS 8.4) is+# anchored on NON-nullable NonEmptyTypeParameters: with the nullable+# TypeParameters it would put the 9 primitive keywords into the+# empty-TypeParameters reduce lookahead, racing the first alternative's+# shift in every member state (9 new conflicts per state). Anchored, the+# branch is only entered through a real '<' - the same '<' shift the+# reference-type generic alternative uses (TypeParameters derives the same+# NonEmptyTypeParameters) - and after the closing '>' the next token picks+# the branch: a primitive keyword shifts here, id reduces TypeParameters. MemberDeclaration = PrimitiveTypeKeyword Dims id MemberRest # Primitive type method/field- | TypeParameters id MoreTypeSpecifier id MemberRest # Generic method with any type+ | TypeParameters id MoreTypeSpecifier id MemberRest # Generic method with reference type+ | NonEmptyTypeParameters PrimitiveTypeKeyword Dims id MemberRest # Generic method with primitive/void type | id MemberAfterFirstId ; # Constructor or reference type # Primitive type keywords (from TypeSpecifier)@@ -329,8 +389,12 @@ VariableInitializer = Expression- | '{' VariableInitializerList '}' ;+ | ArrayInitializer ; +# Brace-enclosed initializer (JLS 10.6), shared by declarators+# ('int[] a = {1, 2};') and array creation ('new int[] {1, 2}').+ArrayInitializer = '{' VariableInitializerList '}' ;+ StaticInitializer = StatementBlock ; @@ -339,16 +403,17 @@ # Parameter modifiers (JLS 8.4.1 VariableModifier: 'final' and annotations). # The NULLABLE prefix is safe here because parameter positions (after '(' or-# ',' in a parameter list, and in 'catch (...)') have no competing expression-# interpretation: the epsilon-reduce of the empty list on a type-start token-# is the state's only action. Do NOT reuse this at statement level, where a-# nullable prefix would break 'Foo x;' - see the NOTE at VariableDeclaration.+# ',' in a parameter list, in 'catch (...)', and in a resource spec) have no+# competing expression interpretation: the epsilon-reduce of the empty list+# on a type-start token is the state's only action. Do NOT reuse this at+# statement level or inside 'for (', where a nullable prefix would break+# 'Foo x;' - see the NOTEs at VariableDeclaration and ForEachHeader. ParamModifierList = ('final' | Annotation)* ; # '...' (varargs, JLS 8.4.1) is one lexer token: Alex's maximal munch prefers # it over '.', and no float literal can follow '..'. That only the LAST # parameter may be variadic is a semantic check (javac's job): the parser-# accepts the ellipsis on any parameter, including a catch parameter.+# accepts the ellipsis on any method parameter. Parameter = ParamModifierList Type ('...')? id Dims ; @@ -366,6 +431,13 @@ # keyword at statement start the next token decides ('(' starts the # invocation; '.' and the operator/closer tokens reduce the keyword to the # expression primary).+#+# 'assert' (JLS 14.10): the keyword anchors the statement, and after the+# first Expression the next token decides the optional detail message (':'+# shifts, ';' reduces the option empty). ':' is already an expression+# follower ('case' labels, the conditional's middle operand), so no new+# conflict. Spelling 'assert' in a rule makes it a keyword token: code using+# 'assert' as an identifier stops parsing - correct for Java 1.4+. Statement = VariableDeclaration | 'return' OptExpression ';'@@ -379,6 +451,7 @@ | SwitchStatement | 'synchronized' '(' Expression ')' Statement | 'throw' Expression ';'+ | 'assert' Expression (':' Expression)? ';' | id ':' Statement | 'break' OptId ';' | 'continue' OptId ';'@@ -411,17 +484,70 @@ 'for' '(' ( VariableDeclaration | ( Expression ';' ) | ';' ) OptExpression ';' OptExpression- ')' Statement ;+ ')' Statement+ | 'for' '(' ForEachHeader ')' Statement ; -CatchList = ( 'catch' '(' Parameter ')' Statement)* ;+# Enhanced-for header (JLS 14.14.2). The loop variable is spelled INLINE as+# 'Type id', NOT through VariableDeclarator: its nullable declarator Dims and+# optional initializer belong to classic declarators only - reusing it would+# let 'for (int i = 0 : xs)' parse and put a never-fillable initializer in+# the AST. Sharing the Type prefix with VariableDeclaration keeps the classic+# and for-each items in ONE item set after 'for (': following 'Type id' the+# next token decides conflict-free - ':' commits to for-each, while '=' ','+# ';' '[' continue the classic declarator.+#+# The modified alternative mirrors VariableDeclaration's two-alternative+# trick rather than reusing Parameter's nullable ParamModifierList: inside+# 'for (' the same Type-vs-Expression weighing as at statement start is in+# progress, and a nullable modifier prefix would demand an epsilon-reduce+# BEFORE the first identifier is shifted - a shift/reduce that happy resolves+# toward the expression/declaration shift, making every UNmodified for-each+# ('for (String s : list)') unparseable. 'final' and '@' cannot start an+# expression, so the modified alternative is keyword-anchored and the+# unmodified one leaves the classic automaton untouched.+ForEachHeader =+ Type id ':' Expression+ | LocalModifierList1 Type id ':' Expression ; -OptFinally = ('finally' Statement)?;+CatchList = ( 'catch' '(' CatchParameter ')' StatementBlock)* ; +# Catch parameter (JLS 14.20 CatchFormalParameter): the type may be a union,+# 'Type | Type | ...' - multi-catch. Inside 'catch (...)' a '|' has no+# expression reading, so the union list is conflict-free. This is a separate+# rule rather than a widening of Parameter so method parameters do not+# silently accept '|'; conversely no '...' or declarator dims here (JLS:+# CatchType is a class type). The nullable ParamModifierList is safe for the+# same reason as in Parameter: after 'catch (' no expression interpretation+# competes with the type.+CatchParameter = ParamModifierList Type ('|' Type)* id ;++OptFinally = ('finally' StatementBlock)?;++# Try statement (JLS 14.20): the try/catch/finally bodies are BLOCKS, not+# bare statements. Besides being what the JLS says, the tightening dissolves+# the old catch/finally-attachment conflict family ('try try { } catch ...'+# could extend either try; with mandatory braces the nesting is explicit),+# and it frees '(' directly after 'try' to unambiguously open a resource+# specification (JLS 14.20.3): 'try' is followed by '(' (resources) or '{'+# (body), nothing else. TryStatement =- 'try' Statement+ 'try' (ResourceSpec)? StatementBlock CatchList OptFinally ; +# The trailing ';' before ')' is optional (JLS 14.20.3). Both ';'+# continuations - separator before another Resource, trailing before ')' -+# share the shift, and the token after the ';' picks the branch.+ResourceSpec = '(' Resource (';' Resource)* (';')? ')' ;++# A resource (JLS 14.20.3): one declarator with a REQUIRED initializer.+# Spelled inline like ForEachHeader, and with Parameter's nullable+# ParamModifierList, which is safe here: after 'try (' or a ';' inside the+# spec, only a resource declaration can start, so the epsilon-reduce of the+# empty modifier list on a type-start token is the state's only action.+# (Java 9's bare-variable resource, 'try (existingVar)', is not covered.)+Resource = ParamModifierList Type id '=' Expression ;+ SwitchCaseList = (( 'case' Expression ':' ) | ( 'default' ':' ) | Statement )*;@@ -439,9 +565,59 @@ # UPDATED: All expression rules now use shared "Expression" type for QQ support Expression : Expression = AssignmentExpression ; +# Lambda expressions (JLS 15.27) sit alongside the assignment alternative,+# exactly where the JLS puts them. Every form is decided by a plain shift of+# a token no competing interpretation claims:+# - 'id ->': '->' directly follows the shifted id. No reduce ever has '->'+# in its lookahead - the token only ever follows a lambda head - so the+# name interpretation of the id (epsilon-starting CompoundNameTail) is+# untouched on every other lookahead.+# - '( )': ')' directly after the operand-position '(' had NO action before+# (an empty parenthesized expression does not exist), so the empty+# parameter list is a fresh shift.+# - '( id , id ... )': two or more INFERRED parameters. The ',' after the+# first id commits to the parameter list - inside an operand-position+# '(' no expression continues with ',' (argument lists live behind a+# call's own '(', a different automaton state), so the shift is+# conflict-free. Only plain identifiers are derivable: TYPED parameter+# lists ('(Foo a, Bar b) -> e') would need the full type-vs-expression+# cover machinery in yet another position and are NOT supported (see+# KNOWN LIMITATION below).+# - '( Expression ) ->': the SINGLE parenthesized parameter '(x) -> e'+# rides the cast machinery: the parser already parses '(' Expression ')'+# and decides cast-vs-paren one token after ')' (see CastExpression);+# '->' joins that decision point as a third, conflict-free outcome. That+# the parenthesized Expression is a bare identifier is a semantic check+# (javac's job), like rejecting 'default' on ordinary methods: '(a+b)->e'+# parses here and javac would reject it.+#+# The body swallows everything an Expression can ('x -> y + 1' puts the sum+# in the body, JLS-correct: the body extends as far right as possible), and+# a '{' after '->' starts a statement block - no Expression starts with '{',+# so the two body forms never compete.+#+# In a conditional, the TRUE branch is a full Expression and accepts a+# lambda ('cond ? x -> a : y'); the FALSE branch is a ConditionalExpression+# and does not - JLS 15.25 puts LambdaExpression in the false branch too,+# but spelling it there would let the bare '? :' chain rederive itself; the+# parenthesized form '(y -> b)' covers it. Annotation element values+# (ConditionalExpression, see AnnotationElement) correctly exclude lambdas.+#+# KNOWN LIMITATION: a lambda directly under a CAST ('(Runnable) () -> f()')+# does not parse - the cast operand (UnaryExpressionNotPlusMinus) cannot+# derive a lambda, and lifting lambdas into it would put 'id ->' behind+# every cast head. Parenthesizing the lambda works: '(Runnable) (() -> f())'.+# Typed parameter lists are out for the same cover-grammar cost, see above. Expression : AssignmentExpression =- ConditionalExpression (AssignmentOp AssignmentExpression)? ;+ ConditionalExpression (AssignmentOp AssignmentExpression)?+ | id '->' LambdaBody+ | '(' ')' '->' LambdaBody+ | '(' id (',' id)+ ')' '->' LambdaBody+ | '(' Expression ')' '->' LambdaBody ; +# JLS 15.27.2: an expression body or a block body; '{' decides.+LambdaBody = Expression | StatementBlock ;+ # COMMENTED OUT - CAUSES LEFT RECURSION: # | Expression (/*NumericExpressionEnd # | TestingExpressionEnd@@ -545,7 +721,7 @@ # conditions (if/while/for) and argument lists there is no cast context, so # 'if (a < b)' and 'f(a < b)' are unaffected. #-# The '[' and '<' shifts inside the cast head are families 5 and 6 of the+# The '[' and '<' shifts inside the cast head are families 4 and 5 of the # conflict inventory at the top of this file. The cast-vs-paren decision # after ')' is conflict-FREE: operand-start tokens can never follow a # complete parenthesized expression, so the lookahead sets are disjoint.@@ -575,17 +751,32 @@ # The NonEmptyTypeArguments alternative is the explicit-type-argument call # on a non-name base: this.<T>m(), f().<T>m(). After the shifted '.' the # tokens id and '<' are distinct, so it adds no conflict. A NAME base-# (Collections.<String>emptyList()) never reaches it - the greedy family-4+# (Collections.<String>emptyList()) never reaches it - the greedy family-3 # shift keeps the name unreduced - and parses through the PrimaryNoPostfix # alternative anchored on 'id CompoundNameTail' instead; see the NOTE # there.+#+# The '::' alternatives are method references (JLS 15.13): 'Foo::bar',+# 'this::handle', 'obj.field::m', 'f()::m', '(expr)::m', and the+# constructor form 'Foo::new'. '::' is a fresh token no other rule+# mentions, so the shift is unambiguous, and after it the id/'new' split is+# a plain token choice. A bare name base reduces CompoundName -> ... ->+# PostfixExpression on lookahead '::' before the shift - '::' competes with+# nothing there (the greedy family-3 '.'-shift only fires on '.'). Lexing:+# maximal munch keeps '::' one token (never two ':') and '->' one token+# (never '-' '>'), while 'a-->b' still lexes as 'a' '--' '>' 'b' ('--'+# matches the input, '->' does not). NOT covered (rare): array-type refs+# ('String[]::new'), 'super::m', and explicit type arguments on the+# reference ('Foo::<T>bar'). Expression : PostfixExpression = PrimaryNoPostfix | PostfixExpression PostfixOp | PostfixExpression '.' id | PostfixExpression '.' id '(' Arglist ')' | PostfixExpression '.' NonEmptyTypeArguments id '(' Arglist ')'- | PostfixExpression '[' Expression ']' ;+ | PostfixExpression '[' Expression ']'+ | PostfixExpression '::' id+ | PostfixExpression '::' 'new' ; # The 'CompoundName '[' Expression ']'' alternative anchors array access on # the unreduced name (JLS ArrayAccess: Name [ Expression ]). It must sit here@@ -600,7 +791,7 @@ # # The class-literal, qualified-this and explicit-type-argument-call # alternatives anchor on the UNREDUCED name spelling 'id CompoundNameTail',-# NOT on CompoundName: the greedy name-extension shift (family 4) means a+# NOT on CompoundName: the greedy name-extension shift (family 3) means a # complete CompoundName is never reduced on lookahead '.', so a # 'CompoundName '.' X' alternative could never be reached - the import-star # lesson (see ImportName), expression edition. Spelling the shared@@ -625,9 +816,27 @@ # Only array creation takes sizing expressions (DimExprs); trailing empty # pairs allow 'new int[3][]'. Uses TypeSpecifier, not Type, so the dims are-# not consumed twice. 'new int[] {1,2}' (initializer syntax) is a separate-# feature (Phase 4g).-CreationExpression = 'new' TypeSpecifier ( '(' Arglist ')' | DimExprs (NonEmptyDims)? );+# not consumed twice.+#+# The optional class body after the call form is an anonymous class+# (JLS 15.9.5): 'new Foo() { ... }'. The '{' is a plain, conflict-FREE+# shift: no production puts '{' directly after a complete expression, so+# '{' is never in the lookahead of the empty-body reduce - after ')' the+# parser either shifts '{' (anonymous body) or reduces on a real+# expression-follower. (Array-initializer braces sit after NonEmptyDims,+# never after a complete creation, and keep it that way.)+#+# The NonEmptyDims ArrayInitializer alternative is array creation with an+# initializer (JLS 15.10.1): 'new int[] {1, 2}', 'new int[][] {{1}, {2}}'.+# The initializer form takes only EMPTY bracket pairs (sizes and an+# initializer are mutually exclusive in the JLS), so DimExprs keeps its+# branch to itself: after 'new T [' the next token decides as before+# (']' commits to the initializer form's empty pair, an expression start+# to a sizing expression).+CreationExpression = 'new' TypeSpecifier+ ( '(' Arglist ')' ('{' FieldDeclarationList '}')?+ | DimExprs (NonEmptyDims)?+ | NonEmptyDims ArrayInitializer ); DimExprs = ('[' Expression ']')+ ; @@ -639,7 +848,7 @@ # NOTE: '<' is both the type-argument opener (List<String>) and the # comparison operator (x < y). Wherever a CompoundName can be followed by # either, the parser shifts '<' into NonEmptyTypeArguments (standard for-# Java parsers); see family 6 of the conflict inventory at the top of this+# Java parsers); see family 5 of the conflict inventory at the top of this # file for the two states where this surfaces. TypeArguments = NonEmptyTypeArguments? ; @@ -666,8 +875,16 @@ | '?' 'extends' Type | '?' 'super' Type ; -TypeParameters = ('<' TypeParameter (',' TypeParameter)* '>')? ;+# Split like TypeArguments/NonEmptyTypeArguments: the nullable wrapper for+# positions where type parameters are optional (class/interface headers,+# reference-type generic members), the non-empty core for+# MemberDeclaration's primitive-return generic alternative, which must be+# '<'-anchored (see the NOTE there). One shared core nonterminal, so both+# uses ride the same '<' shift.+TypeParameters = NonEmptyTypeParameters? ; +NonEmptyTypeParameters = '<' TypeParameter (',' TypeParameter)* '>' ;+ TypeParameter = id ('extends' Type ('&' Type)*)? ; # Type is spelled out by alternatives (instead of 'TypeSpecifier Dims') so@@ -698,6 +915,14 @@ | 'void' | CompoundName TypeArguments ; +# 'default' (JLS 9.4: interface default methods) is a Modifier even though+# the JLS grammar gives it its own InterfaceMethodModifier production:+# accepting it on classes too is parser-level tolerance (javac's job, like+# 'default' values on ordinary methods - see MemberRest). It cannot clash+# with the switch label ('default' ':' sits in a statement context where no+# ModifierList is parsed) nor with the annotation-element default clause+# (that 'default' follows a method header's ')' Dims ThrowsClause?, a+# position with no ModifierList item either). Modifier = 'public' | 'private'@@ -708,7 +933,8 @@ | 'synchronized' | 'abstract' | 'threadsafe'- | 'transient' ;+ | 'transient'+ | 'default' ; # The tail of a dotted name, hoisted into a NAMED rule so that CompoundName # and the PrimaryNoPostfix alternatives anchored on 'id CompoundNameTail'
test/GoldenTests.hs view
@@ -32,8 +32,9 @@ import System.FilePath ((</>), takeBaseName) import Test.HUnit +import qualified GrammarParser as GP+ import Diagnostics (Diagnostic, renderDiagnostic)-import Syntax (InitialGrammar) import TestSupport goldenRoot :: FilePath@@ -54,7 +55,7 @@ -- | Run the pipeline on one grammar file, forcing the generated contents so -- that any lazy `error` from the generators surfaces here as a test failure.-generateArtifacts :: (String -> Either Diagnostic InitialGrammar)+generateArtifacts :: (String -> Either Diagnostic GP.Grammar) -> FilePath -> IO (Either String [(FilePath, String)]) generateArtifacts parseSrc pgFile = do source <- readFileUtf8 pgFile
test/TestSupport.hs view
@@ -20,8 +20,11 @@ import System.FilePath ((</>), takeExtension) import System.IO -import ASTAdapter (parseWithGenerated)+import qualified GrammarParser as GP+ import Diagnostics (Diagnostic)+import Frontend (cleanGrammarTokens, parseWithGenerated)+import GenPP (genPP, PPLayout(..)) import GenQ (genQ) import GenX (genX) import GenY (genY)@@ -32,20 +35,24 @@ import Syntax import TokenProcessing (processTokens) --- | Lexing, token post-processing and parsing of a grammar specification.-parseGrammarSource :: String -> Either Diagnostic InitialGrammar-parseGrammarSource src = scanTokens src >>= (parse . processTokens)+-- | The hand-written reference front end: lexing, token post-processing,+-- parsing and the shared token-text cleanup. Both front ends produce the+-- GENERATED AST ('GP.Grammar'); the pipeline has no other parsed-grammar+-- representation.+parseGrammarSource :: String -> Either Diagnostic GP.Grammar+parseGrammarSource src = cleanGrammarTokens <$> (scanTokens src >>= (parse . processTokens)) --- | The self-hosted front end: the same job as 'parseGrammarSource', done by--- the lexer/parser RTK generated from grammar.pg plus the AST adapter.-parseGrammarSourceGenerated :: String -> Either Diagnostic InitialGrammar+-- | The self-hosted front end (the default): the same job as+-- 'parseGrammarSource', done by the lexer/parser RTK generated from+-- grammar.pg.+parseGrammarSourceGenerated :: String -> Either Diagnostic GP.Grammar parseGrammarSourceGenerated = parseWithGenerated -- | The shared back half of the front-end pipeline: normalization of an -- already-parsed grammar down to what the code generators consume.-normalizeParsedGrammar :: InitialGrammar -> Either Diagnostic NormalGrammar-normalizeParsedGrammar ig = do- ng <- normalizeTopLevelClauses (normalizeStringLiterals ig)+normalizeParsedGrammar :: GP.Grammar -> Either Diagnostic NormalGrammar+normalizeParsedGrammar pg = do+ ng <- normalizeTopLevelClauses (normalizeStringLiterals pg) return (fillConstructorNames ng) -- | The full front-end pipeline, producing the normalized grammar that the@@ -53,16 +60,30 @@ normalizeGrammarSource :: String -> Either Diagnostic NormalGrammar normalizeGrammarSource src = parseGrammarSource src >>= normalizeParsedGrammar --- | The three files rtk writes for a grammar, as (file name, content) pairs.+-- | Grammars (by 'getNGrammarName') that opt in to a pretty-printer golden,+-- with the layout to pin. The PP generator is opt-in (task 9): only these+-- grammars get a @\<Name\>PP.hs@ snapshot, so every other grammar sees zero+-- golden churn. @P@/@Sandbox@ pin the flat layout (task 9a, byte-unchanged);+-- @Block@ pins the block layout (task 9b) over a small bracket-structured+-- grammar so the indented output is reviewable. Keep this small.+ppGoldenGrammars :: [(String, PPLayout)]+ppGoldenGrammars = [("P", PPFlat), ("Sandbox", PPFlat), ("Block", PPBlock)]++-- | The files rtk writes for a grammar, as (file name, content) pairs: the+-- lexer, parser and quasi-quoter for every grammar, plus the pretty-printer+-- (in its pinned layout) for the grammars opted in to 'ppGoldenGrammars'. artifactsFor :: NormalGrammar -> Either Diagnostic [(FilePath, String)] artifactsFor g = do x <- genX g y <- genY g q <- genQ g- return [ (name ++ "Lexer.x", x)- , (name ++ "Parser.y", y)- , (name ++ "QQ.hs", q)- ]+ pp <- case lookup name ppGoldenGrammars of+ Just layout -> (\s -> [(name ++ "PP.hs", s)]) <$> genPP layout g+ Nothing -> return []+ return $ [ (name ++ "Lexer.x", x)+ , (name ++ "Parser.y", y)+ , (name ++ "QQ.hs", q)+ ] ++ pp where name = getNGrammarName g -- | Grammars whose hand-written-front-end parse the generated front end
test/UnitTests.hs view
@@ -6,21 +6,29 @@ -- * pipeline error handling (ported from EmptyGrammar_Test.hs) -- * normalization behavior on small inline grammars -- * normalization invariants checked against every grammar in test-grammars/+-- * the compiled-in generated quasi-quoter (GrammarQQ smoke test) module Main (main) where import Control.Exception (SomeException, evaluate, try) import Control.Monad (when) import Data.List (find, group, isInfixOf, isPrefixOf, nub, sort) import qualified Data.Map as M-import Data.Maybe (maybeToList)+import Data.Maybe (listToMaybe, maybeToList) import qualified Data.Set as S import System.Exit (exitFailure) import System.FilePath (takeBaseName) import Test.HUnit +import Data.Generics (everything, mkQ)+import qualified GrammarLexer as GL+import qualified GrammarParser as GP+ import Diagnostics (Diagnostic (..), SourcePos (..), renderDiagnostic)+import Frontend (grammarRules, ruleClause, ruleName, ruleTypeName) import GenX (isAlexEscape) import Grammar (isClauseSeqLifted)+import GrammarParser (Clause)+import GrammarQQ (clause) import Lexer (AlexPosn (..), PosToken (..), Token (..)) import Normalize (fillConstructorNames, normalizeTopLevelClauses) import Syntax@@ -41,7 +49,9 @@ , TestLabel "diagnostics" diagnosticsTests , TestLabel "pipeline error handling" errorHandlingTests , TestLabel "normalization behavior" normalizationTests+ , TestLabel "named constructors" namedConstructorTests , TestLabel "self-hosted front end" selfHostedFrontEndTests+ , TestLabel "compiled-in quasi-quoter (GrammarQQ)" grammarQQTests ] ++ perGrammar ++ astEquality when (errors results + failures results /= 0) exitFailure @@ -56,10 +66,36 @@ normalizeNoFill = either (error . ("unexpected diagnostic: " ++) . show) id . normalizeNoFillE -- | Parse a valid grammar, failing loudly on a diagnostic.-parseOrDie :: String -> InitialGrammar+parseOrDie :: String -> GP.Grammar parseOrDie = either (error . ("unexpected diagnostic: " ++) . show) id . parseGrammarSource --------------------------------------------------------------------------------+-- Generated-AST builders for expected values. Positions are+-- equality-transparent, so rtkNoPos compares equal to any parsed position.+--------------------------------------------------------------------------------++np :: GP.RtkPos+np = GP.rtkNoPos++gpRef :: String -> GP.Clause+gpRef n = GP.Ref np (GP.Ident np n)++gpLit :: String -> GP.Clause+gpLit s = GP.Lit np (GP.Str np s)++gpIgnore :: GP.Clause -> GP.Clause+gpIgnore = GP.Ignored np++gpSeq :: [GP.Clause] -> GP.Clause+gpSeq = foldl1 (GP.Seq np)++gpAlt :: [GP.Clause] -> GP.Clause+gpAlt = foldl1 (GP.Alt np)++gpLabeled :: String -> GP.Clause -> GP.Clause+gpLabeled n = GP.Labeled np (GP.Ident np n)++-------------------------------------------------------------------------------- -- StrQuote -------------------------------------------------------------------------------- @@ -92,15 +128,19 @@ , TestLabel "unBackQuote unescapes backslash itself" $ TestCase $ assertEqual "" "\\" (unBackQuote "\\\\") , TestLabel "catBigstrs joins adjacent big strings" $ TestCase $- assertEqual "" (map at [BigStr "a\nb", Id "x"])- (catBigstrs (map at [BigStr "a", BigStr "b", Id "x"]))+ -- tokens carry the raw text: merging drops the inner delimiters and+ -- yields a well-delimited block again+ assertEqual "" (map at [BigStr "\"\"\"a\nb\"\"\"", Id "x"])+ (catBigstrs (map at [BigStr "\"\"\"a\"\"\"", BigStr "\"\"\"b\"\"\"", Id "x"])) , TestLabel "catBigstrs keeps the position of the first part" $ TestCase $- assertEqual "" [PosToken (AlexPn 0 1 1) (BigStr "a\nb")]- (catBigstrs [ PosToken (AlexPn 0 1 1) (BigStr "a")- , PosToken (AlexPn 5 2 1) (BigStr "b") ])- , TestLabel "processTokens combines both steps" $ TestCase $- assertEqual "" (map at [StrLit "'", BigStr "a\nb"])- (processTokens (map at [StrLit "\\'", BigStr "a", BigStr "b"]))+ assertEqual "" [PosToken (AlexPn 0 1 1) (BigStr "\"\"\"a\nb\"\"\"")]+ (catBigstrs [ PosToken (AlexPn 0 1 1) (BigStr "\"\"\"a\"\"\"")+ , PosToken (AlexPn 9 2 1) (BigStr "\"\"\"b\"\"\"") ])+ , TestLabel "processTokens merges big strings and leaves literals raw" $ TestCase $+ -- escape processing happens on the parsed AST+ -- (Frontend.cleanGrammarTokens), not here+ assertEqual "" (map at [StrLit "'\\''", BigStr "\"\"\"a\nb\"\"\""])+ (processTokens (map at [StrLit "'\\''", BigStr "\"\"\"a\"\"\"", BigStr "\"\"\"b\"\"\""])) , TestLabel "a '\\f' keyword survives to the generated lexer" testFormFeedReachesLexer , TestLabel "a backslash in a character class is emitted Alex-escaped" testBackslashClassEscaped ]@@ -231,14 +271,14 @@ expectDiagnostic "a mixed lifted clause" (normalizeGrammarSource "grammar 'Test';\nFoo = ,Bar Baz;\nBar = 'b';\nBaz = 'z';\n") $ \d -> do assertEqual "context names the rule" (Just "in rule 'Foo'") (diagContext d)- assertEqual "position of 'Foo'" (Just (SourcePos 2 1)) (diagPos d)+ assertEqual "position of the ',Bar' clause" (Just (SourcePos 2 7)) (diagPos d) assertBool ("unexpected message: " ++ diagMessage d) $ "lifted" `isInfixOf` diagMessage d , TestLabel "a lifted clause under * is rejected" $ TestCase $ expectDiagnostic "a lifted clause under *" (normalizeGrammarSource "grammar 'X';\nFoo = ,Bar * ;\nBar = 'b';\n") $ \d -> do assertEqual "context names the rule" (Just "in rule 'Foo'") (diagContext d)- assertEqual "position of 'Foo'" (Just (SourcePos 2 1)) (diagPos d)+ assertEqual "position of the ',Bar *' clause" (Just (SourcePos 2 7)) (diagPos d) assertBool ("unexpected message: " ++ diagMessage d) $ "lifted" `isInfixOf` diagMessage d && "*" `isInfixOf` diagMessage d , TestLabel "repetition of a value-less item is rejected" $ TestCase $@@ -248,7 +288,7 @@ expectDiagnostic "a string literal under *" (normalizeGrammarSource "grammar 'I28';\nFoo = 'x'* ;\n") $ \d -> do assertEqual "context names the rule" (Just "in rule 'Foo'") (diagContext d)- assertEqual "position of 'Foo'" (Just (SourcePos 2 1)) (diagPos d)+ assertEqual "position of the repeated 'x'" (Just (SourcePos 2 7)) (diagPos d) assertBool ("unexpected message: " ++ diagMessage d) $ "produces no value" `isInfixOf` diagMessage d , TestLabel "repetition over a lexical rule is rejected" $ TestCase $@@ -258,7 +298,7 @@ expectDiagnostic "a lexical rule under +" (normalizeGrammarSource "grammar 'I28';\nFoo = num+ ;\nnum = [0-9]+ ;\n") $ \d -> do assertEqual "context names the rule" (Just "in rule 'Foo'") (diagContext d)- assertEqual "position of 'Foo'" (Just (SourcePos 2 1)) (diagPos d)+ assertEqual "position of the repeated 'num'" (Just (SourcePos 2 7)) (diagPos d) assertBool ("unexpected message: " ++ diagMessage d) $ "lexical rule" `isInfixOf` diagMessage d && "num" `isInfixOf` diagMessage d , TestLabel "duplicate rule definitions are rejected" $ TestCase $@@ -329,17 +369,18 @@ , "B = 'x' A ;" , "bb = [b]+ ;" ]- tokenRules = [ r | r <- getIRules g, getIClause r == IStrLit "x" ]+ rules = grammarRules g+ tokenRules = [ r | r <- rules, ruleClause r == gpLit "x" ] -- both uses of 'x' share a single generated keyword rule case tokenRules of [tok] -> do- assertEqual "keyword token type" (Just "Keyword") (getIDataTypeName tok)- let tokName = getIRuleName tok- clauseOf n = getIClause <$> find ((== n) . getIRuleName) (getIRules g)+ assertEqual "keyword token type" (Just "Keyword") (ruleTypeName tok)+ let tokName = ruleName tok+ clauseOf n = ruleClause <$> find ((== n) . ruleName) rules assertEqual "literal in A replaced by ignored token"- (Just $ IAlt [ISeq [IIgnore (IId tokName), IId "bb"]]) (clauseOf "A")+ (Just $ gpSeq [gpIgnore (gpRef tokName), gpRef "bb"]) (clauseOf "A") assertEqual "literal in B replaced by ignored token"- (Just $ IAlt [ISeq [IIgnore (IId tokName), IId "A"]]) (clauseOf "B")+ (Just $ gpSeq [gpIgnore (gpRef tokName), gpRef "A"]) (clauseOf "B") _ -> assertFailure $ "expected exactly one token rule for 'x', got: " ++ show tokenRules listGrammar :: NormalGrammar@@ -625,7 +666,7 @@ mapM_ (\dummy -> case find ((== dummy) . getLRuleName) (getLexicalRules g) of Just LexicalRule{getLRuleDataType = t, getLClause = cl} -> do assertEqual ("dummy token type for " ++ dummy) "Keyword" t- assertEqual ("dummy token spelling for " ++ dummy) (IStrLit dummy) cl+ assertEqual ("dummy token spelling for " ++ dummy) (gpLit dummy) cl other -> assertFailure $ "missing dummy keyword " ++ dummy ++ ": " ++ show other) (M.elems startInfo) @@ -673,6 +714,187 @@ assertEqual "filling is idempotent" filled (fillConstructorNames filled) --------------------------------------------------------------------------------+-- Named constructors ("Label: ..." alternative labels)+--------------------------------------------------------------------------------++namedConstructorTests :: Test+namedConstructorTests = TestList+ [ TestLabel "a label names the alternative's constructor; unnamed ones keep generated names" testCtorLabelOverride+ , TestLabel "the named constructor reaches the generated artifacts" testCtorLabelArtifacts+ , TestLabel "a label inside a parenthesized group names the proxy's constructor" testCtorLabelInGroup+ , TestLabel "a labeled sole repetition gets a constructor instead of a list alias" testCtorLabelForcesConstructor+ , TestLabel "both front ends parse labels into the same ICtor shape" testCtorLabelFrontEndEquality+ , TestLabel "a lowercase label is rejected" $ TestCase $+ expectDiagnostic "a lowercase constructor name"+ (normalizeGrammarSource "grammar 'X';\nFoo = bad: aa ;\naa = [a]+ ;\n") $ \d -> do+ assertEqual "context names the rule" (Just "in rule 'Foo'") (diagContext d)+ assertEqual "position of the label 'bad'" (Just (SourcePos 2 7)) (diagPos d)+ assertBool ("unexpected message: " ++ diagMessage d) $+ "must start with an uppercase letter" `isInfixOf` diagMessage d+ && "bad" `isInfixOf` diagMessage d+ , TestLabel "the reserved Ctr__ prefix is rejected" $ TestCase $+ expectDiagnostic "a Ctr__ constructor name"+ (normalizeGrammarSource "grammar 'X';\nFoo = Ctr__Foo__0: aa ;\naa = [a]+ ;\n") $ \d -> do+ assertEqual "position of the label" (Just (SourcePos 2 7)) (diagPos d)+ assertBool ("unexpected message: " ++ diagMessage d) $+ "reserved prefix 'Ctr__'" `isInfixOf` diagMessage d+ , TestLabel "the reserved Anti_ prefix is rejected" $ TestCase $+ expectDiagnostic "an Anti_ constructor name"+ (normalizeGrammarSource "grammar 'X';\nFoo = Anti_Foo: aa ;\naa = [a]+ ;\n") $ \d -> do+ assertEqual "position of the label" (Just (SourcePos 2 7)) (diagPos d)+ assertBool ("unexpected message: " ++ diagMessage d) $+ "reserved prefix 'Anti_'" `isInfixOf` diagMessage d+ , TestLabel "duplicate explicit names are rejected across the whole grammar" $ TestCase $+ -- the two rules even have different types: constructor names share+ -- one generated Haskell module, so the clash is global+ expectDiagnostic "a duplicate constructor name"+ (normalizeGrammarSource+ "grammar 'X';\nFoo = Mk: aa ;\nBar = Mk: bb ;\naa = [a]+ ;\nbb = [b]+ ;\n") $ \d -> do+ assertEqual "context names the second rule" (Just "in rule 'Bar'") (diagContext d)+ assertEqual "position of the second label" (Just (SourcePos 3 7)) (diagPos d)+ assertBool ("unexpected message: " ++ diagMessage d) $+ "already used in rule 'Foo'" `isInfixOf` diagMessage d+ && "line 2, column 7" `isInfixOf` diagMessage d+ , TestLabel "duplicate explicit names within one rule are rejected" $ TestCase $+ expectDiagnostic "a duplicate constructor name in one rule"+ (normalizeGrammarSource "grammar 'X';\nFoo = Mk: aa | Mk: bb ;\naa = [a]+ ;\nbb = [b]+ ;\n") $ \d ->+ assertBool ("unexpected message: " ++ diagMessage d) $+ "already used in rule 'Foo'" `isInfixOf` diagMessage d+ , TestLabel "a label in a lexical rule is rejected" $ TestCase $+ expectDiagnostic "a label in a lexical rule"+ (normalizeGrammarSource "grammar 'X';\nFoo = tok ;\ntok = Mk: [a]+ ;\n") $ \d -> do+ assertEqual "context names the lexical rule" (Just "in rule 'tok'") (diagContext d)+ assertEqual "position of the label 'Mk'" (Just (SourcePos 3 7)) (diagPos d)+ assertBool ("unexpected message: " ++ diagMessage d) $+ "lexical rule" `isInfixOf` diagMessage d+ , TestLabel "a label on a lifted alternative is rejected" $ TestCase $+ -- a lifted alternative passes a value through and produces no+ -- constructor; silently dropping the name would be worse+ expectDiagnostic "a label on a lifted alternative"+ (normalizeGrammarSource "grammar 'X';\nFoo = Mk: ,Bar | aa ;\nBar = bb ;\naa = [a]+ ;\nbb = [b]+ ;\n") $ \d -> do+ assertEqual "context names the rule" (Just "in rule 'Foo'") (diagContext d)+ assertBool ("unexpected message: " ++ diagMessage d) $+ "produces no constructor" `isInfixOf` diagMessage d+ && "Mk" `isInfixOf` diagMessage d+ ]++-- | The user's name wins for the labeled alternatives; the unlabeled one is+-- still filled with a generated positional name, and the splice (Anti_)+-- machinery is unaffected.+testCtorLabelOverride :: Test+testCtorLabelOverride = TestCase $+ case normalizeGrammarSource namedExprGrammar of+ Left d -> assertFailure $ "normalization failed: " ++ show d+ Right g -> assertEqual "constructors of the Expr group"+ (Just ["Anti_Expr", "Add", "Neg", "Ctr__Expr__0"])+ (lookupCtors "Expr" g)+ where+ lookupCtors t g = listToMaybe+ [ [ c | SyntaxRule _ (STAltOfSeq alts) <- getSRules grp, STSeq c _ <- alts ]+ | grp <- getSyntaxRuleGroups g, getSDataTypeName grp == t ]++namedExprGrammar :: String+namedExprGrammar = unlines+ [ "grammar 'Named';"+ , "Top = Expr ;"+ , "Expr = Add: Term '+' Term"+ , " | Neg: '-' Term"+ , " | Term ;"+ , "Term = num ;"+ , "Int: num = [0-9]+ ;"+ ]++-- | End to end: the names appear in the generated parser's data declaration+-- and semantic actions, with the leading RtkPos field like any generated+-- constructor.+testCtorLabelArtifacts :: Test+testCtorLabelArtifacts = TestCase $+ case normalizeGrammarSource namedExprGrammar >>= artifactsFor of+ Left d -> assertFailure $ "generation failed: " ++ show d+ Right artifacts -> case lookup "NamedParser.y" artifacts of+ Nothing -> assertFailure "no NamedParser.y artifact generated"+ Just y -> do+ assertBool "data declaration carries the named constructors"+ ("Add RtkPos Term Term" `isInfixOf` y && "Neg RtkPos Term" `isInfixOf` y)+ assertBool "the unnamed alternative keeps a generated name"+ ("Ctr__Expr__0 RtkPos Term" `isInfixOf` y)+ assertBool "semantic actions build the named constructor"+ ("{ Add (rtkPosOf $1) $1 $3 }" `isInfixOf` y)+ assertBool "the named constructors have position projections"+ ("rtkPosOf (Add p _ _) = p" `isInfixOf` y)++-- | A label inside a parenthesized group names the constructor of the+-- anonymous rule the group is extracted into - here under a repetition, so+-- the label also flows through the list-element proxy machinery.+testCtorLabelInGroup :: Test+testCtorLabelInGroup = TestCase $ do+ let g = normalizeNoFill $ unlines+ [ "grammar 'Grp';"+ , "S = (Pair: aa bb)+ ;"+ , "aa = [a]+ ;"+ , "bb = [b]+ ;"+ ]+ assertEqual "the extracted group's alternative carries the user's name"+ [STSeq "Pair" [SSId "aa", SSId "bb"]]+ [ alt | SyntaxRule rn (STAltOfSeq alts) <- allRules g+ , "Rule_" `isPrefixOf` rn, alt@(STSeq "Pair" _) <- alts ]++-- | A label always produces a constructor: a sole "L: Item*" alternative+-- yields a data declaration whose constructor wraps the (proxied) list,+-- where the unlabeled spelling would have made the rule a bare list alias.+testCtorLabelForcesConstructor :: Test+testCtorLabelForcesConstructor = TestCase $ do+ let g = normalizeNoFill $ unlines+ [ "grammar 'Lst';"+ , "Top = S ;"+ , "S = Wrap: Item* ;"+ , "Item = aa ;"+ , "aa = [a]+ ;"+ ]+ case [ alts | SyntaxRule "S" (STAltOfSeq alts) <- allRules g ] of+ [alts] -> assertBool ("expected a Wrap constructor over a proxy, got: " ++ show alts) $+ not $ null [ () | STSeq "Wrap" [SSId proxy] <- alts, "Rule_" `isPrefixOf` proxy ]+ other -> assertFailure $ "expected S to be a data group, got: " ++ show other++-- | Both front ends must represent labels identically: as a 'GP.Labeled'+-- node wrapping the alternative's sequence. Checked structurally against the+-- expected shape AND between the two front ends, for a plain labeled+-- alternative, a labeled group as a whole alternative, and a labeled group+-- in element position (parentheses are pure grouping, so the label node is+-- the only trace of the group). The label 'Mk_1' also pins identifier+-- lexing parity: grammar.pg's id rule allows underscores, which the+-- reference lexer used to reject.+testCtorLabelFrontEndEquality :: Test+testCtorLabelFrontEndEquality = TestCase $ do+ let src = unlines+ [ "grammar 'Eq';"+ , "S = Mk_1: aa bb | cc ;"+ , "T = (L: aa) ;"+ , "U = aa (M: bb) ;"+ , "aa = [a]+ ;"+ , "bb = [b]+ ;"+ , "cc = [c]+ ;"+ ]+ case (parseGrammarSource src, parseGrammarSourceGenerated src) of+ (Right h, Right g) -> do+ assertEqual "hand-written vs generated front end" h g+ assertEqual "hand-written vs generated front end (positions)"+ (positionsOf h) (positionsOf g)+ let clauseOf n = ruleClause <$> find ((== n) . ruleName) (grammarRules h)+ assertEqual "labeled alternative shape"+ (Just (gpAlt [ gpLabeled "Mk_1" (gpSeq [gpRef "aa", gpRef "bb"])+ , gpRef "cc" ]))+ (clauseOf "S")+ assertEqual "labeled group as the whole alternative"+ (Just (gpLabeled "L" (gpRef "aa")))+ (clauseOf "T")+ assertEqual "labeled group in element position"+ (Just (gpSeq [gpRef "aa", gpLabeled "M" (gpRef "bb")]))+ (clauseOf "U")+ (Left d, _) -> assertFailure $ "hand-written front end failed: " ++ show d+ (_, Left d) -> assertFailure $ "generated front end failed: " ++ show d++-------------------------------------------------------------------------------- -- Self-hosted front end (the lexer/parser RTK generated from grammar.pg) -------------------------------------------------------------------------------- @@ -680,9 +902,9 @@ selfHostedFrontEndTests = TestList [ TestLabel "parse errors carry a structured position" $ TestCase $ -- ';' missing after the grammar declaration. The generated parser- -- encodes the position as "LINE:COL:message" and the adapter splits- -- it back out, so the diagnostic points at the identifier 'Foo' on- -- line 2 exactly like the hand-written front end's does.+ -- encodes the position as "LINE:COL:message" and parseWithGenerated+ -- splits it back out, so the diagnostic points at the identifier+ -- 'Foo' on line 2 exactly like the hand-written front end's does. expectDiagnostic "a missing ';'" (parseGrammarSourceGenerated "grammar 'Test'\nFoo = bar;\n") $ \d -> do assertEqual "position of 'Foo'" (Just (SourcePos 2 1)) (diagPos d)@@ -708,9 +930,9 @@ _ -> assertFailure "both front ends should reject the '%'" , TestLabel "rule positions are captured: duplicate rules get a structured diagnostic" $ TestCase $ -- The generated AST carries the position of every rule's first- -- token, and the adapter maps it into getIRulePos, so a- -- normalization diagnostic under the default front end points at the- -- offending line and column exactly like the hand-written front end.+ -- token, and normalization reads it directly, so a normalization+ -- diagnostic under the default front end points at the offending+ -- line and column exactly like the hand-written front end. expectDiagnostic "a duplicate rule" (parseGrammarSourceGenerated "grammar 'Dup';\nFoo = 'a';\nFoo = 'b';\n" >>= normalizeParsedGrammar) $ \d -> do@@ -720,13 +942,61 @@ && "line 2, column 1" `isInfixOf` diagMessage d ] --- | Both front ends must produce the same 'InitialGrammar' for every grammar--- in the corpus, source positions included: the generated front end captures--- 'getIRulePos' from the position fields of its AST, and they must agree--- with the positions the hand-written parser records. This catches adapter--- bugs with far better messages than a generated-artifact diff. Grammars--- pinned in 'frontEndDivergentGrammars' are expected to differ (or be--- rejected); the test fails once they agree, so the pin gets dropped.+--------------------------------------------------------------------------------+-- The compiled-in generated quasi-quoter (GrammarQQ)+--------------------------------------------------------------------------------++-- | Smoke test for the snapshot's quasi-quoter, compiled into rtk beside+-- GrammarLexer/GrammarParser: the quotes below are parsed by the generated+-- front end at rtk's OWN compile time, and Anti_* splices work in both+-- expression and pattern context. The quotes produce the generated AST types+-- ('GrammarParser.Clause' here) - the same types the pipeline computes over+-- since the 8c migration, so quoted fragments can feed normalization-level+-- rewrites (task 8d in docs/qq-grammar-rewrites-plan.md).+grammarQQTests :: Test+grammarQQTests = TestList+ [ TestLabel "an expression quote builds a clause and splices $vars" $ TestCase $ do+ -- $cl resolves via grammar.pg's @shortcuts(cl) to a Clause+ -- metavariable; in expression context the Anti_Clause splice inserts+ -- the local 'cl' into the quoted star repetition+ let cl = [clause| Name |] :: Clause+ assertEqual "spliced clause equals the directly quoted one"+ [clause| Name * |] [clause| $cl * |]+ , TestLabel "a pattern quote matches modulo positions and binds splices" $ TestCase $+ -- pattern and scrutinee come from different quote bodies, so their+ -- positions differ; patterns wildcard every RtkPos field, and the+ -- metavariable binds the repeated clause through the Anti_Clause+ -- splice+ assertEqual "the inner clause is bound"+ (Just [clause| Name |]) (starInner [clause| Name * |])+ , TestLabel "a pattern quote still discriminates clause shapes" $ TestCase $+ assertEqual "a plus clause does not match the star pattern"+ Nothing (starInner [clause| Name + |])+ , TestLabel "the quoted language's own literals lex inside quotes" $ TestCase $+ -- Name '*' is a sequence (a rule reference, then a string literal),+ -- distinct from the star repetition Name *+ assertBool "sequence with a '*' literal differs from the star clause"+ ([clause| Name '*' |] /= [clause| Name * |])+ ]++-- | A matcher defined by a quasi-quoted pattern. The scrutinee stays an+-- opaque argument: applied to a quoted clause directly, GHC sees the+-- expanded constructors on both sides, proves each match's outcome at+-- compile time and rejects the would-be-exercised alternative as redundant+-- under -Werror.+starInner :: Clause -> Maybe Clause+starInner [clause| $cl2 * |] = Just cl2+starInner _ = Nothing++-- | Both front ends must produce the same parsed grammar ('GP.Grammar') for+-- every grammar in the corpus, source positions included. Equality alone no+-- longer proves position agreement - 'GP.RtkPos' is equality-transparent -+-- so the positions of EVERY node are projected with 'positionsOf' and+-- compared explicitly (strictly stronger than the rule-position comparison+-- the retired InitialGrammar equality gave). This catches front-end bugs+-- with far better messages than a generated-artifact diff. Grammars pinned+-- in 'frontEndDivergentGrammars' are expected to differ (or be rejected);+-- the test fails once they agree, so the pin gets dropped. astEqualityTestFor :: FilePath -> IO Test astEqualityTestFor pgFile = do source <- readFileUtf8 pgFile@@ -737,8 +1007,10 @@ case (lookup grammarKey frontEndDivergentGrammars, hand, gen) of (_, Left d, _) -> assertFailure $ "hand-written front end failed on " ++ pgFile ++ ": " ++ show d- (Nothing, Right h, Right g) ->- assertEqual "hand-written vs generated front end (positions included)" h g+ (Nothing, Right h, Right g) -> do+ assertEqual "hand-written vs generated front end" h g+ assertEqual "hand-written vs generated front end (node positions)"+ (positionsOf h) (positionsOf g) (Nothing, _, Left d) -> assertFailure $ "generated front end failed on " ++ pgFile ++ ": " ++ show d (Just _, _, Left _) -> return () -- rejected: still divergent@@ -746,6 +1018,14 @@ when (h == g) $ assertFailure $ "the front ends now agree on this grammar (pinned because: " ++ reason ++ ");\ndrop it from frontEndDivergentGrammars in test/TestSupport.hs"++-- | Every node position in the parsed grammar, in traversal order, as+-- (line, column). 'GP.RtkPos' equality is transparent by design (so ASTs+-- from different sources compare equal), which makes this explicit+-- projection the only way to assert position agreement.+positionsOf :: GP.Grammar -> [(Int, Int)]+positionsOf = everything (++) ([] `mkQ` project)+ where project (GP.RtkPos (GL.AlexPn _ line col)) = [(line, col)] -------------------------------------------------------------------------------- -- Invariants checked against every grammar in test-grammars/
+ test/golden/block/BlockLexer.x view
@@ -0,0 +1,118 @@+-- Generated by RTK from grammar 'Block'. Do not edit by hand.+{+{-# LANGUAGE StandaloneDeriving, DeriveDataTypeable #-}+module BlockLexer(scanTokens, alexScanTokens, Token(..), PosToken(..), AlexPosn(..))+where+import Data.Data (Data)++ }+%wrapper "monad"+++tokens :- "tok_Block_dummy_8" { simple Tk__tok_Block_dummy_8 }+ "tok_Exp_dummy_7" { simple Tk__tok_Exp_dummy_7 }+ "tok_Function_dummy_6" { simple Tk__tok_Function_dummy_6 }+ "tok_Ident_dummy_5" { simple Tk__tok_Ident_dummy_5 }+ "tok_ParamList_dummy_4" { simple Tk__tok_ParamList_dummy_4 }+ "tok_Program_dummy_9" { simple Tk__tok_Program_dummy_9 }+ "tok_Statement_dummy_3" { simple Tk__tok_Statement_dummy_3 }+ "tok_StatementList_dummy_2" { simple Tk__tok_StatementList_dummy_2 }+ "}" { simple Tk__tok__symbol__5 }+ "{" { simple Tk__tok__symbol__4 }+ "return" { simple Tk__tok_return_8 }+ "fn" { simple Tk__tok_fn_0 }+ "=" { simple Tk__tok__eql__6 }+ ";" { simple Tk__tok__semi__7 }+ "," { simple Tk__tok__coma__3 }+ ")" { simple Tk__tok__rparen__2 }+ "(" { simple Tk__tok__lparen__1 }+ ([\ \t\n\r]+) ;+ ([0-9]+) { simple1 $ Tk__num . (read) }+ ([a-zA-Z_] [a-zA-Z0-9_]*) { simple1 $ Tk__id . (id) }+ ("$" "Ident" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_Ident . ((tail . dropWhile (/= ':'))) }+ ("$" "Exp" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_Exp . ((tail . dropWhile (/= ':'))) }+ ("$" "Statement" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_Statement . ((tail . dropWhile (/= ':'))) }+ ("$" "StatementList" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_StatementList . ((tail . dropWhile (/= ':'))) }+ ("$" "Block" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_Block . ((tail . dropWhile (/= ':'))) }+ ("$" "ParamList" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_ParamList . ((tail . dropWhile (/= ':'))) }+ ("$" "Function" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_Function . ((tail . dropWhile (/= ':'))) }+ ("$" "Program" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_Program . ((tail . dropWhile (/= ':'))) }+ . { rtkError }++{+data Token = EndOfFile |+ Tk__tok_Block_dummy_8 |+ Tk__tok_Exp_dummy_7 |+ Tk__tok_Function_dummy_6 |+ Tk__tok_Ident_dummy_5 |+ Tk__tok_ParamList_dummy_4 |+ Tk__tok_Program_dummy_9 |+ Tk__tok_Statement_dummy_3 |+ Tk__tok_StatementList_dummy_2 |+ Tk__tok__symbol__5 |+ Tk__tok__symbol__4 |+ Tk__tok_return_8 |+ Tk__tok_fn_0 |+ Tk__tok__eql__6 |+ Tk__tok__semi__7 |+ Tk__tok__coma__3 |+ Tk__tok__rparen__2 |+ Tk__tok__lparen__1 |+ Tk__num Int |+ Tk__id String |+ Tk__qq_Ident String |+ Tk__qq_Exp String |+ Tk__qq_Statement String |+ Tk__qq_StatementList String |+ Tk__qq_Block String |+ Tk__qq_ParamList String |+ Tk__qq_Function String |+ Tk__qq_Program String+ deriving (Show)++-- AlexPosn is defined by the alex wrapper, so the Data instance (required by+-- the parser's RtkPos position type) can only be attached via standalone+-- deriving - the same solution as the hand-written Lexer.x+deriving instance Data AlexPosn++-- A token together with the source position where it starts+data PosToken = PosToken { ptPos :: AlexPosn, ptToken :: Token }+ deriving (Show)++alexEOF = do+ (pos, _, _, _) <- alexGetInput+ return $ PosToken pos EndOfFile++-- Lex the input into a token stream, returning the positioned error message+-- on a lexical error (encoded as "LINE:COL:message", see rtkError below).+-- The returned list always ends with an EndOfFile token that carries the+-- position of the end of input, so parse errors at end of input can be+-- reported with a position too+scanTokens :: String -> Either String [PosToken]+scanTokens str = runAlex str $ do+ let loop toks = do tok <- alexMonadScan+ case tok of+ PosToken _ EndOfFile -> return $ reverse (tok : toks)+ _ -> let toks' = tok : toks+ in toks' `seq` loop toks'+ loop []++-- Thin compatibility wrapper: callers that have not switched to 'scanTokens'+-- get the error message thrown instead+alexScanTokens :: String -> [PosToken]+alexScanTokens str =+ case scanTokens str of+ Right toks -> toks+ Left err -> errorWithoutStackTrace err++simple1 :: (String -> Token) -> AlexInput -> Int -> Alex PosToken+simple1 t (pos, _, _, str) len = return $ PosToken pos (t (take len str))++simple :: Token -> AlexInput -> Int -> Alex PosToken+simple t (pos, _, _, _) len = return $ PosToken pos t++-- Encode the position as "LINE:COL:message" so callers can split it back out+-- into a structured position - the same encoding the rtk grammar lexer uses+rtkError ((AlexPn _ line column), _, _, str) len = alexError $ (show line) ++ ":" ++ (show column) ++ ":lexical error. Following chars: " ++ (take 10 str)++}
+ test/golden/block/BlockPP.hs view
@@ -0,0 +1,86 @@+-- Generated by RTK from grammar 'Block'. Do not edit by hand.+-- Block-layout pretty-printer (task 9b): indentation and line breaks for+-- bracket-structured languages. Layout comes structurally from block lists+-- (statement/declaration lists), so it adds no parentheses and no charset is+-- baked in. The only guarantee is the semantic round-trip parse (print ast)+-- == ast; comments and the original whitespace are not recovered (lossy).+module BlockPP where+import BlockParser+import Data.List (intercalate)++data PpItem = PpTok String | PpOpen | PpClose | PpBreak+ppRender :: [PpItem] -> String+ppRender = start+ where+ start [] = ""+ start (PpTok s : r) = s ++ inLine 0 r+ start (PpOpen : r) = fresh 1 r+ start (PpClose : r) = fresh 0 r+ start (PpBreak : r) = fresh 0 r+ inLine _ [] = ""+ inLine n (PpTok s : r) = ' ' : s ++ inLine n r+ inLine n (PpOpen : r) = fresh (n + 1) r+ inLine n (PpClose : r) = fresh (max 0 (n - 1)) r+ inLine n (PpBreak : r) = fresh n r+ fresh _ [] = ""+ fresh n (PpTok s : r) = '\n' : (replicate (n * 2) ' ' ++ s) ++ inLine n r+ fresh n (PpOpen : r) = fresh (n + 1) r+ fresh n (PpClose : r) = fresh (max 0 (n - 1)) r+ fresh n (PpBreak : r) = fresh n r++ppProgram :: Program -> String+ppProgram = ppRender . layProgram+layProgram :: Program -> [PpItem]+layProgram (Ctr__Program__0 _ x1) = concat [[PpTok "tok_Program_dummy_9"], layProgram x1, [PpTok "tok_Program_dummy_9"]]+layProgram (Ctr__Program__1 _ x1) = concat [[PpTok "tok_Block_dummy_8"], layBlock x1, [PpTok "tok_Block_dummy_8"]]+layProgram (Ctr__Program__2 _ x1) = concat [[PpTok "tok_Exp_dummy_7"], layExp x1, [PpTok "tok_Exp_dummy_7"]]+layProgram (Ctr__Program__3 _ x1) = concat [[PpTok "tok_Function_dummy_6"], layFunction x1, [PpTok "tok_Function_dummy_6"]]+layProgram (Ctr__Program__4 _ x1) = concat [[PpTok "tok_Ident_dummy_5"], layIdent x1, [PpTok "tok_Ident_dummy_5"]]+layProgram (Ctr__Program__5 _ x1) = concat [[PpTok "tok_ParamList_dummy_4"], layParamList x1, [PpTok "tok_ParamList_dummy_4"]]+layProgram (Ctr__Program__6 _ x1) = concat [[PpTok "tok_Statement_dummy_3"], layStatement x1, [PpTok "tok_Statement_dummy_3"]]+layProgram (Ctr__Program__7 _ x1) = concat [[PpTok "tok_StatementList_dummy_2"], layStatementList x1, [PpTok "tok_StatementList_dummy_2"]]+layProgram (Anti_Program x1) = concat [[PpTok x1]]+layProgram (Prog _ x1) = concat [layFunction x1]++ppBlock :: Block -> String+ppBlock = ppRender . layBlock+layBlock :: Block -> [PpItem]+layBlock (Anti_Block x1) = concat [[PpTok x1]]+layBlock (Blk _ x1) = concat [[PpTok "{"], layStatementList x1, [PpTok "}"]]++ppExp :: Exp -> String+ppExp = ppRender . layExp+layExp :: Exp -> [PpItem]+layExp (Anti_Exp x1) = concat [[PpTok x1]]+layExp (Var _ x1) = concat [layIdent x1]+layExp (Num _ x1) = concat [[PpTok (show x1)]]++ppFunction :: Function -> String+ppFunction = ppRender . layFunction+layFunction :: Function -> [PpItem]+layFunction (Anti_Function x1) = concat [[PpTok x1]]+layFunction (Func _ x1 x2 x3) = concat [[PpTok "fn"], layIdent x1, [PpTok "("], layParamList x2, [PpTok ")"], layBlock x3]++ppIdent :: Ident -> String+ppIdent = ppRender . layIdent+layIdent :: Ident -> [PpItem]+layIdent (Anti_Ident x1) = concat [[PpTok x1]]+layIdent (Name _ x1) = concat [[PpTok x1]]++ppParamList :: ParamList -> String+ppParamList = ppRender . layParamList+layParamList :: ParamList -> [PpItem]+layParamList xs = intercalate [PpTok ","] (map layIdent xs)++ppStatement :: Statement -> String+ppStatement = ppRender . layStatement+layStatement :: Statement -> [PpItem]+layStatement (Anti_Statement x1) = concat [[PpTok x1]]+layStatement (Assign _ x1 x2) = concat [layIdent x1, [PpTok "="], layExp x2, [PpTok ";"]]+layStatement (Return _ x1) = concat [[PpTok "return"], layExp x1, [PpTok ";"]]+layStatement (Nested _ x1) = concat [layBlock x1]++ppStatementList :: StatementList -> String+ppStatementList = ppRender . layStatementList+layStatementList :: StatementList -> [PpItem]+layStatementList xs = if null xs then [] else [PpOpen] ++ intercalate [PpBreak] (map layStatement xs) ++ [PpClose]
+ test/golden/block/BlockParser.y view
@@ -0,0 +1,254 @@+-- Generated by RTK from grammar 'Block'. Do not edit by hand.+{+{-# LANGUAGE DeriveDataTypeable #-}+module BlockParser where+import qualified Data.Generics as Gen+import qualified BlockLexer as L (Token(..), PosToken(..), AlexPosn(..), alexScanTokens)+}++%name parseBlock+%tokentype { L.PosToken }+%monad { Either String }+%error { parseError }++%token++rtk__eof { L.PosToken _ L.EndOfFile }+tok_Block_dummy_8 { L.PosToken _ L.Tk__tok_Block_dummy_8 }+tok_Exp_dummy_7 { L.PosToken _ L.Tk__tok_Exp_dummy_7 }+tok_Function_dummy_6 { L.PosToken _ L.Tk__tok_Function_dummy_6 }+tok_Ident_dummy_5 { L.PosToken _ L.Tk__tok_Ident_dummy_5 }+tok_ParamList_dummy_4 { L.PosToken _ L.Tk__tok_ParamList_dummy_4 }+tok_Program_dummy_9 { L.PosToken _ L.Tk__tok_Program_dummy_9 }+tok_Statement_dummy_3 { L.PosToken _ L.Tk__tok_Statement_dummy_3 }+tok_StatementList_dummy_2 { L.PosToken _ L.Tk__tok_StatementList_dummy_2 }+tok__symbol__5 { L.PosToken _ L.Tk__tok__symbol__5 }+tok__symbol__4 { L.PosToken _ L.Tk__tok__symbol__4 }+tok_return_8 { L.PosToken _ L.Tk__tok_return_8 }+tok_fn_0 { L.PosToken _ L.Tk__tok_fn_0 }+tok__eql__6 { L.PosToken _ L.Tk__tok__eql__6 }+tok__semi__7 { L.PosToken _ L.Tk__tok__semi__7 }+tok__coma__3 { L.PosToken _ L.Tk__tok__coma__3 }+tok__rparen__2 { L.PosToken _ L.Tk__tok__rparen__2 }+tok__lparen__1 { L.PosToken _ L.Tk__tok__lparen__1 }+num { L.PosToken _ (L.Tk__num _) }+id { L.PosToken _ (L.Tk__id _) }+qq_Ident { L.PosToken _ (L.Tk__qq_Ident _) }+qq_Exp { L.PosToken _ (L.Tk__qq_Exp _) }+qq_Statement { L.PosToken _ (L.Tk__qq_Statement _) }+qq_StatementList { L.PosToken _ (L.Tk__qq_StatementList _) }+qq_Block { L.PosToken _ (L.Tk__qq_Block _) }+qq_ParamList { L.PosToken _ (L.Tk__qq_ParamList _) }+qq_Function { L.PosToken _ (L.Tk__qq_Function _) }+qq_Program { L.PosToken _ (L.Tk__qq_Program _) }++%%++Block__top : Program rtk__eof { $1 }++Program : tok_Program_dummy_9 Program tok_Program_dummy_9 { Ctr__Program__0 (rtkPosOf $1) $2 } |+ tok_Block_dummy_8 Block tok_Block_dummy_8 { Ctr__Program__1 (rtkPosOf $1) $2 } |+ tok_Exp_dummy_7 Exp tok_Exp_dummy_7 { Ctr__Program__2 (rtkPosOf $1) $2 } |+ tok_Function_dummy_6 Function tok_Function_dummy_6 { Ctr__Program__3 (rtkPosOf $1) $2 } |+ tok_Ident_dummy_5 Ident tok_Ident_dummy_5 { Ctr__Program__4 (rtkPosOf $1) $2 } |+ tok_ParamList_dummy_4 ParamList tok_ParamList_dummy_4 { Ctr__Program__5 (rtkPosOf $1) (reverse $2) } |+ tok_Statement_dummy_3 Statement tok_Statement_dummy_3 { Ctr__Program__6 (rtkPosOf $1) $2 } |+ tok_StatementList_dummy_2 StatementList tok_StatementList_dummy_2 { Ctr__Program__7 (rtkPosOf $1) (reverse $2) }++Program : qq_Program { Anti_Program (tkVal_qq_Program $1) } |+ Function { Prog (rtkPosOf $1) $1 }++Block : qq_Block { Anti_Block (tkVal_qq_Block $1) } |+ tok__symbol__4 StatementList tok__symbol__5 { Blk (rtkPosOf $1) (reverse $2) }++Exp : qq_Exp { Anti_Exp (tkVal_qq_Exp $1) } |+ Ident { Var (rtkPosOf $1) $1 } |+ num { Num (rtkPosOf $1) (tkVal_num $1) }++Function : qq_Function { Anti_Function (tkVal_qq_Function $1) } |+ tok_fn_0 Ident tok__lparen__1 ParamList tok__rparen__2 Block { Func (rtkPosOf $1) $2 (reverse $4) $6 }++Ident : qq_Ident { Anti_Ident (tkVal_qq_Ident $1) } |+ id { Name (rtkPosOf $1) (tkVal_id $1) }++ListElem_ParamList0 : qq_ParamList { Anti_Ident (tkVal_qq_ParamList $1) } |+ Ident { $1 }++ParamList__plus_list_ : ListElem_ParamList0 { [$1] } |+ ParamList__plus_list_ tok__coma__3 ListElem_ParamList0 { $3 : $1 }++ParamList : ParamList__plus_list_ { $1 } |+ {- empty -} { [] }++Statement : qq_Statement { Anti_Statement (tkVal_qq_Statement $1) } |+ Ident tok__eql__6 Exp tok__semi__7 { Assign (rtkPosOf $1) $1 $3 } |+ tok_return_8 Exp tok__semi__7 { Return (rtkPosOf $1) $2 } |+ Block { Nested (rtkPosOf $1) $1 }++ListElem_StatementList1 : qq_StatementList { Anti_Statement (tkVal_qq_StatementList $1) } |+ Statement { $1 }++StatementList : {- empty -} { [] } |+ StatementList ListElem_StatementList1 { $2 : $1 }+++{+parseError :: [L.PosToken] -> Either String a+parseError [] = Left "unexpected end of input"+parseError (L.PosToken (L.AlexPn _ line col) tok : _) =+ Left $ show line ++ ":" ++ show col ++ ":unexpected " ++ showRtkToken tok++-- Render a token the way it appears in the source, for error messages+showRtkToken :: L.Token -> String+showRtkToken L.EndOfFile = "end of input"+showRtkToken L.Tk__tok_Block_dummy_8 = "'tok_Block_dummy_8'"+showRtkToken L.Tk__tok_Exp_dummy_7 = "'tok_Exp_dummy_7'"+showRtkToken L.Tk__tok_Function_dummy_6 = "'tok_Function_dummy_6'"+showRtkToken L.Tk__tok_Ident_dummy_5 = "'tok_Ident_dummy_5'"+showRtkToken L.Tk__tok_ParamList_dummy_4 = "'tok_ParamList_dummy_4'"+showRtkToken L.Tk__tok_Program_dummy_9 = "'tok_Program_dummy_9'"+showRtkToken L.Tk__tok_Statement_dummy_3 = "'tok_Statement_dummy_3'"+showRtkToken L.Tk__tok_StatementList_dummy_2 = "'tok_StatementList_dummy_2'"+showRtkToken L.Tk__tok__symbol__5 = "'}'"+showRtkToken L.Tk__tok__symbol__4 = "'{'"+showRtkToken L.Tk__tok_return_8 = "'return'"+showRtkToken L.Tk__tok_fn_0 = "'fn'"+showRtkToken L.Tk__tok__eql__6 = "'='"+showRtkToken L.Tk__tok__semi__7 = "';'"+showRtkToken L.Tk__tok__coma__3 = "','"+showRtkToken L.Tk__tok__rparen__2 = "')'"+showRtkToken L.Tk__tok__lparen__1 = "'('"+showRtkToken (L.Tk__num v) = "num " ++ show v+showRtkToken (L.Tk__id v) = "id " ++ show v+showRtkToken (L.Tk__qq_Ident v) = "qq_Ident " ++ show v+showRtkToken (L.Tk__qq_Exp v) = "qq_Exp " ++ show v+showRtkToken (L.Tk__qq_Statement v) = "qq_Statement " ++ show v+showRtkToken (L.Tk__qq_StatementList v) = "qq_StatementList " ++ show v+showRtkToken (L.Tk__qq_Block v) = "qq_Block " ++ show v+showRtkToken (L.Tk__qq_ParamList v) = "qq_ParamList " ++ show v+showRtkToken (L.Tk__qq_Function v) = "qq_Function " ++ show v+showRtkToken (L.Tk__qq_Program v) = "qq_Program " ++ show v++-- Source position of a node: every constructor except the Anti_* splice+-- artifacts stores the position of its alternative's first symbol in its+-- first field. Positions are transparent for equality and ordering, so two+-- ASTs that differ only in source positions (e.g. a quasi-quote parsed at+-- compile time vs the same construct parsed at run time) compare equal.+newtype RtkPos = RtkPos L.AlexPosn deriving (Show, Gen.Data, Gen.Typeable)+instance Eq RtkPos where _ == _ = True+instance Ord RtkPos where compare _ _ = EQ++-- The position used where no source token exists: empty productions, empty+-- lists, absent optionals and Anti_* quasi-quote splices+rtkNoPos :: RtkPos+rtkNoPos = RtkPos (L.AlexPn 0 0 0)++class RtkPosOf a where+ rtkPosOf :: a -> RtkPos+instance RtkPosOf L.PosToken where+ rtkPosOf (L.PosToken p _) = RtkPos p+instance RtkPosOf a => RtkPosOf [a] where+ rtkPosOf (x : _) = rtkPosOf x+ rtkPosOf [] = rtkNoPos+instance RtkPosOf a => RtkPosOf (Maybe a) where+ rtkPosOf (Just x) = rtkPosOf x+ rtkPosOf Nothing = rtkNoPos+-- A Char carries no position; this also covers String token payloads+instance RtkPosOf Char where+ rtkPosOf _ = rtkNoPos+instance RtkPosOf Int where rtkPosOf _ = rtkNoPos++-- Recover a token's payload from the whole positioned token: %token+-- bindings keep the L.PosToken so semantic actions can read its position+tkVal_num :: L.PosToken -> Int+tkVal_num (L.PosToken _ (L.Tk__num v)) = v+tkVal_num t = error ("rtk internal error: token num expected, got " ++ showRtkToken (L.ptToken t))+tkVal_id :: L.PosToken -> String+tkVal_id (L.PosToken _ (L.Tk__id v)) = v+tkVal_id t = error ("rtk internal error: token id expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_Ident :: L.PosToken -> String+tkVal_qq_Ident (L.PosToken _ (L.Tk__qq_Ident v)) = v+tkVal_qq_Ident t = error ("rtk internal error: token qq_Ident expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_Exp :: L.PosToken -> String+tkVal_qq_Exp (L.PosToken _ (L.Tk__qq_Exp v)) = v+tkVal_qq_Exp t = error ("rtk internal error: token qq_Exp expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_Statement :: L.PosToken -> String+tkVal_qq_Statement (L.PosToken _ (L.Tk__qq_Statement v)) = v+tkVal_qq_Statement t = error ("rtk internal error: token qq_Statement expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_StatementList :: L.PosToken -> String+tkVal_qq_StatementList (L.PosToken _ (L.Tk__qq_StatementList v)) = v+tkVal_qq_StatementList t = error ("rtk internal error: token qq_StatementList expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_Block :: L.PosToken -> String+tkVal_qq_Block (L.PosToken _ (L.Tk__qq_Block v)) = v+tkVal_qq_Block t = error ("rtk internal error: token qq_Block expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_ParamList :: L.PosToken -> String+tkVal_qq_ParamList (L.PosToken _ (L.Tk__qq_ParamList v)) = v+tkVal_qq_ParamList t = error ("rtk internal error: token qq_ParamList expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_Function :: L.PosToken -> String+tkVal_qq_Function (L.PosToken _ (L.Tk__qq_Function v)) = v+tkVal_qq_Function t = error ("rtk internal error: token qq_Function expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_Program :: L.PosToken -> String+tkVal_qq_Program (L.PosToken _ (L.Tk__qq_Program v)) = v+tkVal_qq_Program t = error ("rtk internal error: token qq_Program expected, got " ++ showRtkToken (L.ptToken t))++data Program = Ctr__Program__0 RtkPos Program |+ Ctr__Program__1 RtkPos Block |+ Ctr__Program__2 RtkPos Exp |+ Ctr__Program__3 RtkPos Function |+ Ctr__Program__4 RtkPos Ident |+ Ctr__Program__5 RtkPos ParamList |+ Ctr__Program__6 RtkPos Statement |+ Ctr__Program__7 RtkPos StatementList |+ Anti_Program String |+ Prog RtkPos Function+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Program where+ rtkPosOf (Ctr__Program__0 p _) = p+ rtkPosOf (Ctr__Program__1 p _) = p+ rtkPosOf (Ctr__Program__2 p _) = p+ rtkPosOf (Ctr__Program__3 p _) = p+ rtkPosOf (Ctr__Program__4 p _) = p+ rtkPosOf (Ctr__Program__5 p _) = p+ rtkPosOf (Ctr__Program__6 p _) = p+ rtkPosOf (Ctr__Program__7 p _) = p+ rtkPosOf (Anti_Program _) = rtkNoPos+ rtkPosOf (Prog p _) = p+data Block = Anti_Block String |+ Blk RtkPos StatementList+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Block where+ rtkPosOf (Anti_Block _) = rtkNoPos+ rtkPosOf (Blk p _) = p+data Exp = Anti_Exp String |+ Var RtkPos Ident |+ Num RtkPos Int+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Exp where+ rtkPosOf (Anti_Exp _) = rtkNoPos+ rtkPosOf (Var p _) = p+ rtkPosOf (Num p _) = p+data Function = Anti_Function String |+ Func RtkPos Ident ParamList Block+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Function where+ rtkPosOf (Anti_Function _) = rtkNoPos+ rtkPosOf (Func p _ _ _) = p+data Ident = Anti_Ident String |+ Name RtkPos String+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Ident where+ rtkPosOf (Anti_Ident _) = rtkNoPos+ rtkPosOf (Name p _) = p+type ParamList = [Ident]+data Statement = Anti_Statement String |+ Assign RtkPos Ident Exp |+ Return RtkPos Exp |+ Nested RtkPos Block+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Statement where+ rtkPosOf (Anti_Statement _) = rtkNoPos+ rtkPosOf (Assign p _ _) = p+ rtkPosOf (Return p _) = p+ rtkPosOf (Nested p _) = p+type StatementList = [Statement]+}
+ test/golden/block/BlockQQ.hs view
@@ -0,0 +1,205 @@+-- Generated by RTK from grammar 'Block'. Do not edit by hand.+{-# LANGUAGE TemplateHaskell #-}+module BlockQQ+where++import qualified Data.Char as C+import qualified Data.Map as M+import Data.List+import Data.Maybe+import qualified Data.Generics as Generics+import qualified Data.Data as Data+import qualified Language.Haskell.TH as TH+import Language.Haskell.TH.Quote+import BlockLexer+import BlockParser++qqShortcuts :: M.Map String String++-- A $name metavariable is rewritten to $Type:name using the qqShortcuts+-- table below. The rewrite is purely textual, so it would also fire inside+-- the quoted language's own string literals: write $$name there to escape+-- it and get the literal text $name. Each '$$' pair directly before a+-- metavariable stands for one literal '$' (so $$$x is a literal '$'+-- followed by the metavariable $x). A '$' not followed by an identifier is+-- never rewritten and needs no escape, and an explicit $Type:name antiquote+-- (the character after the name is ':') passes through untouched.+-- A plain character scan rather than a regex: metavariables are recognized+-- regardless of what follows the name - including a newline or the end of+-- the quote, which the previous regex's terminator class missed.+replaceAllPatterns :: String -> Either String String+replaceAllPatterns [] = Right []+replaceAllPatterns s@('$' : _) =+ let (dollars, rest) = span (== '$') s+ in case rest of+ (c1 : _) | C.isAlpha c1 || c1 == '_' ->+ let (varName, post) = span (\ ch -> C.isAlphaNum ch || ch == '_') rest+ escCount = length dollars - 1+ keptPre = replicate (div escCount 2) '$'+ in case post of+ (':' : _) -> ((dollars ++ varName) ++) <$> replaceAllPatterns post+ _ | odd escCount -> ((keptPre ++ '$' : varName) ++) <$> replaceAllPatterns post+ _ -> case catMaybes $ map (\ prefix -> M.lookup prefix qqShortcuts) $ reverse $ inits varName of+ [] -> Left $ unlines+ [ "Unknown metavariable $" ++ varName ++ " in quasi-quote:"+ , "no prefix of '" ++ varName ++ "' is a known shortcut. Known shortcuts:"+ , " " ++ intercalate ", " (M.keys qqShortcuts)+ , "To include the literal text $" ++ varName ++ " in the quoted code"+ , "(e.g. inside a string literal), escape it as $$" ++ varName ++ "." ]+ (rule : _) -> ((keptPre ++ '$' : rule ++ ":" ++ varName) ++) <$> replaceAllPatterns post+ _ -> (dollars ++) <$> replaceAllPatterns rest+replaceAllPatterns (c : rest) = (c :) <$> replaceAllPatterns rest++-- The generated lexer and parser encode error positions as "LINE:COL:message"+-- so structured-diagnostic callers can split them; render them back+-- human-readably for quasi-quote compile errors. Positions refer to the quote+-- body (padded with a start token in front).+rtkRenderError :: String -> String+rtkRenderError err =+ case span (/= ':') err of+ (l, ':' : rest1) | [(line, "")] <- (reads l :: [(Int, String)]) ->+ case span (/= ':') rest1 of+ (c, ':' : msg) | [(col, "")] <- (reads c :: [(Int, String)]) ->+ "line " ++ show line ++ ", column " ++ show col ++ ": " ++ msg+ _ -> err+ _ -> err++qqShortcuts = M.fromList [ ("program","Program"),("block","Block"),("exp","Exp"),("function","Function"),("ident","Ident"),("paramList","ParamList"),("statement","Statement"),("statementList","StatementList")]++-- A quasi-quote pattern must match an AST parsed from anywhere in a source+-- file, while the pattern itself was parsed from the quote body - so every+-- RtkPos position field becomes a wildcard in generated patterns.+-- (Expressions need no special case: the compile-time position they embed+-- is equality-transparent.)+rtkPosWildPat :: RtkPos -> Maybe (TH.Q TH.Pat)+rtkPosWildPat _ = Just TH.wildP++quoteBlockExp :: Data.Data a => String -> (Program -> a) -> String -> TH.ExpQ+quoteBlockExp dummy func s = do+ s1 <- either fail return (replaceAllPatterns s)+ ast <- case scanTokens (dummy ++ " " ++ s1 ++ " " ++ dummy) >>= parseBlock of+ Left err -> fail (rtkRenderError err)+ Right a -> return a+ let expr = func ast+ dataToExpQ (const Nothing `Generics.extQ` antiProgramExp `Generics.extQ` antiFunctionExp `Generics.extQ` antiIdentExp `Generics.extQ` antiBlockExp `Generics.extQ` antiStatementExp `Generics.extQ` antiExpExp) expr+quoteBlockPat :: Data.Data a => String -> (Program -> a) -> String -> TH.PatQ+quoteBlockPat dummy func s = do+ s1 <- either fail return (replaceAllPatterns s)+ ast <- case scanTokens (dummy ++ " " ++ s1 ++ " " ++ dummy) >>= parseBlock of+ Left err -> fail (rtkRenderError err)+ Right a -> return a+ let expr = func ast+ dataToPatQ (const Nothing `Generics.extQ` rtkPosWildPat `Generics.extQ` antiProgramPat `Generics.extQ` antiFunctionPat `Generics.extQ` antiIdentPat `Generics.extQ` antiBlockPat `Generics.extQ` antiStatementPat `Generics.extQ` antiExpPat) expr++antiExpExp :: Exp -> Maybe (TH.Q TH.Exp )+antiExpExp ( Anti_Exp v) = Just $ TH.varE (TH.mkName v)+antiExpExp _ = Nothing+++antiStatementExp :: [ Statement ] -> Maybe (TH.Q TH.Exp)+antiStatementExp ((Anti_Statement v):rest) =+ let restExp = dataToExpQ (const Nothing `Generics.extQ` antiProgramExp `Generics.extQ` antiFunctionExp `Generics.extQ` antiIdentExp `Generics.extQ` antiBlockExp `Generics.extQ` antiStatementExp `Generics.extQ` antiExpExp) rest+ lvar = TH.varE $ TH.mkName v+ in Just [| $lvar ++ $restExp |]+antiStatementExp _ = Nothing+++antiBlockExp :: Block -> Maybe (TH.Q TH.Exp )+antiBlockExp ( Anti_Block v) = Just $ TH.varE (TH.mkName v)+antiBlockExp _ = Nothing+++antiIdentExp :: [ Ident ] -> Maybe (TH.Q TH.Exp)+antiIdentExp ((Anti_Ident v):rest) =+ let restExp = dataToExpQ (const Nothing `Generics.extQ` antiProgramExp `Generics.extQ` antiFunctionExp `Generics.extQ` antiIdentExp `Generics.extQ` antiBlockExp `Generics.extQ` antiStatementExp `Generics.extQ` antiExpExp) rest+ lvar = TH.varE $ TH.mkName v+ in Just [| $lvar ++ $restExp |]+antiIdentExp _ = Nothing+++antiFunctionExp :: Function -> Maybe (TH.Q TH.Exp )+antiFunctionExp ( Anti_Function v) = Just $ TH.varE (TH.mkName v)+antiFunctionExp _ = Nothing+++antiProgramExp :: Program -> Maybe (TH.Q TH.Exp )+antiProgramExp ( Anti_Program v) = Just $ TH.varE (TH.mkName v)+antiProgramExp _ = Nothing++++antiExpPat :: Exp -> Maybe (TH.Q TH.Pat )+antiExpPat ( Anti_Exp v) = Just $ TH.varP (TH.mkName v)+antiExpPat _ = Nothing+++antiStatementPat :: [ Statement ] -> Maybe (TH.Q TH.Pat)+antiStatementPat [Anti_Statement v] = Just $ TH.varP (TH.mkName v)+antiStatementPat _ = Nothing+++antiBlockPat :: Block -> Maybe (TH.Q TH.Pat )+antiBlockPat ( Anti_Block v) = Just $ TH.varP (TH.mkName v)+antiBlockPat _ = Nothing+++antiIdentPat :: [ Ident ] -> Maybe (TH.Q TH.Pat)+antiIdentPat [Anti_Ident v] = Just $ TH.varP (TH.mkName v)+antiIdentPat _ = Nothing+++antiFunctionPat :: Function -> Maybe (TH.Q TH.Pat )+antiFunctionPat ( Anti_Function v) = Just $ TH.varP (TH.mkName v)+antiFunctionPat _ = Nothing+++antiProgramPat :: Program -> Maybe (TH.Q TH.Pat )+antiProgramPat ( Anti_Program v) = Just $ TH.varP (TH.mkName v)+antiProgramPat _ = Nothing++++-- This grammar's quasi-quoters work in expression and pattern contexts only+quoteBlockType _ = fail "this quasi-quoter cannot be used in a type context"+quoteBlockDecs _ = fail "this quasi-quoter cannot be used in a declaration context"++getProgram ( Ctr__Program__0 _ s) = s++program :: QuasiQuoter+program = QuasiQuoter (quoteBlockExp "tok_Program_dummy_9" getProgram ) (quoteBlockPat "tok_Program_dummy_9" getProgram ) quoteBlockType quoteBlockDecs++getBlock ( Ctr__Program__1 _ s) = s++block :: QuasiQuoter+block = QuasiQuoter (quoteBlockExp "tok_Block_dummy_8" getBlock ) (quoteBlockPat "tok_Block_dummy_8" getBlock ) quoteBlockType quoteBlockDecs++getExp ( Ctr__Program__2 _ s) = s++exp :: QuasiQuoter+exp = QuasiQuoter (quoteBlockExp "tok_Exp_dummy_7" getExp ) (quoteBlockPat "tok_Exp_dummy_7" getExp ) quoteBlockType quoteBlockDecs++getFunction ( Ctr__Program__3 _ s) = s++function :: QuasiQuoter+function = QuasiQuoter (quoteBlockExp "tok_Function_dummy_6" getFunction ) (quoteBlockPat "tok_Function_dummy_6" getFunction ) quoteBlockType quoteBlockDecs++getIdent ( Ctr__Program__4 _ s) = s++ident :: QuasiQuoter+ident = QuasiQuoter (quoteBlockExp "tok_Ident_dummy_5" getIdent ) (quoteBlockPat "tok_Ident_dummy_5" getIdent ) quoteBlockType quoteBlockDecs++getParamList ( Ctr__Program__5 _ s) = s++paramList :: QuasiQuoter+paramList = QuasiQuoter (quoteBlockExp "tok_ParamList_dummy_4" getParamList ) (quoteBlockPat "tok_ParamList_dummy_4" getParamList ) quoteBlockType quoteBlockDecs++getStatement ( Ctr__Program__6 _ s) = s++statement :: QuasiQuoter+statement = QuasiQuoter (quoteBlockExp "tok_Statement_dummy_3" getStatement ) (quoteBlockPat "tok_Statement_dummy_3" getStatement ) quoteBlockType quoteBlockDecs++getStatementList ( Ctr__Program__7 _ s) = s++statementList :: QuasiQuoter+statementList = QuasiQuoter (quoteBlockExp "tok_StatementList_dummy_2" getStatementList ) (quoteBlockPat "tok_StatementList_dummy_2" getStatementList ) quoteBlockType quoteBlockDecs+
test/golden/grammar/GrammarLexer.x view
@@ -13,31 +13,30 @@ $dq = " $ndq = [^\"]+$backslash = [\\] -tokens :- "tok_Clause_dummy_14" { simple Tk__tok_Clause_dummy_14 }- "tok_Grammar_dummy_15" { simple Tk__tok_Grammar_dummy_15 }- "tok_IdList_dummy_13" { simple Tk__tok_IdList_dummy_13 }- "tok_ImportsOpt_dummy_12" { simple Tk__tok_ImportsOpt_dummy_12 }- "tok_Name_dummy_11" { simple Tk__tok_Name_dummy_11 }- "tok_OptDelim_dummy_10" { simple Tk__tok_OptDelim_dummy_10 }- "tok_Option_dummy_9" { simple Tk__tok_Option_dummy_9 }- "tok_OptionList_dummy_8" { simple Tk__tok_OptionList_dummy_8 }- "tok_Rule_dummy_7" { simple Tk__tok_Rule_dummy_7 }- "tok_RuleList_dummy_6" { simple Tk__tok_RuleList_dummy_6 }- "tok_StrLit_dummy_5" { simple Tk__tok_StrLit_dummy_5 }- "~" { simple Tk__tok__tilde__16 }+tokens :- "tok_Clause_dummy_10" { simple Tk__tok_Clause_dummy_10 }+ "tok_Grammar_dummy_11" { simple Tk__tok_Grammar_dummy_11 }+ "tok_IdList_dummy_9" { simple Tk__tok_IdList_dummy_9 }+ "tok_Name_dummy_8" { simple Tk__tok_Name_dummy_8 }+ "tok_Option_dummy_7" { simple Tk__tok_Option_dummy_7 }+ "tok_OptionList_dummy_6" { simple Tk__tok_OptionList_dummy_6 }+ "tok_Rule_dummy_5" { simple Tk__tok_Rule_dummy_5 }+ "tok_RuleList_dummy_4" { simple Tk__tok_RuleList_dummy_4 }+ "tok_StrLit_dummy_3" { simple Tk__tok_StrLit_dummy_3 }+ "~" { simple Tk__tok__tilde__14 } "|" { simple Tk__tok__pipe__11 } "imports" { simple Tk__tok_imports_2 } "grammar" { simple Tk__tok_grammar_0 } "@symmacro" { simple Tk__tok__symbol_symmacro_9 } "@shortcuts" { simple Tk__tok__symbol_shortcuts_6 }- "?" { simple Tk__tok__symbol__15 }+ "?" { simple Tk__tok__symbol__16 } "=" { simple Tk__tok__eql__3 } ";" { simple Tk__tok__semi__1 } ":" { simple Tk__tok__colon__4 } "." { simple Tk__tok__dot__5 } "," { simple Tk__tok__coma__10 }- "+" { simple Tk__tok__plus__14 }+ "+" { simple Tk__tok__plus__15 } "*" { simple Tk__tok__star__13 } ")" { simple Tk__tok__rparen__8 } "(" { simple Tk__tok__lparen__7 }@@ -47,47 +46,43 @@ ([\ \t\n]+) ; ("[" ([^\]]| "\]")* "]") { simple1 $ Tk__regexplit . (id) } ($dq $dq $dq ($ndq| $dq $ndq| $dq $dq $ndq| [\n])* $dq $dq $dq) { simple1 $ Tk__bigstr . (id) }- ("'" ([^']| "\'")* "'") { simple1 $ Tk__str . (id) }+ ("'" ([^\\']| $backslash .)* "'") { simple1 $ Tk__str . (id) } ([a-zA-Z] [A-Za-z0-9_]*) { simple1 $ Tk__id . (id) } ("$" "Name" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_Name . ((tail . dropWhile (/= ':'))) } ("$" "StrLit" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_StrLit . ((tail . dropWhile (/= ':'))) }- ("$" "OptDelim" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_OptDelim . ((tail . dropWhile (/= ':'))) } ("$" "Clause" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_Clause . ((tail . dropWhile (/= ':'))) } ("$" "IdList" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_IdList . ((tail . dropWhile (/= ':'))) } ("$" "Option" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_Option . ((tail . dropWhile (/= ':'))) } ("$" "OptionList" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_OptionList . ((tail . dropWhile (/= ':'))) } ("$" "Rule" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_Rule . ((tail . dropWhile (/= ':'))) } ("$" "RuleList" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_RuleList . ((tail . dropWhile (/= ':'))) }- ("$" "ImportsOpt" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_ImportsOpt . ((tail . dropWhile (/= ':'))) } ("$" "Grammar" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_Grammar . ((tail . dropWhile (/= ':'))) } . { rtkError } { data Token = EndOfFile |- Tk__tok_Clause_dummy_14 |- Tk__tok_Grammar_dummy_15 |- Tk__tok_IdList_dummy_13 |- Tk__tok_ImportsOpt_dummy_12 |- Tk__tok_Name_dummy_11 |- Tk__tok_OptDelim_dummy_10 |- Tk__tok_Option_dummy_9 |- Tk__tok_OptionList_dummy_8 |- Tk__tok_Rule_dummy_7 |- Tk__tok_RuleList_dummy_6 |- Tk__tok_StrLit_dummy_5 |- Tk__tok__tilde__16 |+ Tk__tok_Clause_dummy_10 |+ Tk__tok_Grammar_dummy_11 |+ Tk__tok_IdList_dummy_9 |+ Tk__tok_Name_dummy_8 |+ Tk__tok_Option_dummy_7 |+ Tk__tok_OptionList_dummy_6 |+ Tk__tok_Rule_dummy_5 |+ Tk__tok_RuleList_dummy_4 |+ Tk__tok_StrLit_dummy_3 |+ Tk__tok__tilde__14 | Tk__tok__pipe__11 | Tk__tok_imports_2 | Tk__tok_grammar_0 | Tk__tok__symbol_symmacro_9 | Tk__tok__symbol_shortcuts_6 |- Tk__tok__symbol__15 |+ Tk__tok__symbol__16 | Tk__tok__eql__3 | Tk__tok__semi__1 | Tk__tok__colon__4 | Tk__tok__dot__5 | Tk__tok__coma__10 |- Tk__tok__plus__14 |+ Tk__tok__plus__15 | Tk__tok__star__13 | Tk__tok__rparen__8 | Tk__tok__lparen__7 |@@ -98,14 +93,12 @@ Tk__id String | Tk__qq_Name String | Tk__qq_StrLit String |- Tk__qq_OptDelim String | Tk__qq_Clause String | Tk__qq_IdList String | Tk__qq_Option String | Tk__qq_OptionList String | Tk__qq_Rule String | Tk__qq_RuleList String |- Tk__qq_ImportsOpt String | Tk__qq_Grammar String deriving (Show)
test/golden/grammar/GrammarParser.y view
@@ -14,30 +14,28 @@ %token rtk__eof { L.PosToken _ L.EndOfFile }-tok_Clause_dummy_14 { L.PosToken _ L.Tk__tok_Clause_dummy_14 }-tok_Grammar_dummy_15 { L.PosToken _ L.Tk__tok_Grammar_dummy_15 }-tok_IdList_dummy_13 { L.PosToken _ L.Tk__tok_IdList_dummy_13 }-tok_ImportsOpt_dummy_12 { L.PosToken _ L.Tk__tok_ImportsOpt_dummy_12 }-tok_Name_dummy_11 { L.PosToken _ L.Tk__tok_Name_dummy_11 }-tok_OptDelim_dummy_10 { L.PosToken _ L.Tk__tok_OptDelim_dummy_10 }-tok_Option_dummy_9 { L.PosToken _ L.Tk__tok_Option_dummy_9 }-tok_OptionList_dummy_8 { L.PosToken _ L.Tk__tok_OptionList_dummy_8 }-tok_Rule_dummy_7 { L.PosToken _ L.Tk__tok_Rule_dummy_7 }-tok_RuleList_dummy_6 { L.PosToken _ L.Tk__tok_RuleList_dummy_6 }-tok_StrLit_dummy_5 { L.PosToken _ L.Tk__tok_StrLit_dummy_5 }-tok__tilde__16 { L.PosToken _ L.Tk__tok__tilde__16 }+tok_Clause_dummy_10 { L.PosToken _ L.Tk__tok_Clause_dummy_10 }+tok_Grammar_dummy_11 { L.PosToken _ L.Tk__tok_Grammar_dummy_11 }+tok_IdList_dummy_9 { L.PosToken _ L.Tk__tok_IdList_dummy_9 }+tok_Name_dummy_8 { L.PosToken _ L.Tk__tok_Name_dummy_8 }+tok_Option_dummy_7 { L.PosToken _ L.Tk__tok_Option_dummy_7 }+tok_OptionList_dummy_6 { L.PosToken _ L.Tk__tok_OptionList_dummy_6 }+tok_Rule_dummy_5 { L.PosToken _ L.Tk__tok_Rule_dummy_5 }+tok_RuleList_dummy_4 { L.PosToken _ L.Tk__tok_RuleList_dummy_4 }+tok_StrLit_dummy_3 { L.PosToken _ L.Tk__tok_StrLit_dummy_3 }+tok__tilde__14 { L.PosToken _ L.Tk__tok__tilde__14 } tok__pipe__11 { L.PosToken _ L.Tk__tok__pipe__11 } tok_imports_2 { L.PosToken _ L.Tk__tok_imports_2 } tok_grammar_0 { L.PosToken _ L.Tk__tok_grammar_0 } tok__symbol_symmacro_9 { L.PosToken _ L.Tk__tok__symbol_symmacro_9 } tok__symbol_shortcuts_6 { L.PosToken _ L.Tk__tok__symbol_shortcuts_6 }-tok__symbol__15 { L.PosToken _ L.Tk__tok__symbol__15 }+tok__symbol__16 { L.PosToken _ L.Tk__tok__symbol__16 } tok__eql__3 { L.PosToken _ L.Tk__tok__eql__3 } tok__semi__1 { L.PosToken _ L.Tk__tok__semi__1 } tok__colon__4 { L.PosToken _ L.Tk__tok__colon__4 } tok__dot__5 { L.PosToken _ L.Tk__tok__dot__5 } tok__coma__10 { L.PosToken _ L.Tk__tok__coma__10 }-tok__plus__14 { L.PosToken _ L.Tk__tok__plus__14 }+tok__plus__15 { L.PosToken _ L.Tk__tok__plus__15 } tok__star__13 { L.PosToken _ L.Tk__tok__star__13 } tok__rparen__8 { L.PosToken _ L.Tk__tok__rparen__8 } tok__lparen__7 { L.PosToken _ L.Tk__tok__lparen__7 }@@ -48,108 +46,98 @@ id { L.PosToken _ (L.Tk__id _) } qq_Name { L.PosToken _ (L.Tk__qq_Name _) } qq_StrLit { L.PosToken _ (L.Tk__qq_StrLit _) }-qq_OptDelim { L.PosToken _ (L.Tk__qq_OptDelim _) } qq_Clause { L.PosToken _ (L.Tk__qq_Clause _) } qq_IdList { L.PosToken _ (L.Tk__qq_IdList _) } qq_Option { L.PosToken _ (L.Tk__qq_Option _) } qq_OptionList { L.PosToken _ (L.Tk__qq_OptionList _) } qq_Rule { L.PosToken _ (L.Tk__qq_Rule _) } qq_RuleList { L.PosToken _ (L.Tk__qq_RuleList _) }-qq_ImportsOpt { L.PosToken _ (L.Tk__qq_ImportsOpt _) } qq_Grammar { L.PosToken _ (L.Tk__qq_Grammar _) } %% Grammar__top : Grammar rtk__eof { $1 } -Grammar : tok_Grammar_dummy_15 Grammar tok_Grammar_dummy_15 { Ctr__Grammar__0 (rtkPosOf $1) $2 } |- tok_Clause_dummy_14 Clause tok_Clause_dummy_14 { Ctr__Grammar__1 (rtkPosOf $1) $2 } |- tok_IdList_dummy_13 IdList tok_IdList_dummy_13 { Ctr__Grammar__2 (rtkPosOf $1) (reverse $2) } |- tok_ImportsOpt_dummy_12 ImportsOpt tok_ImportsOpt_dummy_12 { Ctr__Grammar__3 (rtkPosOf $1) $2 } |- tok_Name_dummy_11 Name tok_Name_dummy_11 { Ctr__Grammar__4 (rtkPosOf $1) $2 } |- tok_OptDelim_dummy_10 OptDelim tok_OptDelim_dummy_10 { Ctr__Grammar__5 (rtkPosOf $1) $2 } |- tok_Option_dummy_9 Option tok_Option_dummy_9 { Ctr__Grammar__6 (rtkPosOf $1) $2 } |- tok_OptionList_dummy_8 OptionList tok_OptionList_dummy_8 { Ctr__Grammar__7 (rtkPosOf $1) (reverse $2) } |- tok_Rule_dummy_7 Rule tok_Rule_dummy_7 { Ctr__Grammar__8 (rtkPosOf $1) $2 } |- tok_RuleList_dummy_6 RuleList tok_RuleList_dummy_6 { Ctr__Grammar__9 (rtkPosOf $1) (reverse $2) } |- tok_StrLit_dummy_5 StrLit tok_StrLit_dummy_5 { Ctr__Grammar__10 (rtkPosOf $1) $2 }+Grammar : tok_Grammar_dummy_11 Grammar tok_Grammar_dummy_11 { Ctr__Grammar__0 (rtkPosOf $1) $2 } |+ tok_Clause_dummy_10 Clause tok_Clause_dummy_10 { Ctr__Grammar__1 (rtkPosOf $1) $2 } |+ tok_IdList_dummy_9 IdList tok_IdList_dummy_9 { Ctr__Grammar__2 (rtkPosOf $1) (reverse $2) } |+ tok_Name_dummy_8 Name tok_Name_dummy_8 { Ctr__Grammar__3 (rtkPosOf $1) $2 } |+ tok_Option_dummy_7 Option tok_Option_dummy_7 { Ctr__Grammar__4 (rtkPosOf $1) $2 } |+ tok_OptionList_dummy_6 OptionList tok_OptionList_dummy_6 { Ctr__Grammar__5 (rtkPosOf $1) (reverse $2) } |+ tok_Rule_dummy_5 Rule tok_Rule_dummy_5 { Ctr__Grammar__6 (rtkPosOf $1) $2 } |+ tok_RuleList_dummy_4 RuleList tok_RuleList_dummy_4 { Ctr__Grammar__7 (rtkPosOf $1) (reverse $2) } |+ tok_StrLit_dummy_3 StrLit tok_StrLit_dummy_3 { Ctr__Grammar__8 (rtkPosOf $1) $2 } Grammar : qq_Grammar { Anti_Grammar (tkVal_qq_Grammar $1) } |- tok_grammar_0 StrLit tok__semi__1 ImportsOpt RuleList { Ctr__Grammar__11 (rtkPosOf $1) $2 $4 (reverse $5) }+ tok_grammar_0 StrLit tok__semi__1 RuleList { GrammarDef (rtkPosOf $1) $2 (reverse $4) } |+ tok_grammar_0 StrLit tok__semi__1 tok_imports_2 bigstr RuleList { GrammarImports (rtkPosOf $1) $2 (tkVal_bigstr $5) (reverse $6) } Clause5 : qq_Clause { Anti_Clause (tkVal_qq_Clause $1) } | tok__lparen__7 Clause tok__rparen__8 { $2 } |- Name { Ctr__Clause__1 (rtkPosOf $1) $1 } |- StrLit { Ctr__Clause__2 (rtkPosOf $1) $1 } |- tok__dot__5 { Ctr__Clause__3 (rtkPosOf $1) } |- regexplit { Ctr__Clause__4 (rtkPosOf $1) (tkVal_regexplit $1) }+ Name { Ref (rtkPosOf $1) $1 } |+ StrLit { Lit (rtkPosOf $1) $1 } |+ tok__dot__5 { Dot (rtkPosOf $1) } |+ regexplit { Regex (rtkPosOf $1) (tkVal_regexplit $1) } -Clause4 : Clause5 tok__star__13 OptDelim { Ctr__Clause__5 (rtkPosOf $1) $1 $3 } |- Clause5 tok__plus__14 OptDelim { Ctr__Clause__6 (rtkPosOf $1) $1 $3 } |- Clause5 tok__symbol__15 { Ctr__Clause__7 (rtkPosOf $1) $1 } |+Clause4 : Clause5 tok__star__13 { Star (rtkPosOf $1) $1 } |+ Clause5 tok__star__13 tok__tilde__14 Clause5 { StarDelim (rtkPosOf $1) $1 $4 } |+ Clause5 tok__plus__15 { Plus (rtkPosOf $1) $1 } |+ Clause5 tok__plus__15 tok__tilde__14 Clause5 { PlusDelim (rtkPosOf $1) $1 $4 } |+ Clause5 tok__symbol__16 { Opt (rtkPosOf $1) $1 } | Clause5 { $1 } -Clause3 : tok__coma__10 Clause4 { Ctr__Clause__9 (rtkPosOf $1) $2 } |- tok__exclamation__12 Clause4 { Ctr__Clause__10 (rtkPosOf $1) $2 } |+Clause3 : tok__coma__10 Clause4 { Lifted (rtkPosOf $1) $2 } |+ tok__exclamation__12 Clause4 { Ignored (rtkPosOf $1) $2 } | Clause4 { $1 } -Clause2 : Clause2 Clause3 { Ctr__Clause__12 (rtkPosOf $1) $1 $2 } |+Clause2 : Clause2 Clause3 { Seq (rtkPosOf $1) $1 $2 } | Clause3 { $1 } -Clause : Clause tok__pipe__11 Clause2 { Ctr__Clause__14 (rtkPosOf $1) $1 $3 } |- Clause2 { $1 }+Clause1 : Name tok__colon__4 Clause2 { Labeled (rtkPosOf $1) $1 $3 } |+ Clause2 { $1 } -IdList__plus_list_ : ListElem_IdList3 { [$1] } |- IdList__plus_list_ tok__coma__10 ListElem_IdList3 { $3 : $1 }+Clause : Clause tok__pipe__11 Clause1 { Alt (rtkPosOf $1) $1 $3 } |+ Clause1 { $1 } +IdList__plus_list_ : ListElem_IdList2 { [$1] } |+ IdList__plus_list_ tok__coma__10 ListElem_IdList2 { $3 : $1 }+ IdList : IdList__plus_list_ { $1 } | {- empty -} { [] } -ImportsOpt : qq_ImportsOpt { Anti_ImportsOpt (tkVal_qq_ImportsOpt $1) } |- { Ctr__ImportsOpt__0 rtkNoPos } |- Rule_0 { Ctr__ImportsOpt__1 (rtkPosOf $1) $1 }- Name : qq_Name { Anti_Name (tkVal_qq_Name $1) } |- id { Ctr__Name__0 (rtkPosOf $1) (tkVal_id $1) }+ id { Ident (rtkPosOf $1) (tkVal_id $1) } -ListElem_IdList3 : qq_IdList { Anti_Name (tkVal_qq_IdList $1) } |+ListElem_IdList2 : qq_IdList { Anti_Name (tkVal_qq_IdList $1) } | Name { $1 } -OptDelim : qq_OptDelim { Anti_OptDelim (tkVal_qq_OptDelim $1) } |- { Ctr__OptDelim__0 rtkNoPos } |- Rule_4 { Ctr__OptDelim__1 (rtkPosOf $1) $1 }- Option : qq_Option { Anti_Option (tkVal_qq_Option $1) } |- tok__symbol_shortcuts_6 tok__lparen__7 IdList tok__rparen__8 { Ctr__Option__0 (rtkPosOf $1) (reverse $3) } |- tok__symbol_symmacro_9 { Ctr__Option__1 (rtkPosOf $1) }+ tok__symbol_shortcuts_6 tok__lparen__7 IdList tok__rparen__8 { Shortcuts (rtkPosOf $1) (reverse $3) } |+ tok__symbol_symmacro_9 { Symmacro (rtkPosOf $1) } -ListElem_OptionList2 : qq_OptionList { Anti_Option (tkVal_qq_OptionList $1) } |+ListElem_OptionList1 : qq_OptionList { Anti_Option (tkVal_qq_OptionList $1) } | Option { $1 } -OptionList : ListElem_OptionList2 { [$1] } |- OptionList ListElem_OptionList2 { $2 : $1 }+OptionList : ListElem_OptionList1 { [$1] } |+ OptionList ListElem_OptionList1 { $2 : $1 } Rule1 : qq_Rule { Anti_Rule (tkVal_qq_Rule $1) } |- Name tok__eql__3 Clause tok__semi__1 { Ctr__Rule__0 (rtkPosOf $1) $1 $3 } |- Name tok__colon__4 Name tok__eql__3 Clause tok__semi__1 { Ctr__Rule__1 (rtkPosOf $1) $1 $3 $5 } |- Name tok__dot__5 Name tok__colon__4 Name tok__eql__3 Clause tok__semi__1 { Ctr__Rule__2 (rtkPosOf $1) $1 $3 $5 $7 } |- tok__dot__5 Name tok__colon__4 Name tok__eql__3 Clause tok__semi__1 { Ctr__Rule__3 (rtkPosOf $1) $2 $4 $6 }+ Name tok__eql__3 Clause tok__semi__1 { RuleSimple (rtkPosOf $1) $1 $3 } |+ Name tok__colon__4 Name tok__eql__3 Clause tok__semi__1 { RuleTyped (rtkPosOf $1) $1 $3 $5 } |+ Name tok__dot__5 Name tok__colon__4 Name tok__eql__3 Clause tok__semi__1 { RuleTypedFunc (rtkPosOf $1) $1 $3 $5 $7 } |+ tok__dot__5 Name tok__colon__4 Name tok__eql__3 Clause tok__semi__1 { RuleFunc (rtkPosOf $1) $2 $4 $6 } -Rule : OptionList Rule1 { Ctr__Rule__4 (rtkPosOf (reverse $1)) (reverse $1) $2 } |+Rule : OptionList Rule1 { RuleWithOptions (rtkPosOf (reverse $1)) (reverse $1) $2 } | Rule1 { $1 } -ListElem_RuleList1 : qq_RuleList { Anti_Rule (tkVal_qq_RuleList $1) } |+ListElem_RuleList0 : qq_RuleList { Anti_Rule (tkVal_qq_RuleList $1) } | Rule { $1 } RuleList : {- empty -} { [] } |- RuleList ListElem_RuleList1 { $2 : $1 }--Rule_0 : tok_imports_2 bigstr { Ctr__Rule_0__0 (rtkPosOf $1) (tkVal_bigstr $2) }--Rule_4 : tok__tilde__16 Clause5 { Ctr__Rule_4__0 (rtkPosOf $1) $2 }+ RuleList ListElem_RuleList0 { $2 : $1 } StrLit : qq_StrLit { Anti_StrLit (tkVal_qq_StrLit $1) } |- str { Ctr__StrLit__0 (rtkPosOf $1) (tkVal_str $1) }+ str { Str (rtkPosOf $1) (tkVal_str $1) } {@@ -161,30 +149,28 @@ -- Render a token the way it appears in the source, for error messages showRtkToken :: L.Token -> String showRtkToken L.EndOfFile = "end of input"-showRtkToken L.Tk__tok_Clause_dummy_14 = "'tok_Clause_dummy_14'"-showRtkToken L.Tk__tok_Grammar_dummy_15 = "'tok_Grammar_dummy_15'"-showRtkToken L.Tk__tok_IdList_dummy_13 = "'tok_IdList_dummy_13'"-showRtkToken L.Tk__tok_ImportsOpt_dummy_12 = "'tok_ImportsOpt_dummy_12'"-showRtkToken L.Tk__tok_Name_dummy_11 = "'tok_Name_dummy_11'"-showRtkToken L.Tk__tok_OptDelim_dummy_10 = "'tok_OptDelim_dummy_10'"-showRtkToken L.Tk__tok_Option_dummy_9 = "'tok_Option_dummy_9'"-showRtkToken L.Tk__tok_OptionList_dummy_8 = "'tok_OptionList_dummy_8'"-showRtkToken L.Tk__tok_Rule_dummy_7 = "'tok_Rule_dummy_7'"-showRtkToken L.Tk__tok_RuleList_dummy_6 = "'tok_RuleList_dummy_6'"-showRtkToken L.Tk__tok_StrLit_dummy_5 = "'tok_StrLit_dummy_5'"-showRtkToken L.Tk__tok__tilde__16 = "'~'"+showRtkToken L.Tk__tok_Clause_dummy_10 = "'tok_Clause_dummy_10'"+showRtkToken L.Tk__tok_Grammar_dummy_11 = "'tok_Grammar_dummy_11'"+showRtkToken L.Tk__tok_IdList_dummy_9 = "'tok_IdList_dummy_9'"+showRtkToken L.Tk__tok_Name_dummy_8 = "'tok_Name_dummy_8'"+showRtkToken L.Tk__tok_Option_dummy_7 = "'tok_Option_dummy_7'"+showRtkToken L.Tk__tok_OptionList_dummy_6 = "'tok_OptionList_dummy_6'"+showRtkToken L.Tk__tok_Rule_dummy_5 = "'tok_Rule_dummy_5'"+showRtkToken L.Tk__tok_RuleList_dummy_4 = "'tok_RuleList_dummy_4'"+showRtkToken L.Tk__tok_StrLit_dummy_3 = "'tok_StrLit_dummy_3'"+showRtkToken L.Tk__tok__tilde__14 = "'~'" showRtkToken L.Tk__tok__pipe__11 = "'|'" showRtkToken L.Tk__tok_imports_2 = "'imports'" showRtkToken L.Tk__tok_grammar_0 = "'grammar'" showRtkToken L.Tk__tok__symbol_symmacro_9 = "'@symmacro'" showRtkToken L.Tk__tok__symbol_shortcuts_6 = "'@shortcuts'"-showRtkToken L.Tk__tok__symbol__15 = "'?'"+showRtkToken L.Tk__tok__symbol__16 = "'?'" showRtkToken L.Tk__tok__eql__3 = "'='" showRtkToken L.Tk__tok__semi__1 = "';'" showRtkToken L.Tk__tok__colon__4 = "':'" showRtkToken L.Tk__tok__dot__5 = "'.'" showRtkToken L.Tk__tok__coma__10 = "','"-showRtkToken L.Tk__tok__plus__14 = "'+'"+showRtkToken L.Tk__tok__plus__15 = "'+'" showRtkToken L.Tk__tok__star__13 = "'*'" showRtkToken L.Tk__tok__rparen__8 = "')'" showRtkToken L.Tk__tok__lparen__7 = "'('"@@ -195,14 +181,12 @@ showRtkToken (L.Tk__id v) = "id " ++ show v showRtkToken (L.Tk__qq_Name v) = "qq_Name " ++ show v showRtkToken (L.Tk__qq_StrLit v) = "qq_StrLit " ++ show v-showRtkToken (L.Tk__qq_OptDelim v) = "qq_OptDelim " ++ show v showRtkToken (L.Tk__qq_Clause v) = "qq_Clause " ++ show v showRtkToken (L.Tk__qq_IdList v) = "qq_IdList " ++ show v showRtkToken (L.Tk__qq_Option v) = "qq_Option " ++ show v showRtkToken (L.Tk__qq_OptionList v) = "qq_OptionList " ++ show v showRtkToken (L.Tk__qq_Rule v) = "qq_Rule " ++ show v showRtkToken (L.Tk__qq_RuleList v) = "qq_RuleList " ++ show v-showRtkToken (L.Tk__qq_ImportsOpt v) = "qq_ImportsOpt " ++ show v showRtkToken (L.Tk__qq_Grammar v) = "qq_Grammar " ++ show v -- Source position of a node: every constructor except the Anti_* splice@@ -253,9 +237,6 @@ tkVal_qq_StrLit :: L.PosToken -> String tkVal_qq_StrLit (L.PosToken _ (L.Tk__qq_StrLit v)) = v tkVal_qq_StrLit t = error ("rtk internal error: token qq_StrLit expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_OptDelim :: L.PosToken -> String-tkVal_qq_OptDelim (L.PosToken _ (L.Tk__qq_OptDelim v)) = v-tkVal_qq_OptDelim t = error ("rtk internal error: token qq_OptDelim expected, got " ++ showRtkToken (L.ptToken t)) tkVal_qq_Clause :: L.PosToken -> String tkVal_qq_Clause (L.PosToken _ (L.Tk__qq_Clause v)) = v tkVal_qq_Clause t = error ("rtk internal error: token qq_Clause expected, got " ++ showRtkToken (L.ptToken t))@@ -274,9 +255,6 @@ tkVal_qq_RuleList :: L.PosToken -> String tkVal_qq_RuleList (L.PosToken _ (L.Tk__qq_RuleList v)) = v tkVal_qq_RuleList t = error ("rtk internal error: token qq_RuleList expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_ImportsOpt :: L.PosToken -> String-tkVal_qq_ImportsOpt (L.PosToken _ (L.Tk__qq_ImportsOpt v)) = v-tkVal_qq_ImportsOpt t = error ("rtk internal error: token qq_ImportsOpt expected, got " ++ showRtkToken (L.ptToken t)) tkVal_qq_Grammar :: L.PosToken -> String tkVal_qq_Grammar (L.PosToken _ (L.Tk__qq_Grammar v)) = v tkVal_qq_Grammar t = error ("rtk internal error: token qq_Grammar expected, got " ++ showRtkToken (L.ptToken t))@@ -284,16 +262,15 @@ data Grammar = Ctr__Grammar__0 RtkPos Grammar | Ctr__Grammar__1 RtkPos Clause | Ctr__Grammar__2 RtkPos IdList |- Ctr__Grammar__3 RtkPos ImportsOpt |- Ctr__Grammar__4 RtkPos Name |- Ctr__Grammar__5 RtkPos OptDelim |- Ctr__Grammar__6 RtkPos Option |- Ctr__Grammar__7 RtkPos OptionList |- Ctr__Grammar__8 RtkPos Rule |- Ctr__Grammar__9 RtkPos RuleList |- Ctr__Grammar__10 RtkPos StrLit |+ Ctr__Grammar__3 RtkPos Name |+ Ctr__Grammar__4 RtkPos Option |+ Ctr__Grammar__5 RtkPos OptionList |+ Ctr__Grammar__6 RtkPos Rule |+ Ctr__Grammar__7 RtkPos RuleList |+ Ctr__Grammar__8 RtkPos StrLit | Anti_Grammar String |- Ctr__Grammar__11 RtkPos StrLit ImportsOpt RuleList+ GrammarDef RtkPos StrLit RuleList |+ GrammarImports RtkPos StrLit String RuleList deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable) instance RtkPosOf Grammar where rtkPosOf (Ctr__Grammar__0 p _) = p@@ -305,95 +282,76 @@ rtkPosOf (Ctr__Grammar__6 p _) = p rtkPosOf (Ctr__Grammar__7 p _) = p rtkPosOf (Ctr__Grammar__8 p _) = p- rtkPosOf (Ctr__Grammar__9 p _) = p- rtkPosOf (Ctr__Grammar__10 p _) = p rtkPosOf (Anti_Grammar _) = rtkNoPos- rtkPosOf (Ctr__Grammar__11 p _ _ _) = p+ rtkPosOf (GrammarDef p _ _) = p+ rtkPosOf (GrammarImports p _ _ _) = p data Clause = Anti_Clause String |- Ctr__Clause__1 RtkPos Name |- Ctr__Clause__2 RtkPos StrLit |- Ctr__Clause__3 RtkPos |- Ctr__Clause__4 RtkPos String |- Ctr__Clause__5 RtkPos Clause OptDelim |- Ctr__Clause__6 RtkPos Clause OptDelim |- Ctr__Clause__7 RtkPos Clause |- Ctr__Clause__9 RtkPos Clause |- Ctr__Clause__10 RtkPos Clause |- Ctr__Clause__12 RtkPos Clause Clause |- Ctr__Clause__14 RtkPos Clause Clause+ Ref RtkPos Name |+ Lit RtkPos StrLit |+ Dot RtkPos |+ Regex RtkPos String |+ Star RtkPos Clause |+ StarDelim RtkPos Clause Clause |+ Plus RtkPos Clause |+ PlusDelim RtkPos Clause Clause |+ Opt RtkPos Clause |+ Lifted RtkPos Clause |+ Ignored RtkPos Clause |+ Seq RtkPos Clause Clause |+ Labeled RtkPos Name Clause |+ Alt RtkPos Clause Clause deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable) instance RtkPosOf Clause where rtkPosOf (Anti_Clause _) = rtkNoPos- rtkPosOf (Ctr__Clause__1 p _) = p- rtkPosOf (Ctr__Clause__2 p _) = p- rtkPosOf (Ctr__Clause__3 p) = p- rtkPosOf (Ctr__Clause__4 p _) = p- rtkPosOf (Ctr__Clause__5 p _ _) = p- rtkPosOf (Ctr__Clause__6 p _ _) = p- rtkPosOf (Ctr__Clause__7 p _) = p- rtkPosOf (Ctr__Clause__9 p _) = p- rtkPosOf (Ctr__Clause__10 p _) = p- rtkPosOf (Ctr__Clause__12 p _ _) = p- rtkPosOf (Ctr__Clause__14 p _ _) = p+ rtkPosOf (Ref p _) = p+ rtkPosOf (Lit p _) = p+ rtkPosOf (Dot p) = p+ rtkPosOf (Regex p _) = p+ rtkPosOf (Star p _) = p+ rtkPosOf (StarDelim p _ _) = p+ rtkPosOf (Plus p _) = p+ rtkPosOf (PlusDelim p _ _) = p+ rtkPosOf (Opt p _) = p+ rtkPosOf (Lifted p _) = p+ rtkPosOf (Ignored p _) = p+ rtkPosOf (Seq p _ _) = p+ rtkPosOf (Labeled p _ _) = p+ rtkPosOf (Alt p _ _) = p type IdList = [Name]-data ImportsOpt = Anti_ImportsOpt String |- Ctr__ImportsOpt__0 RtkPos |- Ctr__ImportsOpt__1 RtkPos Rule_0- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf ImportsOpt where- rtkPosOf (Anti_ImportsOpt _) = rtkNoPos- rtkPosOf (Ctr__ImportsOpt__0 p) = p- rtkPosOf (Ctr__ImportsOpt__1 p _) = p data Name = Anti_Name String |- Ctr__Name__0 RtkPos String+ Ident RtkPos String deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable) instance RtkPosOf Name where rtkPosOf (Anti_Name _) = rtkNoPos- rtkPosOf (Ctr__Name__0 p _) = p-data OptDelim = Anti_OptDelim String |- Ctr__OptDelim__0 RtkPos |- Ctr__OptDelim__1 RtkPos Rule_4- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf OptDelim where- rtkPosOf (Anti_OptDelim _) = rtkNoPos- rtkPosOf (Ctr__OptDelim__0 p) = p- rtkPosOf (Ctr__OptDelim__1 p _) = p+ rtkPosOf (Ident p _) = p data Option = Anti_Option String |- Ctr__Option__0 RtkPos IdList |- Ctr__Option__1 RtkPos+ Shortcuts RtkPos IdList |+ Symmacro RtkPos deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable) instance RtkPosOf Option where rtkPosOf (Anti_Option _) = rtkNoPos- rtkPosOf (Ctr__Option__0 p _) = p- rtkPosOf (Ctr__Option__1 p) = p+ rtkPosOf (Shortcuts p _) = p+ rtkPosOf (Symmacro p) = p type OptionList = [Option] data Rule = Anti_Rule String |- Ctr__Rule__0 RtkPos Name Clause |- Ctr__Rule__1 RtkPos Name Name Clause |- Ctr__Rule__2 RtkPos Name Name Name Clause |- Ctr__Rule__3 RtkPos Name Name Clause |- Ctr__Rule__4 RtkPos OptionList Rule+ RuleSimple RtkPos Name Clause |+ RuleTyped RtkPos Name Name Clause |+ RuleTypedFunc RtkPos Name Name Name Clause |+ RuleFunc RtkPos Name Name Clause |+ RuleWithOptions RtkPos OptionList Rule deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable) instance RtkPosOf Rule where rtkPosOf (Anti_Rule _) = rtkNoPos- rtkPosOf (Ctr__Rule__0 p _ _) = p- rtkPosOf (Ctr__Rule__1 p _ _ _) = p- rtkPosOf (Ctr__Rule__2 p _ _ _ _) = p- rtkPosOf (Ctr__Rule__3 p _ _ _) = p- rtkPosOf (Ctr__Rule__4 p _ _) = p+ rtkPosOf (RuleSimple p _ _) = p+ rtkPosOf (RuleTyped p _ _ _) = p+ rtkPosOf (RuleTypedFunc p _ _ _ _) = p+ rtkPosOf (RuleFunc p _ _ _) = p+ rtkPosOf (RuleWithOptions p _ _) = p type RuleList = [Rule]-data Rule_0 = Ctr__Rule_0__0 RtkPos String- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_0 where- rtkPosOf (Ctr__Rule_0__0 p _) = p-data Rule_4 = Ctr__Rule_4__0 RtkPos Clause- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_4 where- rtkPosOf (Ctr__Rule_4__0 p _) = p data StrLit = Anti_StrLit String |- Ctr__StrLit__0 RtkPos String+ Str RtkPos String deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable) instance RtkPosOf StrLit where rtkPosOf (Anti_StrLit _) = rtkNoPos- rtkPosOf (Ctr__StrLit__0 p _) = p+ rtkPosOf (Str p _) = p }
test/golden/grammar/GrammarQQ.hs view
@@ -64,7 +64,7 @@ _ -> err _ -> err -qqShortcuts = M.fromList [ ("grammar","Grammar"),("clause","Clause"),("idList","IdList"),("importsOpt","ImportsOpt"),("name","Name"),("optDelim","OptDelim"),("option","Option"),("optionList","OptionList"),("rule","Rule"),("ruleList","RuleList"),("strLit","StrLit"),("cl","Clause"),("r","Rule")]+qqShortcuts = M.fromList [ ("grammar","Grammar"),("clause","Clause"),("idList","IdList"),("name","Name"),("option","Option"),("optionList","OptionList"),("rule","Rule"),("ruleList","RuleList"),("strLit","StrLit"),("cl","Clause"),("r","Rule")] -- A quasi-quote pattern must match an AST parsed from anywhere in a source -- file, while the pattern itself was parsed from the quote body - so every@@ -81,7 +81,7 @@ Left err -> fail (rtkRenderError err) Right a -> return a let expr = func ast- dataToExpQ (const Nothing `Generics.extQ` antiGrammarExp `Generics.extQ` antiImportsOptExp `Generics.extQ` antiRuleExp `Generics.extQ` antiOptionExp `Generics.extQ` antiNameExp `Generics.extQ` antiClauseExp `Generics.extQ` antiOptDelimExp `Generics.extQ` antiStrLitExp) expr+ dataToExpQ (const Nothing `Generics.extQ` antiGrammarExp `Generics.extQ` antiRuleExp `Generics.extQ` antiOptionExp `Generics.extQ` antiNameExp `Generics.extQ` antiClauseExp `Generics.extQ` antiStrLitExp) expr quoteGrammarPat :: Data.Data a => String -> (Grammar -> a) -> String -> TH.PatQ quoteGrammarPat dummy func s = do s1 <- either fail return (replaceAllPatterns s)@@ -89,18 +89,13 @@ Left err -> fail (rtkRenderError err) Right a -> return a let expr = func ast- dataToPatQ (const Nothing `Generics.extQ` rtkPosWildPat `Generics.extQ` antiGrammarPat `Generics.extQ` antiImportsOptPat `Generics.extQ` antiRulePat `Generics.extQ` antiOptionPat `Generics.extQ` antiNamePat `Generics.extQ` antiClausePat `Generics.extQ` antiOptDelimPat `Generics.extQ` antiStrLitPat) expr+ dataToPatQ (const Nothing `Generics.extQ` rtkPosWildPat `Generics.extQ` antiGrammarPat `Generics.extQ` antiRulePat `Generics.extQ` antiOptionPat `Generics.extQ` antiNamePat `Generics.extQ` antiClausePat `Generics.extQ` antiStrLitPat) expr antiStrLitExp :: StrLit -> Maybe (TH.Q TH.Exp ) antiStrLitExp ( Anti_StrLit v) = Just $ TH.varE (TH.mkName v) antiStrLitExp _ = Nothing -antiOptDelimExp :: OptDelim -> Maybe (TH.Q TH.Exp )-antiOptDelimExp ( Anti_OptDelim v) = Just $ TH.varE (TH.mkName v)-antiOptDelimExp _ = Nothing-- antiClauseExp :: Clause -> Maybe (TH.Q TH.Exp ) antiClauseExp ( Anti_Clause v) = Just $ TH.varE (TH.mkName v) antiClauseExp _ = Nothing@@ -108,7 +103,7 @@ antiNameExp :: [ Name ] -> Maybe (TH.Q TH.Exp) antiNameExp ((Anti_Name v):rest) =- let restExp = dataToExpQ (const Nothing `Generics.extQ` antiGrammarExp `Generics.extQ` antiImportsOptExp `Generics.extQ` antiRuleExp `Generics.extQ` antiOptionExp `Generics.extQ` antiNameExp `Generics.extQ` antiClauseExp `Generics.extQ` antiOptDelimExp `Generics.extQ` antiStrLitExp) rest+ let restExp = dataToExpQ (const Nothing `Generics.extQ` antiGrammarExp `Generics.extQ` antiRuleExp `Generics.extQ` antiOptionExp `Generics.extQ` antiNameExp `Generics.extQ` antiClauseExp `Generics.extQ` antiStrLitExp) rest lvar = TH.varE $ TH.mkName v in Just [| $lvar ++ $restExp |] antiNameExp _ = Nothing@@ -116,7 +111,7 @@ antiOptionExp :: [ Option ] -> Maybe (TH.Q TH.Exp) antiOptionExp ((Anti_Option v):rest) =- let restExp = dataToExpQ (const Nothing `Generics.extQ` antiGrammarExp `Generics.extQ` antiImportsOptExp `Generics.extQ` antiRuleExp `Generics.extQ` antiOptionExp `Generics.extQ` antiNameExp `Generics.extQ` antiClauseExp `Generics.extQ` antiOptDelimExp `Generics.extQ` antiStrLitExp) rest+ let restExp = dataToExpQ (const Nothing `Generics.extQ` antiGrammarExp `Generics.extQ` antiRuleExp `Generics.extQ` antiOptionExp `Generics.extQ` antiNameExp `Generics.extQ` antiClauseExp `Generics.extQ` antiStrLitExp) rest lvar = TH.varE $ TH.mkName v in Just [| $lvar ++ $restExp |] antiOptionExp _ = Nothing@@ -124,17 +119,12 @@ antiRuleExp :: [ Rule ] -> Maybe (TH.Q TH.Exp) antiRuleExp ((Anti_Rule v):rest) =- let restExp = dataToExpQ (const Nothing `Generics.extQ` antiGrammarExp `Generics.extQ` antiImportsOptExp `Generics.extQ` antiRuleExp `Generics.extQ` antiOptionExp `Generics.extQ` antiNameExp `Generics.extQ` antiClauseExp `Generics.extQ` antiOptDelimExp `Generics.extQ` antiStrLitExp) rest+ let restExp = dataToExpQ (const Nothing `Generics.extQ` antiGrammarExp `Generics.extQ` antiRuleExp `Generics.extQ` antiOptionExp `Generics.extQ` antiNameExp `Generics.extQ` antiClauseExp `Generics.extQ` antiStrLitExp) rest lvar = TH.varE $ TH.mkName v in Just [| $lvar ++ $restExp |] antiRuleExp _ = Nothing -antiImportsOptExp :: ImportsOpt -> Maybe (TH.Q TH.Exp )-antiImportsOptExp ( Anti_ImportsOpt v) = Just $ TH.varE (TH.mkName v)-antiImportsOptExp _ = Nothing-- antiGrammarExp :: Grammar -> Maybe (TH.Q TH.Exp ) antiGrammarExp ( Anti_Grammar v) = Just $ TH.varE (TH.mkName v) antiGrammarExp _ = Nothing@@ -146,11 +136,6 @@ antiStrLitPat _ = Nothing -antiOptDelimPat :: OptDelim -> Maybe (TH.Q TH.Pat )-antiOptDelimPat ( Anti_OptDelim v) = Just $ TH.varP (TH.mkName v)-antiOptDelimPat _ = Nothing-- antiClausePat :: Clause -> Maybe (TH.Q TH.Pat ) antiClausePat ( Anti_Clause v) = Just $ TH.varP (TH.mkName v) antiClausePat _ = Nothing@@ -171,11 +156,6 @@ antiRulePat _ = Nothing -antiImportsOptPat :: ImportsOpt -> Maybe (TH.Q TH.Pat )-antiImportsOptPat ( Anti_ImportsOpt v) = Just $ TH.varP (TH.mkName v)-antiImportsOptPat _ = Nothing-- antiGrammarPat :: Grammar -> Maybe (TH.Q TH.Pat ) antiGrammarPat ( Anti_Grammar v) = Just $ TH.varP (TH.mkName v) antiGrammarPat _ = Nothing@@ -189,55 +169,45 @@ getGrammar ( Ctr__Grammar__0 _ s) = s grammar :: QuasiQuoter-grammar = QuasiQuoter (quoteGrammarExp "tok_Grammar_dummy_15" getGrammar ) (quoteGrammarPat "tok_Grammar_dummy_15" getGrammar ) quoteGrammarType quoteGrammarDecs+grammar = QuasiQuoter (quoteGrammarExp "tok_Grammar_dummy_11" getGrammar ) (quoteGrammarPat "tok_Grammar_dummy_11" getGrammar ) quoteGrammarType quoteGrammarDecs getClause ( Ctr__Grammar__1 _ s) = s clause :: QuasiQuoter-clause = QuasiQuoter (quoteGrammarExp "tok_Clause_dummy_14" getClause ) (quoteGrammarPat "tok_Clause_dummy_14" getClause ) quoteGrammarType quoteGrammarDecs+clause = QuasiQuoter (quoteGrammarExp "tok_Clause_dummy_10" getClause ) (quoteGrammarPat "tok_Clause_dummy_10" getClause ) quoteGrammarType quoteGrammarDecs getIdList ( Ctr__Grammar__2 _ s) = s idList :: QuasiQuoter-idList = QuasiQuoter (quoteGrammarExp "tok_IdList_dummy_13" getIdList ) (quoteGrammarPat "tok_IdList_dummy_13" getIdList ) quoteGrammarType quoteGrammarDecs--getImportsOpt ( Ctr__Grammar__3 _ s) = s--importsOpt :: QuasiQuoter-importsOpt = QuasiQuoter (quoteGrammarExp "tok_ImportsOpt_dummy_12" getImportsOpt ) (quoteGrammarPat "tok_ImportsOpt_dummy_12" getImportsOpt ) quoteGrammarType quoteGrammarDecs+idList = QuasiQuoter (quoteGrammarExp "tok_IdList_dummy_9" getIdList ) (quoteGrammarPat "tok_IdList_dummy_9" getIdList ) quoteGrammarType quoteGrammarDecs -getName ( Ctr__Grammar__4 _ s) = s+getName ( Ctr__Grammar__3 _ s) = s name :: QuasiQuoter-name = QuasiQuoter (quoteGrammarExp "tok_Name_dummy_11" getName ) (quoteGrammarPat "tok_Name_dummy_11" getName ) quoteGrammarType quoteGrammarDecs--getOptDelim ( Ctr__Grammar__5 _ s) = s--optDelim :: QuasiQuoter-optDelim = QuasiQuoter (quoteGrammarExp "tok_OptDelim_dummy_10" getOptDelim ) (quoteGrammarPat "tok_OptDelim_dummy_10" getOptDelim ) quoteGrammarType quoteGrammarDecs+name = QuasiQuoter (quoteGrammarExp "tok_Name_dummy_8" getName ) (quoteGrammarPat "tok_Name_dummy_8" getName ) quoteGrammarType quoteGrammarDecs -getOption ( Ctr__Grammar__6 _ s) = s+getOption ( Ctr__Grammar__4 _ s) = s option :: QuasiQuoter-option = QuasiQuoter (quoteGrammarExp "tok_Option_dummy_9" getOption ) (quoteGrammarPat "tok_Option_dummy_9" getOption ) quoteGrammarType quoteGrammarDecs+option = QuasiQuoter (quoteGrammarExp "tok_Option_dummy_7" getOption ) (quoteGrammarPat "tok_Option_dummy_7" getOption ) quoteGrammarType quoteGrammarDecs -getOptionList ( Ctr__Grammar__7 _ s) = s+getOptionList ( Ctr__Grammar__5 _ s) = s optionList :: QuasiQuoter-optionList = QuasiQuoter (quoteGrammarExp "tok_OptionList_dummy_8" getOptionList ) (quoteGrammarPat "tok_OptionList_dummy_8" getOptionList ) quoteGrammarType quoteGrammarDecs+optionList = QuasiQuoter (quoteGrammarExp "tok_OptionList_dummy_6" getOptionList ) (quoteGrammarPat "tok_OptionList_dummy_6" getOptionList ) quoteGrammarType quoteGrammarDecs -getRule ( Ctr__Grammar__8 _ s) = s+getRule ( Ctr__Grammar__6 _ s) = s rule :: QuasiQuoter-rule = QuasiQuoter (quoteGrammarExp "tok_Rule_dummy_7" getRule ) (quoteGrammarPat "tok_Rule_dummy_7" getRule ) quoteGrammarType quoteGrammarDecs+rule = QuasiQuoter (quoteGrammarExp "tok_Rule_dummy_5" getRule ) (quoteGrammarPat "tok_Rule_dummy_5" getRule ) quoteGrammarType quoteGrammarDecs -getRuleList ( Ctr__Grammar__9 _ s) = s+getRuleList ( Ctr__Grammar__7 _ s) = s ruleList :: QuasiQuoter-ruleList = QuasiQuoter (quoteGrammarExp "tok_RuleList_dummy_6" getRuleList ) (quoteGrammarPat "tok_RuleList_dummy_6" getRuleList ) quoteGrammarType quoteGrammarDecs+ruleList = QuasiQuoter (quoteGrammarExp "tok_RuleList_dummy_4" getRuleList ) (quoteGrammarPat "tok_RuleList_dummy_4" getRuleList ) quoteGrammarType quoteGrammarDecs -getStrLit ( Ctr__Grammar__10 _ s) = s+getStrLit ( Ctr__Grammar__8 _ s) = s strLit :: QuasiQuoter-strLit = QuasiQuoter (quoteGrammarExp "tok_StrLit_dummy_5" getStrLit ) (quoteGrammarPat "tok_StrLit_dummy_5" getStrLit ) quoteGrammarType quoteGrammarDecs+strLit = QuasiQuoter (quoteGrammarExp "tok_StrLit_dummy_3" getStrLit ) (quoteGrammarPat "tok_StrLit_dummy_3" getStrLit ) quoteGrammarType quoteGrammarDecs
test/golden/java/JavaLexer.x view
@@ -12,189 +12,203 @@ @floatTypeSuffix = ([fFdD]) $backslash = [\\] -tokens :- "tok_AdditiveOp_dummy_178" { simple Tk__tok_AdditiveOp_dummy_178 }- "tok_Annotation_dummy_177" { simple Tk__tok_Annotation_dummy_177 }- "tok_AnnotationArguments_dummy_176" { simple Tk__tok_AnnotationArguments_dummy_176 }- "tok_AnnotationDeclaration_dummy_175" { simple Tk__tok_AnnotationDeclaration_dummy_175 }- "tok_AnnotationElement_dummy_174" { simple Tk__tok_AnnotationElement_dummy_174 }- "tok_AnnotationList_dummy_173" { simple Tk__tok_AnnotationList_dummy_173 }- "tok_AnnotationTypeElement_dummy_172" { simple Tk__tok_AnnotationTypeElement_dummy_172 }- "tok_AnnotationTypeElementList_dummy_171" { simple Tk__tok_AnnotationTypeElementList_dummy_171 }- "tok_Arglist_dummy_170" { simple Tk__tok_Arglist_dummy_170 }- "tok_AssignmentOp_dummy_169" { simple Tk__tok_AssignmentOp_dummy_169 }- "tok_CatchList_dummy_168" { simple Tk__tok_CatchList_dummy_168 }- "tok_ClassDeclaration_dummy_167" { simple Tk__tok_ClassDeclaration_dummy_167 }- "tok_ClassOrInterfaceType_dummy_166" { simple Tk__tok_ClassOrInterfaceType_dummy_166 }- "tok_CompilationUnit_dummy_165" { simple Tk__tok_CompilationUnit_dummy_165 }- "tok_CompoundName_dummy_164" { simple Tk__tok_CompoundName_dummy_164 }- "tok_CompoundNameTail_dummy_163" { simple Tk__tok_CompoundNameTail_dummy_163 }- "tok_CreationExpression_dummy_162" { simple Tk__tok_CreationExpression_dummy_162 }- "tok_DimExprs_dummy_161" { simple Tk__tok_DimExprs_dummy_161 }- "tok_Dims_dummy_160" { simple Tk__tok_Dims_dummy_160 }- "tok_DoStatement_dummy_159" { simple Tk__tok_DoStatement_dummy_159 }- "tok_DocComment_dummy_158" { simple Tk__tok_DocComment_dummy_158 }- "tok_EnumConstant_dummy_157" { simple Tk__tok_EnumConstant_dummy_157 }- "tok_EnumConstantList_dummy_156" { simple Tk__tok_EnumConstantList_dummy_156 }- "tok_EnumDeclaration_dummy_155" { simple Tk__tok_EnumDeclaration_dummy_155 }- "tok_EqualityOp_dummy_154" { simple Tk__tok_EqualityOp_dummy_154 }- "tok_Expression_dummy_153" { simple Tk__tok_Expression_dummy_153 }- "tok_ExtendsList_dummy_152" { simple Tk__tok_ExtendsList_dummy_152 }- "tok_FieldDeclaration_dummy_151" { simple Tk__tok_FieldDeclaration_dummy_151 }- "tok_FieldDeclarationList_dummy_150" { simple Tk__tok_FieldDeclarationList_dummy_150 }- "tok_ForStatement_dummy_149" { simple Tk__tok_ForStatement_dummy_149 }- "tok_IfStatement_dummy_148" { simple Tk__tok_IfStatement_dummy_148 }- "tok_ImplementsList_dummy_147" { simple Tk__tok_ImplementsList_dummy_147 }- "tok_ImportHead_dummy_146" { simple Tk__tok_ImportHead_dummy_146 }- "tok_ImportList_dummy_145" { simple Tk__tok_ImportList_dummy_145 }- "tok_ImportName_dummy_144" { simple Tk__tok_ImportName_dummy_144 }- "tok_ImportStatement_dummy_143" { simple Tk__tok_ImportStatement_dummy_143 }- "tok_InterfaceDeclaration_dummy_142" { simple Tk__tok_InterfaceDeclaration_dummy_142 }- "tok_Java_dummy_179" { simple Tk__tok_Java_dummy_179 }- "tok_Literal_dummy_141" { simple Tk__tok_Literal_dummy_141 }- "tok_LocalModifierList1_dummy_140" { simple Tk__tok_LocalModifierList1_dummy_140 }- "tok_MemberAfterFirstId_dummy_139" { simple Tk__tok_MemberAfterFirstId_dummy_139 }- "tok_MemberDeclaration_dummy_138" { simple Tk__tok_MemberDeclaration_dummy_138 }- "tok_MemberRest_dummy_137" { simple Tk__tok_MemberRest_dummy_137 }- "tok_Modifier_dummy_136" { simple Tk__tok_Modifier_dummy_136 }- "tok_ModifierList_dummy_135" { simple Tk__tok_ModifierList_dummy_135 }- "tok_MoreTypeSpecifier_dummy_134" { simple Tk__tok_MoreTypeSpecifier_dummy_134 }- "tok_MoreVariableDeclarators_dummy_133" { simple Tk__tok_MoreVariableDeclarators_dummy_133 }- "tok_MultiplicativeOp_dummy_132" { simple Tk__tok_MultiplicativeOp_dummy_132 }- "tok_NonEmptyDims_dummy_131" { simple Tk__tok_NonEmptyDims_dummy_131 }- "tok_NonEmptyTypeArguments_dummy_130" { simple Tk__tok_NonEmptyTypeArguments_dummy_130 }- "tok_OptDocComment_dummy_129" { simple Tk__tok_OptDocComment_dummy_129 }- "tok_OptElsePart_dummy_128" { simple Tk__tok_OptElsePart_dummy_128 }- "tok_OptExpression_dummy_127" { simple Tk__tok_OptExpression_dummy_127 }- "tok_OptFinally_dummy_126" { simple Tk__tok_OptFinally_dummy_126 }- "tok_OptId_dummy_125" { simple Tk__tok_OptId_dummy_125 }- "tok_OptVariableInitializer_dummy_124" { simple Tk__tok_OptVariableInitializer_dummy_124 }- "tok_Package_dummy_123" { simple Tk__tok_Package_dummy_123 }- "tok_ParamModifierList_dummy_122" { simple Tk__tok_ParamModifierList_dummy_122 }- "tok_Parameter_dummy_121" { simple Tk__tok_Parameter_dummy_121 }- "tok_ParameterList_dummy_120" { simple Tk__tok_ParameterList_dummy_120 }- "tok_PostfixOp_dummy_119" { simple Tk__tok_PostfixOp_dummy_119 }- "tok_PrefixOp_dummy_118" { simple Tk__tok_PrefixOp_dummy_118 }- "tok_PrimitiveTypeKeyword_dummy_117" { simple Tk__tok_PrimitiveTypeKeyword_dummy_117 }- "tok_RelationalOp_dummy_116" { simple Tk__tok_RelationalOp_dummy_116 }- "tok_ShiftOp_dummy_115" { simple Tk__tok_ShiftOp_dummy_115 }- "tok_Statement_dummy_114" { simple Tk__tok_Statement_dummy_114 }- "tok_StatementBlock_dummy_113" { simple Tk__tok_StatementBlock_dummy_113 }- "tok_StatementList_dummy_112" { simple Tk__tok_StatementList_dummy_112 }- "tok_StaticInitializer_dummy_111" { simple Tk__tok_StaticInitializer_dummy_111 }- "tok_SwitchCaseList_dummy_110" { simple Tk__tok_SwitchCaseList_dummy_110 }- "tok_SwitchStatement_dummy_109" { simple Tk__tok_SwitchStatement_dummy_109 }- "tok_ThrowsClause_dummy_108" { simple Tk__tok_ThrowsClause_dummy_108 }- "tok_TryStatement_dummy_107" { simple Tk__tok_TryStatement_dummy_107 }- "tok_Type_dummy_106" { simple Tk__tok_Type_dummy_106 }- "tok_TypeArgument_dummy_105" { simple Tk__tok_TypeArgument_dummy_105 }- "tok_TypeArguments_dummy_104" { simple Tk__tok_TypeArguments_dummy_104 }- "tok_TypeDeclRest_dummy_103" { simple Tk__tok_TypeDeclRest_dummy_103 }- "tok_TypeDeclaration_dummy_102" { simple Tk__tok_TypeDeclaration_dummy_102 }- "tok_TypeParameter_dummy_101" { simple Tk__tok_TypeParameter_dummy_101 }- "tok_TypeParameters_dummy_100" { simple Tk__tok_TypeParameters_dummy_100 }- "tok_TypeSpecifier_dummy_99" { simple Tk__tok_TypeSpecifier_dummy_99 }- "tok_VariableDeclaration_dummy_98" { simple Tk__tok_VariableDeclaration_dummy_98 }- "tok_VariableDeclarator_dummy_97" { simple Tk__tok_VariableDeclarator_dummy_97 }- "tok_VariableDeclaratorList_dummy_96" { simple Tk__tok_VariableDeclaratorList_dummy_96 }- "tok_VariableInitializer_dummy_95" { simple Tk__tok_VariableInitializer_dummy_95 }- "tok_VariableInitializerList_dummy_94" { simple Tk__tok_VariableInitializerList_dummy_94 }- "tok_WhileStatement_dummy_93" { simple Tk__tok_WhileStatement_dummy_93 }- "tok_WildcardType_dummy_92" { simple Tk__tok_WildcardType_dummy_92 }- "~" { simple Tk__tok__tilde__82 }- "}" { simple Tk__tok__symbol__15 }- "||" { simple Tk__tok__pipe__pipe__63 }- "|=" { simple Tk__tok__pipe__eql__55 }- "|" { simple Tk__tok__pipe__65 }- "{" { simple Tk__tok__symbol__14 }- "while" { simple Tk__tok_while_44 }+tokens :- "tok_AdditiveOp_dummy_205" { simple Tk__tok_AdditiveOp_dummy_205 }+ "tok_Annotation_dummy_204" { simple Tk__tok_Annotation_dummy_204 }+ "tok_AnnotationArguments_dummy_203" { simple Tk__tok_AnnotationArguments_dummy_203 }+ "tok_AnnotationDeclaration_dummy_202" { simple Tk__tok_AnnotationDeclaration_dummy_202 }+ "tok_AnnotationElement_dummy_201" { simple Tk__tok_AnnotationElement_dummy_201 }+ "tok_AnnotationList_dummy_200" { simple Tk__tok_AnnotationList_dummy_200 }+ "tok_AnnotationTypeElement_dummy_199" { simple Tk__tok_AnnotationTypeElement_dummy_199 }+ "tok_AnnotationTypeElementList_dummy_198" { simple Tk__tok_AnnotationTypeElementList_dummy_198 }+ "tok_Arglist_dummy_197" { simple Tk__tok_Arglist_dummy_197 }+ "tok_ArrayInitializer_dummy_196" { simple Tk__tok_ArrayInitializer_dummy_196 }+ "tok_AssignmentOp_dummy_195" { simple Tk__tok_AssignmentOp_dummy_195 }+ "tok_CatchList_dummy_194" { simple Tk__tok_CatchList_dummy_194 }+ "tok_CatchParameter_dummy_193" { simple Tk__tok_CatchParameter_dummy_193 }+ "tok_ClassDeclaration_dummy_192" { simple Tk__tok_ClassDeclaration_dummy_192 }+ "tok_ClassOrInterfaceType_dummy_191" { simple Tk__tok_ClassOrInterfaceType_dummy_191 }+ "tok_CompilationUnit_dummy_190" { simple Tk__tok_CompilationUnit_dummy_190 }+ "tok_CompilationUnitRest_dummy_189" { simple Tk__tok_CompilationUnitRest_dummy_189 }+ "tok_CompoundName_dummy_188" { simple Tk__tok_CompoundName_dummy_188 }+ "tok_CompoundNameTail_dummy_187" { simple Tk__tok_CompoundNameTail_dummy_187 }+ "tok_CreationExpression_dummy_186" { simple Tk__tok_CreationExpression_dummy_186 }+ "tok_DimExprs_dummy_185" { simple Tk__tok_DimExprs_dummy_185 }+ "tok_Dims_dummy_184" { simple Tk__tok_Dims_dummy_184 }+ "tok_DoStatement_dummy_183" { simple Tk__tok_DoStatement_dummy_183 }+ "tok_DocComment_dummy_182" { simple Tk__tok_DocComment_dummy_182 }+ "tok_ElementValue_dummy_181" { simple Tk__tok_ElementValue_dummy_181 }+ "tok_ElementValueArrayInitializer_dummy_180" { simple Tk__tok_ElementValueArrayInitializer_dummy_180 }+ "tok_EnumConstant_dummy_179" { simple Tk__tok_EnumConstant_dummy_179 }+ "tok_EnumConstantList_dummy_178" { simple Tk__tok_EnumConstantList_dummy_178 }+ "tok_EnumDeclaration_dummy_177" { simple Tk__tok_EnumDeclaration_dummy_177 }+ "tok_EqualityOp_dummy_176" { simple Tk__tok_EqualityOp_dummy_176 }+ "tok_Expression_dummy_175" { simple Tk__tok_Expression_dummy_175 }+ "tok_ExtendsList_dummy_174" { simple Tk__tok_ExtendsList_dummy_174 }+ "tok_FieldDeclaration_dummy_173" { simple Tk__tok_FieldDeclaration_dummy_173 }+ "tok_FieldDeclarationList_dummy_172" { simple Tk__tok_FieldDeclarationList_dummy_172 }+ "tok_ForEachHeader_dummy_171" { simple Tk__tok_ForEachHeader_dummy_171 }+ "tok_ForStatement_dummy_170" { simple Tk__tok_ForStatement_dummy_170 }+ "tok_IfStatement_dummy_169" { simple Tk__tok_IfStatement_dummy_169 }+ "tok_ImplementsList_dummy_168" { simple Tk__tok_ImplementsList_dummy_168 }+ "tok_ImportHead_dummy_167" { simple Tk__tok_ImportHead_dummy_167 }+ "tok_ImportList_dummy_166" { simple Tk__tok_ImportList_dummy_166 }+ "tok_ImportName_dummy_165" { simple Tk__tok_ImportName_dummy_165 }+ "tok_ImportStatement_dummy_164" { simple Tk__tok_ImportStatement_dummy_164 }+ "tok_InterfaceDeclaration_dummy_163" { simple Tk__tok_InterfaceDeclaration_dummy_163 }+ "tok_Java_dummy_206" { simple Tk__tok_Java_dummy_206 }+ "tok_LambdaBody_dummy_162" { simple Tk__tok_LambdaBody_dummy_162 }+ "tok_Literal_dummy_161" { simple Tk__tok_Literal_dummy_161 }+ "tok_LocalModifierList1_dummy_160" { simple Tk__tok_LocalModifierList1_dummy_160 }+ "tok_MemberAfterFirstId_dummy_159" { simple Tk__tok_MemberAfterFirstId_dummy_159 }+ "tok_MemberDeclaration_dummy_158" { simple Tk__tok_MemberDeclaration_dummy_158 }+ "tok_MemberRest_dummy_157" { simple Tk__tok_MemberRest_dummy_157 }+ "tok_Modifier_dummy_156" { simple Tk__tok_Modifier_dummy_156 }+ "tok_ModifierList_dummy_155" { simple Tk__tok_ModifierList_dummy_155 }+ "tok_MoreTypeSpecifier_dummy_154" { simple Tk__tok_MoreTypeSpecifier_dummy_154 }+ "tok_MoreVariableDeclarators_dummy_153" { simple Tk__tok_MoreVariableDeclarators_dummy_153 }+ "tok_MultiplicativeOp_dummy_152" { simple Tk__tok_MultiplicativeOp_dummy_152 }+ "tok_NonEmptyDims_dummy_151" { simple Tk__tok_NonEmptyDims_dummy_151 }+ "tok_NonEmptyTypeArguments_dummy_150" { simple Tk__tok_NonEmptyTypeArguments_dummy_150 }+ "tok_NonEmptyTypeParameters_dummy_149" { simple Tk__tok_NonEmptyTypeParameters_dummy_149 }+ "tok_OptDocComment_dummy_148" { simple Tk__tok_OptDocComment_dummy_148 }+ "tok_OptElsePart_dummy_147" { simple Tk__tok_OptElsePart_dummy_147 }+ "tok_OptExpression_dummy_146" { simple Tk__tok_OptExpression_dummy_146 }+ "tok_OptFinally_dummy_145" { simple Tk__tok_OptFinally_dummy_145 }+ "tok_OptId_dummy_144" { simple Tk__tok_OptId_dummy_144 }+ "tok_OptVariableInitializer_dummy_143" { simple Tk__tok_OptVariableInitializer_dummy_143 }+ "tok_Package_dummy_142" { simple Tk__tok_Package_dummy_142 }+ "tok_ParamModifierList_dummy_141" { simple Tk__tok_ParamModifierList_dummy_141 }+ "tok_Parameter_dummy_140" { simple Tk__tok_Parameter_dummy_140 }+ "tok_ParameterList_dummy_139" { simple Tk__tok_ParameterList_dummy_139 }+ "tok_PostfixOp_dummy_138" { simple Tk__tok_PostfixOp_dummy_138 }+ "tok_PrefixOp_dummy_137" { simple Tk__tok_PrefixOp_dummy_137 }+ "tok_PrimitiveTypeKeyword_dummy_136" { simple Tk__tok_PrimitiveTypeKeyword_dummy_136 }+ "tok_RelationalOp_dummy_135" { simple Tk__tok_RelationalOp_dummy_135 }+ "tok_Resource_dummy_134" { simple Tk__tok_Resource_dummy_134 }+ "tok_ResourceSpec_dummy_133" { simple Tk__tok_ResourceSpec_dummy_133 }+ "tok_ShiftOp_dummy_132" { simple Tk__tok_ShiftOp_dummy_132 }+ "tok_Statement_dummy_131" { simple Tk__tok_Statement_dummy_131 }+ "tok_StatementBlock_dummy_130" { simple Tk__tok_StatementBlock_dummy_130 }+ "tok_StatementList_dummy_129" { simple Tk__tok_StatementList_dummy_129 }+ "tok_StaticInitializer_dummy_128" { simple Tk__tok_StaticInitializer_dummy_128 }+ "tok_SwitchCaseList_dummy_127" { simple Tk__tok_SwitchCaseList_dummy_127 }+ "tok_SwitchStatement_dummy_126" { simple Tk__tok_SwitchStatement_dummy_126 }+ "tok_ThrowsClause_dummy_125" { simple Tk__tok_ThrowsClause_dummy_125 }+ "tok_TryStatement_dummy_124" { simple Tk__tok_TryStatement_dummy_124 }+ "tok_Type_dummy_123" { simple Tk__tok_Type_dummy_123 }+ "tok_TypeArgument_dummy_122" { simple Tk__tok_TypeArgument_dummy_122 }+ "tok_TypeArguments_dummy_121" { simple Tk__tok_TypeArguments_dummy_121 }+ "tok_TypeDeclRest_dummy_120" { simple Tk__tok_TypeDeclRest_dummy_120 }+ "tok_TypeDeclaration_dummy_119" { simple Tk__tok_TypeDeclaration_dummy_119 }+ "tok_TypeDeclarationList_dummy_118" { simple Tk__tok_TypeDeclarationList_dummy_118 }+ "tok_TypeParameter_dummy_117" { simple Tk__tok_TypeParameter_dummy_117 }+ "tok_TypeParameters_dummy_116" { simple Tk__tok_TypeParameters_dummy_116 }+ "tok_TypeSpecifier_dummy_115" { simple Tk__tok_TypeSpecifier_dummy_115 }+ "tok_VariableDeclaration_dummy_114" { simple Tk__tok_VariableDeclaration_dummy_114 }+ "tok_VariableDeclarator_dummy_113" { simple Tk__tok_VariableDeclarator_dummy_113 }+ "tok_VariableDeclaratorList_dummy_112" { simple Tk__tok_VariableDeclaratorList_dummy_112 }+ "tok_VariableInitializer_dummy_111" { simple Tk__tok_VariableInitializer_dummy_111 }+ "tok_VariableInitializerList_dummy_110" { simple Tk__tok_VariableInitializerList_dummy_110 }+ "tok_WhileStatement_dummy_109" { simple Tk__tok_WhileStatement_dummy_109 }+ "tok_WildcardType_dummy_108" { simple Tk__tok_WildcardType_dummy_108 }+ "~" { simple Tk__tok__tilde__84 }+ "}" { simple Tk__tok__symbol__12 }+ "||" { simple Tk__tok__pipe__pipe__66 }+ "|=" { simple Tk__tok__pipe__eql__58 }+ "|" { simple Tk__tok__pipe__48 }+ "{" { simple Tk__tok__symbol__11 }+ "while" { simple Tk__tok_while_45 } "void" { simple Tk__tok_void_28 }- "try" { simple Tk__tok_try_48 }- "true" { simple Tk__tok_true_85 }- "transient" { simple Tk__tok_transient_94 }+ "try" { simple Tk__tok_try_50 }+ "true" { simple Tk__tok_true_88 }+ "transient" { simple Tk__tok_transient_97 } "throws" { simple Tk__tok_throws_29 } "throw" { simple Tk__tok_throw_35 }- "threadsafe" { simple Tk__tok_threadsafe_93 }- "this" { simple Tk__tok_this_40 }+ "threadsafe" { simple Tk__tok_threadsafe_96 }+ "this" { simple Tk__tok_this_41 } "synchronized" { simple Tk__tok_synchronized_34 }- "switch" { simple Tk__tok_switch_50 }- "super" { simple Tk__tok_super_39 }+ "switch" { simple Tk__tok_switch_52 }+ "super" { simple Tk__tok_super_40 } "static" { simple Tk__tok_static_3 } "short" { simple Tk__tok_short_23 } "return" { simple Tk__tok_return_33 }- "public" { simple Tk__tok_public_88 }- "protected" { simple Tk__tok_protected_90 }- "private" { simple Tk__tok_private_89 }+ "public" { simple Tk__tok_public_91 }+ "protected" { simple Tk__tok_protected_93 }+ "private" { simple Tk__tok_private_92 } "package" { simple Tk__tok_package_0 }- "null" { simple Tk__tok_null_87 }- "new" { simple Tk__tok_new_84 }- "native" { simple Tk__tok_native_91 }+ "null" { simple Tk__tok_null_90 }+ "new" { simple Tk__tok_new_87 }+ "native" { simple Tk__tok_native_94 } "long" { simple Tk__tok_long_26 } "interface" { simple Tk__tok_interface_16 } "int" { simple Tk__tok_int_24 }- "instanceof" { simple Tk__tok_instanceof_74 }+ "instanceof" { simple Tk__tok_instanceof_76 } "import" { simple Tk__tok_import_2 }- "implements" { simple Tk__tok_implements_12 }- "if" { simple Tk__tok_if_42 }- "for" { simple Tk__tok_for_45 }+ "implements" { simple Tk__tok_implements_14 }+ "if" { simple Tk__tok_if_43 }+ "for" { simple Tk__tok_for_46 } "float" { simple Tk__tok_float_25 }- "finally" { simple Tk__tok_finally_47 }+ "finally" { simple Tk__tok_finally_49 } "final" { simple Tk__tok_final_31 }- "false" { simple Tk__tok_false_86 }- "extends" { simple Tk__tok_extends_11 }+ "false" { simple Tk__tok_false_89 }+ "extends" { simple Tk__tok_extends_13 } "enum" { simple Tk__tok_enum_17 }- "else" { simple Tk__tok_else_41 }+ "else" { simple Tk__tok_else_42 } "double" { simple Tk__tok_double_27 }- "do" { simple Tk__tok_do_43 }+ "do" { simple Tk__tok_do_44 } "default" { simple Tk__tok_default_30 }- "continue" { simple Tk__tok_continue_38 }- "class" { simple Tk__tok_class_13 }+ "continue" { simple Tk__tok_continue_39 }+ "class" { simple Tk__tok_class_15 } "char" { simple Tk__tok_char_22 }- "catch" { simple Tk__tok_catch_46 }- "case" { simple Tk__tok_case_49 }+ "catch" { simple Tk__tok_catch_47 }+ "case" { simple Tk__tok_case_51 } "byte" { simple Tk__tok_byte_21 }- "break" { simple Tk__tok_break_37 }+ "break" { simple Tk__tok_break_38 } "boolean" { simple Tk__tok_boolean_20 }- "abstract" { simple Tk__tok_abstract_92 }- "^=" { simple Tk__tok__symbol__eql__57 }- "^" { simple Tk__tok__symbol__66 }+ "assert" { simple Tk__tok_assert_36 }+ "abstract" { simple Tk__tok_abstract_95 }+ "^=" { simple Tk__tok__symbol__eql__60 }+ "^" { simple Tk__tok__symbol__68 } "]" { simple Tk__tok__sq_bkt_r__19 } "[" { simple Tk__tok__sq_bkt_l__18 } "@" { simple Tk__tok__symbol__6 }- "?" { simple Tk__tok__symbol__62 }- ">>>=" { simple Tk__tok__symbol__symbol__symbol__eql__61 }- ">>=" { simple Tk__tok__symbol__symbol__eql__60 }- ">=" { simple Tk__tok__symbol__eql__73 }- ">" { simple Tk__tok__symbol__71 }- "==" { simple Tk__tok__eql__eql__68 }+ "?" { simple Tk__tok__symbol__65 }+ ">>>=" { simple Tk__tok__symbol__symbol__symbol__eql__64 }+ ">>=" { simple Tk__tok__symbol__symbol__eql__63 }+ ">=" { simple Tk__tok__symbol__eql__75 }+ ">" { simple Tk__tok__symbol__73 }+ "==" { simple Tk__tok__eql__eql__70 } "=" { simple Tk__tok__eql__10 }- "<=" { simple Tk__tok__symbol__eql__72 }- "<<=" { simple Tk__tok__symbol__symbol__eql__59 }- "<<" { simple Tk__tok__symbol__symbol__75 }- "<" { simple Tk__tok__symbol__70 }+ "<=" { simple Tk__tok__symbol__eql__74 }+ "<<=" { simple Tk__tok__symbol__symbol__eql__62 }+ "<<" { simple Tk__tok__symbol__symbol__77 }+ "<" { simple Tk__tok__symbol__72 } ";" { simple Tk__tok__semi__1 }- ":" { simple Tk__tok__colon__36 }- "/=" { simple Tk__tok__symbol__eql__54 }- "/" { simple Tk__tok__symbol__78 }+ "::" { simple Tk__tok__colon__colon__86 }+ ":" { simple Tk__tok__colon__37 }+ "/=" { simple Tk__tok__symbol__eql__57 }+ "/" { simple Tk__tok__symbol__80 } "..." { simple Tk__tok__dot__dot__dot__32 } "." { simple Tk__tok__dot__4 }- "-=" { simple Tk__tok__minus__eql__52 }- "--" { simple Tk__tok__minus__minus__81 }- "-" { simple Tk__tok__minus__77 }+ "->" { simple Tk__tok__minus__symbol__53 }+ "-=" { simple Tk__tok__minus__eql__55 }+ "--" { simple Tk__tok__minus__minus__83 }+ "-" { simple Tk__tok__minus__79 } "," { simple Tk__tok__coma__9 }- "+=" { simple Tk__tok__plus__eql__51 }- "++" { simple Tk__tok__plus__plus__80 }- "+" { simple Tk__tok__plus__76 }- "*=" { simple Tk__tok__star__eql__53 }+ "+=" { simple Tk__tok__plus__eql__54 }+ "++" { simple Tk__tok__plus__plus__82 }+ "+" { simple Tk__tok__plus__78 }+ "*=" { simple Tk__tok__star__eql__56 } "*" { simple Tk__tok__star__5 } ")" { simple Tk__tok__rparen__8 } "(" { simple Tk__tok__lparen__7 }- "&=" { simple Tk__tok__symbol__eql__56 }- "&&" { simple Tk__tok__symbol__symbol__64 }- "&" { simple Tk__tok__symbol__67 }- "%=" { simple Tk__tok__symbol__eql__58 }- "%" { simple Tk__tok__symbol__79 }- "!=" { simple Tk__tok__exclamation__eql__69 }- "!" { simple Tk__tok__exclamation__83 }+ "&=" { simple Tk__tok__symbol__eql__59 }+ "&&" { simple Tk__tok__symbol__symbol__67 }+ "&" { simple Tk__tok__symbol__69 }+ "%=" { simple Tk__tok__symbol__eql__61 }+ "%" { simple Tk__tok__symbol__81 }+ "!=" { simple Tk__tok__exclamation__eql__71 }+ "!" { simple Tk__tok__exclamation__85 } ("/*" ([^\*\n]| [\n]) ([\n]| [^\*\n]| [\*] [^\/\n]| [\*] [\n])* "*/") ; ("//" [^\n]* \n) ; ([\ \t\n\r]+) ;@@ -212,6 +226,7 @@ ("$" "TypeSpecifier" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_TypeSpecifier . ((tail . dropWhile (/= ':'))) } ("$" "Type" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_Type . ((tail . dropWhile (/= ':'))) } ("$" "TypeParameter" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_TypeParameter . ((tail . dropWhile (/= ':'))) }+ ("$" "NonEmptyTypeParameters" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_NonEmptyTypeParameters . ((tail . dropWhile (/= ':'))) } ("$" "TypeParameters" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_TypeParameters . ((tail . dropWhile (/= ':'))) } ("$" "WildcardType" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_WildcardType . ((tail . dropWhile (/= ':'))) } ("$" "TypeArgument" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_TypeArgument . ((tail . dropWhile (/= ':'))) }@@ -229,12 +244,17 @@ ("$" "RelationalOp" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_RelationalOp . ((tail . dropWhile (/= ':'))) } ("$" "EqualityOp" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_EqualityOp . ((tail . dropWhile (/= ':'))) } ("$" "AssignmentOp" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_AssignmentOp . ((tail . dropWhile (/= ':'))) }+ ("$" "LambdaBody" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_LambdaBody . ((tail . dropWhile (/= ':'))) } ("$" "Expression" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_Expression . ((tail . dropWhile (/= ':'))) } ("$" "SwitchStatement" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_SwitchStatement . ((tail . dropWhile (/= ':'))) } ("$" "SwitchCaseList" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_SwitchCaseList . ((tail . dropWhile (/= ':'))) }+ ("$" "Resource" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_Resource . ((tail . dropWhile (/= ':'))) }+ ("$" "ResourceSpec" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_ResourceSpec . ((tail . dropWhile (/= ':'))) } ("$" "TryStatement" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_TryStatement . ((tail . dropWhile (/= ':'))) } ("$" "OptFinally" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_OptFinally . ((tail . dropWhile (/= ':'))) }+ ("$" "CatchParameter" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_CatchParameter . ((tail . dropWhile (/= ':'))) } ("$" "CatchList" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_CatchList . ((tail . dropWhile (/= ':'))) }+ ("$" "ForEachHeader" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_ForEachHeader . ((tail . dropWhile (/= ':'))) } ("$" "ForStatement" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_ForStatement . ((tail . dropWhile (/= ':'))) } ("$" "WhileStatement" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_WhileStatement . ((tail . dropWhile (/= ':'))) } ("$" "DoStatement" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_DoStatement . ((tail . dropWhile (/= ':'))) }@@ -248,6 +268,7 @@ ("$" "ParamModifierList" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_ParamModifierList . ((tail . dropWhile (/= ':'))) } ("$" "ParameterList" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_ParameterList . ((tail . dropWhile (/= ':'))) } ("$" "StaticInitializer" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_StaticInitializer . ((tail . dropWhile (/= ':'))) }+ ("$" "ArrayInitializer" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_ArrayInitializer . ((tail . dropWhile (/= ':'))) } ("$" "VariableInitializer" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_VariableInitializer . ((tail . dropWhile (/= ':'))) } ("$" "VariableInitializerList" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_VariableInitializerList . ((tail . dropWhile (/= ':'))) } ("$" "VariableDeclarator" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_VariableDeclarator . ((tail . dropWhile (/= ':'))) }@@ -281,6 +302,8 @@ ("$" "ClassOrInterfaceType" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_ClassOrInterfaceType . ((tail . dropWhile (/= ':'))) } ("$" "ModifierList" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_ModifierList . ((tail . dropWhile (/= ':'))) } ("$" "AnnotationList" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_AnnotationList . ((tail . dropWhile (/= ':'))) }+ ("$" "ElementValueArrayInitializer" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_ElementValueArrayInitializer . ((tail . dropWhile (/= ':'))) }+ ("$" "ElementValue" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_ElementValue . ((tail . dropWhile (/= ':'))) } ("$" "AnnotationElement" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_AnnotationElement . ((tail . dropWhile (/= ':'))) } ("$" "AnnotationArguments" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_AnnotationArguments . ((tail . dropWhile (/= ':'))) } ("$" "Annotation" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_Annotation . ((tail . dropWhile (/= ':'))) }@@ -289,8 +312,10 @@ ("$" "ImportName" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_ImportName . ((tail . dropWhile (/= ':'))) } ("$" "ImportStatement" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_ImportStatement . ((tail . dropWhile (/= ':'))) } ("$" "Package" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_Package . ((tail . dropWhile (/= ':'))) }+ ("$" "CompilationUnitRest" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_CompilationUnitRest . ((tail . dropWhile (/= ':'))) } ("$" "CompilationUnit" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_CompilationUnit . ((tail . dropWhile (/= ':'))) } ("$" "ImportList" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_ImportList . ((tail . dropWhile (/= ':'))) }+ ("$" "TypeDeclarationList" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_TypeDeclarationList . ((tail . dropWhile (/= ':'))) } ("$" "TypeDeclaration" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_TypeDeclaration . ((tail . dropWhile (/= ':'))) } ("$" "OptDocComment" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_OptDocComment . ((tail . dropWhile (/= ':'))) } ("$" "Java" ":" [a-zA-Z_] [A-Za-z0-9_]*) { simple1 $ Tk__qq_Java . ((tail . dropWhile (/= ':'))) }@@ -298,189 +323,203 @@ { data Token = EndOfFile |- Tk__tok_AdditiveOp_dummy_178 |- Tk__tok_Annotation_dummy_177 |- Tk__tok_AnnotationArguments_dummy_176 |- Tk__tok_AnnotationDeclaration_dummy_175 |- Tk__tok_AnnotationElement_dummy_174 |- Tk__tok_AnnotationList_dummy_173 |- Tk__tok_AnnotationTypeElement_dummy_172 |- Tk__tok_AnnotationTypeElementList_dummy_171 |- Tk__tok_Arglist_dummy_170 |- Tk__tok_AssignmentOp_dummy_169 |- Tk__tok_CatchList_dummy_168 |- Tk__tok_ClassDeclaration_dummy_167 |- Tk__tok_ClassOrInterfaceType_dummy_166 |- Tk__tok_CompilationUnit_dummy_165 |- Tk__tok_CompoundName_dummy_164 |- Tk__tok_CompoundNameTail_dummy_163 |- Tk__tok_CreationExpression_dummy_162 |- Tk__tok_DimExprs_dummy_161 |- Tk__tok_Dims_dummy_160 |- Tk__tok_DoStatement_dummy_159 |- Tk__tok_DocComment_dummy_158 |- Tk__tok_EnumConstant_dummy_157 |- Tk__tok_EnumConstantList_dummy_156 |- Tk__tok_EnumDeclaration_dummy_155 |- Tk__tok_EqualityOp_dummy_154 |- Tk__tok_Expression_dummy_153 |- Tk__tok_ExtendsList_dummy_152 |- Tk__tok_FieldDeclaration_dummy_151 |- Tk__tok_FieldDeclarationList_dummy_150 |- Tk__tok_ForStatement_dummy_149 |- Tk__tok_IfStatement_dummy_148 |- Tk__tok_ImplementsList_dummy_147 |- Tk__tok_ImportHead_dummy_146 |- Tk__tok_ImportList_dummy_145 |- Tk__tok_ImportName_dummy_144 |- Tk__tok_ImportStatement_dummy_143 |- Tk__tok_InterfaceDeclaration_dummy_142 |- Tk__tok_Java_dummy_179 |- Tk__tok_Literal_dummy_141 |- Tk__tok_LocalModifierList1_dummy_140 |- Tk__tok_MemberAfterFirstId_dummy_139 |- Tk__tok_MemberDeclaration_dummy_138 |- Tk__tok_MemberRest_dummy_137 |- Tk__tok_Modifier_dummy_136 |- Tk__tok_ModifierList_dummy_135 |- Tk__tok_MoreTypeSpecifier_dummy_134 |- Tk__tok_MoreVariableDeclarators_dummy_133 |- Tk__tok_MultiplicativeOp_dummy_132 |- Tk__tok_NonEmptyDims_dummy_131 |- Tk__tok_NonEmptyTypeArguments_dummy_130 |- Tk__tok_OptDocComment_dummy_129 |- Tk__tok_OptElsePart_dummy_128 |- Tk__tok_OptExpression_dummy_127 |- Tk__tok_OptFinally_dummy_126 |- Tk__tok_OptId_dummy_125 |- Tk__tok_OptVariableInitializer_dummy_124 |- Tk__tok_Package_dummy_123 |- Tk__tok_ParamModifierList_dummy_122 |- Tk__tok_Parameter_dummy_121 |- Tk__tok_ParameterList_dummy_120 |- Tk__tok_PostfixOp_dummy_119 |- Tk__tok_PrefixOp_dummy_118 |- Tk__tok_PrimitiveTypeKeyword_dummy_117 |- Tk__tok_RelationalOp_dummy_116 |- Tk__tok_ShiftOp_dummy_115 |- Tk__tok_Statement_dummy_114 |- Tk__tok_StatementBlock_dummy_113 |- Tk__tok_StatementList_dummy_112 |- Tk__tok_StaticInitializer_dummy_111 |- Tk__tok_SwitchCaseList_dummy_110 |- Tk__tok_SwitchStatement_dummy_109 |- Tk__tok_ThrowsClause_dummy_108 |- Tk__tok_TryStatement_dummy_107 |- Tk__tok_Type_dummy_106 |- Tk__tok_TypeArgument_dummy_105 |- Tk__tok_TypeArguments_dummy_104 |- Tk__tok_TypeDeclRest_dummy_103 |- Tk__tok_TypeDeclaration_dummy_102 |- Tk__tok_TypeParameter_dummy_101 |- Tk__tok_TypeParameters_dummy_100 |- Tk__tok_TypeSpecifier_dummy_99 |- Tk__tok_VariableDeclaration_dummy_98 |- Tk__tok_VariableDeclarator_dummy_97 |- Tk__tok_VariableDeclaratorList_dummy_96 |- Tk__tok_VariableInitializer_dummy_95 |- Tk__tok_VariableInitializerList_dummy_94 |- Tk__tok_WhileStatement_dummy_93 |- Tk__tok_WildcardType_dummy_92 |- Tk__tok__tilde__82 |- Tk__tok__symbol__15 |- Tk__tok__pipe__pipe__63 |- Tk__tok__pipe__eql__55 |- Tk__tok__pipe__65 |- Tk__tok__symbol__14 |- Tk__tok_while_44 |+ Tk__tok_AdditiveOp_dummy_205 |+ Tk__tok_Annotation_dummy_204 |+ Tk__tok_AnnotationArguments_dummy_203 |+ Tk__tok_AnnotationDeclaration_dummy_202 |+ Tk__tok_AnnotationElement_dummy_201 |+ Tk__tok_AnnotationList_dummy_200 |+ Tk__tok_AnnotationTypeElement_dummy_199 |+ Tk__tok_AnnotationTypeElementList_dummy_198 |+ Tk__tok_Arglist_dummy_197 |+ Tk__tok_ArrayInitializer_dummy_196 |+ Tk__tok_AssignmentOp_dummy_195 |+ Tk__tok_CatchList_dummy_194 |+ Tk__tok_CatchParameter_dummy_193 |+ Tk__tok_ClassDeclaration_dummy_192 |+ Tk__tok_ClassOrInterfaceType_dummy_191 |+ Tk__tok_CompilationUnit_dummy_190 |+ Tk__tok_CompilationUnitRest_dummy_189 |+ Tk__tok_CompoundName_dummy_188 |+ Tk__tok_CompoundNameTail_dummy_187 |+ Tk__tok_CreationExpression_dummy_186 |+ Tk__tok_DimExprs_dummy_185 |+ Tk__tok_Dims_dummy_184 |+ Tk__tok_DoStatement_dummy_183 |+ Tk__tok_DocComment_dummy_182 |+ Tk__tok_ElementValue_dummy_181 |+ Tk__tok_ElementValueArrayInitializer_dummy_180 |+ Tk__tok_EnumConstant_dummy_179 |+ Tk__tok_EnumConstantList_dummy_178 |+ Tk__tok_EnumDeclaration_dummy_177 |+ Tk__tok_EqualityOp_dummy_176 |+ Tk__tok_Expression_dummy_175 |+ Tk__tok_ExtendsList_dummy_174 |+ Tk__tok_FieldDeclaration_dummy_173 |+ Tk__tok_FieldDeclarationList_dummy_172 |+ Tk__tok_ForEachHeader_dummy_171 |+ Tk__tok_ForStatement_dummy_170 |+ Tk__tok_IfStatement_dummy_169 |+ Tk__tok_ImplementsList_dummy_168 |+ Tk__tok_ImportHead_dummy_167 |+ Tk__tok_ImportList_dummy_166 |+ Tk__tok_ImportName_dummy_165 |+ Tk__tok_ImportStatement_dummy_164 |+ Tk__tok_InterfaceDeclaration_dummy_163 |+ Tk__tok_Java_dummy_206 |+ Tk__tok_LambdaBody_dummy_162 |+ Tk__tok_Literal_dummy_161 |+ Tk__tok_LocalModifierList1_dummy_160 |+ Tk__tok_MemberAfterFirstId_dummy_159 |+ Tk__tok_MemberDeclaration_dummy_158 |+ Tk__tok_MemberRest_dummy_157 |+ Tk__tok_Modifier_dummy_156 |+ Tk__tok_ModifierList_dummy_155 |+ Tk__tok_MoreTypeSpecifier_dummy_154 |+ Tk__tok_MoreVariableDeclarators_dummy_153 |+ Tk__tok_MultiplicativeOp_dummy_152 |+ Tk__tok_NonEmptyDims_dummy_151 |+ Tk__tok_NonEmptyTypeArguments_dummy_150 |+ Tk__tok_NonEmptyTypeParameters_dummy_149 |+ Tk__tok_OptDocComment_dummy_148 |+ Tk__tok_OptElsePart_dummy_147 |+ Tk__tok_OptExpression_dummy_146 |+ Tk__tok_OptFinally_dummy_145 |+ Tk__tok_OptId_dummy_144 |+ Tk__tok_OptVariableInitializer_dummy_143 |+ Tk__tok_Package_dummy_142 |+ Tk__tok_ParamModifierList_dummy_141 |+ Tk__tok_Parameter_dummy_140 |+ Tk__tok_ParameterList_dummy_139 |+ Tk__tok_PostfixOp_dummy_138 |+ Tk__tok_PrefixOp_dummy_137 |+ Tk__tok_PrimitiveTypeKeyword_dummy_136 |+ Tk__tok_RelationalOp_dummy_135 |+ Tk__tok_Resource_dummy_134 |+ Tk__tok_ResourceSpec_dummy_133 |+ Tk__tok_ShiftOp_dummy_132 |+ Tk__tok_Statement_dummy_131 |+ Tk__tok_StatementBlock_dummy_130 |+ Tk__tok_StatementList_dummy_129 |+ Tk__tok_StaticInitializer_dummy_128 |+ Tk__tok_SwitchCaseList_dummy_127 |+ Tk__tok_SwitchStatement_dummy_126 |+ Tk__tok_ThrowsClause_dummy_125 |+ Tk__tok_TryStatement_dummy_124 |+ Tk__tok_Type_dummy_123 |+ Tk__tok_TypeArgument_dummy_122 |+ Tk__tok_TypeArguments_dummy_121 |+ Tk__tok_TypeDeclRest_dummy_120 |+ Tk__tok_TypeDeclaration_dummy_119 |+ Tk__tok_TypeDeclarationList_dummy_118 |+ Tk__tok_TypeParameter_dummy_117 |+ Tk__tok_TypeParameters_dummy_116 |+ Tk__tok_TypeSpecifier_dummy_115 |+ Tk__tok_VariableDeclaration_dummy_114 |+ Tk__tok_VariableDeclarator_dummy_113 |+ Tk__tok_VariableDeclaratorList_dummy_112 |+ Tk__tok_VariableInitializer_dummy_111 |+ Tk__tok_VariableInitializerList_dummy_110 |+ Tk__tok_WhileStatement_dummy_109 |+ Tk__tok_WildcardType_dummy_108 |+ Tk__tok__tilde__84 |+ Tk__tok__symbol__12 |+ Tk__tok__pipe__pipe__66 |+ Tk__tok__pipe__eql__58 |+ Tk__tok__pipe__48 |+ Tk__tok__symbol__11 |+ Tk__tok_while_45 | Tk__tok_void_28 |- Tk__tok_try_48 |- Tk__tok_true_85 |- Tk__tok_transient_94 |+ Tk__tok_try_50 |+ Tk__tok_true_88 |+ Tk__tok_transient_97 | Tk__tok_throws_29 | Tk__tok_throw_35 |- Tk__tok_threadsafe_93 |- Tk__tok_this_40 |+ Tk__tok_threadsafe_96 |+ Tk__tok_this_41 | Tk__tok_synchronized_34 |- Tk__tok_switch_50 |- Tk__tok_super_39 |+ Tk__tok_switch_52 |+ Tk__tok_super_40 | Tk__tok_static_3 | Tk__tok_short_23 | Tk__tok_return_33 |- Tk__tok_public_88 |- Tk__tok_protected_90 |- Tk__tok_private_89 |+ Tk__tok_public_91 |+ Tk__tok_protected_93 |+ Tk__tok_private_92 | Tk__tok_package_0 |- Tk__tok_null_87 |- Tk__tok_new_84 |- Tk__tok_native_91 |+ Tk__tok_null_90 |+ Tk__tok_new_87 |+ Tk__tok_native_94 | Tk__tok_long_26 | Tk__tok_interface_16 | Tk__tok_int_24 |- Tk__tok_instanceof_74 |+ Tk__tok_instanceof_76 | Tk__tok_import_2 |- Tk__tok_implements_12 |- Tk__tok_if_42 |- Tk__tok_for_45 |+ Tk__tok_implements_14 |+ Tk__tok_if_43 |+ Tk__tok_for_46 | Tk__tok_float_25 |- Tk__tok_finally_47 |+ Tk__tok_finally_49 | Tk__tok_final_31 |- Tk__tok_false_86 |- Tk__tok_extends_11 |+ Tk__tok_false_89 |+ Tk__tok_extends_13 | Tk__tok_enum_17 |- Tk__tok_else_41 |+ Tk__tok_else_42 | Tk__tok_double_27 |- Tk__tok_do_43 |+ Tk__tok_do_44 | Tk__tok_default_30 |- Tk__tok_continue_38 |- Tk__tok_class_13 |+ Tk__tok_continue_39 |+ Tk__tok_class_15 | Tk__tok_char_22 |- Tk__tok_catch_46 |- Tk__tok_case_49 |+ Tk__tok_catch_47 |+ Tk__tok_case_51 | Tk__tok_byte_21 |- Tk__tok_break_37 |+ Tk__tok_break_38 | Tk__tok_boolean_20 |- Tk__tok_abstract_92 |- Tk__tok__symbol__eql__57 |- Tk__tok__symbol__66 |+ Tk__tok_assert_36 |+ Tk__tok_abstract_95 |+ Tk__tok__symbol__eql__60 |+ Tk__tok__symbol__68 | Tk__tok__sq_bkt_r__19 | Tk__tok__sq_bkt_l__18 | Tk__tok__symbol__6 |- Tk__tok__symbol__62 |- Tk__tok__symbol__symbol__symbol__eql__61 |- Tk__tok__symbol__symbol__eql__60 |- Tk__tok__symbol__eql__73 |- Tk__tok__symbol__71 |- Tk__tok__eql__eql__68 |+ Tk__tok__symbol__65 |+ Tk__tok__symbol__symbol__symbol__eql__64 |+ Tk__tok__symbol__symbol__eql__63 |+ Tk__tok__symbol__eql__75 |+ Tk__tok__symbol__73 |+ Tk__tok__eql__eql__70 | Tk__tok__eql__10 |- Tk__tok__symbol__eql__72 |- Tk__tok__symbol__symbol__eql__59 |- Tk__tok__symbol__symbol__75 |- Tk__tok__symbol__70 |+ Tk__tok__symbol__eql__74 |+ Tk__tok__symbol__symbol__eql__62 |+ Tk__tok__symbol__symbol__77 |+ Tk__tok__symbol__72 | Tk__tok__semi__1 |- Tk__tok__colon__36 |- Tk__tok__symbol__eql__54 |- Tk__tok__symbol__78 |+ Tk__tok__colon__colon__86 |+ Tk__tok__colon__37 |+ Tk__tok__symbol__eql__57 |+ Tk__tok__symbol__80 | Tk__tok__dot__dot__dot__32 | Tk__tok__dot__4 |- Tk__tok__minus__eql__52 |- Tk__tok__minus__minus__81 |- Tk__tok__minus__77 |+ Tk__tok__minus__symbol__53 |+ Tk__tok__minus__eql__55 |+ Tk__tok__minus__minus__83 |+ Tk__tok__minus__79 | Tk__tok__coma__9 |- Tk__tok__plus__eql__51 |- Tk__tok__plus__plus__80 |- Tk__tok__plus__76 |- Tk__tok__star__eql__53 |+ Tk__tok__plus__eql__54 |+ Tk__tok__plus__plus__82 |+ Tk__tok__plus__78 |+ Tk__tok__star__eql__56 | Tk__tok__star__5 | Tk__tok__rparen__8 | Tk__tok__lparen__7 |- Tk__tok__symbol__eql__56 |- Tk__tok__symbol__symbol__64 |- Tk__tok__symbol__67 |- Tk__tok__symbol__eql__58 |- Tk__tok__symbol__79 |- Tk__tok__exclamation__eql__69 |- Tk__tok__exclamation__83 |+ Tk__tok__symbol__eql__59 |+ Tk__tok__symbol__symbol__67 |+ Tk__tok__symbol__69 |+ Tk__tok__symbol__eql__61 |+ Tk__tok__symbol__81 |+ Tk__tok__exclamation__eql__71 |+ Tk__tok__exclamation__85 | Tk__doccomment String | Tk__id String | Tk__string String |@@ -495,6 +534,7 @@ Tk__qq_TypeSpecifier String | Tk__qq_Type String | Tk__qq_TypeParameter String |+ Tk__qq_NonEmptyTypeParameters String | Tk__qq_TypeParameters String | Tk__qq_WildcardType String | Tk__qq_TypeArgument String |@@ -512,12 +552,17 @@ Tk__qq_RelationalOp String | Tk__qq_EqualityOp String | Tk__qq_AssignmentOp String |+ Tk__qq_LambdaBody String | Tk__qq_Expression String | Tk__qq_SwitchStatement String | Tk__qq_SwitchCaseList String |+ Tk__qq_Resource String |+ Tk__qq_ResourceSpec String | Tk__qq_TryStatement String | Tk__qq_OptFinally String |+ Tk__qq_CatchParameter String | Tk__qq_CatchList String |+ Tk__qq_ForEachHeader String | Tk__qq_ForStatement String | Tk__qq_WhileStatement String | Tk__qq_DoStatement String |@@ -531,6 +576,7 @@ Tk__qq_ParamModifierList String | Tk__qq_ParameterList String | Tk__qq_StaticInitializer String |+ Tk__qq_ArrayInitializer String | Tk__qq_VariableInitializer String | Tk__qq_VariableInitializerList String | Tk__qq_VariableDeclarator String |@@ -564,6 +610,8 @@ Tk__qq_ClassOrInterfaceType String | Tk__qq_ModifierList String | Tk__qq_AnnotationList String |+ Tk__qq_ElementValueArrayInitializer String |+ Tk__qq_ElementValue String | Tk__qq_AnnotationElement String | Tk__qq_AnnotationArguments String | Tk__qq_Annotation String |@@ -572,8 +620,10 @@ Tk__qq_ImportName String | Tk__qq_ImportStatement String | Tk__qq_Package String |+ Tk__qq_CompilationUnitRest String | Tk__qq_CompilationUnit String | Tk__qq_ImportList String |+ Tk__qq_TypeDeclarationList String | Tk__qq_TypeDeclaration String | Tk__qq_OptDocComment String | Tk__qq_Java String
test/golden/java/JavaParser.y view
@@ -14,2953 +14,3314 @@ %token rtk__eof { L.PosToken _ L.EndOfFile }-tok_AdditiveOp_dummy_178 { L.PosToken _ L.Tk__tok_AdditiveOp_dummy_178 }-tok_Annotation_dummy_177 { L.PosToken _ L.Tk__tok_Annotation_dummy_177 }-tok_AnnotationArguments_dummy_176 { L.PosToken _ L.Tk__tok_AnnotationArguments_dummy_176 }-tok_AnnotationDeclaration_dummy_175 { L.PosToken _ L.Tk__tok_AnnotationDeclaration_dummy_175 }-tok_AnnotationElement_dummy_174 { L.PosToken _ L.Tk__tok_AnnotationElement_dummy_174 }-tok_AnnotationList_dummy_173 { L.PosToken _ L.Tk__tok_AnnotationList_dummy_173 }-tok_AnnotationTypeElement_dummy_172 { L.PosToken _ L.Tk__tok_AnnotationTypeElement_dummy_172 }-tok_AnnotationTypeElementList_dummy_171 { L.PosToken _ L.Tk__tok_AnnotationTypeElementList_dummy_171 }-tok_Arglist_dummy_170 { L.PosToken _ L.Tk__tok_Arglist_dummy_170 }-tok_AssignmentOp_dummy_169 { L.PosToken _ L.Tk__tok_AssignmentOp_dummy_169 }-tok_CatchList_dummy_168 { L.PosToken _ L.Tk__tok_CatchList_dummy_168 }-tok_ClassDeclaration_dummy_167 { L.PosToken _ L.Tk__tok_ClassDeclaration_dummy_167 }-tok_ClassOrInterfaceType_dummy_166 { L.PosToken _ L.Tk__tok_ClassOrInterfaceType_dummy_166 }-tok_CompilationUnit_dummy_165 { L.PosToken _ L.Tk__tok_CompilationUnit_dummy_165 }-tok_CompoundName_dummy_164 { L.PosToken _ L.Tk__tok_CompoundName_dummy_164 }-tok_CompoundNameTail_dummy_163 { L.PosToken _ L.Tk__tok_CompoundNameTail_dummy_163 }-tok_CreationExpression_dummy_162 { L.PosToken _ L.Tk__tok_CreationExpression_dummy_162 }-tok_DimExprs_dummy_161 { L.PosToken _ L.Tk__tok_DimExprs_dummy_161 }-tok_Dims_dummy_160 { L.PosToken _ L.Tk__tok_Dims_dummy_160 }-tok_DoStatement_dummy_159 { L.PosToken _ L.Tk__tok_DoStatement_dummy_159 }-tok_DocComment_dummy_158 { L.PosToken _ L.Tk__tok_DocComment_dummy_158 }-tok_EnumConstant_dummy_157 { L.PosToken _ L.Tk__tok_EnumConstant_dummy_157 }-tok_EnumConstantList_dummy_156 { L.PosToken _ L.Tk__tok_EnumConstantList_dummy_156 }-tok_EnumDeclaration_dummy_155 { L.PosToken _ L.Tk__tok_EnumDeclaration_dummy_155 }-tok_EqualityOp_dummy_154 { L.PosToken _ L.Tk__tok_EqualityOp_dummy_154 }-tok_Expression_dummy_153 { L.PosToken _ L.Tk__tok_Expression_dummy_153 }-tok_ExtendsList_dummy_152 { L.PosToken _ L.Tk__tok_ExtendsList_dummy_152 }-tok_FieldDeclaration_dummy_151 { L.PosToken _ L.Tk__tok_FieldDeclaration_dummy_151 }-tok_FieldDeclarationList_dummy_150 { L.PosToken _ L.Tk__tok_FieldDeclarationList_dummy_150 }-tok_ForStatement_dummy_149 { L.PosToken _ L.Tk__tok_ForStatement_dummy_149 }-tok_IfStatement_dummy_148 { L.PosToken _ L.Tk__tok_IfStatement_dummy_148 }-tok_ImplementsList_dummy_147 { L.PosToken _ L.Tk__tok_ImplementsList_dummy_147 }-tok_ImportHead_dummy_146 { L.PosToken _ L.Tk__tok_ImportHead_dummy_146 }-tok_ImportList_dummy_145 { L.PosToken _ L.Tk__tok_ImportList_dummy_145 }-tok_ImportName_dummy_144 { L.PosToken _ L.Tk__tok_ImportName_dummy_144 }-tok_ImportStatement_dummy_143 { L.PosToken _ L.Tk__tok_ImportStatement_dummy_143 }-tok_InterfaceDeclaration_dummy_142 { L.PosToken _ L.Tk__tok_InterfaceDeclaration_dummy_142 }-tok_Java_dummy_179 { L.PosToken _ L.Tk__tok_Java_dummy_179 }-tok_Literal_dummy_141 { L.PosToken _ L.Tk__tok_Literal_dummy_141 }-tok_LocalModifierList1_dummy_140 { L.PosToken _ L.Tk__tok_LocalModifierList1_dummy_140 }-tok_MemberAfterFirstId_dummy_139 { L.PosToken _ L.Tk__tok_MemberAfterFirstId_dummy_139 }-tok_MemberDeclaration_dummy_138 { L.PosToken _ L.Tk__tok_MemberDeclaration_dummy_138 }-tok_MemberRest_dummy_137 { L.PosToken _ L.Tk__tok_MemberRest_dummy_137 }-tok_Modifier_dummy_136 { L.PosToken _ L.Tk__tok_Modifier_dummy_136 }-tok_ModifierList_dummy_135 { L.PosToken _ L.Tk__tok_ModifierList_dummy_135 }-tok_MoreTypeSpecifier_dummy_134 { L.PosToken _ L.Tk__tok_MoreTypeSpecifier_dummy_134 }-tok_MoreVariableDeclarators_dummy_133 { L.PosToken _ L.Tk__tok_MoreVariableDeclarators_dummy_133 }-tok_MultiplicativeOp_dummy_132 { L.PosToken _ L.Tk__tok_MultiplicativeOp_dummy_132 }-tok_NonEmptyDims_dummy_131 { L.PosToken _ L.Tk__tok_NonEmptyDims_dummy_131 }-tok_NonEmptyTypeArguments_dummy_130 { L.PosToken _ L.Tk__tok_NonEmptyTypeArguments_dummy_130 }-tok_OptDocComment_dummy_129 { L.PosToken _ L.Tk__tok_OptDocComment_dummy_129 }-tok_OptElsePart_dummy_128 { L.PosToken _ L.Tk__tok_OptElsePart_dummy_128 }-tok_OptExpression_dummy_127 { L.PosToken _ L.Tk__tok_OptExpression_dummy_127 }-tok_OptFinally_dummy_126 { L.PosToken _ L.Tk__tok_OptFinally_dummy_126 }-tok_OptId_dummy_125 { L.PosToken _ L.Tk__tok_OptId_dummy_125 }-tok_OptVariableInitializer_dummy_124 { L.PosToken _ L.Tk__tok_OptVariableInitializer_dummy_124 }-tok_Package_dummy_123 { L.PosToken _ L.Tk__tok_Package_dummy_123 }-tok_ParamModifierList_dummy_122 { L.PosToken _ L.Tk__tok_ParamModifierList_dummy_122 }-tok_Parameter_dummy_121 { L.PosToken _ L.Tk__tok_Parameter_dummy_121 }-tok_ParameterList_dummy_120 { L.PosToken _ L.Tk__tok_ParameterList_dummy_120 }-tok_PostfixOp_dummy_119 { L.PosToken _ L.Tk__tok_PostfixOp_dummy_119 }-tok_PrefixOp_dummy_118 { L.PosToken _ L.Tk__tok_PrefixOp_dummy_118 }-tok_PrimitiveTypeKeyword_dummy_117 { L.PosToken _ L.Tk__tok_PrimitiveTypeKeyword_dummy_117 }-tok_RelationalOp_dummy_116 { L.PosToken _ L.Tk__tok_RelationalOp_dummy_116 }-tok_ShiftOp_dummy_115 { L.PosToken _ L.Tk__tok_ShiftOp_dummy_115 }-tok_Statement_dummy_114 { L.PosToken _ L.Tk__tok_Statement_dummy_114 }-tok_StatementBlock_dummy_113 { L.PosToken _ L.Tk__tok_StatementBlock_dummy_113 }-tok_StatementList_dummy_112 { L.PosToken _ L.Tk__tok_StatementList_dummy_112 }-tok_StaticInitializer_dummy_111 { L.PosToken _ L.Tk__tok_StaticInitializer_dummy_111 }-tok_SwitchCaseList_dummy_110 { L.PosToken _ L.Tk__tok_SwitchCaseList_dummy_110 }-tok_SwitchStatement_dummy_109 { L.PosToken _ L.Tk__tok_SwitchStatement_dummy_109 }-tok_ThrowsClause_dummy_108 { L.PosToken _ L.Tk__tok_ThrowsClause_dummy_108 }-tok_TryStatement_dummy_107 { L.PosToken _ L.Tk__tok_TryStatement_dummy_107 }-tok_Type_dummy_106 { L.PosToken _ L.Tk__tok_Type_dummy_106 }-tok_TypeArgument_dummy_105 { L.PosToken _ L.Tk__tok_TypeArgument_dummy_105 }-tok_TypeArguments_dummy_104 { L.PosToken _ L.Tk__tok_TypeArguments_dummy_104 }-tok_TypeDeclRest_dummy_103 { L.PosToken _ L.Tk__tok_TypeDeclRest_dummy_103 }-tok_TypeDeclaration_dummy_102 { L.PosToken _ L.Tk__tok_TypeDeclaration_dummy_102 }-tok_TypeParameter_dummy_101 { L.PosToken _ L.Tk__tok_TypeParameter_dummy_101 }-tok_TypeParameters_dummy_100 { L.PosToken _ L.Tk__tok_TypeParameters_dummy_100 }-tok_TypeSpecifier_dummy_99 { L.PosToken _ L.Tk__tok_TypeSpecifier_dummy_99 }-tok_VariableDeclaration_dummy_98 { L.PosToken _ L.Tk__tok_VariableDeclaration_dummy_98 }-tok_VariableDeclarator_dummy_97 { L.PosToken _ L.Tk__tok_VariableDeclarator_dummy_97 }-tok_VariableDeclaratorList_dummy_96 { L.PosToken _ L.Tk__tok_VariableDeclaratorList_dummy_96 }-tok_VariableInitializer_dummy_95 { L.PosToken _ L.Tk__tok_VariableInitializer_dummy_95 }-tok_VariableInitializerList_dummy_94 { L.PosToken _ L.Tk__tok_VariableInitializerList_dummy_94 }-tok_WhileStatement_dummy_93 { L.PosToken _ L.Tk__tok_WhileStatement_dummy_93 }-tok_WildcardType_dummy_92 { L.PosToken _ L.Tk__tok_WildcardType_dummy_92 }-tok__tilde__82 { L.PosToken _ L.Tk__tok__tilde__82 }-tok__symbol__15 { L.PosToken _ L.Tk__tok__symbol__15 }-tok__pipe__pipe__63 { L.PosToken _ L.Tk__tok__pipe__pipe__63 }-tok__pipe__eql__55 { L.PosToken _ L.Tk__tok__pipe__eql__55 }-tok__pipe__65 { L.PosToken _ L.Tk__tok__pipe__65 }-tok__symbol__14 { L.PosToken _ L.Tk__tok__symbol__14 }-tok_while_44 { L.PosToken _ L.Tk__tok_while_44 }-tok_void_28 { L.PosToken _ L.Tk__tok_void_28 }-tok_try_48 { L.PosToken _ L.Tk__tok_try_48 }-tok_true_85 { L.PosToken _ L.Tk__tok_true_85 }-tok_transient_94 { L.PosToken _ L.Tk__tok_transient_94 }-tok_throws_29 { L.PosToken _ L.Tk__tok_throws_29 }-tok_throw_35 { L.PosToken _ L.Tk__tok_throw_35 }-tok_threadsafe_93 { L.PosToken _ L.Tk__tok_threadsafe_93 }-tok_this_40 { L.PosToken _ L.Tk__tok_this_40 }-tok_synchronized_34 { L.PosToken _ L.Tk__tok_synchronized_34 }-tok_switch_50 { L.PosToken _ L.Tk__tok_switch_50 }-tok_super_39 { L.PosToken _ L.Tk__tok_super_39 }-tok_static_3 { L.PosToken _ L.Tk__tok_static_3 }-tok_short_23 { L.PosToken _ L.Tk__tok_short_23 }-tok_return_33 { L.PosToken _ L.Tk__tok_return_33 }-tok_public_88 { L.PosToken _ L.Tk__tok_public_88 }-tok_protected_90 { L.PosToken _ L.Tk__tok_protected_90 }-tok_private_89 { L.PosToken _ L.Tk__tok_private_89 }-tok_package_0 { L.PosToken _ L.Tk__tok_package_0 }-tok_null_87 { L.PosToken _ L.Tk__tok_null_87 }-tok_new_84 { L.PosToken _ L.Tk__tok_new_84 }-tok_native_91 { L.PosToken _ L.Tk__tok_native_91 }-tok_long_26 { L.PosToken _ L.Tk__tok_long_26 }-tok_interface_16 { L.PosToken _ L.Tk__tok_interface_16 }-tok_int_24 { L.PosToken _ L.Tk__tok_int_24 }-tok_instanceof_74 { L.PosToken _ L.Tk__tok_instanceof_74 }-tok_import_2 { L.PosToken _ L.Tk__tok_import_2 }-tok_implements_12 { L.PosToken _ L.Tk__tok_implements_12 }-tok_if_42 { L.PosToken _ L.Tk__tok_if_42 }-tok_for_45 { L.PosToken _ L.Tk__tok_for_45 }-tok_float_25 { L.PosToken _ L.Tk__tok_float_25 }-tok_finally_47 { L.PosToken _ L.Tk__tok_finally_47 }-tok_final_31 { L.PosToken _ L.Tk__tok_final_31 }-tok_false_86 { L.PosToken _ L.Tk__tok_false_86 }-tok_extends_11 { L.PosToken _ L.Tk__tok_extends_11 }-tok_enum_17 { L.PosToken _ L.Tk__tok_enum_17 }-tok_else_41 { L.PosToken _ L.Tk__tok_else_41 }-tok_double_27 { L.PosToken _ L.Tk__tok_double_27 }-tok_do_43 { L.PosToken _ L.Tk__tok_do_43 }-tok_default_30 { L.PosToken _ L.Tk__tok_default_30 }-tok_continue_38 { L.PosToken _ L.Tk__tok_continue_38 }-tok_class_13 { L.PosToken _ L.Tk__tok_class_13 }-tok_char_22 { L.PosToken _ L.Tk__tok_char_22 }-tok_catch_46 { L.PosToken _ L.Tk__tok_catch_46 }-tok_case_49 { L.PosToken _ L.Tk__tok_case_49 }-tok_byte_21 { L.PosToken _ L.Tk__tok_byte_21 }-tok_break_37 { L.PosToken _ L.Tk__tok_break_37 }-tok_boolean_20 { L.PosToken _ L.Tk__tok_boolean_20 }-tok_abstract_92 { L.PosToken _ L.Tk__tok_abstract_92 }-tok__symbol__eql__57 { L.PosToken _ L.Tk__tok__symbol__eql__57 }-tok__symbol__66 { L.PosToken _ L.Tk__tok__symbol__66 }-tok__sq_bkt_r__19 { L.PosToken _ L.Tk__tok__sq_bkt_r__19 }-tok__sq_bkt_l__18 { L.PosToken _ L.Tk__tok__sq_bkt_l__18 }-tok__symbol__6 { L.PosToken _ L.Tk__tok__symbol__6 }-tok__symbol__62 { L.PosToken _ L.Tk__tok__symbol__62 }-tok__symbol__symbol__symbol__eql__61 { L.PosToken _ L.Tk__tok__symbol__symbol__symbol__eql__61 }-tok__symbol__symbol__eql__60 { L.PosToken _ L.Tk__tok__symbol__symbol__eql__60 }-tok__symbol__eql__73 { L.PosToken _ L.Tk__tok__symbol__eql__73 }-tok__symbol__71 { L.PosToken _ L.Tk__tok__symbol__71 }-tok__eql__eql__68 { L.PosToken _ L.Tk__tok__eql__eql__68 }-tok__eql__10 { L.PosToken _ L.Tk__tok__eql__10 }-tok__symbol__eql__72 { L.PosToken _ L.Tk__tok__symbol__eql__72 }-tok__symbol__symbol__eql__59 { L.PosToken _ L.Tk__tok__symbol__symbol__eql__59 }-tok__symbol__symbol__75 { L.PosToken _ L.Tk__tok__symbol__symbol__75 }-tok__symbol__70 { L.PosToken _ L.Tk__tok__symbol__70 }-tok__semi__1 { L.PosToken _ L.Tk__tok__semi__1 }-tok__colon__36 { L.PosToken _ L.Tk__tok__colon__36 }-tok__symbol__eql__54 { L.PosToken _ L.Tk__tok__symbol__eql__54 }-tok__symbol__78 { L.PosToken _ L.Tk__tok__symbol__78 }-tok__dot__dot__dot__32 { L.PosToken _ L.Tk__tok__dot__dot__dot__32 }-tok__dot__4 { L.PosToken _ L.Tk__tok__dot__4 }-tok__minus__eql__52 { L.PosToken _ L.Tk__tok__minus__eql__52 }-tok__minus__minus__81 { L.PosToken _ L.Tk__tok__minus__minus__81 }-tok__minus__77 { L.PosToken _ L.Tk__tok__minus__77 }-tok__coma__9 { L.PosToken _ L.Tk__tok__coma__9 }-tok__plus__eql__51 { L.PosToken _ L.Tk__tok__plus__eql__51 }-tok__plus__plus__80 { L.PosToken _ L.Tk__tok__plus__plus__80 }-tok__plus__76 { L.PosToken _ L.Tk__tok__plus__76 }-tok__star__eql__53 { L.PosToken _ L.Tk__tok__star__eql__53 }-tok__star__5 { L.PosToken _ L.Tk__tok__star__5 }-tok__rparen__8 { L.PosToken _ L.Tk__tok__rparen__8 }-tok__lparen__7 { L.PosToken _ L.Tk__tok__lparen__7 }-tok__symbol__eql__56 { L.PosToken _ L.Tk__tok__symbol__eql__56 }-tok__symbol__symbol__64 { L.PosToken _ L.Tk__tok__symbol__symbol__64 }-tok__symbol__67 { L.PosToken _ L.Tk__tok__symbol__67 }-tok__symbol__eql__58 { L.PosToken _ L.Tk__tok__symbol__eql__58 }-tok__symbol__79 { L.PosToken _ L.Tk__tok__symbol__79 }-tok__exclamation__eql__69 { L.PosToken _ L.Tk__tok__exclamation__eql__69 }-tok__exclamation__83 { L.PosToken _ L.Tk__tok__exclamation__83 }-doccomment { L.PosToken _ (L.Tk__doccomment _) }-id { L.PosToken _ (L.Tk__id _) }-string { L.PosToken _ (L.Tk__string _) }-char { L.PosToken _ (L.Tk__char _) }-floatTypeSuffix { L.PosToken _ (L.Tk__floatTypeSuffix _) }-exponentPart { L.PosToken _ (L.Tk__exponentPart _) }-floatLiteral { L.PosToken _ (L.Tk__floatLiteral _) }-integerLiteral { L.PosToken _ (L.Tk__integerLiteral _) }-qq_CompoundName { L.PosToken _ (L.Tk__qq_CompoundName _) }-qq_CompoundNameTail { L.PosToken _ (L.Tk__qq_CompoundNameTail _) }-qq_Modifier { L.PosToken _ (L.Tk__qq_Modifier _) }-qq_TypeSpecifier { L.PosToken _ (L.Tk__qq_TypeSpecifier _) }-qq_Type { L.PosToken _ (L.Tk__qq_Type _) }-qq_TypeParameter { L.PosToken _ (L.Tk__qq_TypeParameter _) }-qq_TypeParameters { L.PosToken _ (L.Tk__qq_TypeParameters _) }-qq_WildcardType { L.PosToken _ (L.Tk__qq_WildcardType _) }-qq_TypeArgument { L.PosToken _ (L.Tk__qq_TypeArgument _) }-qq_NonEmptyTypeArguments { L.PosToken _ (L.Tk__qq_NonEmptyTypeArguments _) }-qq_TypeArguments { L.PosToken _ (L.Tk__qq_TypeArguments _) }-qq_Arglist { L.PosToken _ (L.Tk__qq_Arglist _) }-qq_Literal { L.PosToken _ (L.Tk__qq_Literal _) }-qq_DimExprs { L.PosToken _ (L.Tk__qq_DimExprs _) }-qq_CreationExpression { L.PosToken _ (L.Tk__qq_CreationExpression _) }-qq_PostfixOp { L.PosToken _ (L.Tk__qq_PostfixOp _) }-qq_PrefixOp { L.PosToken _ (L.Tk__qq_PrefixOp _) }-qq_MultiplicativeOp { L.PosToken _ (L.Tk__qq_MultiplicativeOp _) }-qq_AdditiveOp { L.PosToken _ (L.Tk__qq_AdditiveOp _) }-qq_ShiftOp { L.PosToken _ (L.Tk__qq_ShiftOp _) }-qq_RelationalOp { L.PosToken _ (L.Tk__qq_RelationalOp _) }-qq_EqualityOp { L.PosToken _ (L.Tk__qq_EqualityOp _) }-qq_AssignmentOp { L.PosToken _ (L.Tk__qq_AssignmentOp _) }-qq_Expression { L.PosToken _ (L.Tk__qq_Expression _) }-qq_SwitchStatement { L.PosToken _ (L.Tk__qq_SwitchStatement _) }-qq_SwitchCaseList { L.PosToken _ (L.Tk__qq_SwitchCaseList _) }-qq_TryStatement { L.PosToken _ (L.Tk__qq_TryStatement _) }-qq_OptFinally { L.PosToken _ (L.Tk__qq_OptFinally _) }-qq_CatchList { L.PosToken _ (L.Tk__qq_CatchList _) }-qq_ForStatement { L.PosToken _ (L.Tk__qq_ForStatement _) }-qq_WhileStatement { L.PosToken _ (L.Tk__qq_WhileStatement _) }-qq_DoStatement { L.PosToken _ (L.Tk__qq_DoStatement _) }-qq_IfStatement { L.PosToken _ (L.Tk__qq_IfStatement _) }-qq_OptElsePart { L.PosToken _ (L.Tk__qq_OptElsePart _) }-qq_Statement { L.PosToken _ (L.Tk__qq_Statement _) }-qq_OptId { L.PosToken _ (L.Tk__qq_OptId _) }-qq_OptExpression { L.PosToken _ (L.Tk__qq_OptExpression _) }-qq_StatementList { L.PosToken _ (L.Tk__qq_StatementList _) }-qq_Parameter { L.PosToken _ (L.Tk__qq_Parameter _) }-qq_ParamModifierList { L.PosToken _ (L.Tk__qq_ParamModifierList _) }-qq_ParameterList { L.PosToken _ (L.Tk__qq_ParameterList _) }-qq_StaticInitializer { L.PosToken _ (L.Tk__qq_StaticInitializer _) }-qq_VariableInitializer { L.PosToken _ (L.Tk__qq_VariableInitializer _) }-qq_VariableInitializerList { L.PosToken _ (L.Tk__qq_VariableInitializerList _) }-qq_VariableDeclarator { L.PosToken _ (L.Tk__qq_VariableDeclarator _) }-qq_OptVariableInitializer { L.PosToken _ (L.Tk__qq_OptVariableInitializer _) }-qq_LocalModifierList1 { L.PosToken _ (L.Tk__qq_LocalModifierList1 _) }-qq_VariableDeclaration { L.PosToken _ (L.Tk__qq_VariableDeclaration _) }-qq_VariableDeclaratorList { L.PosToken _ (L.Tk__qq_VariableDeclaratorList _) }-qq_StatementBlock { L.PosToken _ (L.Tk__qq_StatementBlock _) }-qq_MoreVariableDeclarators { L.PosToken _ (L.Tk__qq_MoreVariableDeclarators _) }-qq_MemberRest { L.PosToken _ (L.Tk__qq_MemberRest _) }-qq_ThrowsClause { L.PosToken _ (L.Tk__qq_ThrowsClause _) }-qq_MoreTypeSpecifier { L.PosToken _ (L.Tk__qq_MoreTypeSpecifier _) }-qq_MemberAfterFirstId { L.PosToken _ (L.Tk__qq_MemberAfterFirstId _) }-qq_PrimitiveTypeKeyword { L.PosToken _ (L.Tk__qq_PrimitiveTypeKeyword _) }-qq_MemberDeclaration { L.PosToken _ (L.Tk__qq_MemberDeclaration _) }-qq_NonEmptyDims { L.PosToken _ (L.Tk__qq_NonEmptyDims _) }-qq_Dims { L.PosToken _ (L.Tk__qq_Dims _) }-qq_FieldDeclaration { L.PosToken _ (L.Tk__qq_FieldDeclaration _) }-qq_TypeDeclRest { L.PosToken _ (L.Tk__qq_TypeDeclRest _) }-qq_EnumDeclaration { L.PosToken _ (L.Tk__qq_EnumDeclaration _) }-qq_EnumConstantList { L.PosToken _ (L.Tk__qq_EnumConstantList _) }-qq_EnumConstant { L.PosToken _ (L.Tk__qq_EnumConstant _) }-qq_AnnotationTypeElement { L.PosToken _ (L.Tk__qq_AnnotationTypeElement _) }-qq_AnnotationTypeElementList { L.PosToken _ (L.Tk__qq_AnnotationTypeElementList _) }-qq_AnnotationDeclaration { L.PosToken _ (L.Tk__qq_AnnotationDeclaration _) }-qq_InterfaceDeclaration { L.PosToken _ (L.Tk__qq_InterfaceDeclaration _) }-qq_ClassDeclaration { L.PosToken _ (L.Tk__qq_ClassDeclaration _) }-qq_FieldDeclarationList { L.PosToken _ (L.Tk__qq_FieldDeclarationList _) }-qq_ImplementsList { L.PosToken _ (L.Tk__qq_ImplementsList _) }-qq_ExtendsList { L.PosToken _ (L.Tk__qq_ExtendsList _) }-qq_ClassOrInterfaceType { L.PosToken _ (L.Tk__qq_ClassOrInterfaceType _) }-qq_ModifierList { L.PosToken _ (L.Tk__qq_ModifierList _) }-qq_AnnotationList { L.PosToken _ (L.Tk__qq_AnnotationList _) }-qq_AnnotationElement { L.PosToken _ (L.Tk__qq_AnnotationElement _) }-qq_AnnotationArguments { L.PosToken _ (L.Tk__qq_AnnotationArguments _) }-qq_Annotation { L.PosToken _ (L.Tk__qq_Annotation _) }-qq_DocComment { L.PosToken _ (L.Tk__qq_DocComment _) }-qq_ImportHead { L.PosToken _ (L.Tk__qq_ImportHead _) }-qq_ImportName { L.PosToken _ (L.Tk__qq_ImportName _) }-qq_ImportStatement { L.PosToken _ (L.Tk__qq_ImportStatement _) }-qq_Package { L.PosToken _ (L.Tk__qq_Package _) }-qq_CompilationUnit { L.PosToken _ (L.Tk__qq_CompilationUnit _) }-qq_ImportList { L.PosToken _ (L.Tk__qq_ImportList _) }-qq_TypeDeclaration { L.PosToken _ (L.Tk__qq_TypeDeclaration _) }-qq_OptDocComment { L.PosToken _ (L.Tk__qq_OptDocComment _) }-qq_Java { L.PosToken _ (L.Tk__qq_Java _) }--%%--Java__top : Java rtk__eof { $1 }--Java : tok_Java_dummy_179 Java tok_Java_dummy_179 { Ctr__Java__0 (rtkPosOf $1) $2 } |- tok_AdditiveOp_dummy_178 AdditiveOp tok_AdditiveOp_dummy_178 { Ctr__Java__1 (rtkPosOf $1) $2 } |- tok_Annotation_dummy_177 Annotation tok_Annotation_dummy_177 { Ctr__Java__2 (rtkPosOf $1) $2 } |- tok_AnnotationArguments_dummy_176 AnnotationArguments tok_AnnotationArguments_dummy_176 { Ctr__Java__3 (rtkPosOf $1) $2 } |- tok_AnnotationDeclaration_dummy_175 AnnotationDeclaration tok_AnnotationDeclaration_dummy_175 { Ctr__Java__4 (rtkPosOf $1) $2 } |- tok_AnnotationElement_dummy_174 AnnotationElement tok_AnnotationElement_dummy_174 { Ctr__Java__5 (rtkPosOf $1) $2 } |- tok_AnnotationList_dummy_173 AnnotationList tok_AnnotationList_dummy_173 { Ctr__Java__6 (rtkPosOf $1) (reverse $2) } |- tok_AnnotationTypeElement_dummy_172 AnnotationTypeElement tok_AnnotationTypeElement_dummy_172 { Ctr__Java__7 (rtkPosOf $1) $2 } |- tok_AnnotationTypeElementList_dummy_171 AnnotationTypeElementList tok_AnnotationTypeElementList_dummy_171 { Ctr__Java__8 (rtkPosOf $1) (reverse $2) } |- tok_Arglist_dummy_170 Arglist tok_Arglist_dummy_170 { Ctr__Java__9 (rtkPosOf $1) $2 } |- tok_AssignmentOp_dummy_169 AssignmentOp tok_AssignmentOp_dummy_169 { Ctr__Java__10 (rtkPosOf $1) $2 } |- tok_CatchList_dummy_168 CatchList tok_CatchList_dummy_168 { Ctr__Java__11 (rtkPosOf $1) (reverse $2) } |- tok_ClassDeclaration_dummy_167 ClassDeclaration tok_ClassDeclaration_dummy_167 { Ctr__Java__12 (rtkPosOf $1) $2 } |- tok_ClassOrInterfaceType_dummy_166 ClassOrInterfaceType tok_ClassOrInterfaceType_dummy_166 { Ctr__Java__13 (rtkPosOf $1) $2 } |- tok_CompilationUnit_dummy_165 CompilationUnit tok_CompilationUnit_dummy_165 { Ctr__Java__14 (rtkPosOf $1) $2 } |- tok_CompoundName_dummy_164 CompoundName tok_CompoundName_dummy_164 { Ctr__Java__15 (rtkPosOf $1) $2 } |- tok_CompoundNameTail_dummy_163 CompoundNameTail tok_CompoundNameTail_dummy_163 { Ctr__Java__16 (rtkPosOf $1) (reverse $2) } |- tok_CreationExpression_dummy_162 CreationExpression tok_CreationExpression_dummy_162 { Ctr__Java__17 (rtkPosOf $1) $2 } |- tok_DimExprs_dummy_161 DimExprs tok_DimExprs_dummy_161 { Ctr__Java__18 (rtkPosOf $1) (reverse $2) } |- tok_Dims_dummy_160 Dims tok_Dims_dummy_160 { Ctr__Java__19 (rtkPosOf $1) (reverse $2) } |- tok_DoStatement_dummy_159 DoStatement tok_DoStatement_dummy_159 { Ctr__Java__20 (rtkPosOf $1) $2 } |- tok_DocComment_dummy_158 DocComment tok_DocComment_dummy_158 { Ctr__Java__21 (rtkPosOf $1) $2 } |- tok_EnumConstant_dummy_157 EnumConstant tok_EnumConstant_dummy_157 { Ctr__Java__22 (rtkPosOf $1) $2 } |- tok_EnumConstantList_dummy_156 EnumConstantList tok_EnumConstantList_dummy_156 { Ctr__Java__23 (rtkPosOf $1) $2 } |- tok_EnumDeclaration_dummy_155 EnumDeclaration tok_EnumDeclaration_dummy_155 { Ctr__Java__24 (rtkPosOf $1) $2 } |- tok_EqualityOp_dummy_154 EqualityOp tok_EqualityOp_dummy_154 { Ctr__Java__25 (rtkPosOf $1) $2 } |- tok_Expression_dummy_153 Expression tok_Expression_dummy_153 { Ctr__Java__26 (rtkPosOf $1) $2 } |- tok_ExtendsList_dummy_152 ExtendsList tok_ExtendsList_dummy_152 { Ctr__Java__27 (rtkPosOf $1) $2 } |- tok_FieldDeclaration_dummy_151 FieldDeclaration tok_FieldDeclaration_dummy_151 { Ctr__Java__28 (rtkPosOf $1) $2 } |- tok_FieldDeclarationList_dummy_150 FieldDeclarationList tok_FieldDeclarationList_dummy_150 { Ctr__Java__29 (rtkPosOf $1) (reverse $2) } |- tok_ForStatement_dummy_149 ForStatement tok_ForStatement_dummy_149 { Ctr__Java__30 (rtkPosOf $1) $2 } |- tok_IfStatement_dummy_148 IfStatement tok_IfStatement_dummy_148 { Ctr__Java__31 (rtkPosOf $1) $2 } |- tok_ImplementsList_dummy_147 ImplementsList tok_ImplementsList_dummy_147 { Ctr__Java__32 (rtkPosOf $1) $2 } |- tok_ImportHead_dummy_146 ImportHead tok_ImportHead_dummy_146 { Ctr__Java__33 (rtkPosOf $1) $2 } |- tok_ImportList_dummy_145 ImportList tok_ImportList_dummy_145 { Ctr__Java__34 (rtkPosOf $1) (reverse $2) } |- tok_ImportName_dummy_144 ImportName tok_ImportName_dummy_144 { Ctr__Java__35 (rtkPosOf $1) $2 } |- tok_ImportStatement_dummy_143 ImportStatement tok_ImportStatement_dummy_143 { Ctr__Java__36 (rtkPosOf $1) $2 } |- tok_InterfaceDeclaration_dummy_142 InterfaceDeclaration tok_InterfaceDeclaration_dummy_142 { Ctr__Java__37 (rtkPosOf $1) $2 } |- tok_Literal_dummy_141 Literal tok_Literal_dummy_141 { Ctr__Java__38 (rtkPosOf $1) $2 } |- tok_LocalModifierList1_dummy_140 LocalModifierList1 tok_LocalModifierList1_dummy_140 { Ctr__Java__39 (rtkPosOf $1) (reverse $2) } |- tok_MemberAfterFirstId_dummy_139 MemberAfterFirstId tok_MemberAfterFirstId_dummy_139 { Ctr__Java__40 (rtkPosOf $1) $2 } |- tok_MemberDeclaration_dummy_138 MemberDeclaration tok_MemberDeclaration_dummy_138 { Ctr__Java__41 (rtkPosOf $1) $2 } |- tok_MemberRest_dummy_137 MemberRest tok_MemberRest_dummy_137 { Ctr__Java__42 (rtkPosOf $1) $2 } |- tok_Modifier_dummy_136 Modifier tok_Modifier_dummy_136 { Ctr__Java__43 (rtkPosOf $1) $2 } |- tok_ModifierList_dummy_135 ModifierList tok_ModifierList_dummy_135 { Ctr__Java__44 (rtkPosOf $1) (reverse $2) } |- tok_MoreTypeSpecifier_dummy_134 MoreTypeSpecifier tok_MoreTypeSpecifier_dummy_134 { Ctr__Java__45 (rtkPosOf $1) $2 } |- tok_MoreVariableDeclarators_dummy_133 MoreVariableDeclarators tok_MoreVariableDeclarators_dummy_133 { Ctr__Java__46 (rtkPosOf $1) (reverse $2) } |- tok_MultiplicativeOp_dummy_132 MultiplicativeOp tok_MultiplicativeOp_dummy_132 { Ctr__Java__47 (rtkPosOf $1) $2 } |- tok_NonEmptyDims_dummy_131 NonEmptyDims tok_NonEmptyDims_dummy_131 { Ctr__Java__48 (rtkPosOf $1) (reverse $2) } |- tok_NonEmptyTypeArguments_dummy_130 NonEmptyTypeArguments tok_NonEmptyTypeArguments_dummy_130 { Ctr__Java__49 (rtkPosOf $1) $2 } |- tok_OptDocComment_dummy_129 OptDocComment tok_OptDocComment_dummy_129 { Ctr__Java__50 (rtkPosOf $1) $2 } |- tok_OptElsePart_dummy_128 OptElsePart tok_OptElsePart_dummy_128 { Ctr__Java__51 (rtkPosOf $1) $2 } |- tok_OptExpression_dummy_127 OptExpression tok_OptExpression_dummy_127 { Ctr__Java__52 (rtkPosOf $1) $2 } |- tok_OptFinally_dummy_126 OptFinally tok_OptFinally_dummy_126 { Ctr__Java__53 (rtkPosOf $1) $2 } |- tok_OptId_dummy_125 OptId tok_OptId_dummy_125 { Ctr__Java__54 (rtkPosOf $1) $2 } |- tok_OptVariableInitializer_dummy_124 OptVariableInitializer tok_OptVariableInitializer_dummy_124 { Ctr__Java__55 (rtkPosOf $1) $2 } |- tok_Package_dummy_123 Package tok_Package_dummy_123 { Ctr__Java__56 (rtkPosOf $1) $2 } |- tok_ParamModifierList_dummy_122 ParamModifierList tok_ParamModifierList_dummy_122 { Ctr__Java__57 (rtkPosOf $1) (reverse $2) } |- tok_Parameter_dummy_121 Parameter tok_Parameter_dummy_121 { Ctr__Java__58 (rtkPosOf $1) $2 } |- tok_ParameterList_dummy_120 ParameterList tok_ParameterList_dummy_120 { Ctr__Java__59 (rtkPosOf $1) $2 } |- tok_PostfixOp_dummy_119 PostfixOp tok_PostfixOp_dummy_119 { Ctr__Java__60 (rtkPosOf $1) $2 } |- tok_PrefixOp_dummy_118 PrefixOp tok_PrefixOp_dummy_118 { Ctr__Java__61 (rtkPosOf $1) $2 } |- tok_PrimitiveTypeKeyword_dummy_117 PrimitiveTypeKeyword tok_PrimitiveTypeKeyword_dummy_117 { Ctr__Java__62 (rtkPosOf $1) $2 } |- tok_RelationalOp_dummy_116 RelationalOp tok_RelationalOp_dummy_116 { Ctr__Java__63 (rtkPosOf $1) $2 } |- tok_ShiftOp_dummy_115 ShiftOp tok_ShiftOp_dummy_115 { Ctr__Java__64 (rtkPosOf $1) $2 } |- tok_Statement_dummy_114 Statement tok_Statement_dummy_114 { Ctr__Java__65 (rtkPosOf $1) $2 } |- tok_StatementBlock_dummy_113 StatementBlock tok_StatementBlock_dummy_113 { Ctr__Java__66 (rtkPosOf $1) $2 } |- tok_StatementList_dummy_112 StatementList tok_StatementList_dummy_112 { Ctr__Java__67 (rtkPosOf $1) (reverse $2) } |- tok_StaticInitializer_dummy_111 StaticInitializer tok_StaticInitializer_dummy_111 { Ctr__Java__68 (rtkPosOf $1) $2 } |- tok_SwitchCaseList_dummy_110 SwitchCaseList tok_SwitchCaseList_dummy_110 { Ctr__Java__69 (rtkPosOf $1) (reverse $2) } |- tok_SwitchStatement_dummy_109 SwitchStatement tok_SwitchStatement_dummy_109 { Ctr__Java__70 (rtkPosOf $1) $2 } |- tok_ThrowsClause_dummy_108 ThrowsClause tok_ThrowsClause_dummy_108 { Ctr__Java__71 (rtkPosOf $1) $2 } |- tok_TryStatement_dummy_107 TryStatement tok_TryStatement_dummy_107 { Ctr__Java__72 (rtkPosOf $1) $2 } |- tok_Type_dummy_106 Type tok_Type_dummy_106 { Ctr__Java__73 (rtkPosOf $1) $2 } |- tok_TypeArgument_dummy_105 TypeArgument tok_TypeArgument_dummy_105 { Ctr__Java__74 (rtkPosOf $1) $2 } |- tok_TypeArguments_dummy_104 TypeArguments tok_TypeArguments_dummy_104 { Ctr__Java__75 (rtkPosOf $1) $2 } |- tok_TypeDeclRest_dummy_103 TypeDeclRest tok_TypeDeclRest_dummy_103 { Ctr__Java__76 (rtkPosOf $1) $2 } |- tok_TypeDeclaration_dummy_102 TypeDeclaration tok_TypeDeclaration_dummy_102 { Ctr__Java__77 (rtkPosOf $1) $2 } |- tok_TypeParameter_dummy_101 TypeParameter tok_TypeParameter_dummy_101 { Ctr__Java__78 (rtkPosOf $1) $2 } |- tok_TypeParameters_dummy_100 TypeParameters tok_TypeParameters_dummy_100 { Ctr__Java__79 (rtkPosOf $1) $2 } |- tok_TypeSpecifier_dummy_99 TypeSpecifier tok_TypeSpecifier_dummy_99 { Ctr__Java__80 (rtkPosOf $1) $2 } |- tok_VariableDeclaration_dummy_98 VariableDeclaration tok_VariableDeclaration_dummy_98 { Ctr__Java__81 (rtkPosOf $1) $2 } |- tok_VariableDeclarator_dummy_97 VariableDeclarator tok_VariableDeclarator_dummy_97 { Ctr__Java__82 (rtkPosOf $1) $2 } |- tok_VariableDeclaratorList_dummy_96 VariableDeclaratorList tok_VariableDeclaratorList_dummy_96 { Ctr__Java__83 (rtkPosOf $1) $2 } |- tok_VariableInitializer_dummy_95 VariableInitializer tok_VariableInitializer_dummy_95 { Ctr__Java__84 (rtkPosOf $1) $2 } |- tok_VariableInitializerList_dummy_94 VariableInitializerList tok_VariableInitializerList_dummy_94 { Ctr__Java__85 (rtkPosOf $1) $2 } |- tok_WhileStatement_dummy_93 WhileStatement tok_WhileStatement_dummy_93 { Ctr__Java__86 (rtkPosOf $1) $2 } |- tok_WildcardType_dummy_92 WildcardType tok_WildcardType_dummy_92 { Ctr__Java__87 (rtkPosOf $1) $2 }--Java : qq_Java { Anti_Java (tkVal_qq_Java $1) } |- CompilationUnit { Ctr__Java__88 (rtkPosOf $1) $1 }--AdditiveOp : qq_AdditiveOp { Anti_AdditiveOp (tkVal_qq_AdditiveOp $1) } |- tok__plus__76 { Ctr__AdditiveOp__0 (rtkPosOf $1) } |- tok__minus__77 { Ctr__AdditiveOp__1 (rtkPosOf $1) }--ListElem_AnnotationList9 : qq_AnnotationList { Anti_Annotation (tkVal_qq_AnnotationList $1) } |- Annotation { $1 }--Annotation : qq_Annotation { Anti_Annotation (tkVal_qq_Annotation $1) } |- tok__symbol__6 CompoundName Rule_4 { Ctr__Annotation__1 (rtkPosOf $1) $2 $3 }--AnnotationArguments : qq_AnnotationArguments { Anti_AnnotationArguments (tkVal_qq_AnnotationArguments $1) } |- AnnotationElement Rule_7 { Ctr__AnnotationArguments__0 (rtkPosOf $1) $1 (reverse $2) }--AnnotationDeclaration : qq_AnnotationDeclaration { Anti_AnnotationDeclaration (tkVal_qq_AnnotationDeclaration $1) } |- tok__symbol__6 tok_interface_16 id tok__symbol__14 AnnotationTypeElementList tok__symbol__15 { Ctr__AnnotationDeclaration__0 (rtkPosOf $1) (tkVal_id $3) (reverse $5) }--AnnotationElement : qq_AnnotationElement { Anti_AnnotationElement (tkVal_qq_AnnotationElement $1) } |- id tok__eql__10 ConditionalExpression { Ctr__AnnotationElement__0 (rtkPosOf $1) (tkVal_id $1) $3 } |- ConditionalExpression { Ctr__AnnotationElement__1 (rtkPosOf $1) $1 }--AnnotationList : {- empty -} { [] } |- AnnotationList ListElem_AnnotationList9 { $2 : $1 }--AnnotationTypeElement : qq_AnnotationTypeElement { Anti_AnnotationTypeElement (tkVal_qq_AnnotationTypeElement $1) } |- FieldDeclaration { Ctr__AnnotationTypeElement__0 (rtkPosOf $1) $1 }--ListElem_AnnotationTypeElementList19 : qq_AnnotationTypeElementList { Anti_AnnotationTypeElement (tkVal_qq_AnnotationTypeElementList $1) } |- AnnotationTypeElement { $1 }--AnnotationTypeElementList : {- empty -} { [] } |- AnnotationTypeElementList ListElem_AnnotationTypeElementList19 { $2 : $1 }--Arglist : qq_Arglist { Anti_Arglist (tkVal_qq_Arglist $1) } |- { Ctr__Arglist__0 rtkNoPos } |- Rule_78 { Ctr__Arglist__1 (rtkPosOf $1) $1 }--AssignmentOp : qq_AssignmentOp { Anti_AssignmentOp (tkVal_qq_AssignmentOp $1) } |- tok__eql__10 { Ctr__AssignmentOp__0 (rtkPosOf $1) } |- tok__plus__eql__51 { Ctr__AssignmentOp__1 (rtkPosOf $1) } |- tok__minus__eql__52 { Ctr__AssignmentOp__2 (rtkPosOf $1) } |- tok__star__eql__53 { Ctr__AssignmentOp__3 (rtkPosOf $1) } |- tok__symbol__eql__54 { Ctr__AssignmentOp__4 (rtkPosOf $1) } |- tok__pipe__eql__55 { Ctr__AssignmentOp__5 (rtkPosOf $1) } |- tok__symbol__eql__56 { Ctr__AssignmentOp__6 (rtkPosOf $1) } |- tok__symbol__eql__57 { Ctr__AssignmentOp__7 (rtkPosOf $1) } |- tok__symbol__eql__58 { Ctr__AssignmentOp__8 (rtkPosOf $1) } |- tok__symbol__symbol__eql__59 { Ctr__AssignmentOp__9 (rtkPosOf $1) } |- tok__symbol__symbol__eql__60 { Ctr__AssignmentOp__10 (rtkPosOf $1) } |- tok__symbol__symbol__symbol__eql__61 { Ctr__AssignmentOp__11 (rtkPosOf $1) }--CatchList : {- empty -} { [] } |- CatchList ListElem_CatchList64 { $2 : $1 }--ClassDeclaration : qq_ClassDeclaration { Anti_ClassDeclaration (tkVal_qq_ClassDeclaration $1) } |- tok_class_13 id TypeParameters Rule_16 Rule_17 tok__symbol__14 FieldDeclarationList tok__symbol__15 { Ctr__ClassDeclaration__0 (rtkPosOf $1) (tkVal_id $2) $3 $4 $5 (reverse $7) }--ClassOrInterfaceType : qq_ClassOrInterfaceType { Anti_ClassOrInterfaceType (tkVal_qq_ClassOrInterfaceType $1) } |- CompoundName TypeArguments { Ctr__ClassOrInterfaceType__0 (rtkPosOf $1) $1 $2 }--CompilationUnit : qq_CompilationUnit { Anti_CompilationUnit (tkVal_qq_CompilationUnit $1) } |- Rule_1 ImportList Rule_2 { Ctr__CompilationUnit__0 (rtkPosOf $1) $1 (reverse $2) $3 }--CompoundName : qq_CompoundName { Anti_CompoundName (tkVal_qq_CompoundName $1) } |- id CompoundNameTail { Ctr__CompoundName__0 (rtkPosOf $1) (tkVal_id $1) (reverse $2) }--CompoundNameTail : {- empty -} { [] } |- CompoundNameTail ListElem_CompoundNameTail91 { $2 : $1 }--CreationExpression : qq_CreationExpression { Anti_CreationExpression (tkVal_qq_CreationExpression $1) } |- tok_new_84 TypeSpecifier Rule_74 { Ctr__CreationExpression__0 (rtkPosOf $1) $2 $3 }--DimExprs : ListElem_DimExprs77 { [$1] } |- DimExprs ListElem_DimExprs77 { $2 : $1 }--Dims : {- empty -} { [] } |- Dims ListElem_Dims32 { $2 : $1 }--DoStatement : qq_DoStatement { Anti_DoStatement (tkVal_qq_DoStatement $1) } |- tok_do_43 Statement tok_while_44 tok__lparen__7 Expression tok__rparen__8 tok__semi__1 { Ctr__DoStatement__0 (rtkPosOf $1) $2 $5 }--DocComment : qq_DocComment { Anti_DocComment (tkVal_qq_DocComment $1) } |- doccomment { Ctr__DocComment__0 (rtkPosOf $1) (tkVal_doccomment $1) }--EnumConstant : qq_EnumConstant { Anti_EnumConstant (tkVal_qq_EnumConstant $1) } |- AnnotationList id Rule_20 Rule_22 { Ctr__EnumConstant__0 (rtkPosOf (reverse $1)) (reverse $1) (tkVal_id $2) $3 $4 }--EnumConstantList : qq_EnumConstantList { Anti_EnumConstantList (tkVal_qq_EnumConstantList $1) } |- EnumConstant Rule_24 Rule_26 { Ctr__EnumConstantList__0 (rtkPosOf $1) $1 (reverse $2) $3 }--EnumDeclaration : qq_EnumDeclaration { Anti_EnumDeclaration (tkVal_qq_EnumDeclaration $1) } |- tok_enum_17 id Rule_27 tok__symbol__14 EnumConstantList Rule_28 tok__symbol__15 { Ctr__EnumDeclaration__0 (rtkPosOf $1) (tkVal_id $2) $3 $5 $6 }--EqualityOp : qq_EqualityOp { Anti_EqualityOp (tkVal_qq_EqualityOp $1) } |- tok__eql__eql__68 { Ctr__EqualityOp__0 (rtkPosOf $1) } |- tok__exclamation__eql__69 { Ctr__EqualityOp__1 (rtkPosOf $1) }--PrimaryNoPostfix : qq_Expression { Anti_Expression (tkVal_qq_Expression $1) } |- Literal { Ctr__Expression__0 (rtkPosOf $1) $1 } |- tok_this_40 { Ctr__Expression__1 (rtkPosOf $1) } |- tok__lparen__7 Expression tok__rparen__8 { Ctr__Expression__2 (rtkPosOf $1) $2 } |- CreationExpression { Ctr__Expression__3 (rtkPosOf $1) $1 } |- CompoundName Rule_70 { Ctr__Expression__4 (rtkPosOf $1) $1 $2 } |- CompoundName tok__sq_bkt_l__18 Expression tok__sq_bkt_r__19 { Ctr__Expression__5 (rtkPosOf $1) $1 $3 } |- tok_super_39 tok__dot__4 id Rule_72 { Ctr__Expression__6 (rtkPosOf $1) (tkVal_id $3) $4 } |- id CompoundNameTail tok__dot__4 tok_class_13 { Ctr__Expression__7 (rtkPosOf $1) (tkVal_id $1) (reverse $2) } |- id CompoundNameTail tok__dot__4 tok_this_40 { Ctr__Expression__8 (rtkPosOf $1) (tkVal_id $1) (reverse $2) } |- id CompoundNameTail tok__dot__4 NonEmptyTypeArguments id tok__lparen__7 Arglist tok__rparen__8 { Ctr__Expression__9 (rtkPosOf $1) (tkVal_id $1) (reverse $2) $4 (tkVal_id $5) $7 } |- PrimitiveTypeKeyword tok__dot__4 tok_class_13 { Ctr__Expression__10 (rtkPosOf $1) $1 }--PostfixExpression : PrimaryNoPostfix { Ctr__Expression__11 (rtkPosOf $1) $1 } |- PostfixExpression PostfixOp { Ctr__Expression__12 (rtkPosOf $1) $1 $2 } |- PostfixExpression tok__dot__4 id { Ctr__Expression__13 (rtkPosOf $1) $1 (tkVal_id $3) } |- PostfixExpression tok__dot__4 id tok__lparen__7 Arglist tok__rparen__8 { Ctr__Expression__14 (rtkPosOf $1) $1 (tkVal_id $3) $5 } |- PostfixExpression tok__dot__4 NonEmptyTypeArguments id tok__lparen__7 Arglist tok__rparen__8 { Ctr__Expression__15 (rtkPosOf $1) $1 $3 (tkVal_id $4) $6 } |- PostfixExpression tok__sq_bkt_l__18 Expression tok__sq_bkt_r__19 { Ctr__Expression__16 (rtkPosOf $1) $1 $3 }--UnaryExpressionNotPlusMinus : PostfixExpression { Ctr__Expression__17 (rtkPosOf $1) $1 } |- tok__tilde__82 UnaryExpression { Ctr__Expression__18 (rtkPosOf $1) $2 } |- tok__exclamation__83 UnaryExpression { Ctr__Expression__19 (rtkPosOf $1) $2 } |- CastExpression { Ctr__Expression__20 (rtkPosOf $1) $1 }--UnaryExpression : PrefixOp UnaryExpression { Ctr__Expression__21 (rtkPosOf $1) $1 $2 } |- UnaryExpressionNotPlusMinus { Ctr__Expression__22 (rtkPosOf $1) $1 }--CastExpression : tok__lparen__7 PrimitiveTypeKeyword Dims tok__rparen__8 UnaryExpression { Ctr__Expression__23 (rtkPosOf $1) $2 (reverse $3) $5 } |- tok__lparen__7 CompoundName NonEmptyTypeArguments Dims tok__rparen__8 UnaryExpressionNotPlusMinus { Ctr__Expression__24 (rtkPosOf $1) $2 $3 (reverse $4) $6 } |- tok__lparen__7 CompoundName NonEmptyDims tok__rparen__8 UnaryExpressionNotPlusMinus { Ctr__Expression__25 (rtkPosOf $1) $2 (reverse $3) $5 } |- tok__lparen__7 Expression tok__rparen__8 UnaryExpressionNotPlusMinus { Ctr__Expression__26 (rtkPosOf $1) $2 $4 }--MultiplicativeExpression : UnaryExpression { Ctr__Expression__27 (rtkPosOf $1) $1 } |- MultiplicativeExpression MultiplicativeOp UnaryExpression { Ctr__Expression__28 (rtkPosOf $1) $1 $2 $3 }--AdditiveExpression : MultiplicativeExpression { Ctr__Expression__29 (rtkPosOf $1) $1 } |- AdditiveExpression AdditiveOp MultiplicativeExpression { Ctr__Expression__30 (rtkPosOf $1) $1 $2 $3 }--ShiftExpression : AdditiveExpression { Ctr__Expression__31 (rtkPosOf $1) $1 } |- ShiftExpression ShiftOp AdditiveExpression { Ctr__Expression__32 (rtkPosOf $1) $1 $2 $3 }--RelationalExpression : ShiftExpression { Ctr__Expression__33 (rtkPosOf $1) $1 } |- ShiftExpression RelationalOp ShiftExpression { Ctr__Expression__34 (rtkPosOf $1) $1 $2 $3 } |- RelationalExpression tok_instanceof_74 Type { Ctr__Expression__35 (rtkPosOf $1) $1 $3 }--EqualityExpression : RelationalExpression { Ctr__Expression__36 (rtkPosOf $1) $1 } |- EqualityExpression EqualityOp RelationalExpression { Ctr__Expression__37 (rtkPosOf $1) $1 $2 $3 }--AndExpression : EqualityExpression { Ctr__Expression__38 (rtkPosOf $1) $1 } |- AndExpression tok__symbol__67 EqualityExpression { Ctr__Expression__39 (rtkPosOf $1) $1 $3 }--ExclusiveOrExpression : AndExpression { Ctr__Expression__40 (rtkPosOf $1) $1 } |- ExclusiveOrExpression tok__symbol__66 AndExpression { Ctr__Expression__41 (rtkPosOf $1) $1 $3 }--InclusiveOrEpression : ExclusiveOrExpression { Ctr__Expression__42 (rtkPosOf $1) $1 } |- InclusiveOrEpression tok__pipe__65 ExclusiveOrExpression { Ctr__Expression__43 (rtkPosOf $1) $1 $3 }--ConditionalAndExpression : InclusiveOrEpression { Ctr__Expression__44 (rtkPosOf $1) $1 } |- ConditionalAndExpression tok__symbol__symbol__64 InclusiveOrEpression { Ctr__Expression__45 (rtkPosOf $1) $1 $3 }--ConditionalOrExpression : ConditionalAndExpression { Ctr__Expression__46 (rtkPosOf $1) $1 } |- ConditionalOrExpression tok__pipe__pipe__63 ConditionalAndExpression { Ctr__Expression__47 (rtkPosOf $1) $1 $3 }--ConditionalExpression : ConditionalOrExpression { Ctr__Expression__48 (rtkPosOf $1) $1 } |- ConditionalOrExpression tok__symbol__62 Expression tok__colon__36 ConditionalExpression { Ctr__Expression__49 (rtkPosOf $1) $1 $3 $5 }--AssignmentExpression : ConditionalExpression Rule_68 { Ctr__Expression__50 (rtkPosOf $1) $1 $2 }--Expression : AssignmentExpression { Ctr__Expression__51 (rtkPosOf $1) $1 }--ExtendsList : qq_ExtendsList { Anti_ExtendsList (tkVal_qq_ExtendsList $1) } |- tok_extends_11 ClassOrInterfaceType Rule_12 { Ctr__ExtendsList__0 (rtkPosOf $1) $2 (reverse $3) }--FieldDeclaration : qq_FieldDeclaration { Anti_FieldDeclaration (tkVal_qq_FieldDeclaration $1) } |- OptDocComment ModifierList Rule_30 { Ctr__FieldDeclaration__0 (rtkPosOf $1) $1 (reverse $2) $3 } |- tok__semi__1 { Ctr__FieldDeclaration__1 (rtkPosOf $1) }--ListElem_FieldDeclarationList15 : qq_FieldDeclarationList { Anti_FieldDeclaration (tkVal_qq_FieldDeclarationList $1) } |- FieldDeclaration { $1 }--FieldDeclarationList : {- empty -} { [] } |- FieldDeclarationList ListElem_FieldDeclarationList15 { $2 : $1 }--ForStatement : qq_ForStatement { Anti_ForStatement (tkVal_qq_ForStatement $1) } |- tok_for_45 tok__lparen__7 Rule_62 OptExpression tok__semi__1 OptExpression tok__rparen__8 Statement { Ctr__ForStatement__0 (rtkPosOf $1) $3 $4 $6 $8 }--IfStatement : qq_IfStatement { Anti_IfStatement (tkVal_qq_IfStatement $1) } |- tok_if_42 tok__lparen__7 Expression tok__rparen__8 Statement OptElsePart { Ctr__IfStatement__0 (rtkPosOf $1) $3 $5 $6 }--ImplementsList : qq_ImplementsList { Anti_ImplementsList (tkVal_qq_ImplementsList $1) } |- tok_implements_12 Rule_14 { Ctr__ImplementsList__0 (rtkPosOf $1) (reverse $2) }--ImportHead : qq_ImportHead { Anti_ImportHead (tkVal_qq_ImportHead $1) } |- id { Ctr__ImportHead__0 (rtkPosOf $1) (tkVal_id $1) } |- ImportHead tok__dot__4 id { Ctr__ImportHead__1 (rtkPosOf $1) $1 (tkVal_id $3) }--ImportList : {- empty -} { [] } |- ImportList ListElem_ImportList0 { $2 : $1 }--ImportName : qq_ImportName { Anti_ImportName (tkVal_qq_ImportName $1) } |- ImportHead { Ctr__ImportName__0 (rtkPosOf $1) $1 } |- ImportHead tok__dot__4 tok__star__5 { Ctr__ImportName__1 (rtkPosOf $1) $1 }--ImportStatement : qq_ImportStatement { Anti_ImportStatement (tkVal_qq_ImportStatement $1) } |- tok_import_2 Rule_3 ImportName tok__semi__1 { Ctr__ImportStatement__0 (rtkPosOf $1) $2 $3 }--ListElem_ImportList0 : qq_ImportList { Anti_ImportStatement (tkVal_qq_ImportList $1) } |- ImportStatement { $1 }--InterfaceDeclaration : qq_InterfaceDeclaration { Anti_InterfaceDeclaration (tkVal_qq_InterfaceDeclaration $1) } |- tok_interface_16 id TypeParameters Rule_18 tok__symbol__14 FieldDeclarationList tok__symbol__15 { Ctr__InterfaceDeclaration__0 (rtkPosOf $1) (tkVal_id $2) $3 $4 (reverse $6) }--Literal : qq_Literal { Anti_Literal (tkVal_qq_Literal $1) } |- integerLiteral { Ctr__Literal__0 (rtkPosOf $1) (tkVal_integerLiteral $1) } |- floatLiteral { Ctr__Literal__1 (rtkPosOf $1) (tkVal_floatLiteral $1) } |- tok_true_85 { Ctr__Literal__2 (rtkPosOf $1) } |- tok_false_86 { Ctr__Literal__3 (rtkPosOf $1) } |- char { Ctr__Literal__4 (rtkPosOf $1) (tkVal_char $1) } |- string { Ctr__Literal__5 (rtkPosOf $1) (tkVal_string $1) } |- tok_null_87 { Ctr__Literal__6 (rtkPosOf $1) }--LocalModifierList1 : ListElem_LocalModifierList149 { [$1] } |- LocalModifierList1 ListElem_LocalModifierList149 { $2 : $1 }--MemberAfterFirstId : qq_MemberAfterFirstId { Anti_MemberAfterFirstId (tkVal_qq_MemberAfterFirstId $1) } |- tok__lparen__7 Rule_35 tok__rparen__8 Rule_36 StatementBlock { Ctr__MemberAfterFirstId__0 (rtkPosOf $1) $2 $4 $5 } |- MoreTypeSpecifier id MemberRest { Ctr__MemberAfterFirstId__1 (rtkPosOf $1) $1 (tkVal_id $2) $3 }--MemberDeclaration : qq_MemberDeclaration { Anti_MemberDeclaration (tkVal_qq_MemberDeclaration $1) } |- PrimitiveTypeKeyword Dims id MemberRest { Ctr__MemberDeclaration__0 (rtkPosOf $1) $1 (reverse $2) (tkVal_id $3) $4 } |- TypeParameters id MoreTypeSpecifier id MemberRest { Ctr__MemberDeclaration__1 (rtkPosOf $1) $1 (tkVal_id $2) $3 (tkVal_id $4) $5 } |- id MemberAfterFirstId { Ctr__MemberDeclaration__2 (rtkPosOf $1) (tkVal_id $1) $2 }--MemberRest : qq_MemberRest { Anti_MemberRest (tkVal_qq_MemberRest $1) } |- tok__lparen__7 Rule_39 tok__rparen__8 Dims Rule_40 Rule_41 { Ctr__MemberRest__0 (rtkPosOf $1) $2 (reverse $4) $5 $6 } |- Dims OptVariableInitializer MoreVariableDeclarators tok__semi__1 { Ctr__MemberRest__1 (rtkPosOf (reverse $1)) (reverse $1) $2 (reverse $3) }--Modifier : qq_Modifier { Anti_Modifier (tkVal_qq_Modifier $1) } |- tok_public_88 { Ctr__Modifier__0 (rtkPosOf $1) } |- tok_private_89 { Ctr__Modifier__1 (rtkPosOf $1) } |- tok_protected_90 { Ctr__Modifier__2 (rtkPosOf $1) } |- tok_static_3 { Ctr__Modifier__3 (rtkPosOf $1) } |- tok_final_31 { Ctr__Modifier__4 (rtkPosOf $1) } |- tok_native_91 { Ctr__Modifier__5 (rtkPosOf $1) } |- tok_synchronized_34 { Ctr__Modifier__6 (rtkPosOf $1) } |- tok_abstract_92 { Ctr__Modifier__7 (rtkPosOf $1) } |- tok_threadsafe_93 { Ctr__Modifier__8 (rtkPosOf $1) } |- tok_transient_94 { Ctr__Modifier__9 (rtkPosOf $1) }--ModifierList : {- empty -} { [] } |- ModifierList ListElem_ModifierList11 { $2 : $1 }--MoreTypeSpecifier : qq_MoreTypeSpecifier { Anti_MoreTypeSpecifier (tkVal_qq_MoreTypeSpecifier $1) } |- tok__dot__4 id MoreTypeSpecifier { Ctr__MoreTypeSpecifier__0 (rtkPosOf $1) (tkVal_id $2) $3 } |- TypeArguments Dims { Ctr__MoreTypeSpecifier__1 (rtkPosOf $1) $1 (reverse $2) }--MoreVariableDeclarators : {- empty -} { [] } |- MoreVariableDeclarators ListElem_MoreVariableDeclarators45 { $2 : $1 }--MultiplicativeOp : qq_MultiplicativeOp { Anti_MultiplicativeOp (tkVal_qq_MultiplicativeOp $1) } |- tok__star__5 { Ctr__MultiplicativeOp__0 (rtkPosOf $1) } |- tok__symbol__78 { Ctr__MultiplicativeOp__1 (rtkPosOf $1) } |- tok__symbol__79 { Ctr__MultiplicativeOp__2 (rtkPosOf $1) }--NonEmptyDims : ListElem_NonEmptyDims34 { [$1] } |- NonEmptyDims ListElem_NonEmptyDims34 { $2 : $1 }--NonEmptyTypeArguments : qq_NonEmptyTypeArguments { Anti_NonEmptyTypeArguments (tkVal_qq_NonEmptyTypeArguments $1) } |- tok__symbol__70 TypeArgument Rule_81 tok__symbol__71 { Ctr__NonEmptyTypeArguments__0 (rtkPosOf $1) $2 (reverse $3) } |- tok__symbol__70 tok__symbol__71 { Ctr__NonEmptyTypeArguments__1 (rtkPosOf $1) }--OptDocComment : qq_OptDocComment { Anti_OptDocComment (tkVal_qq_OptDocComment $1) } |- { Ctr__OptDocComment__0 rtkNoPos } |- DocComment { Ctr__OptDocComment__1 (rtkPosOf $1) $1 }--OptElsePart : qq_OptElsePart { Anti_OptElsePart (tkVal_qq_OptElsePart $1) } |- { Ctr__OptElsePart__0 rtkNoPos } |- Rule_61 { Ctr__OptElsePart__1 (rtkPosOf $1) $1 }--OptExpression : qq_OptExpression { Anti_OptExpression (tkVal_qq_OptExpression $1) } |- { Ctr__OptExpression__0 rtkNoPos } |- Expression { Ctr__OptExpression__1 (rtkPosOf $1) $1 }--OptFinally : qq_OptFinally { Anti_OptFinally (tkVal_qq_OptFinally $1) } |- { Ctr__OptFinally__0 rtkNoPos } |- Rule_65 { Ctr__OptFinally__1 (rtkPosOf $1) $1 }--OptId : qq_OptId { Anti_OptId (tkVal_qq_OptId $1) } |- { Ctr__OptId__0 rtkNoPos } |- id { Ctr__OptId__1 (rtkPosOf $1) (tkVal_id $1) }--OptVariableInitializer : qq_OptVariableInitializer { Anti_OptVariableInitializer (tkVal_qq_OptVariableInitializer $1) } |- { Ctr__OptVariableInitializer__0 rtkNoPos } |- Rule_50 { Ctr__OptVariableInitializer__1 (rtkPosOf $1) $1 }--Package : qq_Package { Anti_Package (tkVal_qq_Package $1) } |- tok_package_0 CompoundName tok__semi__1 { Ctr__Package__0 (rtkPosOf $1) $2 }--ParamModifierList : {- empty -} { [] } |- ParamModifierList ListElem_ParamModifierList58 { $2 : $1 }--Parameter : qq_Parameter { Anti_Parameter (tkVal_qq_Parameter $1) } |- ParamModifierList Type Rule_59 id Dims { Ctr__Parameter__0 (rtkPosOf (reverse $1)) (reverse $1) $2 $3 (tkVal_id $4) (reverse $5) }--ParameterList : qq_ParameterList { Anti_ParameterList (tkVal_qq_ParameterList $1) } |- Parameter Rule_55 { Ctr__ParameterList__0 (rtkPosOf $1) $1 (reverse $2) }--PostfixOp : qq_PostfixOp { Anti_PostfixOp (tkVal_qq_PostfixOp $1) } |- tok__plus__plus__80 { Ctr__PostfixOp__0 (rtkPosOf $1) } |- tok__minus__minus__81 { Ctr__PostfixOp__1 (rtkPosOf $1) }--PrefixOp : qq_PrefixOp { Anti_PrefixOp (tkVal_qq_PrefixOp $1) } |- tok__plus__plus__80 { Ctr__PrefixOp__0 (rtkPosOf $1) } |- tok__minus__minus__81 { Ctr__PrefixOp__1 (rtkPosOf $1) } |- tok__plus__76 { Ctr__PrefixOp__2 (rtkPosOf $1) } |- tok__minus__77 { Ctr__PrefixOp__3 (rtkPosOf $1) }--PrimitiveTypeKeyword : qq_PrimitiveTypeKeyword { Anti_PrimitiveTypeKeyword (tkVal_qq_PrimitiveTypeKeyword $1) } |- tok_boolean_20 { Ctr__PrimitiveTypeKeyword__0 (rtkPosOf $1) } |- tok_byte_21 { Ctr__PrimitiveTypeKeyword__1 (rtkPosOf $1) } |- tok_char_22 { Ctr__PrimitiveTypeKeyword__2 (rtkPosOf $1) } |- tok_short_23 { Ctr__PrimitiveTypeKeyword__3 (rtkPosOf $1) } |- tok_int_24 { Ctr__PrimitiveTypeKeyword__4 (rtkPosOf $1) } |- tok_float_25 { Ctr__PrimitiveTypeKeyword__5 (rtkPosOf $1) } |- tok_long_26 { Ctr__PrimitiveTypeKeyword__6 (rtkPosOf $1) } |- tok_double_27 { Ctr__PrimitiveTypeKeyword__7 (rtkPosOf $1) } |- tok_void_28 { Ctr__PrimitiveTypeKeyword__8 (rtkPosOf $1) }--RelationalOp : qq_RelationalOp { Anti_RelationalOp (tkVal_qq_RelationalOp $1) } |- tok__symbol__70 { Ctr__RelationalOp__0 (rtkPosOf $1) } |- tok__symbol__71 { Ctr__RelationalOp__1 (rtkPosOf $1) } |- tok__symbol__eql__72 { Ctr__RelationalOp__2 (rtkPosOf $1) } |- tok__symbol__eql__73 { Ctr__RelationalOp__3 (rtkPosOf $1) }--Rule_1 : { Ctr__Rule_1__0 rtkNoPos } |- Package { Ctr__Rule_1__1 (rtkPosOf $1) $1 }--ListElem_ModifierList11 : qq_ModifierList { Anti_Rule_10 (tkVal_qq_ModifierList $1) } |- Rule_10 { $1 }--Rule_10 : Modifier { Ctr__Rule_10__1 (rtkPosOf $1) $1 } |- Annotation { Ctr__Rule_10__2 (rtkPosOf $1) $1 }--Rule_12 : {- empty -} { [] } |- Rule_12 Rule_13 { $2 : $1 }--Rule_13 : tok__coma__9 ClassOrInterfaceType { Ctr__Rule_13__0 (rtkPosOf $1) $2 }--Rule_14 : ClassOrInterfaceType { [$1] } |- Rule_14 tok__coma__9 ClassOrInterfaceType { $3 : $1 }--Rule_16 : { Ctr__Rule_16__0 rtkNoPos } |- ExtendsList { Ctr__Rule_16__1 (rtkPosOf $1) $1 }--Rule_17 : { Ctr__Rule_17__0 rtkNoPos } |- ImplementsList { Ctr__Rule_17__1 (rtkPosOf $1) $1 }--Rule_18 : { Ctr__Rule_18__0 rtkNoPos } |- ExtendsList { Ctr__Rule_18__1 (rtkPosOf $1) $1 }--Rule_2 : { Ctr__Rule_2__0 rtkNoPos } |- TypeDeclaration { Ctr__Rule_2__1 (rtkPosOf $1) $1 }--Rule_20 : { Ctr__Rule_20__0 rtkNoPos } |- Rule_21 { Ctr__Rule_20__1 (rtkPosOf $1) $1 }--Rule_21 : tok__lparen__7 Arglist tok__rparen__8 { Ctr__Rule_21__0 (rtkPosOf $1) $2 }--Rule_22 : { Ctr__Rule_22__0 rtkNoPos } |- Rule_23 { Ctr__Rule_22__1 (rtkPosOf $1) $1 }--Rule_23 : tok__symbol__14 FieldDeclarationList tok__symbol__15 { Ctr__Rule_23__0 (rtkPosOf $1) (reverse $2) }--Rule_24 : {- empty -} { [] } |- Rule_24 Rule_25 { $2 : $1 }--Rule_25 : tok__coma__9 EnumConstant { Ctr__Rule_25__0 (rtkPosOf $1) $2 }--Rule_26 : { Ctr__Rule_26__0 rtkNoPos } |- tok__coma__9 { Ctr__Rule_26__1 (rtkPosOf $1) }--Rule_27 : { Ctr__Rule_27__0 rtkNoPos } |- ImplementsList { Ctr__Rule_27__1 (rtkPosOf $1) $1 }--Rule_28 : { Ctr__Rule_28__0 rtkNoPos } |- Rule_29 { Ctr__Rule_28__1 (rtkPosOf $1) $1 }--Rule_29 : tok__semi__1 FieldDeclarationList { Ctr__Rule_29__0 (rtkPosOf $1) (reverse $2) }--Rule_3 : { Ctr__Rule_3__0 rtkNoPos } |- tok_static_3 { Ctr__Rule_3__1 (rtkPosOf $1) }--Rule_30 : MemberDeclaration { Ctr__Rule_30__0 (rtkPosOf $1) $1 } |- TypeDeclRest { Ctr__Rule_30__1 (rtkPosOf $1) $1 } |- StaticInitializer { Ctr__Rule_30__2 (rtkPosOf $1) $1 }--ListElem_Dims32 : qq_Dims { Anti_Rule_31 (tkVal_qq_Dims $1) } |- Rule_31 { $1 }--Rule_31 : tok__sq_bkt_l__18 tok__sq_bkt_r__19 { Ctr__Rule_31__1 (rtkPosOf $1) }--ListElem_NonEmptyDims34 : qq_NonEmptyDims { Anti_Rule_33 (tkVal_qq_NonEmptyDims $1) } |- Rule_33 { $1 }--Rule_33 : tok__sq_bkt_l__18 tok__sq_bkt_r__19 { Ctr__Rule_33__1 (rtkPosOf $1) }--Rule_35 : { Ctr__Rule_35__0 rtkNoPos } |- ParameterList { Ctr__Rule_35__1 (rtkPosOf $1) $1 }--Rule_36 : { Ctr__Rule_36__0 rtkNoPos } |- ThrowsClause { Ctr__Rule_36__1 (rtkPosOf $1) $1 }--Rule_37 : {- empty -} { [] } |- Rule_37 Rule_38 { $2 : $1 }--Rule_38 : tok__coma__9 CompoundName { Ctr__Rule_38__0 (rtkPosOf $1) $2 }--Rule_39 : { Ctr__Rule_39__0 rtkNoPos } |- ParameterList { Ctr__Rule_39__1 (rtkPosOf $1) $1 }--Rule_4 : { Ctr__Rule_4__0 rtkNoPos } |- Rule_5 { Ctr__Rule_4__1 (rtkPosOf $1) $1 }--Rule_40 : { Ctr__Rule_40__0 rtkNoPos } |- ThrowsClause { Ctr__Rule_40__1 (rtkPosOf $1) $1 }--Rule_41 : StatementBlock { Ctr__Rule_41__0 (rtkPosOf $1) $1 } |- Rule_42 tok__semi__1 { Ctr__Rule_41__1 (rtkPosOf $1) $1 }--Rule_42 : { Ctr__Rule_42__0 rtkNoPos } |- Rule_43 { Ctr__Rule_42__1 (rtkPosOf $1) $1 }--Rule_43 : tok_default_30 Expression { Ctr__Rule_43__0 (rtkPosOf $1) $2 }--ListElem_MoreVariableDeclarators45 : qq_MoreVariableDeclarators { Anti_Rule_44 (tkVal_qq_MoreVariableDeclarators $1) } |- Rule_44 { $1 }--Rule_44 : tok__coma__9 VariableDeclarator { Ctr__Rule_44__1 (rtkPosOf $1) $2 }--Rule_46 : {- empty -} { [] } |- Rule_46 Rule_47 { $2 : $1 }--Rule_47 : tok__coma__9 VariableDeclarator { Ctr__Rule_47__0 (rtkPosOf $1) $2 }--ListElem_LocalModifierList149 : qq_LocalModifierList1 { Anti_Rule_48 (tkVal_qq_LocalModifierList1 $1) } |- Rule_48 { $1 }--Rule_48 : tok_final_31 { Ctr__Rule_48__1 (rtkPosOf $1) } |- Annotation { Ctr__Rule_48__2 (rtkPosOf $1) $1 }--Rule_5 : tok__lparen__7 Rule_6 tok__rparen__8 { Ctr__Rule_5__0 (rtkPosOf $1) $2 }--Rule_50 : tok__eql__10 VariableInitializer { Ctr__Rule_50__0 (rtkPosOf $1) $2 }--Rule_51 : VariableInitializer Rule_52 Rule_54 { Ctr__Rule_51__0 (rtkPosOf $1) $1 (reverse $2) $3 }--Rule_52 : {- empty -} { [] } |- Rule_52 Rule_53 { $2 : $1 }--Rule_53 : tok__coma__9 VariableInitializer { Ctr__Rule_53__0 (rtkPosOf $1) $2 }--Rule_54 : { Ctr__Rule_54__0 rtkNoPos } |- tok__coma__9 { Ctr__Rule_54__1 (rtkPosOf $1) }--Rule_55 : {- empty -} { [] } |- Rule_55 Rule_56 { $2 : $1 }--Rule_56 : tok__coma__9 Parameter { Ctr__Rule_56__0 (rtkPosOf $1) $2 }--ListElem_ParamModifierList58 : qq_ParamModifierList { Anti_Rule_57 (tkVal_qq_ParamModifierList $1) } |- Rule_57 { $1 }--Rule_57 : tok_final_31 { Ctr__Rule_57__1 (rtkPosOf $1) } |- Annotation { Ctr__Rule_57__2 (rtkPosOf $1) $1 }--Rule_59 : { Ctr__Rule_59__0 rtkNoPos } |- tok__dot__dot__dot__32 { Ctr__Rule_59__1 (rtkPosOf $1) }--Rule_6 : { Ctr__Rule_6__0 rtkNoPos } |- AnnotationArguments { Ctr__Rule_6__1 (rtkPosOf $1) $1 }--Rule_61 : tok_else_41 Statement { Ctr__Rule_61__0 (rtkPosOf $1) $2 }--Rule_62 : VariableDeclaration { Ctr__Rule_62__0 (rtkPosOf $1) $1 } |- Expression tok__semi__1 { Ctr__Rule_62__1 (rtkPosOf $1) $1 } |- tok__semi__1 { Ctr__Rule_62__2 (rtkPosOf $1) }--ListElem_CatchList64 : qq_CatchList { Anti_Rule_63 (tkVal_qq_CatchList $1) } |- Rule_63 { $1 }--Rule_63 : tok_catch_46 tok__lparen__7 Parameter tok__rparen__8 Statement { Ctr__Rule_63__1 (rtkPosOf $1) $3 $5 }--Rule_65 : tok_finally_47 Statement { Ctr__Rule_65__0 (rtkPosOf $1) $2 }--ListElem_SwitchCaseList67 : qq_SwitchCaseList { Anti_Rule_66 (tkVal_qq_SwitchCaseList $1) } |- Rule_66 { $1 }--Rule_66 : tok_case_49 Expression tok__colon__36 { Ctr__Rule_66__1 (rtkPosOf $1) $2 } |- tok_default_30 tok__colon__36 { Ctr__Rule_66__2 (rtkPosOf $1) } |- Statement { Ctr__Rule_66__3 (rtkPosOf $1) $1 }--Rule_68 : { Ctr__Rule_68__0 rtkNoPos } |- Rule_69 { Ctr__Rule_68__1 (rtkPosOf $1) $1 }--Rule_69 : AssignmentOp AssignmentExpression { Ctr__Rule_69__0 (rtkPosOf $1) $1 $2 }--Rule_7 : {- empty -} { [] } |- Rule_7 Rule_8 { $2 : $1 }--Rule_70 : { Ctr__Rule_70__0 rtkNoPos } |- Rule_71 { Ctr__Rule_70__1 (rtkPosOf $1) $1 }--Rule_71 : tok__lparen__7 Arglist tok__rparen__8 { Ctr__Rule_71__0 (rtkPosOf $1) $2 }--Rule_72 : { Ctr__Rule_72__0 rtkNoPos } |- Rule_73 { Ctr__Rule_72__1 (rtkPosOf $1) $1 }--Rule_73 : tok__lparen__7 Arglist tok__rparen__8 { Ctr__Rule_73__0 (rtkPosOf $1) $2 }--Rule_74 : tok__lparen__7 Arglist tok__rparen__8 { Ctr__Rule_74__0 (rtkPosOf $1) $2 } |- DimExprs Rule_75 { Ctr__Rule_74__1 (rtkPosOf (reverse $1)) (reverse $1) $2 }--Rule_75 : { Ctr__Rule_75__0 rtkNoPos } |- NonEmptyDims { Ctr__Rule_75__1 (rtkPosOf (reverse $1)) (reverse $1) }--ListElem_DimExprs77 : qq_DimExprs { Anti_Rule_76 (tkVal_qq_DimExprs $1) } |- Rule_76 { $1 }--Rule_76 : tok__sq_bkt_l__18 Expression tok__sq_bkt_r__19 { Ctr__Rule_76__1 (rtkPosOf $1) $2 }--Rule_78 : Expression Rule_79 { Ctr__Rule_78__0 (rtkPosOf $1) $1 (reverse $2) }--Rule_79 : {- empty -} { [] } |- Rule_79 Rule_80 { $2 : $1 }--Rule_8 : tok__coma__9 AnnotationElement { Ctr__Rule_8__0 (rtkPosOf $1) $2 }--Rule_80 : tok__coma__9 Expression { Ctr__Rule_80__0 (rtkPosOf $1) $2 }--Rule_81 : {- empty -} { [] } |- Rule_81 Rule_82 { $2 : $1 }--Rule_82 : tok__coma__9 TypeArgument { Ctr__Rule_82__0 (rtkPosOf $1) $2 }--Rule_83 : tok__symbol__70 TypeParameter Rule_84 tok__symbol__71 { Ctr__Rule_83__0 (rtkPosOf $1) $2 (reverse $3) }--Rule_84 : {- empty -} { [] } |- Rule_84 Rule_85 { $2 : $1 }--Rule_85 : tok__coma__9 TypeParameter { Ctr__Rule_85__0 (rtkPosOf $1) $2 }--Rule_86 : { Ctr__Rule_86__0 rtkNoPos } |- Rule_87 { Ctr__Rule_86__1 (rtkPosOf $1) $1 }--Rule_87 : tok_extends_11 Type Rule_88 { Ctr__Rule_87__0 (rtkPosOf $1) $2 (reverse $3) }--Rule_88 : {- empty -} { [] } |- Rule_88 Rule_89 { $2 : $1 }--Rule_89 : tok__symbol__67 Type { Ctr__Rule_89__0 (rtkPosOf $1) $2 }--ListElem_CompoundNameTail91 : qq_CompoundNameTail { Anti_Rule_90 (tkVal_qq_CompoundNameTail $1) } |- Rule_90 { $1 }--Rule_90 : tok__dot__4 id { Ctr__Rule_90__1 (rtkPosOf $1) (tkVal_id $2) }--ShiftOp : qq_ShiftOp { Anti_ShiftOp (tkVal_qq_ShiftOp $1) } |- tok__symbol__symbol__75 { Ctr__ShiftOp__0 (rtkPosOf $1) } |- tok__symbol__71 tok__symbol__71 { Ctr__ShiftOp__1 (rtkPosOf $1) } |- tok__symbol__71 tok__symbol__71 tok__symbol__71 { Ctr__ShiftOp__2 (rtkPosOf $1) }--Statement : qq_Statement { Anti_Statement (tkVal_qq_Statement $1) } |- VariableDeclaration { Ctr__Statement__0 (rtkPosOf $1) $1 } |- tok_return_33 OptExpression tok__semi__1 { Ctr__Statement__1 (rtkPosOf $1) $2 } |- Expression tok__semi__1 { Ctr__Statement__2 (rtkPosOf $1) $1 } |- StatementBlock { Ctr__Statement__3 (rtkPosOf $1) $1 } |- IfStatement { Ctr__Statement__4 (rtkPosOf $1) $1 } |- DoStatement { Ctr__Statement__5 (rtkPosOf $1) $1 } |- WhileStatement { Ctr__Statement__6 (rtkPosOf $1) $1 } |- ForStatement { Ctr__Statement__7 (rtkPosOf $1) $1 } |- TryStatement { Ctr__Statement__8 (rtkPosOf $1) $1 } |- SwitchStatement { Ctr__Statement__9 (rtkPosOf $1) $1 } |- tok_synchronized_34 tok__lparen__7 Expression tok__rparen__8 Statement { Ctr__Statement__10 (rtkPosOf $1) $3 $5 } |- tok_throw_35 Expression tok__semi__1 { Ctr__Statement__11 (rtkPosOf $1) $2 } |- id tok__colon__36 Statement { Ctr__Statement__12 (rtkPosOf $1) (tkVal_id $1) $3 } |- tok_break_37 OptId tok__semi__1 { Ctr__Statement__13 (rtkPosOf $1) $2 } |- tok_continue_38 OptId tok__semi__1 { Ctr__Statement__14 (rtkPosOf $1) $2 } |- tok_super_39 tok__lparen__7 Arglist tok__rparen__8 tok__semi__1 { Ctr__Statement__15 (rtkPosOf $1) $3 } |- tok_this_40 tok__lparen__7 Arglist tok__rparen__8 tok__semi__1 { Ctr__Statement__16 (rtkPosOf $1) $3 } |- tok__semi__1 { Ctr__Statement__17 (rtkPosOf $1) }--ListElem_StatementList60 : qq_StatementList { Anti_Statement (tkVal_qq_StatementList $1) } |- Statement { $1 }--StatementBlock : qq_StatementBlock { Anti_StatementBlock (tkVal_qq_StatementBlock $1) } |- tok__symbol__14 StatementList tok__symbol__15 { Ctr__StatementBlock__0 (rtkPosOf $1) (reverse $2) }--StatementList : {- empty -} { [] } |- StatementList ListElem_StatementList60 { $2 : $1 }--StaticInitializer : qq_StaticInitializer { Anti_StaticInitializer (tkVal_qq_StaticInitializer $1) } |- StatementBlock { Ctr__StaticInitializer__0 (rtkPosOf $1) $1 }--SwitchCaseList : {- empty -} { [] } |- SwitchCaseList ListElem_SwitchCaseList67 { $2 : $1 }--SwitchStatement : qq_SwitchStatement { Anti_SwitchStatement (tkVal_qq_SwitchStatement $1) } |- tok_switch_50 tok__lparen__7 Expression tok__rparen__8 tok__symbol__14 SwitchCaseList tok__symbol__15 { Ctr__SwitchStatement__0 (rtkPosOf $1) $3 (reverse $6) }--ThrowsClause : qq_ThrowsClause { Anti_ThrowsClause (tkVal_qq_ThrowsClause $1) } |- tok_throws_29 CompoundName Rule_37 { Ctr__ThrowsClause__0 (rtkPosOf $1) $2 (reverse $3) }--TryStatement : qq_TryStatement { Anti_TryStatement (tkVal_qq_TryStatement $1) } |- tok_try_48 Statement CatchList OptFinally { Ctr__TryStatement__0 (rtkPosOf $1) $2 (reverse $3) $4 }--Type : qq_Type { Anti_Type (tkVal_qq_Type $1) } |- PrimitiveTypeKeyword Dims { Ctr__Type__0 (rtkPosOf $1) $1 (reverse $2) } |- CompoundName NonEmptyTypeArguments Dims { Ctr__Type__1 (rtkPosOf $1) $1 $2 (reverse $3) } |- CompoundName NonEmptyDims { Ctr__Type__2 (rtkPosOf $1) $1 (reverse $2) } |- CompoundName { Ctr__Type__3 (rtkPosOf $1) $1 }--TypeArgument : qq_TypeArgument { Anti_TypeArgument (tkVal_qq_TypeArgument $1) } |- Type { Ctr__TypeArgument__0 (rtkPosOf $1) $1 } |- WildcardType { Ctr__TypeArgument__1 (rtkPosOf $1) $1 }--TypeArguments : qq_TypeArguments { Anti_TypeArguments (tkVal_qq_TypeArguments $1) } |- { Ctr__TypeArguments__0 rtkNoPos } |- NonEmptyTypeArguments { Ctr__TypeArguments__1 (rtkPosOf $1) $1 }--TypeDeclRest : qq_TypeDeclRest { Anti_TypeDeclRest (tkVal_qq_TypeDeclRest $1) } |- ClassDeclaration { Ctr__TypeDeclRest__0 (rtkPosOf $1) $1 } |- InterfaceDeclaration { Ctr__TypeDeclRest__1 (rtkPosOf $1) $1 } |- EnumDeclaration { Ctr__TypeDeclRest__2 (rtkPosOf $1) $1 } |- AnnotationDeclaration { Ctr__TypeDeclRest__3 (rtkPosOf $1) $1 }--TypeDeclaration : qq_TypeDeclaration { Anti_TypeDeclaration (tkVal_qq_TypeDeclaration $1) } |- OptDocComment ModifierList TypeDeclRest { Ctr__TypeDeclaration__0 (rtkPosOf $1) $1 (reverse $2) $3 }--TypeParameter : qq_TypeParameter { Anti_TypeParameter (tkVal_qq_TypeParameter $1) } |- id Rule_86 { Ctr__TypeParameter__0 (rtkPosOf $1) (tkVal_id $1) $2 }--TypeParameters : qq_TypeParameters { Anti_TypeParameters (tkVal_qq_TypeParameters $1) } |- { Ctr__TypeParameters__0 rtkNoPos } |- Rule_83 { Ctr__TypeParameters__1 (rtkPosOf $1) $1 }--TypeSpecifier : qq_TypeSpecifier { Anti_TypeSpecifier (tkVal_qq_TypeSpecifier $1) } |- tok_boolean_20 { Ctr__TypeSpecifier__0 (rtkPosOf $1) } |- tok_byte_21 { Ctr__TypeSpecifier__1 (rtkPosOf $1) } |- tok_char_22 { Ctr__TypeSpecifier__2 (rtkPosOf $1) } |- tok_short_23 { Ctr__TypeSpecifier__3 (rtkPosOf $1) } |- tok_int_24 { Ctr__TypeSpecifier__4 (rtkPosOf $1) } |- tok_float_25 { Ctr__TypeSpecifier__5 (rtkPosOf $1) } |- tok_long_26 { Ctr__TypeSpecifier__6 (rtkPosOf $1) } |- tok_double_27 { Ctr__TypeSpecifier__7 (rtkPosOf $1) } |- tok_void_28 { Ctr__TypeSpecifier__8 (rtkPosOf $1) } |- CompoundName TypeArguments { Ctr__TypeSpecifier__9 (rtkPosOf $1) $1 $2 }--VariableDeclaration : qq_VariableDeclaration { Anti_VariableDeclaration (tkVal_qq_VariableDeclaration $1) } |- Type VariableDeclaratorList tok__semi__1 { Ctr__VariableDeclaration__0 (rtkPosOf $1) $1 $2 } |- LocalModifierList1 Type VariableDeclaratorList tok__semi__1 { Ctr__VariableDeclaration__1 (rtkPosOf (reverse $1)) (reverse $1) $2 $3 }--VariableDeclarator : qq_VariableDeclarator { Anti_VariableDeclarator (tkVal_qq_VariableDeclarator $1) } |- id Dims OptVariableInitializer { Ctr__VariableDeclarator__0 (rtkPosOf $1) (tkVal_id $1) (reverse $2) $3 }--VariableDeclaratorList : qq_VariableDeclaratorList { Anti_VariableDeclaratorList (tkVal_qq_VariableDeclaratorList $1) } |- VariableDeclarator Rule_46 { Ctr__VariableDeclaratorList__0 (rtkPosOf $1) $1 (reverse $2) }--VariableInitializer : qq_VariableInitializer { Anti_VariableInitializer (tkVal_qq_VariableInitializer $1) } |- Expression { Ctr__VariableInitializer__0 (rtkPosOf $1) $1 } |- tok__symbol__14 VariableInitializerList tok__symbol__15 { Ctr__VariableInitializer__1 (rtkPosOf $1) $2 }--VariableInitializerList : qq_VariableInitializerList { Anti_VariableInitializerList (tkVal_qq_VariableInitializerList $1) } |- { Ctr__VariableInitializerList__0 rtkNoPos } |- Rule_51 { Ctr__VariableInitializerList__1 (rtkPosOf $1) $1 }--WhileStatement : qq_WhileStatement { Anti_WhileStatement (tkVal_qq_WhileStatement $1) } |- tok_while_44 tok__lparen__7 Expression tok__rparen__8 Statement { Ctr__WhileStatement__0 (rtkPosOf $1) $3 $5 }--WildcardType : qq_WildcardType { Anti_WildcardType (tkVal_qq_WildcardType $1) } |- tok__symbol__62 { Ctr__WildcardType__0 (rtkPosOf $1) } |- tok__symbol__62 tok_extends_11 Type { Ctr__WildcardType__1 (rtkPosOf $1) $3 } |- tok__symbol__62 tok_super_39 Type { Ctr__WildcardType__2 (rtkPosOf $1) $3 }---{-parseError :: [L.PosToken] -> Either String a-parseError [] = Left "unexpected end of input"-parseError (L.PosToken (L.AlexPn _ line col) tok : _) =- Left $ show line ++ ":" ++ show col ++ ":unexpected " ++ showRtkToken tok---- Render a token the way it appears in the source, for error messages-showRtkToken :: L.Token -> String-showRtkToken L.EndOfFile = "end of input"-showRtkToken L.Tk__tok_AdditiveOp_dummy_178 = "'tok_AdditiveOp_dummy_178'"-showRtkToken L.Tk__tok_Annotation_dummy_177 = "'tok_Annotation_dummy_177'"-showRtkToken L.Tk__tok_AnnotationArguments_dummy_176 = "'tok_AnnotationArguments_dummy_176'"-showRtkToken L.Tk__tok_AnnotationDeclaration_dummy_175 = "'tok_AnnotationDeclaration_dummy_175'"-showRtkToken L.Tk__tok_AnnotationElement_dummy_174 = "'tok_AnnotationElement_dummy_174'"-showRtkToken L.Tk__tok_AnnotationList_dummy_173 = "'tok_AnnotationList_dummy_173'"-showRtkToken L.Tk__tok_AnnotationTypeElement_dummy_172 = "'tok_AnnotationTypeElement_dummy_172'"-showRtkToken L.Tk__tok_AnnotationTypeElementList_dummy_171 = "'tok_AnnotationTypeElementList_dummy_171'"-showRtkToken L.Tk__tok_Arglist_dummy_170 = "'tok_Arglist_dummy_170'"-showRtkToken L.Tk__tok_AssignmentOp_dummy_169 = "'tok_AssignmentOp_dummy_169'"-showRtkToken L.Tk__tok_CatchList_dummy_168 = "'tok_CatchList_dummy_168'"-showRtkToken L.Tk__tok_ClassDeclaration_dummy_167 = "'tok_ClassDeclaration_dummy_167'"-showRtkToken L.Tk__tok_ClassOrInterfaceType_dummy_166 = "'tok_ClassOrInterfaceType_dummy_166'"-showRtkToken L.Tk__tok_CompilationUnit_dummy_165 = "'tok_CompilationUnit_dummy_165'"-showRtkToken L.Tk__tok_CompoundName_dummy_164 = "'tok_CompoundName_dummy_164'"-showRtkToken L.Tk__tok_CompoundNameTail_dummy_163 = "'tok_CompoundNameTail_dummy_163'"-showRtkToken L.Tk__tok_CreationExpression_dummy_162 = "'tok_CreationExpression_dummy_162'"-showRtkToken L.Tk__tok_DimExprs_dummy_161 = "'tok_DimExprs_dummy_161'"-showRtkToken L.Tk__tok_Dims_dummy_160 = "'tok_Dims_dummy_160'"-showRtkToken L.Tk__tok_DoStatement_dummy_159 = "'tok_DoStatement_dummy_159'"-showRtkToken L.Tk__tok_DocComment_dummy_158 = "'tok_DocComment_dummy_158'"-showRtkToken L.Tk__tok_EnumConstant_dummy_157 = "'tok_EnumConstant_dummy_157'"-showRtkToken L.Tk__tok_EnumConstantList_dummy_156 = "'tok_EnumConstantList_dummy_156'"-showRtkToken L.Tk__tok_EnumDeclaration_dummy_155 = "'tok_EnumDeclaration_dummy_155'"-showRtkToken L.Tk__tok_EqualityOp_dummy_154 = "'tok_EqualityOp_dummy_154'"-showRtkToken L.Tk__tok_Expression_dummy_153 = "'tok_Expression_dummy_153'"-showRtkToken L.Tk__tok_ExtendsList_dummy_152 = "'tok_ExtendsList_dummy_152'"-showRtkToken L.Tk__tok_FieldDeclaration_dummy_151 = "'tok_FieldDeclaration_dummy_151'"-showRtkToken L.Tk__tok_FieldDeclarationList_dummy_150 = "'tok_FieldDeclarationList_dummy_150'"-showRtkToken L.Tk__tok_ForStatement_dummy_149 = "'tok_ForStatement_dummy_149'"-showRtkToken L.Tk__tok_IfStatement_dummy_148 = "'tok_IfStatement_dummy_148'"-showRtkToken L.Tk__tok_ImplementsList_dummy_147 = "'tok_ImplementsList_dummy_147'"-showRtkToken L.Tk__tok_ImportHead_dummy_146 = "'tok_ImportHead_dummy_146'"-showRtkToken L.Tk__tok_ImportList_dummy_145 = "'tok_ImportList_dummy_145'"-showRtkToken L.Tk__tok_ImportName_dummy_144 = "'tok_ImportName_dummy_144'"-showRtkToken L.Tk__tok_ImportStatement_dummy_143 = "'tok_ImportStatement_dummy_143'"-showRtkToken L.Tk__tok_InterfaceDeclaration_dummy_142 = "'tok_InterfaceDeclaration_dummy_142'"-showRtkToken L.Tk__tok_Java_dummy_179 = "'tok_Java_dummy_179'"-showRtkToken L.Tk__tok_Literal_dummy_141 = "'tok_Literal_dummy_141'"-showRtkToken L.Tk__tok_LocalModifierList1_dummy_140 = "'tok_LocalModifierList1_dummy_140'"-showRtkToken L.Tk__tok_MemberAfterFirstId_dummy_139 = "'tok_MemberAfterFirstId_dummy_139'"-showRtkToken L.Tk__tok_MemberDeclaration_dummy_138 = "'tok_MemberDeclaration_dummy_138'"-showRtkToken L.Tk__tok_MemberRest_dummy_137 = "'tok_MemberRest_dummy_137'"-showRtkToken L.Tk__tok_Modifier_dummy_136 = "'tok_Modifier_dummy_136'"-showRtkToken L.Tk__tok_ModifierList_dummy_135 = "'tok_ModifierList_dummy_135'"-showRtkToken L.Tk__tok_MoreTypeSpecifier_dummy_134 = "'tok_MoreTypeSpecifier_dummy_134'"-showRtkToken L.Tk__tok_MoreVariableDeclarators_dummy_133 = "'tok_MoreVariableDeclarators_dummy_133'"-showRtkToken L.Tk__tok_MultiplicativeOp_dummy_132 = "'tok_MultiplicativeOp_dummy_132'"-showRtkToken L.Tk__tok_NonEmptyDims_dummy_131 = "'tok_NonEmptyDims_dummy_131'"-showRtkToken L.Tk__tok_NonEmptyTypeArguments_dummy_130 = "'tok_NonEmptyTypeArguments_dummy_130'"-showRtkToken L.Tk__tok_OptDocComment_dummy_129 = "'tok_OptDocComment_dummy_129'"-showRtkToken L.Tk__tok_OptElsePart_dummy_128 = "'tok_OptElsePart_dummy_128'"-showRtkToken L.Tk__tok_OptExpression_dummy_127 = "'tok_OptExpression_dummy_127'"-showRtkToken L.Tk__tok_OptFinally_dummy_126 = "'tok_OptFinally_dummy_126'"-showRtkToken L.Tk__tok_OptId_dummy_125 = "'tok_OptId_dummy_125'"-showRtkToken L.Tk__tok_OptVariableInitializer_dummy_124 = "'tok_OptVariableInitializer_dummy_124'"-showRtkToken L.Tk__tok_Package_dummy_123 = "'tok_Package_dummy_123'"-showRtkToken L.Tk__tok_ParamModifierList_dummy_122 = "'tok_ParamModifierList_dummy_122'"-showRtkToken L.Tk__tok_Parameter_dummy_121 = "'tok_Parameter_dummy_121'"-showRtkToken L.Tk__tok_ParameterList_dummy_120 = "'tok_ParameterList_dummy_120'"-showRtkToken L.Tk__tok_PostfixOp_dummy_119 = "'tok_PostfixOp_dummy_119'"-showRtkToken L.Tk__tok_PrefixOp_dummy_118 = "'tok_PrefixOp_dummy_118'"-showRtkToken L.Tk__tok_PrimitiveTypeKeyword_dummy_117 = "'tok_PrimitiveTypeKeyword_dummy_117'"-showRtkToken L.Tk__tok_RelationalOp_dummy_116 = "'tok_RelationalOp_dummy_116'"-showRtkToken L.Tk__tok_ShiftOp_dummy_115 = "'tok_ShiftOp_dummy_115'"-showRtkToken L.Tk__tok_Statement_dummy_114 = "'tok_Statement_dummy_114'"-showRtkToken L.Tk__tok_StatementBlock_dummy_113 = "'tok_StatementBlock_dummy_113'"-showRtkToken L.Tk__tok_StatementList_dummy_112 = "'tok_StatementList_dummy_112'"-showRtkToken L.Tk__tok_StaticInitializer_dummy_111 = "'tok_StaticInitializer_dummy_111'"-showRtkToken L.Tk__tok_SwitchCaseList_dummy_110 = "'tok_SwitchCaseList_dummy_110'"-showRtkToken L.Tk__tok_SwitchStatement_dummy_109 = "'tok_SwitchStatement_dummy_109'"-showRtkToken L.Tk__tok_ThrowsClause_dummy_108 = "'tok_ThrowsClause_dummy_108'"-showRtkToken L.Tk__tok_TryStatement_dummy_107 = "'tok_TryStatement_dummy_107'"-showRtkToken L.Tk__tok_Type_dummy_106 = "'tok_Type_dummy_106'"-showRtkToken L.Tk__tok_TypeArgument_dummy_105 = "'tok_TypeArgument_dummy_105'"-showRtkToken L.Tk__tok_TypeArguments_dummy_104 = "'tok_TypeArguments_dummy_104'"-showRtkToken L.Tk__tok_TypeDeclRest_dummy_103 = "'tok_TypeDeclRest_dummy_103'"-showRtkToken L.Tk__tok_TypeDeclaration_dummy_102 = "'tok_TypeDeclaration_dummy_102'"-showRtkToken L.Tk__tok_TypeParameter_dummy_101 = "'tok_TypeParameter_dummy_101'"-showRtkToken L.Tk__tok_TypeParameters_dummy_100 = "'tok_TypeParameters_dummy_100'"-showRtkToken L.Tk__tok_TypeSpecifier_dummy_99 = "'tok_TypeSpecifier_dummy_99'"-showRtkToken L.Tk__tok_VariableDeclaration_dummy_98 = "'tok_VariableDeclaration_dummy_98'"-showRtkToken L.Tk__tok_VariableDeclarator_dummy_97 = "'tok_VariableDeclarator_dummy_97'"-showRtkToken L.Tk__tok_VariableDeclaratorList_dummy_96 = "'tok_VariableDeclaratorList_dummy_96'"-showRtkToken L.Tk__tok_VariableInitializer_dummy_95 = "'tok_VariableInitializer_dummy_95'"-showRtkToken L.Tk__tok_VariableInitializerList_dummy_94 = "'tok_VariableInitializerList_dummy_94'"-showRtkToken L.Tk__tok_WhileStatement_dummy_93 = "'tok_WhileStatement_dummy_93'"-showRtkToken L.Tk__tok_WildcardType_dummy_92 = "'tok_WildcardType_dummy_92'"-showRtkToken L.Tk__tok__tilde__82 = "'~'"-showRtkToken L.Tk__tok__symbol__15 = "'}'"-showRtkToken L.Tk__tok__pipe__pipe__63 = "'||'"-showRtkToken L.Tk__tok__pipe__eql__55 = "'|='"-showRtkToken L.Tk__tok__pipe__65 = "'|'"-showRtkToken L.Tk__tok__symbol__14 = "'{'"-showRtkToken L.Tk__tok_while_44 = "'while'"-showRtkToken L.Tk__tok_void_28 = "'void'"-showRtkToken L.Tk__tok_try_48 = "'try'"-showRtkToken L.Tk__tok_true_85 = "'true'"-showRtkToken L.Tk__tok_transient_94 = "'transient'"-showRtkToken L.Tk__tok_throws_29 = "'throws'"-showRtkToken L.Tk__tok_throw_35 = "'throw'"-showRtkToken L.Tk__tok_threadsafe_93 = "'threadsafe'"-showRtkToken L.Tk__tok_this_40 = "'this'"-showRtkToken L.Tk__tok_synchronized_34 = "'synchronized'"-showRtkToken L.Tk__tok_switch_50 = "'switch'"-showRtkToken L.Tk__tok_super_39 = "'super'"-showRtkToken L.Tk__tok_static_3 = "'static'"-showRtkToken L.Tk__tok_short_23 = "'short'"-showRtkToken L.Tk__tok_return_33 = "'return'"-showRtkToken L.Tk__tok_public_88 = "'public'"-showRtkToken L.Tk__tok_protected_90 = "'protected'"-showRtkToken L.Tk__tok_private_89 = "'private'"-showRtkToken L.Tk__tok_package_0 = "'package'"-showRtkToken L.Tk__tok_null_87 = "'null'"-showRtkToken L.Tk__tok_new_84 = "'new'"-showRtkToken L.Tk__tok_native_91 = "'native'"-showRtkToken L.Tk__tok_long_26 = "'long'"-showRtkToken L.Tk__tok_interface_16 = "'interface'"-showRtkToken L.Tk__tok_int_24 = "'int'"-showRtkToken L.Tk__tok_instanceof_74 = "'instanceof'"-showRtkToken L.Tk__tok_import_2 = "'import'"-showRtkToken L.Tk__tok_implements_12 = "'implements'"-showRtkToken L.Tk__tok_if_42 = "'if'"-showRtkToken L.Tk__tok_for_45 = "'for'"-showRtkToken L.Tk__tok_float_25 = "'float'"-showRtkToken L.Tk__tok_finally_47 = "'finally'"-showRtkToken L.Tk__tok_final_31 = "'final'"-showRtkToken L.Tk__tok_false_86 = "'false'"-showRtkToken L.Tk__tok_extends_11 = "'extends'"-showRtkToken L.Tk__tok_enum_17 = "'enum'"-showRtkToken L.Tk__tok_else_41 = "'else'"-showRtkToken L.Tk__tok_double_27 = "'double'"-showRtkToken L.Tk__tok_do_43 = "'do'"-showRtkToken L.Tk__tok_default_30 = "'default'"-showRtkToken L.Tk__tok_continue_38 = "'continue'"-showRtkToken L.Tk__tok_class_13 = "'class'"-showRtkToken L.Tk__tok_char_22 = "'char'"-showRtkToken L.Tk__tok_catch_46 = "'catch'"-showRtkToken L.Tk__tok_case_49 = "'case'"-showRtkToken L.Tk__tok_byte_21 = "'byte'"-showRtkToken L.Tk__tok_break_37 = "'break'"-showRtkToken L.Tk__tok_boolean_20 = "'boolean'"-showRtkToken L.Tk__tok_abstract_92 = "'abstract'"-showRtkToken L.Tk__tok__symbol__eql__57 = "'^='"-showRtkToken L.Tk__tok__symbol__66 = "'^'"-showRtkToken L.Tk__tok__sq_bkt_r__19 = "']'"-showRtkToken L.Tk__tok__sq_bkt_l__18 = "'['"-showRtkToken L.Tk__tok__symbol__6 = "'@'"-showRtkToken L.Tk__tok__symbol__62 = "'?'"-showRtkToken L.Tk__tok__symbol__symbol__symbol__eql__61 = "'>>>='"-showRtkToken L.Tk__tok__symbol__symbol__eql__60 = "'>>='"-showRtkToken L.Tk__tok__symbol__eql__73 = "'>='"-showRtkToken L.Tk__tok__symbol__71 = "'>'"-showRtkToken L.Tk__tok__eql__eql__68 = "'=='"-showRtkToken L.Tk__tok__eql__10 = "'='"-showRtkToken L.Tk__tok__symbol__eql__72 = "'<='"-showRtkToken L.Tk__tok__symbol__symbol__eql__59 = "'<<='"-showRtkToken L.Tk__tok__symbol__symbol__75 = "'<<'"-showRtkToken L.Tk__tok__symbol__70 = "'<'"-showRtkToken L.Tk__tok__semi__1 = "';'"-showRtkToken L.Tk__tok__colon__36 = "':'"-showRtkToken L.Tk__tok__symbol__eql__54 = "'/='"-showRtkToken L.Tk__tok__symbol__78 = "'/'"-showRtkToken L.Tk__tok__dot__dot__dot__32 = "'...'"-showRtkToken L.Tk__tok__dot__4 = "'.'"-showRtkToken L.Tk__tok__minus__eql__52 = "'-='"-showRtkToken L.Tk__tok__minus__minus__81 = "'--'"-showRtkToken L.Tk__tok__minus__77 = "'-'"-showRtkToken L.Tk__tok__coma__9 = "','"-showRtkToken L.Tk__tok__plus__eql__51 = "'+='"-showRtkToken L.Tk__tok__plus__plus__80 = "'++'"-showRtkToken L.Tk__tok__plus__76 = "'+'"-showRtkToken L.Tk__tok__star__eql__53 = "'*='"-showRtkToken L.Tk__tok__star__5 = "'*'"-showRtkToken L.Tk__tok__rparen__8 = "')'"-showRtkToken L.Tk__tok__lparen__7 = "'('"-showRtkToken L.Tk__tok__symbol__eql__56 = "'&='"-showRtkToken L.Tk__tok__symbol__symbol__64 = "'&&'"-showRtkToken L.Tk__tok__symbol__67 = "'&'"-showRtkToken L.Tk__tok__symbol__eql__58 = "'%='"-showRtkToken L.Tk__tok__symbol__79 = "'%'"-showRtkToken L.Tk__tok__exclamation__eql__69 = "'!='"-showRtkToken L.Tk__tok__exclamation__83 = "'!'"-showRtkToken (L.Tk__doccomment v) = "doccomment " ++ show v-showRtkToken (L.Tk__id v) = "id " ++ show v-showRtkToken (L.Tk__string v) = "string " ++ show v-showRtkToken (L.Tk__char v) = "char " ++ show v-showRtkToken (L.Tk__floatTypeSuffix v) = "floatTypeSuffix " ++ show v-showRtkToken (L.Tk__exponentPart v) = "exponentPart " ++ show v-showRtkToken (L.Tk__floatLiteral v) = "floatLiteral " ++ show v-showRtkToken (L.Tk__integerLiteral v) = "integerLiteral " ++ show v-showRtkToken (L.Tk__qq_CompoundName v) = "qq_CompoundName " ++ show v-showRtkToken (L.Tk__qq_CompoundNameTail v) = "qq_CompoundNameTail " ++ show v-showRtkToken (L.Tk__qq_Modifier v) = "qq_Modifier " ++ show v-showRtkToken (L.Tk__qq_TypeSpecifier v) = "qq_TypeSpecifier " ++ show v-showRtkToken (L.Tk__qq_Type v) = "qq_Type " ++ show v-showRtkToken (L.Tk__qq_TypeParameter v) = "qq_TypeParameter " ++ show v-showRtkToken (L.Tk__qq_TypeParameters v) = "qq_TypeParameters " ++ show v-showRtkToken (L.Tk__qq_WildcardType v) = "qq_WildcardType " ++ show v-showRtkToken (L.Tk__qq_TypeArgument v) = "qq_TypeArgument " ++ show v-showRtkToken (L.Tk__qq_NonEmptyTypeArguments v) = "qq_NonEmptyTypeArguments " ++ show v-showRtkToken (L.Tk__qq_TypeArguments v) = "qq_TypeArguments " ++ show v-showRtkToken (L.Tk__qq_Arglist v) = "qq_Arglist " ++ show v-showRtkToken (L.Tk__qq_Literal v) = "qq_Literal " ++ show v-showRtkToken (L.Tk__qq_DimExprs v) = "qq_DimExprs " ++ show v-showRtkToken (L.Tk__qq_CreationExpression v) = "qq_CreationExpression " ++ show v-showRtkToken (L.Tk__qq_PostfixOp v) = "qq_PostfixOp " ++ show v-showRtkToken (L.Tk__qq_PrefixOp v) = "qq_PrefixOp " ++ show v-showRtkToken (L.Tk__qq_MultiplicativeOp v) = "qq_MultiplicativeOp " ++ show v-showRtkToken (L.Tk__qq_AdditiveOp v) = "qq_AdditiveOp " ++ show v-showRtkToken (L.Tk__qq_ShiftOp v) = "qq_ShiftOp " ++ show v-showRtkToken (L.Tk__qq_RelationalOp v) = "qq_RelationalOp " ++ show v-showRtkToken (L.Tk__qq_EqualityOp v) = "qq_EqualityOp " ++ show v-showRtkToken (L.Tk__qq_AssignmentOp v) = "qq_AssignmentOp " ++ show v-showRtkToken (L.Tk__qq_Expression v) = "qq_Expression " ++ show v-showRtkToken (L.Tk__qq_SwitchStatement v) = "qq_SwitchStatement " ++ show v-showRtkToken (L.Tk__qq_SwitchCaseList v) = "qq_SwitchCaseList " ++ show v-showRtkToken (L.Tk__qq_TryStatement v) = "qq_TryStatement " ++ show v-showRtkToken (L.Tk__qq_OptFinally v) = "qq_OptFinally " ++ show v-showRtkToken (L.Tk__qq_CatchList v) = "qq_CatchList " ++ show v-showRtkToken (L.Tk__qq_ForStatement v) = "qq_ForStatement " ++ show v-showRtkToken (L.Tk__qq_WhileStatement v) = "qq_WhileStatement " ++ show v-showRtkToken (L.Tk__qq_DoStatement v) = "qq_DoStatement " ++ show v-showRtkToken (L.Tk__qq_IfStatement v) = "qq_IfStatement " ++ show v-showRtkToken (L.Tk__qq_OptElsePart v) = "qq_OptElsePart " ++ show v-showRtkToken (L.Tk__qq_Statement v) = "qq_Statement " ++ show v-showRtkToken (L.Tk__qq_OptId v) = "qq_OptId " ++ show v-showRtkToken (L.Tk__qq_OptExpression v) = "qq_OptExpression " ++ show v-showRtkToken (L.Tk__qq_StatementList v) = "qq_StatementList " ++ show v-showRtkToken (L.Tk__qq_Parameter v) = "qq_Parameter " ++ show v-showRtkToken (L.Tk__qq_ParamModifierList v) = "qq_ParamModifierList " ++ show v-showRtkToken (L.Tk__qq_ParameterList v) = "qq_ParameterList " ++ show v-showRtkToken (L.Tk__qq_StaticInitializer v) = "qq_StaticInitializer " ++ show v-showRtkToken (L.Tk__qq_VariableInitializer v) = "qq_VariableInitializer " ++ show v-showRtkToken (L.Tk__qq_VariableInitializerList v) = "qq_VariableInitializerList " ++ show v-showRtkToken (L.Tk__qq_VariableDeclarator v) = "qq_VariableDeclarator " ++ show v-showRtkToken (L.Tk__qq_OptVariableInitializer v) = "qq_OptVariableInitializer " ++ show v-showRtkToken (L.Tk__qq_LocalModifierList1 v) = "qq_LocalModifierList1 " ++ show v-showRtkToken (L.Tk__qq_VariableDeclaration v) = "qq_VariableDeclaration " ++ show v-showRtkToken (L.Tk__qq_VariableDeclaratorList v) = "qq_VariableDeclaratorList " ++ show v-showRtkToken (L.Tk__qq_StatementBlock v) = "qq_StatementBlock " ++ show v-showRtkToken (L.Tk__qq_MoreVariableDeclarators v) = "qq_MoreVariableDeclarators " ++ show v-showRtkToken (L.Tk__qq_MemberRest v) = "qq_MemberRest " ++ show v-showRtkToken (L.Tk__qq_ThrowsClause v) = "qq_ThrowsClause " ++ show v-showRtkToken (L.Tk__qq_MoreTypeSpecifier v) = "qq_MoreTypeSpecifier " ++ show v-showRtkToken (L.Tk__qq_MemberAfterFirstId v) = "qq_MemberAfterFirstId " ++ show v-showRtkToken (L.Tk__qq_PrimitiveTypeKeyword v) = "qq_PrimitiveTypeKeyword " ++ show v-showRtkToken (L.Tk__qq_MemberDeclaration v) = "qq_MemberDeclaration " ++ show v-showRtkToken (L.Tk__qq_NonEmptyDims v) = "qq_NonEmptyDims " ++ show v-showRtkToken (L.Tk__qq_Dims v) = "qq_Dims " ++ show v-showRtkToken (L.Tk__qq_FieldDeclaration v) = "qq_FieldDeclaration " ++ show v-showRtkToken (L.Tk__qq_TypeDeclRest v) = "qq_TypeDeclRest " ++ show v-showRtkToken (L.Tk__qq_EnumDeclaration v) = "qq_EnumDeclaration " ++ show v-showRtkToken (L.Tk__qq_EnumConstantList v) = "qq_EnumConstantList " ++ show v-showRtkToken (L.Tk__qq_EnumConstant v) = "qq_EnumConstant " ++ show v-showRtkToken (L.Tk__qq_AnnotationTypeElement v) = "qq_AnnotationTypeElement " ++ show v-showRtkToken (L.Tk__qq_AnnotationTypeElementList v) = "qq_AnnotationTypeElementList " ++ show v-showRtkToken (L.Tk__qq_AnnotationDeclaration v) = "qq_AnnotationDeclaration " ++ show v-showRtkToken (L.Tk__qq_InterfaceDeclaration v) = "qq_InterfaceDeclaration " ++ show v-showRtkToken (L.Tk__qq_ClassDeclaration v) = "qq_ClassDeclaration " ++ show v-showRtkToken (L.Tk__qq_FieldDeclarationList v) = "qq_FieldDeclarationList " ++ show v-showRtkToken (L.Tk__qq_ImplementsList v) = "qq_ImplementsList " ++ show v-showRtkToken (L.Tk__qq_ExtendsList v) = "qq_ExtendsList " ++ show v-showRtkToken (L.Tk__qq_ClassOrInterfaceType v) = "qq_ClassOrInterfaceType " ++ show v-showRtkToken (L.Tk__qq_ModifierList v) = "qq_ModifierList " ++ show v-showRtkToken (L.Tk__qq_AnnotationList v) = "qq_AnnotationList " ++ show v-showRtkToken (L.Tk__qq_AnnotationElement v) = "qq_AnnotationElement " ++ show v-showRtkToken (L.Tk__qq_AnnotationArguments v) = "qq_AnnotationArguments " ++ show v-showRtkToken (L.Tk__qq_Annotation v) = "qq_Annotation " ++ show v-showRtkToken (L.Tk__qq_DocComment v) = "qq_DocComment " ++ show v-showRtkToken (L.Tk__qq_ImportHead v) = "qq_ImportHead " ++ show v-showRtkToken (L.Tk__qq_ImportName v) = "qq_ImportName " ++ show v-showRtkToken (L.Tk__qq_ImportStatement v) = "qq_ImportStatement " ++ show v-showRtkToken (L.Tk__qq_Package v) = "qq_Package " ++ show v-showRtkToken (L.Tk__qq_CompilationUnit v) = "qq_CompilationUnit " ++ show v-showRtkToken (L.Tk__qq_ImportList v) = "qq_ImportList " ++ show v-showRtkToken (L.Tk__qq_TypeDeclaration v) = "qq_TypeDeclaration " ++ show v-showRtkToken (L.Tk__qq_OptDocComment v) = "qq_OptDocComment " ++ show v-showRtkToken (L.Tk__qq_Java v) = "qq_Java " ++ show v---- Source position of a node: every constructor except the Anti_* splice--- artifacts stores the position of its alternative's first symbol in its--- first field. Positions are transparent for equality and ordering, so two--- ASTs that differ only in source positions (e.g. a quasi-quote parsed at--- compile time vs the same construct parsed at run time) compare equal.-newtype RtkPos = RtkPos L.AlexPosn deriving (Show, Gen.Data, Gen.Typeable)-instance Eq RtkPos where _ == _ = True-instance Ord RtkPos where compare _ _ = EQ---- The position used where no source token exists: empty productions, empty--- lists, absent optionals and Anti_* quasi-quote splices-rtkNoPos :: RtkPos-rtkNoPos = RtkPos (L.AlexPn 0 0 0)--class RtkPosOf a where- rtkPosOf :: a -> RtkPos-instance RtkPosOf L.PosToken where- rtkPosOf (L.PosToken p _) = RtkPos p-instance RtkPosOf a => RtkPosOf [a] where- rtkPosOf (x : _) = rtkPosOf x- rtkPosOf [] = rtkNoPos-instance RtkPosOf a => RtkPosOf (Maybe a) where- rtkPosOf (Just x) = rtkPosOf x- rtkPosOf Nothing = rtkNoPos--- A Char carries no position; this also covers String token payloads-instance RtkPosOf Char where- rtkPosOf _ = rtkNoPos---- Recover a token's payload from the whole positioned token: %token--- bindings keep the L.PosToken so semantic actions can read its position-tkVal_doccomment :: L.PosToken -> String-tkVal_doccomment (L.PosToken _ (L.Tk__doccomment v)) = v-tkVal_doccomment t = error ("rtk internal error: token doccomment expected, got " ++ showRtkToken (L.ptToken t))-tkVal_id :: L.PosToken -> String-tkVal_id (L.PosToken _ (L.Tk__id v)) = v-tkVal_id t = error ("rtk internal error: token id expected, got " ++ showRtkToken (L.ptToken t))-tkVal_string :: L.PosToken -> String-tkVal_string (L.PosToken _ (L.Tk__string v)) = v-tkVal_string t = error ("rtk internal error: token string expected, got " ++ showRtkToken (L.ptToken t))-tkVal_char :: L.PosToken -> String-tkVal_char (L.PosToken _ (L.Tk__char v)) = v-tkVal_char t = error ("rtk internal error: token char expected, got " ++ showRtkToken (L.ptToken t))-tkVal_floatTypeSuffix :: L.PosToken -> String-tkVal_floatTypeSuffix (L.PosToken _ (L.Tk__floatTypeSuffix v)) = v-tkVal_floatTypeSuffix t = error ("rtk internal error: token floatTypeSuffix expected, got " ++ showRtkToken (L.ptToken t))-tkVal_exponentPart :: L.PosToken -> String-tkVal_exponentPart (L.PosToken _ (L.Tk__exponentPart v)) = v-tkVal_exponentPart t = error ("rtk internal error: token exponentPart expected, got " ++ showRtkToken (L.ptToken t))-tkVal_floatLiteral :: L.PosToken -> String-tkVal_floatLiteral (L.PosToken _ (L.Tk__floatLiteral v)) = v-tkVal_floatLiteral t = error ("rtk internal error: token floatLiteral expected, got " ++ showRtkToken (L.ptToken t))-tkVal_integerLiteral :: L.PosToken -> String-tkVal_integerLiteral (L.PosToken _ (L.Tk__integerLiteral v)) = v-tkVal_integerLiteral t = error ("rtk internal error: token integerLiteral expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_CompoundName :: L.PosToken -> String-tkVal_qq_CompoundName (L.PosToken _ (L.Tk__qq_CompoundName v)) = v-tkVal_qq_CompoundName t = error ("rtk internal error: token qq_CompoundName expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_CompoundNameTail :: L.PosToken -> String-tkVal_qq_CompoundNameTail (L.PosToken _ (L.Tk__qq_CompoundNameTail v)) = v-tkVal_qq_CompoundNameTail t = error ("rtk internal error: token qq_CompoundNameTail expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_Modifier :: L.PosToken -> String-tkVal_qq_Modifier (L.PosToken _ (L.Tk__qq_Modifier v)) = v-tkVal_qq_Modifier t = error ("rtk internal error: token qq_Modifier expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_TypeSpecifier :: L.PosToken -> String-tkVal_qq_TypeSpecifier (L.PosToken _ (L.Tk__qq_TypeSpecifier v)) = v-tkVal_qq_TypeSpecifier t = error ("rtk internal error: token qq_TypeSpecifier expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_Type :: L.PosToken -> String-tkVal_qq_Type (L.PosToken _ (L.Tk__qq_Type v)) = v-tkVal_qq_Type t = error ("rtk internal error: token qq_Type expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_TypeParameter :: L.PosToken -> String-tkVal_qq_TypeParameter (L.PosToken _ (L.Tk__qq_TypeParameter v)) = v-tkVal_qq_TypeParameter t = error ("rtk internal error: token qq_TypeParameter expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_TypeParameters :: L.PosToken -> String-tkVal_qq_TypeParameters (L.PosToken _ (L.Tk__qq_TypeParameters v)) = v-tkVal_qq_TypeParameters t = error ("rtk internal error: token qq_TypeParameters expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_WildcardType :: L.PosToken -> String-tkVal_qq_WildcardType (L.PosToken _ (L.Tk__qq_WildcardType v)) = v-tkVal_qq_WildcardType t = error ("rtk internal error: token qq_WildcardType expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_TypeArgument :: L.PosToken -> String-tkVal_qq_TypeArgument (L.PosToken _ (L.Tk__qq_TypeArgument v)) = v-tkVal_qq_TypeArgument t = error ("rtk internal error: token qq_TypeArgument expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_NonEmptyTypeArguments :: L.PosToken -> String-tkVal_qq_NonEmptyTypeArguments (L.PosToken _ (L.Tk__qq_NonEmptyTypeArguments v)) = v-tkVal_qq_NonEmptyTypeArguments t = error ("rtk internal error: token qq_NonEmptyTypeArguments expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_TypeArguments :: L.PosToken -> String-tkVal_qq_TypeArguments (L.PosToken _ (L.Tk__qq_TypeArguments v)) = v-tkVal_qq_TypeArguments t = error ("rtk internal error: token qq_TypeArguments expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_Arglist :: L.PosToken -> String-tkVal_qq_Arglist (L.PosToken _ (L.Tk__qq_Arglist v)) = v-tkVal_qq_Arglist t = error ("rtk internal error: token qq_Arglist expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_Literal :: L.PosToken -> String-tkVal_qq_Literal (L.PosToken _ (L.Tk__qq_Literal v)) = v-tkVal_qq_Literal t = error ("rtk internal error: token qq_Literal expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_DimExprs :: L.PosToken -> String-tkVal_qq_DimExprs (L.PosToken _ (L.Tk__qq_DimExprs v)) = v-tkVal_qq_DimExprs t = error ("rtk internal error: token qq_DimExprs expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_CreationExpression :: L.PosToken -> String-tkVal_qq_CreationExpression (L.PosToken _ (L.Tk__qq_CreationExpression v)) = v-tkVal_qq_CreationExpression t = error ("rtk internal error: token qq_CreationExpression expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_PostfixOp :: L.PosToken -> String-tkVal_qq_PostfixOp (L.PosToken _ (L.Tk__qq_PostfixOp v)) = v-tkVal_qq_PostfixOp t = error ("rtk internal error: token qq_PostfixOp expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_PrefixOp :: L.PosToken -> String-tkVal_qq_PrefixOp (L.PosToken _ (L.Tk__qq_PrefixOp v)) = v-tkVal_qq_PrefixOp t = error ("rtk internal error: token qq_PrefixOp expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_MultiplicativeOp :: L.PosToken -> String-tkVal_qq_MultiplicativeOp (L.PosToken _ (L.Tk__qq_MultiplicativeOp v)) = v-tkVal_qq_MultiplicativeOp t = error ("rtk internal error: token qq_MultiplicativeOp expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_AdditiveOp :: L.PosToken -> String-tkVal_qq_AdditiveOp (L.PosToken _ (L.Tk__qq_AdditiveOp v)) = v-tkVal_qq_AdditiveOp t = error ("rtk internal error: token qq_AdditiveOp expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_ShiftOp :: L.PosToken -> String-tkVal_qq_ShiftOp (L.PosToken _ (L.Tk__qq_ShiftOp v)) = v-tkVal_qq_ShiftOp t = error ("rtk internal error: token qq_ShiftOp expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_RelationalOp :: L.PosToken -> String-tkVal_qq_RelationalOp (L.PosToken _ (L.Tk__qq_RelationalOp v)) = v-tkVal_qq_RelationalOp t = error ("rtk internal error: token qq_RelationalOp expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_EqualityOp :: L.PosToken -> String-tkVal_qq_EqualityOp (L.PosToken _ (L.Tk__qq_EqualityOp v)) = v-tkVal_qq_EqualityOp t = error ("rtk internal error: token qq_EqualityOp expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_AssignmentOp :: L.PosToken -> String-tkVal_qq_AssignmentOp (L.PosToken _ (L.Tk__qq_AssignmentOp v)) = v-tkVal_qq_AssignmentOp t = error ("rtk internal error: token qq_AssignmentOp expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_Expression :: L.PosToken -> String-tkVal_qq_Expression (L.PosToken _ (L.Tk__qq_Expression v)) = v-tkVal_qq_Expression t = error ("rtk internal error: token qq_Expression expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_SwitchStatement :: L.PosToken -> String-tkVal_qq_SwitchStatement (L.PosToken _ (L.Tk__qq_SwitchStatement v)) = v-tkVal_qq_SwitchStatement t = error ("rtk internal error: token qq_SwitchStatement expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_SwitchCaseList :: L.PosToken -> String-tkVal_qq_SwitchCaseList (L.PosToken _ (L.Tk__qq_SwitchCaseList v)) = v-tkVal_qq_SwitchCaseList t = error ("rtk internal error: token qq_SwitchCaseList expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_TryStatement :: L.PosToken -> String-tkVal_qq_TryStatement (L.PosToken _ (L.Tk__qq_TryStatement v)) = v-tkVal_qq_TryStatement t = error ("rtk internal error: token qq_TryStatement expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_OptFinally :: L.PosToken -> String-tkVal_qq_OptFinally (L.PosToken _ (L.Tk__qq_OptFinally v)) = v-tkVal_qq_OptFinally t = error ("rtk internal error: token qq_OptFinally expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_CatchList :: L.PosToken -> String-tkVal_qq_CatchList (L.PosToken _ (L.Tk__qq_CatchList v)) = v-tkVal_qq_CatchList t = error ("rtk internal error: token qq_CatchList expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_ForStatement :: L.PosToken -> String-tkVal_qq_ForStatement (L.PosToken _ (L.Tk__qq_ForStatement v)) = v-tkVal_qq_ForStatement t = error ("rtk internal error: token qq_ForStatement expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_WhileStatement :: L.PosToken -> String-tkVal_qq_WhileStatement (L.PosToken _ (L.Tk__qq_WhileStatement v)) = v-tkVal_qq_WhileStatement t = error ("rtk internal error: token qq_WhileStatement expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_DoStatement :: L.PosToken -> String-tkVal_qq_DoStatement (L.PosToken _ (L.Tk__qq_DoStatement v)) = v-tkVal_qq_DoStatement t = error ("rtk internal error: token qq_DoStatement expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_IfStatement :: L.PosToken -> String-tkVal_qq_IfStatement (L.PosToken _ (L.Tk__qq_IfStatement v)) = v-tkVal_qq_IfStatement t = error ("rtk internal error: token qq_IfStatement expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_OptElsePart :: L.PosToken -> String-tkVal_qq_OptElsePart (L.PosToken _ (L.Tk__qq_OptElsePart v)) = v-tkVal_qq_OptElsePart t = error ("rtk internal error: token qq_OptElsePart expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_Statement :: L.PosToken -> String-tkVal_qq_Statement (L.PosToken _ (L.Tk__qq_Statement v)) = v-tkVal_qq_Statement t = error ("rtk internal error: token qq_Statement expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_OptId :: L.PosToken -> String-tkVal_qq_OptId (L.PosToken _ (L.Tk__qq_OptId v)) = v-tkVal_qq_OptId t = error ("rtk internal error: token qq_OptId expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_OptExpression :: L.PosToken -> String-tkVal_qq_OptExpression (L.PosToken _ (L.Tk__qq_OptExpression v)) = v-tkVal_qq_OptExpression t = error ("rtk internal error: token qq_OptExpression expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_StatementList :: L.PosToken -> String-tkVal_qq_StatementList (L.PosToken _ (L.Tk__qq_StatementList v)) = v-tkVal_qq_StatementList t = error ("rtk internal error: token qq_StatementList expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_Parameter :: L.PosToken -> String-tkVal_qq_Parameter (L.PosToken _ (L.Tk__qq_Parameter v)) = v-tkVal_qq_Parameter t = error ("rtk internal error: token qq_Parameter expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_ParamModifierList :: L.PosToken -> String-tkVal_qq_ParamModifierList (L.PosToken _ (L.Tk__qq_ParamModifierList v)) = v-tkVal_qq_ParamModifierList t = error ("rtk internal error: token qq_ParamModifierList expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_ParameterList :: L.PosToken -> String-tkVal_qq_ParameterList (L.PosToken _ (L.Tk__qq_ParameterList v)) = v-tkVal_qq_ParameterList t = error ("rtk internal error: token qq_ParameterList expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_StaticInitializer :: L.PosToken -> String-tkVal_qq_StaticInitializer (L.PosToken _ (L.Tk__qq_StaticInitializer v)) = v-tkVal_qq_StaticInitializer t = error ("rtk internal error: token qq_StaticInitializer expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_VariableInitializer :: L.PosToken -> String-tkVal_qq_VariableInitializer (L.PosToken _ (L.Tk__qq_VariableInitializer v)) = v-tkVal_qq_VariableInitializer t = error ("rtk internal error: token qq_VariableInitializer expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_VariableInitializerList :: L.PosToken -> String-tkVal_qq_VariableInitializerList (L.PosToken _ (L.Tk__qq_VariableInitializerList v)) = v-tkVal_qq_VariableInitializerList t = error ("rtk internal error: token qq_VariableInitializerList expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_VariableDeclarator :: L.PosToken -> String-tkVal_qq_VariableDeclarator (L.PosToken _ (L.Tk__qq_VariableDeclarator v)) = v-tkVal_qq_VariableDeclarator t = error ("rtk internal error: token qq_VariableDeclarator expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_OptVariableInitializer :: L.PosToken -> String-tkVal_qq_OptVariableInitializer (L.PosToken _ (L.Tk__qq_OptVariableInitializer v)) = v-tkVal_qq_OptVariableInitializer t = error ("rtk internal error: token qq_OptVariableInitializer expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_LocalModifierList1 :: L.PosToken -> String-tkVal_qq_LocalModifierList1 (L.PosToken _ (L.Tk__qq_LocalModifierList1 v)) = v-tkVal_qq_LocalModifierList1 t = error ("rtk internal error: token qq_LocalModifierList1 expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_VariableDeclaration :: L.PosToken -> String-tkVal_qq_VariableDeclaration (L.PosToken _ (L.Tk__qq_VariableDeclaration v)) = v-tkVal_qq_VariableDeclaration t = error ("rtk internal error: token qq_VariableDeclaration expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_VariableDeclaratorList :: L.PosToken -> String-tkVal_qq_VariableDeclaratorList (L.PosToken _ (L.Tk__qq_VariableDeclaratorList v)) = v-tkVal_qq_VariableDeclaratorList t = error ("rtk internal error: token qq_VariableDeclaratorList expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_StatementBlock :: L.PosToken -> String-tkVal_qq_StatementBlock (L.PosToken _ (L.Tk__qq_StatementBlock v)) = v-tkVal_qq_StatementBlock t = error ("rtk internal error: token qq_StatementBlock expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_MoreVariableDeclarators :: L.PosToken -> String-tkVal_qq_MoreVariableDeclarators (L.PosToken _ (L.Tk__qq_MoreVariableDeclarators v)) = v-tkVal_qq_MoreVariableDeclarators t = error ("rtk internal error: token qq_MoreVariableDeclarators expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_MemberRest :: L.PosToken -> String-tkVal_qq_MemberRest (L.PosToken _ (L.Tk__qq_MemberRest v)) = v-tkVal_qq_MemberRest t = error ("rtk internal error: token qq_MemberRest expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_ThrowsClause :: L.PosToken -> String-tkVal_qq_ThrowsClause (L.PosToken _ (L.Tk__qq_ThrowsClause v)) = v-tkVal_qq_ThrowsClause t = error ("rtk internal error: token qq_ThrowsClause expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_MoreTypeSpecifier :: L.PosToken -> String-tkVal_qq_MoreTypeSpecifier (L.PosToken _ (L.Tk__qq_MoreTypeSpecifier v)) = v-tkVal_qq_MoreTypeSpecifier t = error ("rtk internal error: token qq_MoreTypeSpecifier expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_MemberAfterFirstId :: L.PosToken -> String-tkVal_qq_MemberAfterFirstId (L.PosToken _ (L.Tk__qq_MemberAfterFirstId v)) = v-tkVal_qq_MemberAfterFirstId t = error ("rtk internal error: token qq_MemberAfterFirstId expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_PrimitiveTypeKeyword :: L.PosToken -> String-tkVal_qq_PrimitiveTypeKeyword (L.PosToken _ (L.Tk__qq_PrimitiveTypeKeyword v)) = v-tkVal_qq_PrimitiveTypeKeyword t = error ("rtk internal error: token qq_PrimitiveTypeKeyword expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_MemberDeclaration :: L.PosToken -> String-tkVal_qq_MemberDeclaration (L.PosToken _ (L.Tk__qq_MemberDeclaration v)) = v-tkVal_qq_MemberDeclaration t = error ("rtk internal error: token qq_MemberDeclaration expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_NonEmptyDims :: L.PosToken -> String-tkVal_qq_NonEmptyDims (L.PosToken _ (L.Tk__qq_NonEmptyDims v)) = v-tkVal_qq_NonEmptyDims t = error ("rtk internal error: token qq_NonEmptyDims expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_Dims :: L.PosToken -> String-tkVal_qq_Dims (L.PosToken _ (L.Tk__qq_Dims v)) = v-tkVal_qq_Dims t = error ("rtk internal error: token qq_Dims expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_FieldDeclaration :: L.PosToken -> String-tkVal_qq_FieldDeclaration (L.PosToken _ (L.Tk__qq_FieldDeclaration v)) = v-tkVal_qq_FieldDeclaration t = error ("rtk internal error: token qq_FieldDeclaration expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_TypeDeclRest :: L.PosToken -> String-tkVal_qq_TypeDeclRest (L.PosToken _ (L.Tk__qq_TypeDeclRest v)) = v-tkVal_qq_TypeDeclRest t = error ("rtk internal error: token qq_TypeDeclRest expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_EnumDeclaration :: L.PosToken -> String-tkVal_qq_EnumDeclaration (L.PosToken _ (L.Tk__qq_EnumDeclaration v)) = v-tkVal_qq_EnumDeclaration t = error ("rtk internal error: token qq_EnumDeclaration expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_EnumConstantList :: L.PosToken -> String-tkVal_qq_EnumConstantList (L.PosToken _ (L.Tk__qq_EnumConstantList v)) = v-tkVal_qq_EnumConstantList t = error ("rtk internal error: token qq_EnumConstantList expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_EnumConstant :: L.PosToken -> String-tkVal_qq_EnumConstant (L.PosToken _ (L.Tk__qq_EnumConstant v)) = v-tkVal_qq_EnumConstant t = error ("rtk internal error: token qq_EnumConstant expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_AnnotationTypeElement :: L.PosToken -> String-tkVal_qq_AnnotationTypeElement (L.PosToken _ (L.Tk__qq_AnnotationTypeElement v)) = v-tkVal_qq_AnnotationTypeElement t = error ("rtk internal error: token qq_AnnotationTypeElement expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_AnnotationTypeElementList :: L.PosToken -> String-tkVal_qq_AnnotationTypeElementList (L.PosToken _ (L.Tk__qq_AnnotationTypeElementList v)) = v-tkVal_qq_AnnotationTypeElementList t = error ("rtk internal error: token qq_AnnotationTypeElementList expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_AnnotationDeclaration :: L.PosToken -> String-tkVal_qq_AnnotationDeclaration (L.PosToken _ (L.Tk__qq_AnnotationDeclaration v)) = v-tkVal_qq_AnnotationDeclaration t = error ("rtk internal error: token qq_AnnotationDeclaration expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_InterfaceDeclaration :: L.PosToken -> String-tkVal_qq_InterfaceDeclaration (L.PosToken _ (L.Tk__qq_InterfaceDeclaration v)) = v-tkVal_qq_InterfaceDeclaration t = error ("rtk internal error: token qq_InterfaceDeclaration expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_ClassDeclaration :: L.PosToken -> String-tkVal_qq_ClassDeclaration (L.PosToken _ (L.Tk__qq_ClassDeclaration v)) = v-tkVal_qq_ClassDeclaration t = error ("rtk internal error: token qq_ClassDeclaration expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_FieldDeclarationList :: L.PosToken -> String-tkVal_qq_FieldDeclarationList (L.PosToken _ (L.Tk__qq_FieldDeclarationList v)) = v-tkVal_qq_FieldDeclarationList t = error ("rtk internal error: token qq_FieldDeclarationList expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_ImplementsList :: L.PosToken -> String-tkVal_qq_ImplementsList (L.PosToken _ (L.Tk__qq_ImplementsList v)) = v-tkVal_qq_ImplementsList t = error ("rtk internal error: token qq_ImplementsList expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_ExtendsList :: L.PosToken -> String-tkVal_qq_ExtendsList (L.PosToken _ (L.Tk__qq_ExtendsList v)) = v-tkVal_qq_ExtendsList t = error ("rtk internal error: token qq_ExtendsList expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_ClassOrInterfaceType :: L.PosToken -> String-tkVal_qq_ClassOrInterfaceType (L.PosToken _ (L.Tk__qq_ClassOrInterfaceType v)) = v-tkVal_qq_ClassOrInterfaceType t = error ("rtk internal error: token qq_ClassOrInterfaceType expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_ModifierList :: L.PosToken -> String-tkVal_qq_ModifierList (L.PosToken _ (L.Tk__qq_ModifierList v)) = v-tkVal_qq_ModifierList t = error ("rtk internal error: token qq_ModifierList expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_AnnotationList :: L.PosToken -> String-tkVal_qq_AnnotationList (L.PosToken _ (L.Tk__qq_AnnotationList v)) = v-tkVal_qq_AnnotationList t = error ("rtk internal error: token qq_AnnotationList expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_AnnotationElement :: L.PosToken -> String-tkVal_qq_AnnotationElement (L.PosToken _ (L.Tk__qq_AnnotationElement v)) = v-tkVal_qq_AnnotationElement t = error ("rtk internal error: token qq_AnnotationElement expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_AnnotationArguments :: L.PosToken -> String-tkVal_qq_AnnotationArguments (L.PosToken _ (L.Tk__qq_AnnotationArguments v)) = v-tkVal_qq_AnnotationArguments t = error ("rtk internal error: token qq_AnnotationArguments expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_Annotation :: L.PosToken -> String-tkVal_qq_Annotation (L.PosToken _ (L.Tk__qq_Annotation v)) = v-tkVal_qq_Annotation t = error ("rtk internal error: token qq_Annotation expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_DocComment :: L.PosToken -> String-tkVal_qq_DocComment (L.PosToken _ (L.Tk__qq_DocComment v)) = v-tkVal_qq_DocComment t = error ("rtk internal error: token qq_DocComment expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_ImportHead :: L.PosToken -> String-tkVal_qq_ImportHead (L.PosToken _ (L.Tk__qq_ImportHead v)) = v-tkVal_qq_ImportHead t = error ("rtk internal error: token qq_ImportHead expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_ImportName :: L.PosToken -> String-tkVal_qq_ImportName (L.PosToken _ (L.Tk__qq_ImportName v)) = v-tkVal_qq_ImportName t = error ("rtk internal error: token qq_ImportName expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_ImportStatement :: L.PosToken -> String-tkVal_qq_ImportStatement (L.PosToken _ (L.Tk__qq_ImportStatement v)) = v-tkVal_qq_ImportStatement t = error ("rtk internal error: token qq_ImportStatement expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_Package :: L.PosToken -> String-tkVal_qq_Package (L.PosToken _ (L.Tk__qq_Package v)) = v-tkVal_qq_Package t = error ("rtk internal error: token qq_Package expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_CompilationUnit :: L.PosToken -> String-tkVal_qq_CompilationUnit (L.PosToken _ (L.Tk__qq_CompilationUnit v)) = v-tkVal_qq_CompilationUnit t = error ("rtk internal error: token qq_CompilationUnit expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_ImportList :: L.PosToken -> String-tkVal_qq_ImportList (L.PosToken _ (L.Tk__qq_ImportList v)) = v-tkVal_qq_ImportList t = error ("rtk internal error: token qq_ImportList expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_TypeDeclaration :: L.PosToken -> String-tkVal_qq_TypeDeclaration (L.PosToken _ (L.Tk__qq_TypeDeclaration v)) = v-tkVal_qq_TypeDeclaration t = error ("rtk internal error: token qq_TypeDeclaration expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_OptDocComment :: L.PosToken -> String-tkVal_qq_OptDocComment (L.PosToken _ (L.Tk__qq_OptDocComment v)) = v-tkVal_qq_OptDocComment t = error ("rtk internal error: token qq_OptDocComment expected, got " ++ showRtkToken (L.ptToken t))-tkVal_qq_Java :: L.PosToken -> String-tkVal_qq_Java (L.PosToken _ (L.Tk__qq_Java v)) = v-tkVal_qq_Java t = error ("rtk internal error: token qq_Java expected, got " ++ showRtkToken (L.ptToken t))--data Java = Ctr__Java__0 RtkPos Java |- Ctr__Java__1 RtkPos AdditiveOp |- Ctr__Java__2 RtkPos Annotation |- Ctr__Java__3 RtkPos AnnotationArguments |- Ctr__Java__4 RtkPos AnnotationDeclaration |- Ctr__Java__5 RtkPos AnnotationElement |- Ctr__Java__6 RtkPos AnnotationList |- Ctr__Java__7 RtkPos AnnotationTypeElement |- Ctr__Java__8 RtkPos AnnotationTypeElementList |- Ctr__Java__9 RtkPos Arglist |- Ctr__Java__10 RtkPos AssignmentOp |- Ctr__Java__11 RtkPos CatchList |- Ctr__Java__12 RtkPos ClassDeclaration |- Ctr__Java__13 RtkPos ClassOrInterfaceType |- Ctr__Java__14 RtkPos CompilationUnit |- Ctr__Java__15 RtkPos CompoundName |- Ctr__Java__16 RtkPos CompoundNameTail |- Ctr__Java__17 RtkPos CreationExpression |- Ctr__Java__18 RtkPos DimExprs |- Ctr__Java__19 RtkPos Dims |- Ctr__Java__20 RtkPos DoStatement |- Ctr__Java__21 RtkPos DocComment |- Ctr__Java__22 RtkPos EnumConstant |- Ctr__Java__23 RtkPos EnumConstantList |- Ctr__Java__24 RtkPos EnumDeclaration |- Ctr__Java__25 RtkPos EqualityOp |- Ctr__Java__26 RtkPos Expression |- Ctr__Java__27 RtkPos ExtendsList |- Ctr__Java__28 RtkPos FieldDeclaration |- Ctr__Java__29 RtkPos FieldDeclarationList |- Ctr__Java__30 RtkPos ForStatement |- Ctr__Java__31 RtkPos IfStatement |- Ctr__Java__32 RtkPos ImplementsList |- Ctr__Java__33 RtkPos ImportHead |- Ctr__Java__34 RtkPos ImportList |- Ctr__Java__35 RtkPos ImportName |- Ctr__Java__36 RtkPos ImportStatement |- Ctr__Java__37 RtkPos InterfaceDeclaration |- Ctr__Java__38 RtkPos Literal |- Ctr__Java__39 RtkPos LocalModifierList1 |- Ctr__Java__40 RtkPos MemberAfterFirstId |- Ctr__Java__41 RtkPos MemberDeclaration |- Ctr__Java__42 RtkPos MemberRest |- Ctr__Java__43 RtkPos Modifier |- Ctr__Java__44 RtkPos ModifierList |- Ctr__Java__45 RtkPos MoreTypeSpecifier |- Ctr__Java__46 RtkPos MoreVariableDeclarators |- Ctr__Java__47 RtkPos MultiplicativeOp |- Ctr__Java__48 RtkPos NonEmptyDims |- Ctr__Java__49 RtkPos NonEmptyTypeArguments |- Ctr__Java__50 RtkPos OptDocComment |- Ctr__Java__51 RtkPos OptElsePart |- Ctr__Java__52 RtkPos OptExpression |- Ctr__Java__53 RtkPos OptFinally |- Ctr__Java__54 RtkPos OptId |- Ctr__Java__55 RtkPos OptVariableInitializer |- Ctr__Java__56 RtkPos Package |- Ctr__Java__57 RtkPos ParamModifierList |- Ctr__Java__58 RtkPos Parameter |- Ctr__Java__59 RtkPos ParameterList |- Ctr__Java__60 RtkPos PostfixOp |- Ctr__Java__61 RtkPos PrefixOp |- Ctr__Java__62 RtkPos PrimitiveTypeKeyword |- Ctr__Java__63 RtkPos RelationalOp |- Ctr__Java__64 RtkPos ShiftOp |- Ctr__Java__65 RtkPos Statement |- Ctr__Java__66 RtkPos StatementBlock |- Ctr__Java__67 RtkPos StatementList |- Ctr__Java__68 RtkPos StaticInitializer |- Ctr__Java__69 RtkPos SwitchCaseList |- Ctr__Java__70 RtkPos SwitchStatement |- Ctr__Java__71 RtkPos ThrowsClause |- Ctr__Java__72 RtkPos TryStatement |- Ctr__Java__73 RtkPos Type |- Ctr__Java__74 RtkPos TypeArgument |- Ctr__Java__75 RtkPos TypeArguments |- Ctr__Java__76 RtkPos TypeDeclRest |- Ctr__Java__77 RtkPos TypeDeclaration |- Ctr__Java__78 RtkPos TypeParameter |- Ctr__Java__79 RtkPos TypeParameters |- Ctr__Java__80 RtkPos TypeSpecifier |- Ctr__Java__81 RtkPos VariableDeclaration |- Ctr__Java__82 RtkPos VariableDeclarator |- Ctr__Java__83 RtkPos VariableDeclaratorList |- Ctr__Java__84 RtkPos VariableInitializer |- Ctr__Java__85 RtkPos VariableInitializerList |- Ctr__Java__86 RtkPos WhileStatement |- Ctr__Java__87 RtkPos WildcardType |- Anti_Java String |- Ctr__Java__88 RtkPos CompilationUnit- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Java where- rtkPosOf (Ctr__Java__0 p _) = p- rtkPosOf (Ctr__Java__1 p _) = p- rtkPosOf (Ctr__Java__2 p _) = p- rtkPosOf (Ctr__Java__3 p _) = p- rtkPosOf (Ctr__Java__4 p _) = p- rtkPosOf (Ctr__Java__5 p _) = p- rtkPosOf (Ctr__Java__6 p _) = p- rtkPosOf (Ctr__Java__7 p _) = p- rtkPosOf (Ctr__Java__8 p _) = p- rtkPosOf (Ctr__Java__9 p _) = p- rtkPosOf (Ctr__Java__10 p _) = p- rtkPosOf (Ctr__Java__11 p _) = p- rtkPosOf (Ctr__Java__12 p _) = p- rtkPosOf (Ctr__Java__13 p _) = p- rtkPosOf (Ctr__Java__14 p _) = p- rtkPosOf (Ctr__Java__15 p _) = p- rtkPosOf (Ctr__Java__16 p _) = p- rtkPosOf (Ctr__Java__17 p _) = p- rtkPosOf (Ctr__Java__18 p _) = p- rtkPosOf (Ctr__Java__19 p _) = p- rtkPosOf (Ctr__Java__20 p _) = p- rtkPosOf (Ctr__Java__21 p _) = p- rtkPosOf (Ctr__Java__22 p _) = p- rtkPosOf (Ctr__Java__23 p _) = p- rtkPosOf (Ctr__Java__24 p _) = p- rtkPosOf (Ctr__Java__25 p _) = p- rtkPosOf (Ctr__Java__26 p _) = p- rtkPosOf (Ctr__Java__27 p _) = p- rtkPosOf (Ctr__Java__28 p _) = p- rtkPosOf (Ctr__Java__29 p _) = p- rtkPosOf (Ctr__Java__30 p _) = p- rtkPosOf (Ctr__Java__31 p _) = p- rtkPosOf (Ctr__Java__32 p _) = p- rtkPosOf (Ctr__Java__33 p _) = p- rtkPosOf (Ctr__Java__34 p _) = p- rtkPosOf (Ctr__Java__35 p _) = p- rtkPosOf (Ctr__Java__36 p _) = p- rtkPosOf (Ctr__Java__37 p _) = p- rtkPosOf (Ctr__Java__38 p _) = p- rtkPosOf (Ctr__Java__39 p _) = p- rtkPosOf (Ctr__Java__40 p _) = p- rtkPosOf (Ctr__Java__41 p _) = p- rtkPosOf (Ctr__Java__42 p _) = p- rtkPosOf (Ctr__Java__43 p _) = p- rtkPosOf (Ctr__Java__44 p _) = p- rtkPosOf (Ctr__Java__45 p _) = p- rtkPosOf (Ctr__Java__46 p _) = p- rtkPosOf (Ctr__Java__47 p _) = p- rtkPosOf (Ctr__Java__48 p _) = p- rtkPosOf (Ctr__Java__49 p _) = p- rtkPosOf (Ctr__Java__50 p _) = p- rtkPosOf (Ctr__Java__51 p _) = p- rtkPosOf (Ctr__Java__52 p _) = p- rtkPosOf (Ctr__Java__53 p _) = p- rtkPosOf (Ctr__Java__54 p _) = p- rtkPosOf (Ctr__Java__55 p _) = p- rtkPosOf (Ctr__Java__56 p _) = p- rtkPosOf (Ctr__Java__57 p _) = p- rtkPosOf (Ctr__Java__58 p _) = p- rtkPosOf (Ctr__Java__59 p _) = p- rtkPosOf (Ctr__Java__60 p _) = p- rtkPosOf (Ctr__Java__61 p _) = p- rtkPosOf (Ctr__Java__62 p _) = p- rtkPosOf (Ctr__Java__63 p _) = p- rtkPosOf (Ctr__Java__64 p _) = p- rtkPosOf (Ctr__Java__65 p _) = p- rtkPosOf (Ctr__Java__66 p _) = p- rtkPosOf (Ctr__Java__67 p _) = p- rtkPosOf (Ctr__Java__68 p _) = p- rtkPosOf (Ctr__Java__69 p _) = p- rtkPosOf (Ctr__Java__70 p _) = p- rtkPosOf (Ctr__Java__71 p _) = p- rtkPosOf (Ctr__Java__72 p _) = p- rtkPosOf (Ctr__Java__73 p _) = p- rtkPosOf (Ctr__Java__74 p _) = p- rtkPosOf (Ctr__Java__75 p _) = p- rtkPosOf (Ctr__Java__76 p _) = p- rtkPosOf (Ctr__Java__77 p _) = p- rtkPosOf (Ctr__Java__78 p _) = p- rtkPosOf (Ctr__Java__79 p _) = p- rtkPosOf (Ctr__Java__80 p _) = p- rtkPosOf (Ctr__Java__81 p _) = p- rtkPosOf (Ctr__Java__82 p _) = p- rtkPosOf (Ctr__Java__83 p _) = p- rtkPosOf (Ctr__Java__84 p _) = p- rtkPosOf (Ctr__Java__85 p _) = p- rtkPosOf (Ctr__Java__86 p _) = p- rtkPosOf (Ctr__Java__87 p _) = p- rtkPosOf (Anti_Java _) = rtkNoPos- rtkPosOf (Ctr__Java__88 p _) = p-data AdditiveOp = Anti_AdditiveOp String |- Ctr__AdditiveOp__0 RtkPos |- Ctr__AdditiveOp__1 RtkPos- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf AdditiveOp where- rtkPosOf (Anti_AdditiveOp _) = rtkNoPos- rtkPosOf (Ctr__AdditiveOp__0 p) = p- rtkPosOf (Ctr__AdditiveOp__1 p) = p-data Annotation = Anti_Annotation String |- Ctr__Annotation__1 RtkPos CompoundName Rule_4- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Annotation where- rtkPosOf (Anti_Annotation _) = rtkNoPos- rtkPosOf (Ctr__Annotation__1 p _ _) = p-data AnnotationArguments = Anti_AnnotationArguments String |- Ctr__AnnotationArguments__0 RtkPos AnnotationElement Rule_7- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf AnnotationArguments where- rtkPosOf (Anti_AnnotationArguments _) = rtkNoPos- rtkPosOf (Ctr__AnnotationArguments__0 p _ _) = p-data AnnotationDeclaration = Anti_AnnotationDeclaration String |- Ctr__AnnotationDeclaration__0 RtkPos String AnnotationTypeElementList- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf AnnotationDeclaration where- rtkPosOf (Anti_AnnotationDeclaration _) = rtkNoPos- rtkPosOf (Ctr__AnnotationDeclaration__0 p _ _) = p-data AnnotationElement = Anti_AnnotationElement String |- Ctr__AnnotationElement__0 RtkPos String Expression |- Ctr__AnnotationElement__1 RtkPos Expression- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf AnnotationElement where- rtkPosOf (Anti_AnnotationElement _) = rtkNoPos- rtkPosOf (Ctr__AnnotationElement__0 p _ _) = p- rtkPosOf (Ctr__AnnotationElement__1 p _) = p-type AnnotationList = [Annotation]-data AnnotationTypeElement = Anti_AnnotationTypeElement String |- Ctr__AnnotationTypeElement__0 RtkPos FieldDeclaration- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf AnnotationTypeElement where- rtkPosOf (Anti_AnnotationTypeElement _) = rtkNoPos- rtkPosOf (Ctr__AnnotationTypeElement__0 p _) = p-type AnnotationTypeElementList = [AnnotationTypeElement]-data Arglist = Anti_Arglist String |- Ctr__Arglist__0 RtkPos |- Ctr__Arglist__1 RtkPos Rule_78- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Arglist where- rtkPosOf (Anti_Arglist _) = rtkNoPos- rtkPosOf (Ctr__Arglist__0 p) = p- rtkPosOf (Ctr__Arglist__1 p _) = p-data AssignmentOp = Anti_AssignmentOp String |- Ctr__AssignmentOp__0 RtkPos |- Ctr__AssignmentOp__1 RtkPos |- Ctr__AssignmentOp__2 RtkPos |- Ctr__AssignmentOp__3 RtkPos |- Ctr__AssignmentOp__4 RtkPos |- Ctr__AssignmentOp__5 RtkPos |- Ctr__AssignmentOp__6 RtkPos |- Ctr__AssignmentOp__7 RtkPos |- Ctr__AssignmentOp__8 RtkPos |- Ctr__AssignmentOp__9 RtkPos |- Ctr__AssignmentOp__10 RtkPos |- Ctr__AssignmentOp__11 RtkPos- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf AssignmentOp where- rtkPosOf (Anti_AssignmentOp _) = rtkNoPos- rtkPosOf (Ctr__AssignmentOp__0 p) = p- rtkPosOf (Ctr__AssignmentOp__1 p) = p- rtkPosOf (Ctr__AssignmentOp__2 p) = p- rtkPosOf (Ctr__AssignmentOp__3 p) = p- rtkPosOf (Ctr__AssignmentOp__4 p) = p- rtkPosOf (Ctr__AssignmentOp__5 p) = p- rtkPosOf (Ctr__AssignmentOp__6 p) = p- rtkPosOf (Ctr__AssignmentOp__7 p) = p- rtkPosOf (Ctr__AssignmentOp__8 p) = p- rtkPosOf (Ctr__AssignmentOp__9 p) = p- rtkPosOf (Ctr__AssignmentOp__10 p) = p- rtkPosOf (Ctr__AssignmentOp__11 p) = p-type CatchList = [Rule_63]-data ClassDeclaration = Anti_ClassDeclaration String |- Ctr__ClassDeclaration__0 RtkPos String TypeParameters Rule_16 Rule_17 FieldDeclarationList- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf ClassDeclaration where- rtkPosOf (Anti_ClassDeclaration _) = rtkNoPos- rtkPosOf (Ctr__ClassDeclaration__0 p _ _ _ _ _) = p-data ClassOrInterfaceType = Anti_ClassOrInterfaceType String |- Ctr__ClassOrInterfaceType__0 RtkPos CompoundName TypeArguments- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf ClassOrInterfaceType where- rtkPosOf (Anti_ClassOrInterfaceType _) = rtkNoPos- rtkPosOf (Ctr__ClassOrInterfaceType__0 p _ _) = p-data CompilationUnit = Anti_CompilationUnit String |- Ctr__CompilationUnit__0 RtkPos Rule_1 ImportList Rule_2- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf CompilationUnit where- rtkPosOf (Anti_CompilationUnit _) = rtkNoPos- rtkPosOf (Ctr__CompilationUnit__0 p _ _ _) = p-data CompoundName = Anti_CompoundName String |- Ctr__CompoundName__0 RtkPos String CompoundNameTail- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf CompoundName where- rtkPosOf (Anti_CompoundName _) = rtkNoPos- rtkPosOf (Ctr__CompoundName__0 p _ _) = p-type CompoundNameTail = [Rule_90]-data CreationExpression = Anti_CreationExpression String |- Ctr__CreationExpression__0 RtkPos TypeSpecifier Rule_74- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf CreationExpression where- rtkPosOf (Anti_CreationExpression _) = rtkNoPos- rtkPosOf (Ctr__CreationExpression__0 p _ _) = p-type DimExprs = [Rule_76]-type Dims = [Rule_31]-data DoStatement = Anti_DoStatement String |- Ctr__DoStatement__0 RtkPos Statement Expression- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf DoStatement where- rtkPosOf (Anti_DoStatement _) = rtkNoPos- rtkPosOf (Ctr__DoStatement__0 p _ _) = p-data DocComment = Anti_DocComment String |- Ctr__DocComment__0 RtkPos String- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf DocComment where- rtkPosOf (Anti_DocComment _) = rtkNoPos- rtkPosOf (Ctr__DocComment__0 p _) = p-data EnumConstant = Anti_EnumConstant String |- Ctr__EnumConstant__0 RtkPos AnnotationList String Rule_20 Rule_22- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf EnumConstant where- rtkPosOf (Anti_EnumConstant _) = rtkNoPos- rtkPosOf (Ctr__EnumConstant__0 p _ _ _ _) = p-data EnumConstantList = Anti_EnumConstantList String |- Ctr__EnumConstantList__0 RtkPos EnumConstant Rule_24 Rule_26- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf EnumConstantList where- rtkPosOf (Anti_EnumConstantList _) = rtkNoPos- rtkPosOf (Ctr__EnumConstantList__0 p _ _ _) = p-data EnumDeclaration = Anti_EnumDeclaration String |- Ctr__EnumDeclaration__0 RtkPos String Rule_27 EnumConstantList Rule_28- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf EnumDeclaration where- rtkPosOf (Anti_EnumDeclaration _) = rtkNoPos- rtkPosOf (Ctr__EnumDeclaration__0 p _ _ _ _) = p-data EqualityOp = Anti_EqualityOp String |- Ctr__EqualityOp__0 RtkPos |- Ctr__EqualityOp__1 RtkPos- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf EqualityOp where- rtkPosOf (Anti_EqualityOp _) = rtkNoPos- rtkPosOf (Ctr__EqualityOp__0 p) = p- rtkPosOf (Ctr__EqualityOp__1 p) = p-data Expression = Anti_Expression String |- Ctr__Expression__0 RtkPos Literal |- Ctr__Expression__1 RtkPos |- Ctr__Expression__2 RtkPos Expression |- Ctr__Expression__3 RtkPos CreationExpression |- Ctr__Expression__4 RtkPos CompoundName Rule_70 |- Ctr__Expression__5 RtkPos CompoundName Expression |- Ctr__Expression__6 RtkPos String Rule_72 |- Ctr__Expression__7 RtkPos String CompoundNameTail |- Ctr__Expression__8 RtkPos String CompoundNameTail |- Ctr__Expression__9 RtkPos String CompoundNameTail NonEmptyTypeArguments String Arglist |- Ctr__Expression__10 RtkPos PrimitiveTypeKeyword |- Ctr__Expression__11 RtkPos Expression |- Ctr__Expression__12 RtkPos Expression PostfixOp |- Ctr__Expression__13 RtkPos Expression String |- Ctr__Expression__14 RtkPos Expression String Arglist |- Ctr__Expression__15 RtkPos Expression NonEmptyTypeArguments String Arglist |- Ctr__Expression__16 RtkPos Expression Expression |- Ctr__Expression__17 RtkPos Expression |- Ctr__Expression__18 RtkPos Expression |- Ctr__Expression__19 RtkPos Expression |- Ctr__Expression__20 RtkPos Expression |- Ctr__Expression__21 RtkPos PrefixOp Expression |- Ctr__Expression__22 RtkPos Expression |- Ctr__Expression__23 RtkPos PrimitiveTypeKeyword Dims Expression |- Ctr__Expression__24 RtkPos CompoundName NonEmptyTypeArguments Dims Expression |- Ctr__Expression__25 RtkPos CompoundName NonEmptyDims Expression |- Ctr__Expression__26 RtkPos Expression Expression |- Ctr__Expression__27 RtkPos Expression |- Ctr__Expression__28 RtkPos Expression MultiplicativeOp Expression |- Ctr__Expression__29 RtkPos Expression |- Ctr__Expression__30 RtkPos Expression AdditiveOp Expression |- Ctr__Expression__31 RtkPos Expression |- Ctr__Expression__32 RtkPos Expression ShiftOp Expression |- Ctr__Expression__33 RtkPos Expression |- Ctr__Expression__34 RtkPos Expression RelationalOp Expression |- Ctr__Expression__35 RtkPos Expression Type |- Ctr__Expression__36 RtkPos Expression |- Ctr__Expression__37 RtkPos Expression EqualityOp Expression |- Ctr__Expression__38 RtkPos Expression |- Ctr__Expression__39 RtkPos Expression Expression |- Ctr__Expression__40 RtkPos Expression |- Ctr__Expression__41 RtkPos Expression Expression |- Ctr__Expression__42 RtkPos Expression |- Ctr__Expression__43 RtkPos Expression Expression |- Ctr__Expression__44 RtkPos Expression |- Ctr__Expression__45 RtkPos Expression Expression |- Ctr__Expression__46 RtkPos Expression |- Ctr__Expression__47 RtkPos Expression Expression |- Ctr__Expression__48 RtkPos Expression |- Ctr__Expression__49 RtkPos Expression Expression Expression |- Ctr__Expression__50 RtkPos Expression Rule_68 |- Ctr__Expression__51 RtkPos Expression- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Expression where- rtkPosOf (Anti_Expression _) = rtkNoPos- rtkPosOf (Ctr__Expression__0 p _) = p- rtkPosOf (Ctr__Expression__1 p) = p- rtkPosOf (Ctr__Expression__2 p _) = p- rtkPosOf (Ctr__Expression__3 p _) = p- rtkPosOf (Ctr__Expression__4 p _ _) = p- rtkPosOf (Ctr__Expression__5 p _ _) = p- rtkPosOf (Ctr__Expression__6 p _ _) = p- rtkPosOf (Ctr__Expression__7 p _ _) = p- rtkPosOf (Ctr__Expression__8 p _ _) = p- rtkPosOf (Ctr__Expression__9 p _ _ _ _ _) = p- rtkPosOf (Ctr__Expression__10 p _) = p- rtkPosOf (Ctr__Expression__11 p _) = p- rtkPosOf (Ctr__Expression__12 p _ _) = p- rtkPosOf (Ctr__Expression__13 p _ _) = p- rtkPosOf (Ctr__Expression__14 p _ _ _) = p- rtkPosOf (Ctr__Expression__15 p _ _ _ _) = p- rtkPosOf (Ctr__Expression__16 p _ _) = p- rtkPosOf (Ctr__Expression__17 p _) = p- rtkPosOf (Ctr__Expression__18 p _) = p- rtkPosOf (Ctr__Expression__19 p _) = p- rtkPosOf (Ctr__Expression__20 p _) = p- rtkPosOf (Ctr__Expression__21 p _ _) = p- rtkPosOf (Ctr__Expression__22 p _) = p- rtkPosOf (Ctr__Expression__23 p _ _ _) = p- rtkPosOf (Ctr__Expression__24 p _ _ _ _) = p- rtkPosOf (Ctr__Expression__25 p _ _ _) = p- rtkPosOf (Ctr__Expression__26 p _ _) = p- rtkPosOf (Ctr__Expression__27 p _) = p- rtkPosOf (Ctr__Expression__28 p _ _ _) = p- rtkPosOf (Ctr__Expression__29 p _) = p- rtkPosOf (Ctr__Expression__30 p _ _ _) = p- rtkPosOf (Ctr__Expression__31 p _) = p- rtkPosOf (Ctr__Expression__32 p _ _ _) = p- rtkPosOf (Ctr__Expression__33 p _) = p- rtkPosOf (Ctr__Expression__34 p _ _ _) = p- rtkPosOf (Ctr__Expression__35 p _ _) = p- rtkPosOf (Ctr__Expression__36 p _) = p- rtkPosOf (Ctr__Expression__37 p _ _ _) = p- rtkPosOf (Ctr__Expression__38 p _) = p- rtkPosOf (Ctr__Expression__39 p _ _) = p- rtkPosOf (Ctr__Expression__40 p _) = p- rtkPosOf (Ctr__Expression__41 p _ _) = p- rtkPosOf (Ctr__Expression__42 p _) = p- rtkPosOf (Ctr__Expression__43 p _ _) = p- rtkPosOf (Ctr__Expression__44 p _) = p- rtkPosOf (Ctr__Expression__45 p _ _) = p- rtkPosOf (Ctr__Expression__46 p _) = p- rtkPosOf (Ctr__Expression__47 p _ _) = p- rtkPosOf (Ctr__Expression__48 p _) = p- rtkPosOf (Ctr__Expression__49 p _ _ _) = p- rtkPosOf (Ctr__Expression__50 p _ _) = p- rtkPosOf (Ctr__Expression__51 p _) = p-data ExtendsList = Anti_ExtendsList String |- Ctr__ExtendsList__0 RtkPos ClassOrInterfaceType Rule_12- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf ExtendsList where- rtkPosOf (Anti_ExtendsList _) = rtkNoPos- rtkPosOf (Ctr__ExtendsList__0 p _ _) = p-data FieldDeclaration = Anti_FieldDeclaration String |- Ctr__FieldDeclaration__0 RtkPos OptDocComment ModifierList Rule_30 |- Ctr__FieldDeclaration__1 RtkPos- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf FieldDeclaration where- rtkPosOf (Anti_FieldDeclaration _) = rtkNoPos- rtkPosOf (Ctr__FieldDeclaration__0 p _ _ _) = p- rtkPosOf (Ctr__FieldDeclaration__1 p) = p-type FieldDeclarationList = [FieldDeclaration]-data ForStatement = Anti_ForStatement String |- Ctr__ForStatement__0 RtkPos Rule_62 OptExpression OptExpression Statement- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf ForStatement where- rtkPosOf (Anti_ForStatement _) = rtkNoPos- rtkPosOf (Ctr__ForStatement__0 p _ _ _ _) = p-data IfStatement = Anti_IfStatement String |- Ctr__IfStatement__0 RtkPos Expression Statement OptElsePart- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf IfStatement where- rtkPosOf (Anti_IfStatement _) = rtkNoPos- rtkPosOf (Ctr__IfStatement__0 p _ _ _) = p-data ImplementsList = Anti_ImplementsList String |- Ctr__ImplementsList__0 RtkPos Rule_14- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf ImplementsList where- rtkPosOf (Anti_ImplementsList _) = rtkNoPos- rtkPosOf (Ctr__ImplementsList__0 p _) = p-data ImportHead = Anti_ImportHead String |- Ctr__ImportHead__0 RtkPos String |- Ctr__ImportHead__1 RtkPos ImportHead String- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf ImportHead where- rtkPosOf (Anti_ImportHead _) = rtkNoPos- rtkPosOf (Ctr__ImportHead__0 p _) = p- rtkPosOf (Ctr__ImportHead__1 p _ _) = p-type ImportList = [ImportStatement]-data ImportName = Anti_ImportName String |- Ctr__ImportName__0 RtkPos ImportHead |- Ctr__ImportName__1 RtkPos ImportHead- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf ImportName where- rtkPosOf (Anti_ImportName _) = rtkNoPos- rtkPosOf (Ctr__ImportName__0 p _) = p- rtkPosOf (Ctr__ImportName__1 p _) = p-data ImportStatement = Anti_ImportStatement String |- Ctr__ImportStatement__0 RtkPos Rule_3 ImportName- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf ImportStatement where- rtkPosOf (Anti_ImportStatement _) = rtkNoPos- rtkPosOf (Ctr__ImportStatement__0 p _ _) = p-data InterfaceDeclaration = Anti_InterfaceDeclaration String |- Ctr__InterfaceDeclaration__0 RtkPos String TypeParameters Rule_18 FieldDeclarationList- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf InterfaceDeclaration where- rtkPosOf (Anti_InterfaceDeclaration _) = rtkNoPos- rtkPosOf (Ctr__InterfaceDeclaration__0 p _ _ _ _) = p-data Literal = Anti_Literal String |- Ctr__Literal__0 RtkPos String |- Ctr__Literal__1 RtkPos String |- Ctr__Literal__2 RtkPos |- Ctr__Literal__3 RtkPos |- Ctr__Literal__4 RtkPos String |- Ctr__Literal__5 RtkPos String |- Ctr__Literal__6 RtkPos- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Literal where- rtkPosOf (Anti_Literal _) = rtkNoPos- rtkPosOf (Ctr__Literal__0 p _) = p- rtkPosOf (Ctr__Literal__1 p _) = p- rtkPosOf (Ctr__Literal__2 p) = p- rtkPosOf (Ctr__Literal__3 p) = p- rtkPosOf (Ctr__Literal__4 p _) = p- rtkPosOf (Ctr__Literal__5 p _) = p- rtkPosOf (Ctr__Literal__6 p) = p-type LocalModifierList1 = [Rule_48]-data MemberAfterFirstId = Anti_MemberAfterFirstId String |- Ctr__MemberAfterFirstId__0 RtkPos Rule_35 Rule_36 StatementBlock |- Ctr__MemberAfterFirstId__1 RtkPos MoreTypeSpecifier String MemberRest- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf MemberAfterFirstId where- rtkPosOf (Anti_MemberAfterFirstId _) = rtkNoPos- rtkPosOf (Ctr__MemberAfterFirstId__0 p _ _ _) = p- rtkPosOf (Ctr__MemberAfterFirstId__1 p _ _ _) = p-data MemberDeclaration = Anti_MemberDeclaration String |- Ctr__MemberDeclaration__0 RtkPos PrimitiveTypeKeyword Dims String MemberRest |- Ctr__MemberDeclaration__1 RtkPos TypeParameters String MoreTypeSpecifier String MemberRest |- Ctr__MemberDeclaration__2 RtkPos String MemberAfterFirstId- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf MemberDeclaration where- rtkPosOf (Anti_MemberDeclaration _) = rtkNoPos- rtkPosOf (Ctr__MemberDeclaration__0 p _ _ _ _) = p- rtkPosOf (Ctr__MemberDeclaration__1 p _ _ _ _ _) = p- rtkPosOf (Ctr__MemberDeclaration__2 p _ _) = p-data MemberRest = Anti_MemberRest String |- Ctr__MemberRest__0 RtkPos Rule_39 Dims Rule_40 Rule_41 |- Ctr__MemberRest__1 RtkPos Dims OptVariableInitializer MoreVariableDeclarators- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf MemberRest where- rtkPosOf (Anti_MemberRest _) = rtkNoPos- rtkPosOf (Ctr__MemberRest__0 p _ _ _ _) = p- rtkPosOf (Ctr__MemberRest__1 p _ _ _) = p-data Modifier = Anti_Modifier String |- Ctr__Modifier__0 RtkPos |- Ctr__Modifier__1 RtkPos |- Ctr__Modifier__2 RtkPos |- Ctr__Modifier__3 RtkPos |- Ctr__Modifier__4 RtkPos |- Ctr__Modifier__5 RtkPos |- Ctr__Modifier__6 RtkPos |- Ctr__Modifier__7 RtkPos |- Ctr__Modifier__8 RtkPos |- Ctr__Modifier__9 RtkPos- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Modifier where- rtkPosOf (Anti_Modifier _) = rtkNoPos- rtkPosOf (Ctr__Modifier__0 p) = p- rtkPosOf (Ctr__Modifier__1 p) = p- rtkPosOf (Ctr__Modifier__2 p) = p- rtkPosOf (Ctr__Modifier__3 p) = p- rtkPosOf (Ctr__Modifier__4 p) = p- rtkPosOf (Ctr__Modifier__5 p) = p- rtkPosOf (Ctr__Modifier__6 p) = p- rtkPosOf (Ctr__Modifier__7 p) = p- rtkPosOf (Ctr__Modifier__8 p) = p- rtkPosOf (Ctr__Modifier__9 p) = p-type ModifierList = [Rule_10]-data MoreTypeSpecifier = Anti_MoreTypeSpecifier String |- Ctr__MoreTypeSpecifier__0 RtkPos String MoreTypeSpecifier |- Ctr__MoreTypeSpecifier__1 RtkPos TypeArguments Dims- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf MoreTypeSpecifier where- rtkPosOf (Anti_MoreTypeSpecifier _) = rtkNoPos- rtkPosOf (Ctr__MoreTypeSpecifier__0 p _ _) = p- rtkPosOf (Ctr__MoreTypeSpecifier__1 p _ _) = p-type MoreVariableDeclarators = [Rule_44]-data MultiplicativeOp = Anti_MultiplicativeOp String |- Ctr__MultiplicativeOp__0 RtkPos |- Ctr__MultiplicativeOp__1 RtkPos |- Ctr__MultiplicativeOp__2 RtkPos- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf MultiplicativeOp where- rtkPosOf (Anti_MultiplicativeOp _) = rtkNoPos- rtkPosOf (Ctr__MultiplicativeOp__0 p) = p- rtkPosOf (Ctr__MultiplicativeOp__1 p) = p- rtkPosOf (Ctr__MultiplicativeOp__2 p) = p-type NonEmptyDims = [Rule_33]-data NonEmptyTypeArguments = Anti_NonEmptyTypeArguments String |- Ctr__NonEmptyTypeArguments__0 RtkPos TypeArgument Rule_81 |- Ctr__NonEmptyTypeArguments__1 RtkPos- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf NonEmptyTypeArguments where- rtkPosOf (Anti_NonEmptyTypeArguments _) = rtkNoPos- rtkPosOf (Ctr__NonEmptyTypeArguments__0 p _ _) = p- rtkPosOf (Ctr__NonEmptyTypeArguments__1 p) = p-data OptDocComment = Anti_OptDocComment String |- Ctr__OptDocComment__0 RtkPos |- Ctr__OptDocComment__1 RtkPos DocComment- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf OptDocComment where- rtkPosOf (Anti_OptDocComment _) = rtkNoPos- rtkPosOf (Ctr__OptDocComment__0 p) = p- rtkPosOf (Ctr__OptDocComment__1 p _) = p-data OptElsePart = Anti_OptElsePart String |- Ctr__OptElsePart__0 RtkPos |- Ctr__OptElsePart__1 RtkPos Rule_61- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf OptElsePart where- rtkPosOf (Anti_OptElsePart _) = rtkNoPos- rtkPosOf (Ctr__OptElsePart__0 p) = p- rtkPosOf (Ctr__OptElsePart__1 p _) = p-data OptExpression = Anti_OptExpression String |- Ctr__OptExpression__0 RtkPos |- Ctr__OptExpression__1 RtkPos Expression- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf OptExpression where- rtkPosOf (Anti_OptExpression _) = rtkNoPos- rtkPosOf (Ctr__OptExpression__0 p) = p- rtkPosOf (Ctr__OptExpression__1 p _) = p-data OptFinally = Anti_OptFinally String |- Ctr__OptFinally__0 RtkPos |- Ctr__OptFinally__1 RtkPos Rule_65- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf OptFinally where- rtkPosOf (Anti_OptFinally _) = rtkNoPos- rtkPosOf (Ctr__OptFinally__0 p) = p- rtkPosOf (Ctr__OptFinally__1 p _) = p-data OptId = Anti_OptId String |- Ctr__OptId__0 RtkPos |- Ctr__OptId__1 RtkPos String- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf OptId where- rtkPosOf (Anti_OptId _) = rtkNoPos- rtkPosOf (Ctr__OptId__0 p) = p- rtkPosOf (Ctr__OptId__1 p _) = p-data OptVariableInitializer = Anti_OptVariableInitializer String |- Ctr__OptVariableInitializer__0 RtkPos |- Ctr__OptVariableInitializer__1 RtkPos Rule_50- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf OptVariableInitializer where- rtkPosOf (Anti_OptVariableInitializer _) = rtkNoPos- rtkPosOf (Ctr__OptVariableInitializer__0 p) = p- rtkPosOf (Ctr__OptVariableInitializer__1 p _) = p-data Package = Anti_Package String |- Ctr__Package__0 RtkPos CompoundName- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Package where- rtkPosOf (Anti_Package _) = rtkNoPos- rtkPosOf (Ctr__Package__0 p _) = p-type ParamModifierList = [Rule_57]-data Parameter = Anti_Parameter String |- Ctr__Parameter__0 RtkPos ParamModifierList Type Rule_59 String Dims- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Parameter where- rtkPosOf (Anti_Parameter _) = rtkNoPos- rtkPosOf (Ctr__Parameter__0 p _ _ _ _ _) = p-data ParameterList = Anti_ParameterList String |- Ctr__ParameterList__0 RtkPos Parameter Rule_55- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf ParameterList where- rtkPosOf (Anti_ParameterList _) = rtkNoPos- rtkPosOf (Ctr__ParameterList__0 p _ _) = p-data PostfixOp = Anti_PostfixOp String |- Ctr__PostfixOp__0 RtkPos |- Ctr__PostfixOp__1 RtkPos- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf PostfixOp where- rtkPosOf (Anti_PostfixOp _) = rtkNoPos- rtkPosOf (Ctr__PostfixOp__0 p) = p- rtkPosOf (Ctr__PostfixOp__1 p) = p-data PrefixOp = Anti_PrefixOp String |- Ctr__PrefixOp__0 RtkPos |- Ctr__PrefixOp__1 RtkPos |- Ctr__PrefixOp__2 RtkPos |- Ctr__PrefixOp__3 RtkPos- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf PrefixOp where- rtkPosOf (Anti_PrefixOp _) = rtkNoPos- rtkPosOf (Ctr__PrefixOp__0 p) = p- rtkPosOf (Ctr__PrefixOp__1 p) = p- rtkPosOf (Ctr__PrefixOp__2 p) = p- rtkPosOf (Ctr__PrefixOp__3 p) = p-data PrimitiveTypeKeyword = Anti_PrimitiveTypeKeyword String |- Ctr__PrimitiveTypeKeyword__0 RtkPos |- Ctr__PrimitiveTypeKeyword__1 RtkPos |- Ctr__PrimitiveTypeKeyword__2 RtkPos |- Ctr__PrimitiveTypeKeyword__3 RtkPos |- Ctr__PrimitiveTypeKeyword__4 RtkPos |- Ctr__PrimitiveTypeKeyword__5 RtkPos |- Ctr__PrimitiveTypeKeyword__6 RtkPos |- Ctr__PrimitiveTypeKeyword__7 RtkPos |- Ctr__PrimitiveTypeKeyword__8 RtkPos- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf PrimitiveTypeKeyword where- rtkPosOf (Anti_PrimitiveTypeKeyword _) = rtkNoPos- rtkPosOf (Ctr__PrimitiveTypeKeyword__0 p) = p- rtkPosOf (Ctr__PrimitiveTypeKeyword__1 p) = p- rtkPosOf (Ctr__PrimitiveTypeKeyword__2 p) = p- rtkPosOf (Ctr__PrimitiveTypeKeyword__3 p) = p- rtkPosOf (Ctr__PrimitiveTypeKeyword__4 p) = p- rtkPosOf (Ctr__PrimitiveTypeKeyword__5 p) = p- rtkPosOf (Ctr__PrimitiveTypeKeyword__6 p) = p- rtkPosOf (Ctr__PrimitiveTypeKeyword__7 p) = p- rtkPosOf (Ctr__PrimitiveTypeKeyword__8 p) = p-data RelationalOp = Anti_RelationalOp String |- Ctr__RelationalOp__0 RtkPos |- Ctr__RelationalOp__1 RtkPos |- Ctr__RelationalOp__2 RtkPos |- Ctr__RelationalOp__3 RtkPos- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf RelationalOp where- rtkPosOf (Anti_RelationalOp _) = rtkNoPos- rtkPosOf (Ctr__RelationalOp__0 p) = p- rtkPosOf (Ctr__RelationalOp__1 p) = p- rtkPosOf (Ctr__RelationalOp__2 p) = p- rtkPosOf (Ctr__RelationalOp__3 p) = p-data Rule_1 = Ctr__Rule_1__0 RtkPos |- Ctr__Rule_1__1 RtkPos Package- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_1 where- rtkPosOf (Ctr__Rule_1__0 p) = p- rtkPosOf (Ctr__Rule_1__1 p _) = p-data Rule_10 = Anti_Rule_10 String |- Ctr__Rule_10__1 RtkPos Modifier |- Ctr__Rule_10__2 RtkPos Annotation- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_10 where- rtkPosOf (Anti_Rule_10 _) = rtkNoPos- rtkPosOf (Ctr__Rule_10__1 p _) = p- rtkPosOf (Ctr__Rule_10__2 p _) = p-type Rule_12 = [Rule_13]-data Rule_13 = Ctr__Rule_13__0 RtkPos ClassOrInterfaceType- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_13 where- rtkPosOf (Ctr__Rule_13__0 p _) = p-type Rule_14 = [ClassOrInterfaceType]-data Rule_16 = Ctr__Rule_16__0 RtkPos |- Ctr__Rule_16__1 RtkPos ExtendsList- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_16 where- rtkPosOf (Ctr__Rule_16__0 p) = p- rtkPosOf (Ctr__Rule_16__1 p _) = p-data Rule_17 = Ctr__Rule_17__0 RtkPos |- Ctr__Rule_17__1 RtkPos ImplementsList- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_17 where- rtkPosOf (Ctr__Rule_17__0 p) = p- rtkPosOf (Ctr__Rule_17__1 p _) = p-data Rule_18 = Ctr__Rule_18__0 RtkPos |- Ctr__Rule_18__1 RtkPos ExtendsList- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_18 where- rtkPosOf (Ctr__Rule_18__0 p) = p- rtkPosOf (Ctr__Rule_18__1 p _) = p-data Rule_2 = Ctr__Rule_2__0 RtkPos |- Ctr__Rule_2__1 RtkPos TypeDeclaration- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_2 where- rtkPosOf (Ctr__Rule_2__0 p) = p- rtkPosOf (Ctr__Rule_2__1 p _) = p-data Rule_20 = Ctr__Rule_20__0 RtkPos |- Ctr__Rule_20__1 RtkPos Rule_21- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_20 where- rtkPosOf (Ctr__Rule_20__0 p) = p- rtkPosOf (Ctr__Rule_20__1 p _) = p-data Rule_21 = Ctr__Rule_21__0 RtkPos Arglist- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_21 where- rtkPosOf (Ctr__Rule_21__0 p _) = p-data Rule_22 = Ctr__Rule_22__0 RtkPos |- Ctr__Rule_22__1 RtkPos Rule_23- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_22 where- rtkPosOf (Ctr__Rule_22__0 p) = p- rtkPosOf (Ctr__Rule_22__1 p _) = p-data Rule_23 = Ctr__Rule_23__0 RtkPos FieldDeclarationList- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_23 where- rtkPosOf (Ctr__Rule_23__0 p _) = p-type Rule_24 = [Rule_25]-data Rule_25 = Ctr__Rule_25__0 RtkPos EnumConstant- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_25 where- rtkPosOf (Ctr__Rule_25__0 p _) = p-data Rule_26 = Ctr__Rule_26__0 RtkPos |- Ctr__Rule_26__1 RtkPos- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_26 where- rtkPosOf (Ctr__Rule_26__0 p) = p- rtkPosOf (Ctr__Rule_26__1 p) = p-data Rule_27 = Ctr__Rule_27__0 RtkPos |- Ctr__Rule_27__1 RtkPos ImplementsList- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_27 where- rtkPosOf (Ctr__Rule_27__0 p) = p- rtkPosOf (Ctr__Rule_27__1 p _) = p-data Rule_28 = Ctr__Rule_28__0 RtkPos |- Ctr__Rule_28__1 RtkPos Rule_29- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_28 where- rtkPosOf (Ctr__Rule_28__0 p) = p- rtkPosOf (Ctr__Rule_28__1 p _) = p-data Rule_29 = Ctr__Rule_29__0 RtkPos FieldDeclarationList- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_29 where- rtkPosOf (Ctr__Rule_29__0 p _) = p-data Rule_3 = Ctr__Rule_3__0 RtkPos |- Ctr__Rule_3__1 RtkPos- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_3 where- rtkPosOf (Ctr__Rule_3__0 p) = p- rtkPosOf (Ctr__Rule_3__1 p) = p-data Rule_30 = Ctr__Rule_30__0 RtkPos MemberDeclaration |- Ctr__Rule_30__1 RtkPos TypeDeclRest |- Ctr__Rule_30__2 RtkPos StaticInitializer- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_30 where- rtkPosOf (Ctr__Rule_30__0 p _) = p- rtkPosOf (Ctr__Rule_30__1 p _) = p- rtkPosOf (Ctr__Rule_30__2 p _) = p-data Rule_31 = Anti_Rule_31 String |- Ctr__Rule_31__1 RtkPos- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_31 where- rtkPosOf (Anti_Rule_31 _) = rtkNoPos- rtkPosOf (Ctr__Rule_31__1 p) = p-data Rule_33 = Anti_Rule_33 String |- Ctr__Rule_33__1 RtkPos- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_33 where- rtkPosOf (Anti_Rule_33 _) = rtkNoPos- rtkPosOf (Ctr__Rule_33__1 p) = p-data Rule_35 = Ctr__Rule_35__0 RtkPos |- Ctr__Rule_35__1 RtkPos ParameterList- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_35 where- rtkPosOf (Ctr__Rule_35__0 p) = p- rtkPosOf (Ctr__Rule_35__1 p _) = p-data Rule_36 = Ctr__Rule_36__0 RtkPos |- Ctr__Rule_36__1 RtkPos ThrowsClause- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_36 where- rtkPosOf (Ctr__Rule_36__0 p) = p- rtkPosOf (Ctr__Rule_36__1 p _) = p-type Rule_37 = [Rule_38]-data Rule_38 = Ctr__Rule_38__0 RtkPos CompoundName- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_38 where- rtkPosOf (Ctr__Rule_38__0 p _) = p-data Rule_39 = Ctr__Rule_39__0 RtkPos |- Ctr__Rule_39__1 RtkPos ParameterList- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_39 where- rtkPosOf (Ctr__Rule_39__0 p) = p- rtkPosOf (Ctr__Rule_39__1 p _) = p-data Rule_4 = Ctr__Rule_4__0 RtkPos |- Ctr__Rule_4__1 RtkPos Rule_5- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_4 where- rtkPosOf (Ctr__Rule_4__0 p) = p- rtkPosOf (Ctr__Rule_4__1 p _) = p-data Rule_40 = Ctr__Rule_40__0 RtkPos |- Ctr__Rule_40__1 RtkPos ThrowsClause- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_40 where- rtkPosOf (Ctr__Rule_40__0 p) = p- rtkPosOf (Ctr__Rule_40__1 p _) = p-data Rule_41 = Ctr__Rule_41__0 RtkPos StatementBlock |- Ctr__Rule_41__1 RtkPos Rule_42- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_41 where- rtkPosOf (Ctr__Rule_41__0 p _) = p- rtkPosOf (Ctr__Rule_41__1 p _) = p-data Rule_42 = Ctr__Rule_42__0 RtkPos |- Ctr__Rule_42__1 RtkPos Rule_43- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_42 where- rtkPosOf (Ctr__Rule_42__0 p) = p- rtkPosOf (Ctr__Rule_42__1 p _) = p-data Rule_43 = Ctr__Rule_43__0 RtkPos Expression- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_43 where- rtkPosOf (Ctr__Rule_43__0 p _) = p-data Rule_44 = Anti_Rule_44 String |- Ctr__Rule_44__1 RtkPos VariableDeclarator- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_44 where- rtkPosOf (Anti_Rule_44 _) = rtkNoPos- rtkPosOf (Ctr__Rule_44__1 p _) = p-type Rule_46 = [Rule_47]-data Rule_47 = Ctr__Rule_47__0 RtkPos VariableDeclarator- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_47 where- rtkPosOf (Ctr__Rule_47__0 p _) = p-data Rule_48 = Anti_Rule_48 String |- Ctr__Rule_48__1 RtkPos |- Ctr__Rule_48__2 RtkPos Annotation- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_48 where- rtkPosOf (Anti_Rule_48 _) = rtkNoPos- rtkPosOf (Ctr__Rule_48__1 p) = p- rtkPosOf (Ctr__Rule_48__2 p _) = p-data Rule_5 = Ctr__Rule_5__0 RtkPos Rule_6- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_5 where- rtkPosOf (Ctr__Rule_5__0 p _) = p-data Rule_50 = Ctr__Rule_50__0 RtkPos VariableInitializer- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_50 where- rtkPosOf (Ctr__Rule_50__0 p _) = p-data Rule_51 = Ctr__Rule_51__0 RtkPos VariableInitializer Rule_52 Rule_54- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_51 where- rtkPosOf (Ctr__Rule_51__0 p _ _ _) = p-type Rule_52 = [Rule_53]-data Rule_53 = Ctr__Rule_53__0 RtkPos VariableInitializer- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_53 where- rtkPosOf (Ctr__Rule_53__0 p _) = p-data Rule_54 = Ctr__Rule_54__0 RtkPos |- Ctr__Rule_54__1 RtkPos- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_54 where- rtkPosOf (Ctr__Rule_54__0 p) = p- rtkPosOf (Ctr__Rule_54__1 p) = p-type Rule_55 = [Rule_56]-data Rule_56 = Ctr__Rule_56__0 RtkPos Parameter- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_56 where- rtkPosOf (Ctr__Rule_56__0 p _) = p-data Rule_57 = Anti_Rule_57 String |- Ctr__Rule_57__1 RtkPos |- Ctr__Rule_57__2 RtkPos Annotation- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_57 where- rtkPosOf (Anti_Rule_57 _) = rtkNoPos- rtkPosOf (Ctr__Rule_57__1 p) = p- rtkPosOf (Ctr__Rule_57__2 p _) = p-data Rule_59 = Ctr__Rule_59__0 RtkPos |- Ctr__Rule_59__1 RtkPos- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_59 where- rtkPosOf (Ctr__Rule_59__0 p) = p- rtkPosOf (Ctr__Rule_59__1 p) = p-data Rule_6 = Ctr__Rule_6__0 RtkPos |- Ctr__Rule_6__1 RtkPos AnnotationArguments- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_6 where- rtkPosOf (Ctr__Rule_6__0 p) = p- rtkPosOf (Ctr__Rule_6__1 p _) = p-data Rule_61 = Ctr__Rule_61__0 RtkPos Statement- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_61 where- rtkPosOf (Ctr__Rule_61__0 p _) = p-data Rule_62 = Ctr__Rule_62__0 RtkPos VariableDeclaration |- Ctr__Rule_62__1 RtkPos Expression |- Ctr__Rule_62__2 RtkPos- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_62 where- rtkPosOf (Ctr__Rule_62__0 p _) = p- rtkPosOf (Ctr__Rule_62__1 p _) = p- rtkPosOf (Ctr__Rule_62__2 p) = p-data Rule_63 = Anti_Rule_63 String |- Ctr__Rule_63__1 RtkPos Parameter Statement- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_63 where- rtkPosOf (Anti_Rule_63 _) = rtkNoPos- rtkPosOf (Ctr__Rule_63__1 p _ _) = p-data Rule_65 = Ctr__Rule_65__0 RtkPos Statement- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_65 where- rtkPosOf (Ctr__Rule_65__0 p _) = p-data Rule_66 = Anti_Rule_66 String |- Ctr__Rule_66__1 RtkPos Expression |- Ctr__Rule_66__2 RtkPos |- Ctr__Rule_66__3 RtkPos Statement- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_66 where- rtkPosOf (Anti_Rule_66 _) = rtkNoPos- rtkPosOf (Ctr__Rule_66__1 p _) = p- rtkPosOf (Ctr__Rule_66__2 p) = p- rtkPosOf (Ctr__Rule_66__3 p _) = p-data Rule_68 = Ctr__Rule_68__0 RtkPos |- Ctr__Rule_68__1 RtkPos Rule_69- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_68 where- rtkPosOf (Ctr__Rule_68__0 p) = p- rtkPosOf (Ctr__Rule_68__1 p _) = p-data Rule_69 = Ctr__Rule_69__0 RtkPos AssignmentOp Expression- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_69 where- rtkPosOf (Ctr__Rule_69__0 p _ _) = p-type Rule_7 = [Rule_8]-data Rule_70 = Ctr__Rule_70__0 RtkPos |- Ctr__Rule_70__1 RtkPos Rule_71- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_70 where- rtkPosOf (Ctr__Rule_70__0 p) = p- rtkPosOf (Ctr__Rule_70__1 p _) = p-data Rule_71 = Ctr__Rule_71__0 RtkPos Arglist- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_71 where- rtkPosOf (Ctr__Rule_71__0 p _) = p-data Rule_72 = Ctr__Rule_72__0 RtkPos |- Ctr__Rule_72__1 RtkPos Rule_73- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_72 where- rtkPosOf (Ctr__Rule_72__0 p) = p- rtkPosOf (Ctr__Rule_72__1 p _) = p-data Rule_73 = Ctr__Rule_73__0 RtkPos Arglist- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_73 where- rtkPosOf (Ctr__Rule_73__0 p _) = p-data Rule_74 = Ctr__Rule_74__0 RtkPos Arglist |- Ctr__Rule_74__1 RtkPos DimExprs Rule_75- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_74 where- rtkPosOf (Ctr__Rule_74__0 p _) = p- rtkPosOf (Ctr__Rule_74__1 p _ _) = p-data Rule_75 = Ctr__Rule_75__0 RtkPos |- Ctr__Rule_75__1 RtkPos NonEmptyDims- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_75 where- rtkPosOf (Ctr__Rule_75__0 p) = p- rtkPosOf (Ctr__Rule_75__1 p _) = p-data Rule_76 = Anti_Rule_76 String |- Ctr__Rule_76__1 RtkPos Expression- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_76 where- rtkPosOf (Anti_Rule_76 _) = rtkNoPos- rtkPosOf (Ctr__Rule_76__1 p _) = p-data Rule_78 = Ctr__Rule_78__0 RtkPos Expression Rule_79- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_78 where- rtkPosOf (Ctr__Rule_78__0 p _ _) = p-type Rule_79 = [Rule_80]-data Rule_8 = Ctr__Rule_8__0 RtkPos AnnotationElement- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_8 where- rtkPosOf (Ctr__Rule_8__0 p _) = p-data Rule_80 = Ctr__Rule_80__0 RtkPos Expression- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_80 where- rtkPosOf (Ctr__Rule_80__0 p _) = p-type Rule_81 = [Rule_82]-data Rule_82 = Ctr__Rule_82__0 RtkPos TypeArgument- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_82 where- rtkPosOf (Ctr__Rule_82__0 p _) = p-data Rule_83 = Ctr__Rule_83__0 RtkPos TypeParameter Rule_84- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_83 where- rtkPosOf (Ctr__Rule_83__0 p _ _) = p-type Rule_84 = [Rule_85]-data Rule_85 = Ctr__Rule_85__0 RtkPos TypeParameter- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_85 where- rtkPosOf (Ctr__Rule_85__0 p _) = p-data Rule_86 = Ctr__Rule_86__0 RtkPos |- Ctr__Rule_86__1 RtkPos Rule_87- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_86 where- rtkPosOf (Ctr__Rule_86__0 p) = p- rtkPosOf (Ctr__Rule_86__1 p _) = p-data Rule_87 = Ctr__Rule_87__0 RtkPos Type Rule_88- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_87 where- rtkPosOf (Ctr__Rule_87__0 p _ _) = p-type Rule_88 = [Rule_89]-data Rule_89 = Ctr__Rule_89__0 RtkPos Type- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_89 where- rtkPosOf (Ctr__Rule_89__0 p _) = p-data Rule_90 = Anti_Rule_90 String |- Ctr__Rule_90__1 RtkPos String- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Rule_90 where- rtkPosOf (Anti_Rule_90 _) = rtkNoPos- rtkPosOf (Ctr__Rule_90__1 p _) = p-data ShiftOp = Anti_ShiftOp String |- Ctr__ShiftOp__0 RtkPos |- Ctr__ShiftOp__1 RtkPos |- Ctr__ShiftOp__2 RtkPos- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf ShiftOp where- rtkPosOf (Anti_ShiftOp _) = rtkNoPos- rtkPosOf (Ctr__ShiftOp__0 p) = p- rtkPosOf (Ctr__ShiftOp__1 p) = p- rtkPosOf (Ctr__ShiftOp__2 p) = p-data Statement = Anti_Statement String |- Ctr__Statement__0 RtkPos VariableDeclaration |- Ctr__Statement__1 RtkPos OptExpression |- Ctr__Statement__2 RtkPos Expression |- Ctr__Statement__3 RtkPos StatementBlock |- Ctr__Statement__4 RtkPos IfStatement |- Ctr__Statement__5 RtkPos DoStatement |- Ctr__Statement__6 RtkPos WhileStatement |- Ctr__Statement__7 RtkPos ForStatement |- Ctr__Statement__8 RtkPos TryStatement |- Ctr__Statement__9 RtkPos SwitchStatement |- Ctr__Statement__10 RtkPos Expression Statement |- Ctr__Statement__11 RtkPos Expression |- Ctr__Statement__12 RtkPos String Statement |- Ctr__Statement__13 RtkPos OptId |- Ctr__Statement__14 RtkPos OptId |- Ctr__Statement__15 RtkPos Arglist |- Ctr__Statement__16 RtkPos Arglist |- Ctr__Statement__17 RtkPos- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Statement where- rtkPosOf (Anti_Statement _) = rtkNoPos- rtkPosOf (Ctr__Statement__0 p _) = p- rtkPosOf (Ctr__Statement__1 p _) = p- rtkPosOf (Ctr__Statement__2 p _) = p- rtkPosOf (Ctr__Statement__3 p _) = p- rtkPosOf (Ctr__Statement__4 p _) = p- rtkPosOf (Ctr__Statement__5 p _) = p- rtkPosOf (Ctr__Statement__6 p _) = p- rtkPosOf (Ctr__Statement__7 p _) = p- rtkPosOf (Ctr__Statement__8 p _) = p- rtkPosOf (Ctr__Statement__9 p _) = p- rtkPosOf (Ctr__Statement__10 p _ _) = p- rtkPosOf (Ctr__Statement__11 p _) = p- rtkPosOf (Ctr__Statement__12 p _ _) = p- rtkPosOf (Ctr__Statement__13 p _) = p- rtkPosOf (Ctr__Statement__14 p _) = p- rtkPosOf (Ctr__Statement__15 p _) = p- rtkPosOf (Ctr__Statement__16 p _) = p- rtkPosOf (Ctr__Statement__17 p) = p-data StatementBlock = Anti_StatementBlock String |- Ctr__StatementBlock__0 RtkPos StatementList- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf StatementBlock where- rtkPosOf (Anti_StatementBlock _) = rtkNoPos- rtkPosOf (Ctr__StatementBlock__0 p _) = p-type StatementList = [Statement]-data StaticInitializer = Anti_StaticInitializer String |- Ctr__StaticInitializer__0 RtkPos StatementBlock- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf StaticInitializer where- rtkPosOf (Anti_StaticInitializer _) = rtkNoPos- rtkPosOf (Ctr__StaticInitializer__0 p _) = p-type SwitchCaseList = [Rule_66]-data SwitchStatement = Anti_SwitchStatement String |- Ctr__SwitchStatement__0 RtkPos Expression SwitchCaseList- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf SwitchStatement where- rtkPosOf (Anti_SwitchStatement _) = rtkNoPos- rtkPosOf (Ctr__SwitchStatement__0 p _ _) = p-data ThrowsClause = Anti_ThrowsClause String |- Ctr__ThrowsClause__0 RtkPos CompoundName Rule_37- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf ThrowsClause where- rtkPosOf (Anti_ThrowsClause _) = rtkNoPos- rtkPosOf (Ctr__ThrowsClause__0 p _ _) = p-data TryStatement = Anti_TryStatement String |- Ctr__TryStatement__0 RtkPos Statement CatchList OptFinally- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf TryStatement where- rtkPosOf (Anti_TryStatement _) = rtkNoPos- rtkPosOf (Ctr__TryStatement__0 p _ _ _) = p-data Type = Anti_Type String |- Ctr__Type__0 RtkPos PrimitiveTypeKeyword Dims |- Ctr__Type__1 RtkPos CompoundName NonEmptyTypeArguments Dims |- Ctr__Type__2 RtkPos CompoundName NonEmptyDims |- Ctr__Type__3 RtkPos CompoundName- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf Type where- rtkPosOf (Anti_Type _) = rtkNoPos- rtkPosOf (Ctr__Type__0 p _ _) = p- rtkPosOf (Ctr__Type__1 p _ _ _) = p- rtkPosOf (Ctr__Type__2 p _ _) = p- rtkPosOf (Ctr__Type__3 p _) = p-data TypeArgument = Anti_TypeArgument String |- Ctr__TypeArgument__0 RtkPos Type |- Ctr__TypeArgument__1 RtkPos WildcardType- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf TypeArgument where- rtkPosOf (Anti_TypeArgument _) = rtkNoPos- rtkPosOf (Ctr__TypeArgument__0 p _) = p- rtkPosOf (Ctr__TypeArgument__1 p _) = p-data TypeArguments = Anti_TypeArguments String |- Ctr__TypeArguments__0 RtkPos |- Ctr__TypeArguments__1 RtkPos NonEmptyTypeArguments- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf TypeArguments where- rtkPosOf (Anti_TypeArguments _) = rtkNoPos- rtkPosOf (Ctr__TypeArguments__0 p) = p- rtkPosOf (Ctr__TypeArguments__1 p _) = p-data TypeDeclRest = Anti_TypeDeclRest String |- Ctr__TypeDeclRest__0 RtkPos ClassDeclaration |- Ctr__TypeDeclRest__1 RtkPos InterfaceDeclaration |- Ctr__TypeDeclRest__2 RtkPos EnumDeclaration |- Ctr__TypeDeclRest__3 RtkPos AnnotationDeclaration- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf TypeDeclRest where- rtkPosOf (Anti_TypeDeclRest _) = rtkNoPos- rtkPosOf (Ctr__TypeDeclRest__0 p _) = p- rtkPosOf (Ctr__TypeDeclRest__1 p _) = p- rtkPosOf (Ctr__TypeDeclRest__2 p _) = p- rtkPosOf (Ctr__TypeDeclRest__3 p _) = p-data TypeDeclaration = Anti_TypeDeclaration String |- Ctr__TypeDeclaration__0 RtkPos OptDocComment ModifierList TypeDeclRest- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf TypeDeclaration where- rtkPosOf (Anti_TypeDeclaration _) = rtkNoPos- rtkPosOf (Ctr__TypeDeclaration__0 p _ _ _) = p-data TypeParameter = Anti_TypeParameter String |- Ctr__TypeParameter__0 RtkPos String Rule_86- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf TypeParameter where- rtkPosOf (Anti_TypeParameter _) = rtkNoPos- rtkPosOf (Ctr__TypeParameter__0 p _ _) = p-data TypeParameters = Anti_TypeParameters String |- Ctr__TypeParameters__0 RtkPos |- Ctr__TypeParameters__1 RtkPos Rule_83- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf TypeParameters where- rtkPosOf (Anti_TypeParameters _) = rtkNoPos- rtkPosOf (Ctr__TypeParameters__0 p) = p- rtkPosOf (Ctr__TypeParameters__1 p _) = p-data TypeSpecifier = Anti_TypeSpecifier String |- Ctr__TypeSpecifier__0 RtkPos |- Ctr__TypeSpecifier__1 RtkPos |- Ctr__TypeSpecifier__2 RtkPos |- Ctr__TypeSpecifier__3 RtkPos |- Ctr__TypeSpecifier__4 RtkPos |- Ctr__TypeSpecifier__5 RtkPos |- Ctr__TypeSpecifier__6 RtkPos |- Ctr__TypeSpecifier__7 RtkPos |- Ctr__TypeSpecifier__8 RtkPos |- Ctr__TypeSpecifier__9 RtkPos CompoundName TypeArguments- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf TypeSpecifier where- rtkPosOf (Anti_TypeSpecifier _) = rtkNoPos- rtkPosOf (Ctr__TypeSpecifier__0 p) = p- rtkPosOf (Ctr__TypeSpecifier__1 p) = p- rtkPosOf (Ctr__TypeSpecifier__2 p) = p- rtkPosOf (Ctr__TypeSpecifier__3 p) = p- rtkPosOf (Ctr__TypeSpecifier__4 p) = p- rtkPosOf (Ctr__TypeSpecifier__5 p) = p- rtkPosOf (Ctr__TypeSpecifier__6 p) = p- rtkPosOf (Ctr__TypeSpecifier__7 p) = p- rtkPosOf (Ctr__TypeSpecifier__8 p) = p- rtkPosOf (Ctr__TypeSpecifier__9 p _ _) = p-data VariableDeclaration = Anti_VariableDeclaration String |- Ctr__VariableDeclaration__0 RtkPos Type VariableDeclaratorList |- Ctr__VariableDeclaration__1 RtkPos LocalModifierList1 Type VariableDeclaratorList- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf VariableDeclaration where- rtkPosOf (Anti_VariableDeclaration _) = rtkNoPos- rtkPosOf (Ctr__VariableDeclaration__0 p _ _) = p- rtkPosOf (Ctr__VariableDeclaration__1 p _ _ _) = p-data VariableDeclarator = Anti_VariableDeclarator String |- Ctr__VariableDeclarator__0 RtkPos String Dims OptVariableInitializer- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf VariableDeclarator where- rtkPosOf (Anti_VariableDeclarator _) = rtkNoPos- rtkPosOf (Ctr__VariableDeclarator__0 p _ _ _) = p-data VariableDeclaratorList = Anti_VariableDeclaratorList String |- Ctr__VariableDeclaratorList__0 RtkPos VariableDeclarator Rule_46- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf VariableDeclaratorList where- rtkPosOf (Anti_VariableDeclaratorList _) = rtkNoPos- rtkPosOf (Ctr__VariableDeclaratorList__0 p _ _) = p-data VariableInitializer = Anti_VariableInitializer String |- Ctr__VariableInitializer__0 RtkPos Expression |- Ctr__VariableInitializer__1 RtkPos VariableInitializerList- deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)-instance RtkPosOf VariableInitializer where- rtkPosOf (Anti_VariableInitializer _) = rtkNoPos- rtkPosOf (Ctr__VariableInitializer__0 p _) = p- rtkPosOf (Ctr__VariableInitializer__1 p _) = p-data VariableInitializerList = Anti_VariableInitializerList String |- Ctr__VariableInitializerList__0 RtkPos |- Ctr__VariableInitializerList__1 RtkPos Rule_51+tok_AdditiveOp_dummy_205 { L.PosToken _ L.Tk__tok_AdditiveOp_dummy_205 }+tok_Annotation_dummy_204 { L.PosToken _ L.Tk__tok_Annotation_dummy_204 }+tok_AnnotationArguments_dummy_203 { L.PosToken _ L.Tk__tok_AnnotationArguments_dummy_203 }+tok_AnnotationDeclaration_dummy_202 { L.PosToken _ L.Tk__tok_AnnotationDeclaration_dummy_202 }+tok_AnnotationElement_dummy_201 { L.PosToken _ L.Tk__tok_AnnotationElement_dummy_201 }+tok_AnnotationList_dummy_200 { L.PosToken _ L.Tk__tok_AnnotationList_dummy_200 }+tok_AnnotationTypeElement_dummy_199 { L.PosToken _ L.Tk__tok_AnnotationTypeElement_dummy_199 }+tok_AnnotationTypeElementList_dummy_198 { L.PosToken _ L.Tk__tok_AnnotationTypeElementList_dummy_198 }+tok_Arglist_dummy_197 { L.PosToken _ L.Tk__tok_Arglist_dummy_197 }+tok_ArrayInitializer_dummy_196 { L.PosToken _ L.Tk__tok_ArrayInitializer_dummy_196 }+tok_AssignmentOp_dummy_195 { L.PosToken _ L.Tk__tok_AssignmentOp_dummy_195 }+tok_CatchList_dummy_194 { L.PosToken _ L.Tk__tok_CatchList_dummy_194 }+tok_CatchParameter_dummy_193 { L.PosToken _ L.Tk__tok_CatchParameter_dummy_193 }+tok_ClassDeclaration_dummy_192 { L.PosToken _ L.Tk__tok_ClassDeclaration_dummy_192 }+tok_ClassOrInterfaceType_dummy_191 { L.PosToken _ L.Tk__tok_ClassOrInterfaceType_dummy_191 }+tok_CompilationUnit_dummy_190 { L.PosToken _ L.Tk__tok_CompilationUnit_dummy_190 }+tok_CompilationUnitRest_dummy_189 { L.PosToken _ L.Tk__tok_CompilationUnitRest_dummy_189 }+tok_CompoundName_dummy_188 { L.PosToken _ L.Tk__tok_CompoundName_dummy_188 }+tok_CompoundNameTail_dummy_187 { L.PosToken _ L.Tk__tok_CompoundNameTail_dummy_187 }+tok_CreationExpression_dummy_186 { L.PosToken _ L.Tk__tok_CreationExpression_dummy_186 }+tok_DimExprs_dummy_185 { L.PosToken _ L.Tk__tok_DimExprs_dummy_185 }+tok_Dims_dummy_184 { L.PosToken _ L.Tk__tok_Dims_dummy_184 }+tok_DoStatement_dummy_183 { L.PosToken _ L.Tk__tok_DoStatement_dummy_183 }+tok_DocComment_dummy_182 { L.PosToken _ L.Tk__tok_DocComment_dummy_182 }+tok_ElementValue_dummy_181 { L.PosToken _ L.Tk__tok_ElementValue_dummy_181 }+tok_ElementValueArrayInitializer_dummy_180 { L.PosToken _ L.Tk__tok_ElementValueArrayInitializer_dummy_180 }+tok_EnumConstant_dummy_179 { L.PosToken _ L.Tk__tok_EnumConstant_dummy_179 }+tok_EnumConstantList_dummy_178 { L.PosToken _ L.Tk__tok_EnumConstantList_dummy_178 }+tok_EnumDeclaration_dummy_177 { L.PosToken _ L.Tk__tok_EnumDeclaration_dummy_177 }+tok_EqualityOp_dummy_176 { L.PosToken _ L.Tk__tok_EqualityOp_dummy_176 }+tok_Expression_dummy_175 { L.PosToken _ L.Tk__tok_Expression_dummy_175 }+tok_ExtendsList_dummy_174 { L.PosToken _ L.Tk__tok_ExtendsList_dummy_174 }+tok_FieldDeclaration_dummy_173 { L.PosToken _ L.Tk__tok_FieldDeclaration_dummy_173 }+tok_FieldDeclarationList_dummy_172 { L.PosToken _ L.Tk__tok_FieldDeclarationList_dummy_172 }+tok_ForEachHeader_dummy_171 { L.PosToken _ L.Tk__tok_ForEachHeader_dummy_171 }+tok_ForStatement_dummy_170 { L.PosToken _ L.Tk__tok_ForStatement_dummy_170 }+tok_IfStatement_dummy_169 { L.PosToken _ L.Tk__tok_IfStatement_dummy_169 }+tok_ImplementsList_dummy_168 { L.PosToken _ L.Tk__tok_ImplementsList_dummy_168 }+tok_ImportHead_dummy_167 { L.PosToken _ L.Tk__tok_ImportHead_dummy_167 }+tok_ImportList_dummy_166 { L.PosToken _ L.Tk__tok_ImportList_dummy_166 }+tok_ImportName_dummy_165 { L.PosToken _ L.Tk__tok_ImportName_dummy_165 }+tok_ImportStatement_dummy_164 { L.PosToken _ L.Tk__tok_ImportStatement_dummy_164 }+tok_InterfaceDeclaration_dummy_163 { L.PosToken _ L.Tk__tok_InterfaceDeclaration_dummy_163 }+tok_Java_dummy_206 { L.PosToken _ L.Tk__tok_Java_dummy_206 }+tok_LambdaBody_dummy_162 { L.PosToken _ L.Tk__tok_LambdaBody_dummy_162 }+tok_Literal_dummy_161 { L.PosToken _ L.Tk__tok_Literal_dummy_161 }+tok_LocalModifierList1_dummy_160 { L.PosToken _ L.Tk__tok_LocalModifierList1_dummy_160 }+tok_MemberAfterFirstId_dummy_159 { L.PosToken _ L.Tk__tok_MemberAfterFirstId_dummy_159 }+tok_MemberDeclaration_dummy_158 { L.PosToken _ L.Tk__tok_MemberDeclaration_dummy_158 }+tok_MemberRest_dummy_157 { L.PosToken _ L.Tk__tok_MemberRest_dummy_157 }+tok_Modifier_dummy_156 { L.PosToken _ L.Tk__tok_Modifier_dummy_156 }+tok_ModifierList_dummy_155 { L.PosToken _ L.Tk__tok_ModifierList_dummy_155 }+tok_MoreTypeSpecifier_dummy_154 { L.PosToken _ L.Tk__tok_MoreTypeSpecifier_dummy_154 }+tok_MoreVariableDeclarators_dummy_153 { L.PosToken _ L.Tk__tok_MoreVariableDeclarators_dummy_153 }+tok_MultiplicativeOp_dummy_152 { L.PosToken _ L.Tk__tok_MultiplicativeOp_dummy_152 }+tok_NonEmptyDims_dummy_151 { L.PosToken _ L.Tk__tok_NonEmptyDims_dummy_151 }+tok_NonEmptyTypeArguments_dummy_150 { L.PosToken _ L.Tk__tok_NonEmptyTypeArguments_dummy_150 }+tok_NonEmptyTypeParameters_dummy_149 { L.PosToken _ L.Tk__tok_NonEmptyTypeParameters_dummy_149 }+tok_OptDocComment_dummy_148 { L.PosToken _ L.Tk__tok_OptDocComment_dummy_148 }+tok_OptElsePart_dummy_147 { L.PosToken _ L.Tk__tok_OptElsePart_dummy_147 }+tok_OptExpression_dummy_146 { L.PosToken _ L.Tk__tok_OptExpression_dummy_146 }+tok_OptFinally_dummy_145 { L.PosToken _ L.Tk__tok_OptFinally_dummy_145 }+tok_OptId_dummy_144 { L.PosToken _ L.Tk__tok_OptId_dummy_144 }+tok_OptVariableInitializer_dummy_143 { L.PosToken _ L.Tk__tok_OptVariableInitializer_dummy_143 }+tok_Package_dummy_142 { L.PosToken _ L.Tk__tok_Package_dummy_142 }+tok_ParamModifierList_dummy_141 { L.PosToken _ L.Tk__tok_ParamModifierList_dummy_141 }+tok_Parameter_dummy_140 { L.PosToken _ L.Tk__tok_Parameter_dummy_140 }+tok_ParameterList_dummy_139 { L.PosToken _ L.Tk__tok_ParameterList_dummy_139 }+tok_PostfixOp_dummy_138 { L.PosToken _ L.Tk__tok_PostfixOp_dummy_138 }+tok_PrefixOp_dummy_137 { L.PosToken _ L.Tk__tok_PrefixOp_dummy_137 }+tok_PrimitiveTypeKeyword_dummy_136 { L.PosToken _ L.Tk__tok_PrimitiveTypeKeyword_dummy_136 }+tok_RelationalOp_dummy_135 { L.PosToken _ L.Tk__tok_RelationalOp_dummy_135 }+tok_Resource_dummy_134 { L.PosToken _ L.Tk__tok_Resource_dummy_134 }+tok_ResourceSpec_dummy_133 { L.PosToken _ L.Tk__tok_ResourceSpec_dummy_133 }+tok_ShiftOp_dummy_132 { L.PosToken _ L.Tk__tok_ShiftOp_dummy_132 }+tok_Statement_dummy_131 { L.PosToken _ L.Tk__tok_Statement_dummy_131 }+tok_StatementBlock_dummy_130 { L.PosToken _ L.Tk__tok_StatementBlock_dummy_130 }+tok_StatementList_dummy_129 { L.PosToken _ L.Tk__tok_StatementList_dummy_129 }+tok_StaticInitializer_dummy_128 { L.PosToken _ L.Tk__tok_StaticInitializer_dummy_128 }+tok_SwitchCaseList_dummy_127 { L.PosToken _ L.Tk__tok_SwitchCaseList_dummy_127 }+tok_SwitchStatement_dummy_126 { L.PosToken _ L.Tk__tok_SwitchStatement_dummy_126 }+tok_ThrowsClause_dummy_125 { L.PosToken _ L.Tk__tok_ThrowsClause_dummy_125 }+tok_TryStatement_dummy_124 { L.PosToken _ L.Tk__tok_TryStatement_dummy_124 }+tok_Type_dummy_123 { L.PosToken _ L.Tk__tok_Type_dummy_123 }+tok_TypeArgument_dummy_122 { L.PosToken _ L.Tk__tok_TypeArgument_dummy_122 }+tok_TypeArguments_dummy_121 { L.PosToken _ L.Tk__tok_TypeArguments_dummy_121 }+tok_TypeDeclRest_dummy_120 { L.PosToken _ L.Tk__tok_TypeDeclRest_dummy_120 }+tok_TypeDeclaration_dummy_119 { L.PosToken _ L.Tk__tok_TypeDeclaration_dummy_119 }+tok_TypeDeclarationList_dummy_118 { L.PosToken _ L.Tk__tok_TypeDeclarationList_dummy_118 }+tok_TypeParameter_dummy_117 { L.PosToken _ L.Tk__tok_TypeParameter_dummy_117 }+tok_TypeParameters_dummy_116 { L.PosToken _ L.Tk__tok_TypeParameters_dummy_116 }+tok_TypeSpecifier_dummy_115 { L.PosToken _ L.Tk__tok_TypeSpecifier_dummy_115 }+tok_VariableDeclaration_dummy_114 { L.PosToken _ L.Tk__tok_VariableDeclaration_dummy_114 }+tok_VariableDeclarator_dummy_113 { L.PosToken _ L.Tk__tok_VariableDeclarator_dummy_113 }+tok_VariableDeclaratorList_dummy_112 { L.PosToken _ L.Tk__tok_VariableDeclaratorList_dummy_112 }+tok_VariableInitializer_dummy_111 { L.PosToken _ L.Tk__tok_VariableInitializer_dummy_111 }+tok_VariableInitializerList_dummy_110 { L.PosToken _ L.Tk__tok_VariableInitializerList_dummy_110 }+tok_WhileStatement_dummy_109 { L.PosToken _ L.Tk__tok_WhileStatement_dummy_109 }+tok_WildcardType_dummy_108 { L.PosToken _ L.Tk__tok_WildcardType_dummy_108 }+tok__tilde__84 { L.PosToken _ L.Tk__tok__tilde__84 }+tok__symbol__12 { L.PosToken _ L.Tk__tok__symbol__12 }+tok__pipe__pipe__66 { L.PosToken _ L.Tk__tok__pipe__pipe__66 }+tok__pipe__eql__58 { L.PosToken _ L.Tk__tok__pipe__eql__58 }+tok__pipe__48 { L.PosToken _ L.Tk__tok__pipe__48 }+tok__symbol__11 { L.PosToken _ L.Tk__tok__symbol__11 }+tok_while_45 { L.PosToken _ L.Tk__tok_while_45 }+tok_void_28 { L.PosToken _ L.Tk__tok_void_28 }+tok_try_50 { L.PosToken _ L.Tk__tok_try_50 }+tok_true_88 { L.PosToken _ L.Tk__tok_true_88 }+tok_transient_97 { L.PosToken _ L.Tk__tok_transient_97 }+tok_throws_29 { L.PosToken _ L.Tk__tok_throws_29 }+tok_throw_35 { L.PosToken _ L.Tk__tok_throw_35 }+tok_threadsafe_96 { L.PosToken _ L.Tk__tok_threadsafe_96 }+tok_this_41 { L.PosToken _ L.Tk__tok_this_41 }+tok_synchronized_34 { L.PosToken _ L.Tk__tok_synchronized_34 }+tok_switch_52 { L.PosToken _ L.Tk__tok_switch_52 }+tok_super_40 { L.PosToken _ L.Tk__tok_super_40 }+tok_static_3 { L.PosToken _ L.Tk__tok_static_3 }+tok_short_23 { L.PosToken _ L.Tk__tok_short_23 }+tok_return_33 { L.PosToken _ L.Tk__tok_return_33 }+tok_public_91 { L.PosToken _ L.Tk__tok_public_91 }+tok_protected_93 { L.PosToken _ L.Tk__tok_protected_93 }+tok_private_92 { L.PosToken _ L.Tk__tok_private_92 }+tok_package_0 { L.PosToken _ L.Tk__tok_package_0 }+tok_null_90 { L.PosToken _ L.Tk__tok_null_90 }+tok_new_87 { L.PosToken _ L.Tk__tok_new_87 }+tok_native_94 { L.PosToken _ L.Tk__tok_native_94 }+tok_long_26 { L.PosToken _ L.Tk__tok_long_26 }+tok_interface_16 { L.PosToken _ L.Tk__tok_interface_16 }+tok_int_24 { L.PosToken _ L.Tk__tok_int_24 }+tok_instanceof_76 { L.PosToken _ L.Tk__tok_instanceof_76 }+tok_import_2 { L.PosToken _ L.Tk__tok_import_2 }+tok_implements_14 { L.PosToken _ L.Tk__tok_implements_14 }+tok_if_43 { L.PosToken _ L.Tk__tok_if_43 }+tok_for_46 { L.PosToken _ L.Tk__tok_for_46 }+tok_float_25 { L.PosToken _ L.Tk__tok_float_25 }+tok_finally_49 { L.PosToken _ L.Tk__tok_finally_49 }+tok_final_31 { L.PosToken _ L.Tk__tok_final_31 }+tok_false_89 { L.PosToken _ L.Tk__tok_false_89 }+tok_extends_13 { L.PosToken _ L.Tk__tok_extends_13 }+tok_enum_17 { L.PosToken _ L.Tk__tok_enum_17 }+tok_else_42 { L.PosToken _ L.Tk__tok_else_42 }+tok_double_27 { L.PosToken _ L.Tk__tok_double_27 }+tok_do_44 { L.PosToken _ L.Tk__tok_do_44 }+tok_default_30 { L.PosToken _ L.Tk__tok_default_30 }+tok_continue_39 { L.PosToken _ L.Tk__tok_continue_39 }+tok_class_15 { L.PosToken _ L.Tk__tok_class_15 }+tok_char_22 { L.PosToken _ L.Tk__tok_char_22 }+tok_catch_47 { L.PosToken _ L.Tk__tok_catch_47 }+tok_case_51 { L.PosToken _ L.Tk__tok_case_51 }+tok_byte_21 { L.PosToken _ L.Tk__tok_byte_21 }+tok_break_38 { L.PosToken _ L.Tk__tok_break_38 }+tok_boolean_20 { L.PosToken _ L.Tk__tok_boolean_20 }+tok_assert_36 { L.PosToken _ L.Tk__tok_assert_36 }+tok_abstract_95 { L.PosToken _ L.Tk__tok_abstract_95 }+tok__symbol__eql__60 { L.PosToken _ L.Tk__tok__symbol__eql__60 }+tok__symbol__68 { L.PosToken _ L.Tk__tok__symbol__68 }+tok__sq_bkt_r__19 { L.PosToken _ L.Tk__tok__sq_bkt_r__19 }+tok__sq_bkt_l__18 { L.PosToken _ L.Tk__tok__sq_bkt_l__18 }+tok__symbol__6 { L.PosToken _ L.Tk__tok__symbol__6 }+tok__symbol__65 { L.PosToken _ L.Tk__tok__symbol__65 }+tok__symbol__symbol__symbol__eql__64 { L.PosToken _ L.Tk__tok__symbol__symbol__symbol__eql__64 }+tok__symbol__symbol__eql__63 { L.PosToken _ L.Tk__tok__symbol__symbol__eql__63 }+tok__symbol__eql__75 { L.PosToken _ L.Tk__tok__symbol__eql__75 }+tok__symbol__73 { L.PosToken _ L.Tk__tok__symbol__73 }+tok__eql__eql__70 { L.PosToken _ L.Tk__tok__eql__eql__70 }+tok__eql__10 { L.PosToken _ L.Tk__tok__eql__10 }+tok__symbol__eql__74 { L.PosToken _ L.Tk__tok__symbol__eql__74 }+tok__symbol__symbol__eql__62 { L.PosToken _ L.Tk__tok__symbol__symbol__eql__62 }+tok__symbol__symbol__77 { L.PosToken _ L.Tk__tok__symbol__symbol__77 }+tok__symbol__72 { L.PosToken _ L.Tk__tok__symbol__72 }+tok__semi__1 { L.PosToken _ L.Tk__tok__semi__1 }+tok__colon__colon__86 { L.PosToken _ L.Tk__tok__colon__colon__86 }+tok__colon__37 { L.PosToken _ L.Tk__tok__colon__37 }+tok__symbol__eql__57 { L.PosToken _ L.Tk__tok__symbol__eql__57 }+tok__symbol__80 { L.PosToken _ L.Tk__tok__symbol__80 }+tok__dot__dot__dot__32 { L.PosToken _ L.Tk__tok__dot__dot__dot__32 }+tok__dot__4 { L.PosToken _ L.Tk__tok__dot__4 }+tok__minus__symbol__53 { L.PosToken _ L.Tk__tok__minus__symbol__53 }+tok__minus__eql__55 { L.PosToken _ L.Tk__tok__minus__eql__55 }+tok__minus__minus__83 { L.PosToken _ L.Tk__tok__minus__minus__83 }+tok__minus__79 { L.PosToken _ L.Tk__tok__minus__79 }+tok__coma__9 { L.PosToken _ L.Tk__tok__coma__9 }+tok__plus__eql__54 { L.PosToken _ L.Tk__tok__plus__eql__54 }+tok__plus__plus__82 { L.PosToken _ L.Tk__tok__plus__plus__82 }+tok__plus__78 { L.PosToken _ L.Tk__tok__plus__78 }+tok__star__eql__56 { L.PosToken _ L.Tk__tok__star__eql__56 }+tok__star__5 { L.PosToken _ L.Tk__tok__star__5 }+tok__rparen__8 { L.PosToken _ L.Tk__tok__rparen__8 }+tok__lparen__7 { L.PosToken _ L.Tk__tok__lparen__7 }+tok__symbol__eql__59 { L.PosToken _ L.Tk__tok__symbol__eql__59 }+tok__symbol__symbol__67 { L.PosToken _ L.Tk__tok__symbol__symbol__67 }+tok__symbol__69 { L.PosToken _ L.Tk__tok__symbol__69 }+tok__symbol__eql__61 { L.PosToken _ L.Tk__tok__symbol__eql__61 }+tok__symbol__81 { L.PosToken _ L.Tk__tok__symbol__81 }+tok__exclamation__eql__71 { L.PosToken _ L.Tk__tok__exclamation__eql__71 }+tok__exclamation__85 { L.PosToken _ L.Tk__tok__exclamation__85 }+doccomment { L.PosToken _ (L.Tk__doccomment _) }+id { L.PosToken _ (L.Tk__id _) }+string { L.PosToken _ (L.Tk__string _) }+char { L.PosToken _ (L.Tk__char _) }+floatTypeSuffix { L.PosToken _ (L.Tk__floatTypeSuffix _) }+exponentPart { L.PosToken _ (L.Tk__exponentPart _) }+floatLiteral { L.PosToken _ (L.Tk__floatLiteral _) }+integerLiteral { L.PosToken _ (L.Tk__integerLiteral _) }+qq_CompoundName { L.PosToken _ (L.Tk__qq_CompoundName _) }+qq_CompoundNameTail { L.PosToken _ (L.Tk__qq_CompoundNameTail _) }+qq_Modifier { L.PosToken _ (L.Tk__qq_Modifier _) }+qq_TypeSpecifier { L.PosToken _ (L.Tk__qq_TypeSpecifier _) }+qq_Type { L.PosToken _ (L.Tk__qq_Type _) }+qq_TypeParameter { L.PosToken _ (L.Tk__qq_TypeParameter _) }+qq_NonEmptyTypeParameters { L.PosToken _ (L.Tk__qq_NonEmptyTypeParameters _) }+qq_TypeParameters { L.PosToken _ (L.Tk__qq_TypeParameters _) }+qq_WildcardType { L.PosToken _ (L.Tk__qq_WildcardType _) }+qq_TypeArgument { L.PosToken _ (L.Tk__qq_TypeArgument _) }+qq_NonEmptyTypeArguments { L.PosToken _ (L.Tk__qq_NonEmptyTypeArguments _) }+qq_TypeArguments { L.PosToken _ (L.Tk__qq_TypeArguments _) }+qq_Arglist { L.PosToken _ (L.Tk__qq_Arglist _) }+qq_Literal { L.PosToken _ (L.Tk__qq_Literal _) }+qq_DimExprs { L.PosToken _ (L.Tk__qq_DimExprs _) }+qq_CreationExpression { L.PosToken _ (L.Tk__qq_CreationExpression _) }+qq_PostfixOp { L.PosToken _ (L.Tk__qq_PostfixOp _) }+qq_PrefixOp { L.PosToken _ (L.Tk__qq_PrefixOp _) }+qq_MultiplicativeOp { L.PosToken _ (L.Tk__qq_MultiplicativeOp _) }+qq_AdditiveOp { L.PosToken _ (L.Tk__qq_AdditiveOp _) }+qq_ShiftOp { L.PosToken _ (L.Tk__qq_ShiftOp _) }+qq_RelationalOp { L.PosToken _ (L.Tk__qq_RelationalOp _) }+qq_EqualityOp { L.PosToken _ (L.Tk__qq_EqualityOp _) }+qq_AssignmentOp { L.PosToken _ (L.Tk__qq_AssignmentOp _) }+qq_LambdaBody { L.PosToken _ (L.Tk__qq_LambdaBody _) }+qq_Expression { L.PosToken _ (L.Tk__qq_Expression _) }+qq_SwitchStatement { L.PosToken _ (L.Tk__qq_SwitchStatement _) }+qq_SwitchCaseList { L.PosToken _ (L.Tk__qq_SwitchCaseList _) }+qq_Resource { L.PosToken _ (L.Tk__qq_Resource _) }+qq_ResourceSpec { L.PosToken _ (L.Tk__qq_ResourceSpec _) }+qq_TryStatement { L.PosToken _ (L.Tk__qq_TryStatement _) }+qq_OptFinally { L.PosToken _ (L.Tk__qq_OptFinally _) }+qq_CatchParameter { L.PosToken _ (L.Tk__qq_CatchParameter _) }+qq_CatchList { L.PosToken _ (L.Tk__qq_CatchList _) }+qq_ForEachHeader { L.PosToken _ (L.Tk__qq_ForEachHeader _) }+qq_ForStatement { L.PosToken _ (L.Tk__qq_ForStatement _) }+qq_WhileStatement { L.PosToken _ (L.Tk__qq_WhileStatement _) }+qq_DoStatement { L.PosToken _ (L.Tk__qq_DoStatement _) }+qq_IfStatement { L.PosToken _ (L.Tk__qq_IfStatement _) }+qq_OptElsePart { L.PosToken _ (L.Tk__qq_OptElsePart _) }+qq_Statement { L.PosToken _ (L.Tk__qq_Statement _) }+qq_OptId { L.PosToken _ (L.Tk__qq_OptId _) }+qq_OptExpression { L.PosToken _ (L.Tk__qq_OptExpression _) }+qq_StatementList { L.PosToken _ (L.Tk__qq_StatementList _) }+qq_Parameter { L.PosToken _ (L.Tk__qq_Parameter _) }+qq_ParamModifierList { L.PosToken _ (L.Tk__qq_ParamModifierList _) }+qq_ParameterList { L.PosToken _ (L.Tk__qq_ParameterList _) }+qq_StaticInitializer { L.PosToken _ (L.Tk__qq_StaticInitializer _) }+qq_ArrayInitializer { L.PosToken _ (L.Tk__qq_ArrayInitializer _) }+qq_VariableInitializer { L.PosToken _ (L.Tk__qq_VariableInitializer _) }+qq_VariableInitializerList { L.PosToken _ (L.Tk__qq_VariableInitializerList _) }+qq_VariableDeclarator { L.PosToken _ (L.Tk__qq_VariableDeclarator _) }+qq_OptVariableInitializer { L.PosToken _ (L.Tk__qq_OptVariableInitializer _) }+qq_LocalModifierList1 { L.PosToken _ (L.Tk__qq_LocalModifierList1 _) }+qq_VariableDeclaration { L.PosToken _ (L.Tk__qq_VariableDeclaration _) }+qq_VariableDeclaratorList { L.PosToken _ (L.Tk__qq_VariableDeclaratorList _) }+qq_StatementBlock { L.PosToken _ (L.Tk__qq_StatementBlock _) }+qq_MoreVariableDeclarators { L.PosToken _ (L.Tk__qq_MoreVariableDeclarators _) }+qq_MemberRest { L.PosToken _ (L.Tk__qq_MemberRest _) }+qq_ThrowsClause { L.PosToken _ (L.Tk__qq_ThrowsClause _) }+qq_MoreTypeSpecifier { L.PosToken _ (L.Tk__qq_MoreTypeSpecifier _) }+qq_MemberAfterFirstId { L.PosToken _ (L.Tk__qq_MemberAfterFirstId _) }+qq_PrimitiveTypeKeyword { L.PosToken _ (L.Tk__qq_PrimitiveTypeKeyword _) }+qq_MemberDeclaration { L.PosToken _ (L.Tk__qq_MemberDeclaration _) }+qq_NonEmptyDims { L.PosToken _ (L.Tk__qq_NonEmptyDims _) }+qq_Dims { L.PosToken _ (L.Tk__qq_Dims _) }+qq_FieldDeclaration { L.PosToken _ (L.Tk__qq_FieldDeclaration _) }+qq_TypeDeclRest { L.PosToken _ (L.Tk__qq_TypeDeclRest _) }+qq_EnumDeclaration { L.PosToken _ (L.Tk__qq_EnumDeclaration _) }+qq_EnumConstantList { L.PosToken _ (L.Tk__qq_EnumConstantList _) }+qq_EnumConstant { L.PosToken _ (L.Tk__qq_EnumConstant _) }+qq_AnnotationTypeElement { L.PosToken _ (L.Tk__qq_AnnotationTypeElement _) }+qq_AnnotationTypeElementList { L.PosToken _ (L.Tk__qq_AnnotationTypeElementList _) }+qq_AnnotationDeclaration { L.PosToken _ (L.Tk__qq_AnnotationDeclaration _) }+qq_InterfaceDeclaration { L.PosToken _ (L.Tk__qq_InterfaceDeclaration _) }+qq_ClassDeclaration { L.PosToken _ (L.Tk__qq_ClassDeclaration _) }+qq_FieldDeclarationList { L.PosToken _ (L.Tk__qq_FieldDeclarationList _) }+qq_ImplementsList { L.PosToken _ (L.Tk__qq_ImplementsList _) }+qq_ExtendsList { L.PosToken _ (L.Tk__qq_ExtendsList _) }+qq_ClassOrInterfaceType { L.PosToken _ (L.Tk__qq_ClassOrInterfaceType _) }+qq_ModifierList { L.PosToken _ (L.Tk__qq_ModifierList _) }+qq_AnnotationList { L.PosToken _ (L.Tk__qq_AnnotationList _) }+qq_ElementValueArrayInitializer { L.PosToken _ (L.Tk__qq_ElementValueArrayInitializer _) }+qq_ElementValue { L.PosToken _ (L.Tk__qq_ElementValue _) }+qq_AnnotationElement { L.PosToken _ (L.Tk__qq_AnnotationElement _) }+qq_AnnotationArguments { L.PosToken _ (L.Tk__qq_AnnotationArguments _) }+qq_Annotation { L.PosToken _ (L.Tk__qq_Annotation _) }+qq_DocComment { L.PosToken _ (L.Tk__qq_DocComment _) }+qq_ImportHead { L.PosToken _ (L.Tk__qq_ImportHead _) }+qq_ImportName { L.PosToken _ (L.Tk__qq_ImportName _) }+qq_ImportStatement { L.PosToken _ (L.Tk__qq_ImportStatement _) }+qq_Package { L.PosToken _ (L.Tk__qq_Package _) }+qq_CompilationUnitRest { L.PosToken _ (L.Tk__qq_CompilationUnitRest _) }+qq_CompilationUnit { L.PosToken _ (L.Tk__qq_CompilationUnit _) }+qq_ImportList { L.PosToken _ (L.Tk__qq_ImportList _) }+qq_TypeDeclarationList { L.PosToken _ (L.Tk__qq_TypeDeclarationList _) }+qq_TypeDeclaration { L.PosToken _ (L.Tk__qq_TypeDeclaration _) }+qq_OptDocComment { L.PosToken _ (L.Tk__qq_OptDocComment _) }+qq_Java { L.PosToken _ (L.Tk__qq_Java _) }++%%++Java__top : Java rtk__eof { $1 }++Java : tok_Java_dummy_206 Java tok_Java_dummy_206 { Ctr__Java__0 (rtkPosOf $1) $2 } |+ tok_AdditiveOp_dummy_205 AdditiveOp tok_AdditiveOp_dummy_205 { Ctr__Java__1 (rtkPosOf $1) $2 } |+ tok_Annotation_dummy_204 Annotation tok_Annotation_dummy_204 { Ctr__Java__2 (rtkPosOf $1) $2 } |+ tok_AnnotationArguments_dummy_203 AnnotationArguments tok_AnnotationArguments_dummy_203 { Ctr__Java__3 (rtkPosOf $1) $2 } |+ tok_AnnotationDeclaration_dummy_202 AnnotationDeclaration tok_AnnotationDeclaration_dummy_202 { Ctr__Java__4 (rtkPosOf $1) $2 } |+ tok_AnnotationElement_dummy_201 AnnotationElement tok_AnnotationElement_dummy_201 { Ctr__Java__5 (rtkPosOf $1) $2 } |+ tok_AnnotationList_dummy_200 AnnotationList tok_AnnotationList_dummy_200 { Ctr__Java__6 (rtkPosOf $1) (reverse $2) } |+ tok_AnnotationTypeElement_dummy_199 AnnotationTypeElement tok_AnnotationTypeElement_dummy_199 { Ctr__Java__7 (rtkPosOf $1) $2 } |+ tok_AnnotationTypeElementList_dummy_198 AnnotationTypeElementList tok_AnnotationTypeElementList_dummy_198 { Ctr__Java__8 (rtkPosOf $1) (reverse $2) } |+ tok_Arglist_dummy_197 Arglist tok_Arglist_dummy_197 { Ctr__Java__9 (rtkPosOf $1) $2 } |+ tok_ArrayInitializer_dummy_196 ArrayInitializer tok_ArrayInitializer_dummy_196 { Ctr__Java__10 (rtkPosOf $1) $2 } |+ tok_AssignmentOp_dummy_195 AssignmentOp tok_AssignmentOp_dummy_195 { Ctr__Java__11 (rtkPosOf $1) $2 } |+ tok_CatchList_dummy_194 CatchList tok_CatchList_dummy_194 { Ctr__Java__12 (rtkPosOf $1) (reverse $2) } |+ tok_CatchParameter_dummy_193 CatchParameter tok_CatchParameter_dummy_193 { Ctr__Java__13 (rtkPosOf $1) $2 } |+ tok_ClassDeclaration_dummy_192 ClassDeclaration tok_ClassDeclaration_dummy_192 { Ctr__Java__14 (rtkPosOf $1) $2 } |+ tok_ClassOrInterfaceType_dummy_191 ClassOrInterfaceType tok_ClassOrInterfaceType_dummy_191 { Ctr__Java__15 (rtkPosOf $1) $2 } |+ tok_CompilationUnit_dummy_190 CompilationUnit tok_CompilationUnit_dummy_190 { Ctr__Java__16 (rtkPosOf $1) $2 } |+ tok_CompilationUnitRest_dummy_189 CompilationUnitRest tok_CompilationUnitRest_dummy_189 { Ctr__Java__17 (rtkPosOf $1) $2 } |+ tok_CompoundName_dummy_188 CompoundName tok_CompoundName_dummy_188 { Ctr__Java__18 (rtkPosOf $1) $2 } |+ tok_CompoundNameTail_dummy_187 CompoundNameTail tok_CompoundNameTail_dummy_187 { Ctr__Java__19 (rtkPosOf $1) (reverse $2) } |+ tok_CreationExpression_dummy_186 CreationExpression tok_CreationExpression_dummy_186 { Ctr__Java__20 (rtkPosOf $1) $2 } |+ tok_DimExprs_dummy_185 DimExprs tok_DimExprs_dummy_185 { Ctr__Java__21 (rtkPosOf $1) (reverse $2) } |+ tok_Dims_dummy_184 Dims tok_Dims_dummy_184 { Ctr__Java__22 (rtkPosOf $1) (reverse $2) } |+ tok_DoStatement_dummy_183 DoStatement tok_DoStatement_dummy_183 { Ctr__Java__23 (rtkPosOf $1) $2 } |+ tok_DocComment_dummy_182 DocComment tok_DocComment_dummy_182 { Ctr__Java__24 (rtkPosOf $1) $2 } |+ tok_ElementValue_dummy_181 ElementValue tok_ElementValue_dummy_181 { Ctr__Java__25 (rtkPosOf $1) $2 } |+ tok_ElementValueArrayInitializer_dummy_180 ElementValueArrayInitializer tok_ElementValueArrayInitializer_dummy_180 { Ctr__Java__26 (rtkPosOf $1) $2 } |+ tok_EnumConstant_dummy_179 EnumConstant tok_EnumConstant_dummy_179 { Ctr__Java__27 (rtkPosOf $1) $2 } |+ tok_EnumConstantList_dummy_178 EnumConstantList tok_EnumConstantList_dummy_178 { Ctr__Java__28 (rtkPosOf $1) $2 } |+ tok_EnumDeclaration_dummy_177 EnumDeclaration tok_EnumDeclaration_dummy_177 { Ctr__Java__29 (rtkPosOf $1) $2 } |+ tok_EqualityOp_dummy_176 EqualityOp tok_EqualityOp_dummy_176 { Ctr__Java__30 (rtkPosOf $1) $2 } |+ tok_Expression_dummy_175 Expression tok_Expression_dummy_175 { Ctr__Java__31 (rtkPosOf $1) $2 } |+ tok_ExtendsList_dummy_174 ExtendsList tok_ExtendsList_dummy_174 { Ctr__Java__32 (rtkPosOf $1) $2 } |+ tok_FieldDeclaration_dummy_173 FieldDeclaration tok_FieldDeclaration_dummy_173 { Ctr__Java__33 (rtkPosOf $1) $2 } |+ tok_FieldDeclarationList_dummy_172 FieldDeclarationList tok_FieldDeclarationList_dummy_172 { Ctr__Java__34 (rtkPosOf $1) (reverse $2) } |+ tok_ForEachHeader_dummy_171 ForEachHeader tok_ForEachHeader_dummy_171 { Ctr__Java__35 (rtkPosOf $1) $2 } |+ tok_ForStatement_dummy_170 ForStatement tok_ForStatement_dummy_170 { Ctr__Java__36 (rtkPosOf $1) $2 } |+ tok_IfStatement_dummy_169 IfStatement tok_IfStatement_dummy_169 { Ctr__Java__37 (rtkPosOf $1) $2 } |+ tok_ImplementsList_dummy_168 ImplementsList tok_ImplementsList_dummy_168 { Ctr__Java__38 (rtkPosOf $1) $2 } |+ tok_ImportHead_dummy_167 ImportHead tok_ImportHead_dummy_167 { Ctr__Java__39 (rtkPosOf $1) $2 } |+ tok_ImportList_dummy_166 ImportList tok_ImportList_dummy_166 { Ctr__Java__40 (rtkPosOf $1) (reverse $2) } |+ tok_ImportName_dummy_165 ImportName tok_ImportName_dummy_165 { Ctr__Java__41 (rtkPosOf $1) $2 } |+ tok_ImportStatement_dummy_164 ImportStatement tok_ImportStatement_dummy_164 { Ctr__Java__42 (rtkPosOf $1) $2 } |+ tok_InterfaceDeclaration_dummy_163 InterfaceDeclaration tok_InterfaceDeclaration_dummy_163 { Ctr__Java__43 (rtkPosOf $1) $2 } |+ tok_LambdaBody_dummy_162 LambdaBody tok_LambdaBody_dummy_162 { Ctr__Java__44 (rtkPosOf $1) $2 } |+ tok_Literal_dummy_161 Literal tok_Literal_dummy_161 { Ctr__Java__45 (rtkPosOf $1) $2 } |+ tok_LocalModifierList1_dummy_160 LocalModifierList1 tok_LocalModifierList1_dummy_160 { Ctr__Java__46 (rtkPosOf $1) (reverse $2) } |+ tok_MemberAfterFirstId_dummy_159 MemberAfterFirstId tok_MemberAfterFirstId_dummy_159 { Ctr__Java__47 (rtkPosOf $1) $2 } |+ tok_MemberDeclaration_dummy_158 MemberDeclaration tok_MemberDeclaration_dummy_158 { Ctr__Java__48 (rtkPosOf $1) $2 } |+ tok_MemberRest_dummy_157 MemberRest tok_MemberRest_dummy_157 { Ctr__Java__49 (rtkPosOf $1) $2 } |+ tok_Modifier_dummy_156 Modifier tok_Modifier_dummy_156 { Ctr__Java__50 (rtkPosOf $1) $2 } |+ tok_ModifierList_dummy_155 ModifierList tok_ModifierList_dummy_155 { Ctr__Java__51 (rtkPosOf $1) (reverse $2) } |+ tok_MoreTypeSpecifier_dummy_154 MoreTypeSpecifier tok_MoreTypeSpecifier_dummy_154 { Ctr__Java__52 (rtkPosOf $1) $2 } |+ tok_MoreVariableDeclarators_dummy_153 MoreVariableDeclarators tok_MoreVariableDeclarators_dummy_153 { Ctr__Java__53 (rtkPosOf $1) (reverse $2) } |+ tok_MultiplicativeOp_dummy_152 MultiplicativeOp tok_MultiplicativeOp_dummy_152 { Ctr__Java__54 (rtkPosOf $1) $2 } |+ tok_NonEmptyDims_dummy_151 NonEmptyDims tok_NonEmptyDims_dummy_151 { Ctr__Java__55 (rtkPosOf $1) (reverse $2) } |+ tok_NonEmptyTypeArguments_dummy_150 NonEmptyTypeArguments tok_NonEmptyTypeArguments_dummy_150 { Ctr__Java__56 (rtkPosOf $1) $2 } |+ tok_NonEmptyTypeParameters_dummy_149 NonEmptyTypeParameters tok_NonEmptyTypeParameters_dummy_149 { Ctr__Java__57 (rtkPosOf $1) $2 } |+ tok_OptDocComment_dummy_148 OptDocComment tok_OptDocComment_dummy_148 { Ctr__Java__58 (rtkPosOf $1) $2 } |+ tok_OptElsePart_dummy_147 OptElsePart tok_OptElsePart_dummy_147 { Ctr__Java__59 (rtkPosOf $1) $2 } |+ tok_OptExpression_dummy_146 OptExpression tok_OptExpression_dummy_146 { Ctr__Java__60 (rtkPosOf $1) $2 } |+ tok_OptFinally_dummy_145 OptFinally tok_OptFinally_dummy_145 { Ctr__Java__61 (rtkPosOf $1) $2 } |+ tok_OptId_dummy_144 OptId tok_OptId_dummy_144 { Ctr__Java__62 (rtkPosOf $1) $2 } |+ tok_OptVariableInitializer_dummy_143 OptVariableInitializer tok_OptVariableInitializer_dummy_143 { Ctr__Java__63 (rtkPosOf $1) $2 } |+ tok_Package_dummy_142 Package tok_Package_dummy_142 { Ctr__Java__64 (rtkPosOf $1) $2 } |+ tok_ParamModifierList_dummy_141 ParamModifierList tok_ParamModifierList_dummy_141 { Ctr__Java__65 (rtkPosOf $1) (reverse $2) } |+ tok_Parameter_dummy_140 Parameter tok_Parameter_dummy_140 { Ctr__Java__66 (rtkPosOf $1) $2 } |+ tok_ParameterList_dummy_139 ParameterList tok_ParameterList_dummy_139 { Ctr__Java__67 (rtkPosOf $1) $2 } |+ tok_PostfixOp_dummy_138 PostfixOp tok_PostfixOp_dummy_138 { Ctr__Java__68 (rtkPosOf $1) $2 } |+ tok_PrefixOp_dummy_137 PrefixOp tok_PrefixOp_dummy_137 { Ctr__Java__69 (rtkPosOf $1) $2 } |+ tok_PrimitiveTypeKeyword_dummy_136 PrimitiveTypeKeyword tok_PrimitiveTypeKeyword_dummy_136 { Ctr__Java__70 (rtkPosOf $1) $2 } |+ tok_RelationalOp_dummy_135 RelationalOp tok_RelationalOp_dummy_135 { Ctr__Java__71 (rtkPosOf $1) $2 } |+ tok_Resource_dummy_134 Resource tok_Resource_dummy_134 { Ctr__Java__72 (rtkPosOf $1) $2 } |+ tok_ResourceSpec_dummy_133 ResourceSpec tok_ResourceSpec_dummy_133 { Ctr__Java__73 (rtkPosOf $1) $2 } |+ tok_ShiftOp_dummy_132 ShiftOp tok_ShiftOp_dummy_132 { Ctr__Java__74 (rtkPosOf $1) $2 } |+ tok_Statement_dummy_131 Statement tok_Statement_dummy_131 { Ctr__Java__75 (rtkPosOf $1) $2 } |+ tok_StatementBlock_dummy_130 StatementBlock tok_StatementBlock_dummy_130 { Ctr__Java__76 (rtkPosOf $1) $2 } |+ tok_StatementList_dummy_129 StatementList tok_StatementList_dummy_129 { Ctr__Java__77 (rtkPosOf $1) (reverse $2) } |+ tok_StaticInitializer_dummy_128 StaticInitializer tok_StaticInitializer_dummy_128 { Ctr__Java__78 (rtkPosOf $1) $2 } |+ tok_SwitchCaseList_dummy_127 SwitchCaseList tok_SwitchCaseList_dummy_127 { Ctr__Java__79 (rtkPosOf $1) (reverse $2) } |+ tok_SwitchStatement_dummy_126 SwitchStatement tok_SwitchStatement_dummy_126 { Ctr__Java__80 (rtkPosOf $1) $2 } |+ tok_ThrowsClause_dummy_125 ThrowsClause tok_ThrowsClause_dummy_125 { Ctr__Java__81 (rtkPosOf $1) $2 } |+ tok_TryStatement_dummy_124 TryStatement tok_TryStatement_dummy_124 { Ctr__Java__82 (rtkPosOf $1) $2 } |+ tok_Type_dummy_123 Type tok_Type_dummy_123 { Ctr__Java__83 (rtkPosOf $1) $2 } |+ tok_TypeArgument_dummy_122 TypeArgument tok_TypeArgument_dummy_122 { Ctr__Java__84 (rtkPosOf $1) $2 } |+ tok_TypeArguments_dummy_121 TypeArguments tok_TypeArguments_dummy_121 { Ctr__Java__85 (rtkPosOf $1) $2 } |+ tok_TypeDeclRest_dummy_120 TypeDeclRest tok_TypeDeclRest_dummy_120 { Ctr__Java__86 (rtkPosOf $1) $2 } |+ tok_TypeDeclaration_dummy_119 TypeDeclaration tok_TypeDeclaration_dummy_119 { Ctr__Java__87 (rtkPosOf $1) $2 } |+ tok_TypeDeclarationList_dummy_118 TypeDeclarationList tok_TypeDeclarationList_dummy_118 { Ctr__Java__88 (rtkPosOf $1) (reverse $2) } |+ tok_TypeParameter_dummy_117 TypeParameter tok_TypeParameter_dummy_117 { Ctr__Java__89 (rtkPosOf $1) $2 } |+ tok_TypeParameters_dummy_116 TypeParameters tok_TypeParameters_dummy_116 { Ctr__Java__90 (rtkPosOf $1) $2 } |+ tok_TypeSpecifier_dummy_115 TypeSpecifier tok_TypeSpecifier_dummy_115 { Ctr__Java__91 (rtkPosOf $1) $2 } |+ tok_VariableDeclaration_dummy_114 VariableDeclaration tok_VariableDeclaration_dummy_114 { Ctr__Java__92 (rtkPosOf $1) $2 } |+ tok_VariableDeclarator_dummy_113 VariableDeclarator tok_VariableDeclarator_dummy_113 { Ctr__Java__93 (rtkPosOf $1) $2 } |+ tok_VariableDeclaratorList_dummy_112 VariableDeclaratorList tok_VariableDeclaratorList_dummy_112 { Ctr__Java__94 (rtkPosOf $1) $2 } |+ tok_VariableInitializer_dummy_111 VariableInitializer tok_VariableInitializer_dummy_111 { Ctr__Java__95 (rtkPosOf $1) $2 } |+ tok_VariableInitializerList_dummy_110 VariableInitializerList tok_VariableInitializerList_dummy_110 { Ctr__Java__96 (rtkPosOf $1) $2 } |+ tok_WhileStatement_dummy_109 WhileStatement tok_WhileStatement_dummy_109 { Ctr__Java__97 (rtkPosOf $1) $2 } |+ tok_WildcardType_dummy_108 WildcardType tok_WildcardType_dummy_108 { Ctr__Java__98 (rtkPosOf $1) $2 }++Java : qq_Java { Anti_Java (tkVal_qq_Java $1) } |+ CompilationUnit { Ctr__Java__99 (rtkPosOf $1) $1 }++AdditiveOp : qq_AdditiveOp { Anti_AdditiveOp (tkVal_qq_AdditiveOp $1) } |+ tok__plus__78 { Ctr__AdditiveOp__0 (rtkPosOf $1) } |+ tok__minus__79 { Ctr__AdditiveOp__1 (rtkPosOf $1) }++ListElem_AnnotationList14 : qq_AnnotationList { Anti_Annotation (tkVal_qq_AnnotationList $1) } |+ Annotation { $1 }++Annotation : qq_Annotation { Anti_Annotation (tkVal_qq_Annotation $1) } |+ tok__symbol__6 CompoundName Rule_4 { Ctr__Annotation__1 (rtkPosOf $1) $2 $3 }++AnnotationArguments : qq_AnnotationArguments { Anti_AnnotationArguments (tkVal_qq_AnnotationArguments $1) } |+ AnnotationElement Rule_7 { Ctr__AnnotationArguments__0 (rtkPosOf $1) $1 (reverse $2) }++AnnotationDeclaration : qq_AnnotationDeclaration { Anti_AnnotationDeclaration (tkVal_qq_AnnotationDeclaration $1) } |+ tok__symbol__6 tok_interface_16 id tok__symbol__11 AnnotationTypeElementList tok__symbol__12 { Ctr__AnnotationDeclaration__0 (rtkPosOf $1) (tkVal_id $3) (reverse $5) }++AnnotationElement : qq_AnnotationElement { Anti_AnnotationElement (tkVal_qq_AnnotationElement $1) } |+ id tok__eql__10 ElementValue { Ctr__AnnotationElement__0 (rtkPosOf $1) (tkVal_id $1) $3 } |+ ElementValue { Ctr__AnnotationElement__1 (rtkPosOf $1) $1 }++AnnotationList : {- empty -} { [] } |+ AnnotationList ListElem_AnnotationList14 { $2 : $1 }++AnnotationTypeElement : qq_AnnotationTypeElement { Anti_AnnotationTypeElement (tkVal_qq_AnnotationTypeElement $1) } |+ FieldDeclaration { Ctr__AnnotationTypeElement__0 (rtkPosOf $1) $1 }++ListElem_AnnotationTypeElementList24 : qq_AnnotationTypeElementList { Anti_AnnotationTypeElement (tkVal_qq_AnnotationTypeElementList $1) } |+ AnnotationTypeElement { $1 }++AnnotationTypeElementList : {- empty -} { [] } |+ AnnotationTypeElementList ListElem_AnnotationTypeElementList24 { $2 : $1 }++Arglist : qq_Arglist { Anti_Arglist (tkVal_qq_Arglist $1) } |+ { Ctr__Arglist__0 rtkNoPos } |+ Rule_95 { Ctr__Arglist__1 (rtkPosOf $1) $1 }++ArrayInitializer : qq_ArrayInitializer { Anti_ArrayInitializer (tkVal_qq_ArrayInitializer $1) } |+ tok__symbol__11 VariableInitializerList tok__symbol__12 { Ctr__ArrayInitializer__0 (rtkPosOf $1) $2 }++AssignmentOp : qq_AssignmentOp { Anti_AssignmentOp (tkVal_qq_AssignmentOp $1) } |+ tok__eql__10 { Ctr__AssignmentOp__0 (rtkPosOf $1) } |+ tok__plus__eql__54 { Ctr__AssignmentOp__1 (rtkPosOf $1) } |+ tok__minus__eql__55 { Ctr__AssignmentOp__2 (rtkPosOf $1) } |+ tok__star__eql__56 { Ctr__AssignmentOp__3 (rtkPosOf $1) } |+ tok__symbol__eql__57 { Ctr__AssignmentOp__4 (rtkPosOf $1) } |+ tok__pipe__eql__58 { Ctr__AssignmentOp__5 (rtkPosOf $1) } |+ tok__symbol__eql__59 { Ctr__AssignmentOp__6 (rtkPosOf $1) } |+ tok__symbol__eql__60 { Ctr__AssignmentOp__7 (rtkPosOf $1) } |+ tok__symbol__eql__61 { Ctr__AssignmentOp__8 (rtkPosOf $1) } |+ tok__symbol__symbol__eql__62 { Ctr__AssignmentOp__9 (rtkPosOf $1) } |+ tok__symbol__symbol__eql__63 { Ctr__AssignmentOp__10 (rtkPosOf $1) } |+ tok__symbol__symbol__symbol__eql__64 { Ctr__AssignmentOp__11 (rtkPosOf $1) }++CatchList : {- empty -} { [] } |+ CatchList ListElem_CatchList71 { $2 : $1 }++CatchParameter : qq_CatchParameter { Anti_CatchParameter (tkVal_qq_CatchParameter $1) } |+ ParamModifierList Type Rule_72 id { Ctr__CatchParameter__0 (rtkPosOf (reverse $1)) (reverse $1) $2 (reverse $3) (tkVal_id $4) }++ClassDeclaration : qq_ClassDeclaration { Anti_ClassDeclaration (tkVal_qq_ClassDeclaration $1) } |+ tok_class_15 id TypeParameters Rule_21 Rule_22 tok__symbol__11 FieldDeclarationList tok__symbol__12 { Ctr__ClassDeclaration__0 (rtkPosOf $1) (tkVal_id $2) $3 $4 $5 (reverse $7) }++ClassOrInterfaceType : qq_ClassOrInterfaceType { Anti_ClassOrInterfaceType (tkVal_qq_ClassOrInterfaceType $1) } |+ CompoundName TypeArguments { Ctr__ClassOrInterfaceType__0 (rtkPosOf $1) $1 $2 }++CompilationUnit : qq_CompilationUnit { Anti_CompilationUnit (tkVal_qq_CompilationUnit $1) } |+ OptDocComment ModifierList Rule_2 { Ctr__CompilationUnit__0 (rtkPosOf $1) $1 (reverse $2) $3 }++CompilationUnitRest : qq_CompilationUnitRest { Anti_CompilationUnitRest (tkVal_qq_CompilationUnitRest $1) } |+ Package ImportList TypeDeclarationList { UnitPackageFirst (rtkPosOf $1) $1 (reverse $2) (reverse $3) } |+ ImportStatement ImportList TypeDeclarationList { UnitImportsFirst (rtkPosOf $1) $1 (reverse $2) (reverse $3) } |+ TypeDeclRest TypeDeclarationList { UnitTypeFirst (rtkPosOf $1) $1 (reverse $2) }++CompoundName : qq_CompoundName { Anti_CompoundName (tkVal_qq_CompoundName $1) } |+ id CompoundNameTail { Ctr__CompoundName__0 (rtkPosOf $1) (tkVal_id $1) (reverse $2) }++CompoundNameTail : {- empty -} { [] } |+ CompoundNameTail ListElem_CompoundNameTail107 { $2 : $1 }++CreationExpression : qq_CreationExpression { Anti_CreationExpression (tkVal_qq_CreationExpression $1) } |+ tok_new_87 TypeSpecifier Rule_89 { Ctr__CreationExpression__0 (rtkPosOf $1) $2 $3 }++DimExprs : ListElem_DimExprs94 { [$1] } |+ DimExprs ListElem_DimExprs94 { $2 : $1 }++Dims : {- empty -} { [] } |+ Dims ListElem_Dims37 { $2 : $1 }++DoStatement : qq_DoStatement { Anti_DoStatement (tkVal_qq_DoStatement $1) } |+ tok_do_44 Statement tok_while_45 tok__lparen__7 Expression tok__rparen__8 tok__semi__1 { Ctr__DoStatement__0 (rtkPosOf $1) $2 $5 }++DocComment : qq_DocComment { Anti_DocComment (tkVal_qq_DocComment $1) } |+ doccomment { Ctr__DocComment__0 (rtkPosOf $1) (tkVal_doccomment $1) }++ElementValue : qq_ElementValue { Anti_ElementValue (tkVal_qq_ElementValue $1) } |+ ConditionalExpression { Ctr__ElementValue__0 (rtkPosOf $1) $1 } |+ Annotation { Ctr__ElementValue__1 (rtkPosOf $1) $1 } |+ ElementValueArrayInitializer { Ctr__ElementValue__2 (rtkPosOf $1) $1 }++ElementValueArrayInitializer : qq_ElementValueArrayInitializer { Anti_ElementValueArrayInitializer (tkVal_qq_ElementValueArrayInitializer $1) } |+ tok__symbol__11 Rule_9 tok__symbol__12 { Ctr__ElementValueArrayInitializer__0 (rtkPosOf $1) $2 }++EnumConstant : qq_EnumConstant { Anti_EnumConstant (tkVal_qq_EnumConstant $1) } |+ OptDocComment AnnotationList id Rule_25 Rule_27 { Ctr__EnumConstant__0 (rtkPosOf $1) $1 (reverse $2) (tkVal_id $3) $4 $5 }++EnumConstantList : qq_EnumConstantList { Anti_EnumConstantList (tkVal_qq_EnumConstantList $1) } |+ EnumConstant Rule_29 Rule_31 { Ctr__EnumConstantList__0 (rtkPosOf $1) $1 (reverse $2) $3 }++EnumDeclaration : qq_EnumDeclaration { Anti_EnumDeclaration (tkVal_qq_EnumDeclaration $1) } |+ tok_enum_17 id Rule_32 tok__symbol__11 EnumConstantList Rule_33 tok__symbol__12 { Ctr__EnumDeclaration__0 (rtkPosOf $1) (tkVal_id $2) $3 $5 $6 }++EqualityOp : qq_EqualityOp { Anti_EqualityOp (tkVal_qq_EqualityOp $1) } |+ tok__eql__eql__70 { Ctr__EqualityOp__0 (rtkPosOf $1) } |+ tok__exclamation__eql__71 { Ctr__EqualityOp__1 (rtkPosOf $1) }++PrimaryNoPostfix : qq_Expression { Anti_Expression (tkVal_qq_Expression $1) } |+ Literal { Ctr__Expression__0 (rtkPosOf $1) $1 } |+ tok_this_41 { Ctr__Expression__1 (rtkPosOf $1) } |+ tok__lparen__7 Expression tok__rparen__8 { Ctr__Expression__2 (rtkPosOf $1) $2 } |+ CreationExpression { Ctr__Expression__3 (rtkPosOf $1) $1 } |+ CompoundName Rule_85 { Ctr__Expression__4 (rtkPosOf $1) $1 $2 } |+ CompoundName tok__sq_bkt_l__18 Expression tok__sq_bkt_r__19 { Ctr__Expression__5 (rtkPosOf $1) $1 $3 } |+ tok_super_40 tok__dot__4 id Rule_87 { Ctr__Expression__6 (rtkPosOf $1) (tkVal_id $3) $4 } |+ id CompoundNameTail tok__dot__4 tok_class_15 { Ctr__Expression__7 (rtkPosOf $1) (tkVal_id $1) (reverse $2) } |+ id CompoundNameTail tok__dot__4 tok_this_41 { Ctr__Expression__8 (rtkPosOf $1) (tkVal_id $1) (reverse $2) } |+ id CompoundNameTail tok__dot__4 NonEmptyTypeArguments id tok__lparen__7 Arglist tok__rparen__8 { Ctr__Expression__9 (rtkPosOf $1) (tkVal_id $1) (reverse $2) $4 (tkVal_id $5) $7 } |+ PrimitiveTypeKeyword tok__dot__4 tok_class_15 { Ctr__Expression__10 (rtkPosOf $1) $1 }++PostfixExpression : PrimaryNoPostfix { Ctr__Expression__11 (rtkPosOf $1) $1 } |+ PostfixExpression PostfixOp { Ctr__Expression__12 (rtkPosOf $1) $1 $2 } |+ PostfixExpression tok__dot__4 id { Ctr__Expression__13 (rtkPosOf $1) $1 (tkVal_id $3) } |+ PostfixExpression tok__dot__4 id tok__lparen__7 Arglist tok__rparen__8 { Ctr__Expression__14 (rtkPosOf $1) $1 (tkVal_id $3) $5 } |+ PostfixExpression tok__dot__4 NonEmptyTypeArguments id tok__lparen__7 Arglist tok__rparen__8 { Ctr__Expression__15 (rtkPosOf $1) $1 $3 (tkVal_id $4) $6 } |+ PostfixExpression tok__sq_bkt_l__18 Expression tok__sq_bkt_r__19 { Ctr__Expression__16 (rtkPosOf $1) $1 $3 } |+ PostfixExpression tok__colon__colon__86 id { Ctr__Expression__17 (rtkPosOf $1) $1 (tkVal_id $3) } |+ PostfixExpression tok__colon__colon__86 tok_new_87 { Ctr__Expression__18 (rtkPosOf $1) $1 }++UnaryExpressionNotPlusMinus : PostfixExpression { Ctr__Expression__19 (rtkPosOf $1) $1 } |+ tok__tilde__84 UnaryExpression { Ctr__Expression__20 (rtkPosOf $1) $2 } |+ tok__exclamation__85 UnaryExpression { Ctr__Expression__21 (rtkPosOf $1) $2 } |+ CastExpression { Ctr__Expression__22 (rtkPosOf $1) $1 }++UnaryExpression : PrefixOp UnaryExpression { Ctr__Expression__23 (rtkPosOf $1) $1 $2 } |+ UnaryExpressionNotPlusMinus { Ctr__Expression__24 (rtkPosOf $1) $1 }++CastExpression : tok__lparen__7 PrimitiveTypeKeyword Dims tok__rparen__8 UnaryExpression { Ctr__Expression__25 (rtkPosOf $1) $2 (reverse $3) $5 } |+ tok__lparen__7 CompoundName NonEmptyTypeArguments Dims tok__rparen__8 UnaryExpressionNotPlusMinus { Ctr__Expression__26 (rtkPosOf $1) $2 $3 (reverse $4) $6 } |+ tok__lparen__7 CompoundName NonEmptyDims tok__rparen__8 UnaryExpressionNotPlusMinus { Ctr__Expression__27 (rtkPosOf $1) $2 (reverse $3) $5 } |+ tok__lparen__7 Expression tok__rparen__8 UnaryExpressionNotPlusMinus { Ctr__Expression__28 (rtkPosOf $1) $2 $4 }++MultiplicativeExpression : UnaryExpression { Ctr__Expression__29 (rtkPosOf $1) $1 } |+ MultiplicativeExpression MultiplicativeOp UnaryExpression { Ctr__Expression__30 (rtkPosOf $1) $1 $2 $3 }++AdditiveExpression : MultiplicativeExpression { Ctr__Expression__31 (rtkPosOf $1) $1 } |+ AdditiveExpression AdditiveOp MultiplicativeExpression { Ctr__Expression__32 (rtkPosOf $1) $1 $2 $3 }++ShiftExpression : AdditiveExpression { Ctr__Expression__33 (rtkPosOf $1) $1 } |+ ShiftExpression ShiftOp AdditiveExpression { Ctr__Expression__34 (rtkPosOf $1) $1 $2 $3 }++RelationalExpression : ShiftExpression { Ctr__Expression__35 (rtkPosOf $1) $1 } |+ ShiftExpression RelationalOp ShiftExpression { Ctr__Expression__36 (rtkPosOf $1) $1 $2 $3 } |+ RelationalExpression tok_instanceof_76 Type { Ctr__Expression__37 (rtkPosOf $1) $1 $3 }++EqualityExpression : RelationalExpression { Ctr__Expression__38 (rtkPosOf $1) $1 } |+ EqualityExpression EqualityOp RelationalExpression { Ctr__Expression__39 (rtkPosOf $1) $1 $2 $3 }++AndExpression : EqualityExpression { Ctr__Expression__40 (rtkPosOf $1) $1 } |+ AndExpression tok__symbol__69 EqualityExpression { Ctr__Expression__41 (rtkPosOf $1) $1 $3 }++ExclusiveOrExpression : AndExpression { Ctr__Expression__42 (rtkPosOf $1) $1 } |+ ExclusiveOrExpression tok__symbol__68 AndExpression { Ctr__Expression__43 (rtkPosOf $1) $1 $3 }++InclusiveOrEpression : ExclusiveOrExpression { Ctr__Expression__44 (rtkPosOf $1) $1 } |+ InclusiveOrEpression tok__pipe__48 ExclusiveOrExpression { Ctr__Expression__45 (rtkPosOf $1) $1 $3 }++ConditionalAndExpression : InclusiveOrEpression { Ctr__Expression__46 (rtkPosOf $1) $1 } |+ ConditionalAndExpression tok__symbol__symbol__67 InclusiveOrEpression { Ctr__Expression__47 (rtkPosOf $1) $1 $3 }++ConditionalOrExpression : ConditionalAndExpression { Ctr__Expression__48 (rtkPosOf $1) $1 } |+ ConditionalOrExpression tok__pipe__pipe__66 ConditionalAndExpression { Ctr__Expression__49 (rtkPosOf $1) $1 $3 }++ConditionalExpression : ConditionalOrExpression { Ctr__Expression__50 (rtkPosOf $1) $1 } |+ ConditionalOrExpression tok__symbol__65 Expression tok__colon__37 ConditionalExpression { Ctr__Expression__51 (rtkPosOf $1) $1 $3 $5 }++AssignmentExpression : ConditionalExpression Rule_81 { Ctr__Expression__52 (rtkPosOf $1) $1 $2 } |+ id tok__minus__symbol__53 LambdaBody { Ctr__Expression__53 (rtkPosOf $1) (tkVal_id $1) $3 } |+ tok__lparen__7 tok__rparen__8 tok__minus__symbol__53 LambdaBody { Ctr__Expression__54 (rtkPosOf $1) $4 } |+ tok__lparen__7 id Rule_83 tok__rparen__8 tok__minus__symbol__53 LambdaBody { Ctr__Expression__55 (rtkPosOf $1) (tkVal_id $2) (reverse $3) $6 } |+ tok__lparen__7 Expression tok__rparen__8 tok__minus__symbol__53 LambdaBody { Ctr__Expression__56 (rtkPosOf $1) $2 $5 }++Expression : AssignmentExpression { Ctr__Expression__57 (rtkPosOf $1) $1 }++ExtendsList : qq_ExtendsList { Anti_ExtendsList (tkVal_qq_ExtendsList $1) } |+ tok_extends_13 ClassOrInterfaceType Rule_17 { Ctr__ExtendsList__0 (rtkPosOf $1) $2 (reverse $3) }++FieldDeclaration : qq_FieldDeclaration { Anti_FieldDeclaration (tkVal_qq_FieldDeclaration $1) } |+ OptDocComment ModifierList Rule_35 { Ctr__FieldDeclaration__0 (rtkPosOf $1) $1 (reverse $2) $3 } |+ tok__semi__1 { Ctr__FieldDeclaration__1 (rtkPosOf $1) }++ListElem_FieldDeclarationList20 : qq_FieldDeclarationList { Anti_FieldDeclaration (tkVal_qq_FieldDeclarationList $1) } |+ FieldDeclaration { $1 }++FieldDeclarationList : {- empty -} { [] } |+ FieldDeclarationList ListElem_FieldDeclarationList20 { $2 : $1 }++ForEachHeader : qq_ForEachHeader { Anti_ForEachHeader (tkVal_qq_ForEachHeader $1) } |+ Type id tok__colon__37 Expression { Ctr__ForEachHeader__0 (rtkPosOf $1) $1 (tkVal_id $2) $4 } |+ LocalModifierList1 Type id tok__colon__37 Expression { Ctr__ForEachHeader__1 (rtkPosOf (reverse $1)) (reverse $1) $2 (tkVal_id $3) $5 }++ForStatement : qq_ForStatement { Anti_ForStatement (tkVal_qq_ForStatement $1) } |+ tok_for_46 tok__lparen__7 Rule_69 OptExpression tok__semi__1 OptExpression tok__rparen__8 Statement { Ctr__ForStatement__0 (rtkPosOf $1) $3 $4 $6 $8 } |+ tok_for_46 tok__lparen__7 ForEachHeader tok__rparen__8 Statement { Ctr__ForStatement__1 (rtkPosOf $1) $3 $5 }++IfStatement : qq_IfStatement { Anti_IfStatement (tkVal_qq_IfStatement $1) } |+ tok_if_43 tok__lparen__7 Expression tok__rparen__8 Statement OptElsePart { Ctr__IfStatement__0 (rtkPosOf $1) $3 $5 $6 }++ImplementsList : qq_ImplementsList { Anti_ImplementsList (tkVal_qq_ImplementsList $1) } |+ tok_implements_14 Rule_19 { Ctr__ImplementsList__0 (rtkPosOf $1) (reverse $2) }++ImportHead : qq_ImportHead { Anti_ImportHead (tkVal_qq_ImportHead $1) } |+ id { Ctr__ImportHead__0 (rtkPosOf $1) (tkVal_id $1) } |+ ImportHead tok__dot__4 id { Ctr__ImportHead__1 (rtkPosOf $1) $1 (tkVal_id $3) }++ImportList : {- empty -} { [] } |+ ImportList ListElem_ImportList1 { $2 : $1 }++ImportName : qq_ImportName { Anti_ImportName (tkVal_qq_ImportName $1) } |+ ImportHead { Ctr__ImportName__0 (rtkPosOf $1) $1 } |+ ImportHead tok__dot__4 tok__star__5 { Ctr__ImportName__1 (rtkPosOf $1) $1 }++ImportStatement : qq_ImportStatement { Anti_ImportStatement (tkVal_qq_ImportStatement $1) } |+ tok_import_2 Rule_3 ImportName tok__semi__1 { Ctr__ImportStatement__0 (rtkPosOf $1) $2 $3 }++ListElem_ImportList1 : qq_ImportList { Anti_ImportStatement (tkVal_qq_ImportList $1) } |+ ImportStatement { $1 }++InterfaceDeclaration : qq_InterfaceDeclaration { Anti_InterfaceDeclaration (tkVal_qq_InterfaceDeclaration $1) } |+ tok_interface_16 id TypeParameters Rule_23 tok__symbol__11 FieldDeclarationList tok__symbol__12 { Ctr__InterfaceDeclaration__0 (rtkPosOf $1) (tkVal_id $2) $3 $4 (reverse $6) }++LambdaBody : qq_LambdaBody { Anti_LambdaBody (tkVal_qq_LambdaBody $1) } |+ Expression { Ctr__LambdaBody__0 (rtkPosOf $1) $1 } |+ StatementBlock { Ctr__LambdaBody__1 (rtkPosOf $1) $1 }++Literal : qq_Literal { Anti_Literal (tkVal_qq_Literal $1) } |+ integerLiteral { Ctr__Literal__0 (rtkPosOf $1) (tkVal_integerLiteral $1) } |+ floatLiteral { Ctr__Literal__1 (rtkPosOf $1) (tkVal_floatLiteral $1) } |+ tok_true_88 { Ctr__Literal__2 (rtkPosOf $1) } |+ tok_false_89 { Ctr__Literal__3 (rtkPosOf $1) } |+ char { Ctr__Literal__4 (rtkPosOf $1) (tkVal_char $1) } |+ string { Ctr__Literal__5 (rtkPosOf $1) (tkVal_string $1) } |+ tok_null_90 { Ctr__Literal__6 (rtkPosOf $1) }++LocalModifierList1 : ListElem_LocalModifierList154 { [$1] } |+ LocalModifierList1 ListElem_LocalModifierList154 { $2 : $1 }++MemberAfterFirstId : qq_MemberAfterFirstId { Anti_MemberAfterFirstId (tkVal_qq_MemberAfterFirstId $1) } |+ tok__lparen__7 Rule_40 tok__rparen__8 Rule_41 StatementBlock { Ctr__MemberAfterFirstId__0 (rtkPosOf $1) $2 $4 $5 } |+ MoreTypeSpecifier id MemberRest { Ctr__MemberAfterFirstId__1 (rtkPosOf $1) $1 (tkVal_id $2) $3 }++MemberDeclaration : qq_MemberDeclaration { Anti_MemberDeclaration (tkVal_qq_MemberDeclaration $1) } |+ PrimitiveTypeKeyword Dims id MemberRest { Ctr__MemberDeclaration__0 (rtkPosOf $1) $1 (reverse $2) (tkVal_id $3) $4 } |+ TypeParameters id MoreTypeSpecifier id MemberRest { Ctr__MemberDeclaration__1 (rtkPosOf $1) $1 (tkVal_id $2) $3 (tkVal_id $4) $5 } |+ NonEmptyTypeParameters PrimitiveTypeKeyword Dims id MemberRest { Ctr__MemberDeclaration__2 (rtkPosOf $1) $1 $2 (reverse $3) (tkVal_id $4) $5 } |+ id MemberAfterFirstId { Ctr__MemberDeclaration__3 (rtkPosOf $1) (tkVal_id $1) $2 }++MemberRest : qq_MemberRest { Anti_MemberRest (tkVal_qq_MemberRest $1) } |+ tok__lparen__7 Rule_44 tok__rparen__8 Dims Rule_45 Rule_46 { Ctr__MemberRest__0 (rtkPosOf $1) $2 (reverse $4) $5 $6 } |+ Dims OptVariableInitializer MoreVariableDeclarators tok__semi__1 { Ctr__MemberRest__1 (rtkPosOf (reverse $1)) (reverse $1) $2 (reverse $3) }++Modifier : qq_Modifier { Anti_Modifier (tkVal_qq_Modifier $1) } |+ tok_public_91 { Ctr__Modifier__0 (rtkPosOf $1) } |+ tok_private_92 { Ctr__Modifier__1 (rtkPosOf $1) } |+ tok_protected_93 { Ctr__Modifier__2 (rtkPosOf $1) } |+ tok_static_3 { Ctr__Modifier__3 (rtkPosOf $1) } |+ tok_final_31 { Ctr__Modifier__4 (rtkPosOf $1) } |+ tok_native_94 { Ctr__Modifier__5 (rtkPosOf $1) } |+ tok_synchronized_34 { Ctr__Modifier__6 (rtkPosOf $1) } |+ tok_abstract_95 { Ctr__Modifier__7 (rtkPosOf $1) } |+ tok_threadsafe_96 { Ctr__Modifier__8 (rtkPosOf $1) } |+ tok_transient_97 { Ctr__Modifier__9 (rtkPosOf $1) } |+ tok_default_30 { Ctr__Modifier__10 (rtkPosOf $1) }++ModifierList : {- empty -} { [] } |+ ModifierList ListElem_ModifierList16 { $2 : $1 }++MoreTypeSpecifier : qq_MoreTypeSpecifier { Anti_MoreTypeSpecifier (tkVal_qq_MoreTypeSpecifier $1) } |+ tok__dot__4 id MoreTypeSpecifier { Ctr__MoreTypeSpecifier__0 (rtkPosOf $1) (tkVal_id $2) $3 } |+ TypeArguments Dims { Ctr__MoreTypeSpecifier__1 (rtkPosOf $1) $1 (reverse $2) }++MoreVariableDeclarators : {- empty -} { [] } |+ MoreVariableDeclarators ListElem_MoreVariableDeclarators50 { $2 : $1 }++MultiplicativeOp : qq_MultiplicativeOp { Anti_MultiplicativeOp (tkVal_qq_MultiplicativeOp $1) } |+ tok__star__5 { Ctr__MultiplicativeOp__0 (rtkPosOf $1) } |+ tok__symbol__80 { Ctr__MultiplicativeOp__1 (rtkPosOf $1) } |+ tok__symbol__81 { Ctr__MultiplicativeOp__2 (rtkPosOf $1) }++NonEmptyDims : ListElem_NonEmptyDims39 { [$1] } |+ NonEmptyDims ListElem_NonEmptyDims39 { $2 : $1 }++NonEmptyTypeArguments : qq_NonEmptyTypeArguments { Anti_NonEmptyTypeArguments (tkVal_qq_NonEmptyTypeArguments $1) } |+ tok__symbol__72 TypeArgument Rule_98 tok__symbol__73 { Ctr__NonEmptyTypeArguments__0 (rtkPosOf $1) $2 (reverse $3) } |+ tok__symbol__72 tok__symbol__73 { Ctr__NonEmptyTypeArguments__1 (rtkPosOf $1) }++NonEmptyTypeParameters : qq_NonEmptyTypeParameters { Anti_NonEmptyTypeParameters (tkVal_qq_NonEmptyTypeParameters $1) } |+ tok__symbol__72 TypeParameter Rule_100 tok__symbol__73 { Ctr__NonEmptyTypeParameters__0 (rtkPosOf $1) $2 (reverse $3) }++OptDocComment : qq_OptDocComment { Anti_OptDocComment (tkVal_qq_OptDocComment $1) } |+ { Ctr__OptDocComment__0 rtkNoPos } |+ DocComment { Ctr__OptDocComment__1 (rtkPosOf $1) $1 }++OptElsePart : qq_OptElsePart { Anti_OptElsePart (tkVal_qq_OptElsePart $1) } |+ { Ctr__OptElsePart__0 rtkNoPos } |+ Rule_68 { Ctr__OptElsePart__1 (rtkPosOf $1) $1 }++OptExpression : qq_OptExpression { Anti_OptExpression (tkVal_qq_OptExpression $1) } |+ { Ctr__OptExpression__0 rtkNoPos } |+ Expression { Ctr__OptExpression__1 (rtkPosOf $1) $1 }++OptFinally : qq_OptFinally { Anti_OptFinally (tkVal_qq_OptFinally $1) } |+ { Ctr__OptFinally__0 rtkNoPos } |+ Rule_74 { Ctr__OptFinally__1 (rtkPosOf $1) $1 }++OptId : qq_OptId { Anti_OptId (tkVal_qq_OptId $1) } |+ { Ctr__OptId__0 rtkNoPos } |+ id { Ctr__OptId__1 (rtkPosOf $1) (tkVal_id $1) }++OptVariableInitializer : qq_OptVariableInitializer { Anti_OptVariableInitializer (tkVal_qq_OptVariableInitializer $1) } |+ { Ctr__OptVariableInitializer__0 rtkNoPos } |+ Rule_55 { Ctr__OptVariableInitializer__1 (rtkPosOf $1) $1 }++Package : qq_Package { Anti_Package (tkVal_qq_Package $1) } |+ tok_package_0 CompoundName tok__semi__1 { Ctr__Package__0 (rtkPosOf $1) $2 }++ParamModifierList : {- empty -} { [] } |+ ParamModifierList ListElem_ParamModifierList63 { $2 : $1 }++Parameter : qq_Parameter { Anti_Parameter (tkVal_qq_Parameter $1) } |+ ParamModifierList Type Rule_64 id Dims { Ctr__Parameter__0 (rtkPosOf (reverse $1)) (reverse $1) $2 $3 (tkVal_id $4) (reverse $5) }++ParameterList : qq_ParameterList { Anti_ParameterList (tkVal_qq_ParameterList $1) } |+ Parameter Rule_60 { Ctr__ParameterList__0 (rtkPosOf $1) $1 (reverse $2) }++PostfixOp : qq_PostfixOp { Anti_PostfixOp (tkVal_qq_PostfixOp $1) } |+ tok__plus__plus__82 { Ctr__PostfixOp__0 (rtkPosOf $1) } |+ tok__minus__minus__83 { Ctr__PostfixOp__1 (rtkPosOf $1) }++PrefixOp : qq_PrefixOp { Anti_PrefixOp (tkVal_qq_PrefixOp $1) } |+ tok__plus__plus__82 { Ctr__PrefixOp__0 (rtkPosOf $1) } |+ tok__minus__minus__83 { Ctr__PrefixOp__1 (rtkPosOf $1) } |+ tok__plus__78 { Ctr__PrefixOp__2 (rtkPosOf $1) } |+ tok__minus__79 { Ctr__PrefixOp__3 (rtkPosOf $1) }++PrimitiveTypeKeyword : qq_PrimitiveTypeKeyword { Anti_PrimitiveTypeKeyword (tkVal_qq_PrimitiveTypeKeyword $1) } |+ tok_boolean_20 { Ctr__PrimitiveTypeKeyword__0 (rtkPosOf $1) } |+ tok_byte_21 { Ctr__PrimitiveTypeKeyword__1 (rtkPosOf $1) } |+ tok_char_22 { Ctr__PrimitiveTypeKeyword__2 (rtkPosOf $1) } |+ tok_short_23 { Ctr__PrimitiveTypeKeyword__3 (rtkPosOf $1) } |+ tok_int_24 { Ctr__PrimitiveTypeKeyword__4 (rtkPosOf $1) } |+ tok_float_25 { Ctr__PrimitiveTypeKeyword__5 (rtkPosOf $1) } |+ tok_long_26 { Ctr__PrimitiveTypeKeyword__6 (rtkPosOf $1) } |+ tok_double_27 { Ctr__PrimitiveTypeKeyword__7 (rtkPosOf $1) } |+ tok_void_28 { Ctr__PrimitiveTypeKeyword__8 (rtkPosOf $1) }++RelationalOp : qq_RelationalOp { Anti_RelationalOp (tkVal_qq_RelationalOp $1) } |+ tok__symbol__72 { Ctr__RelationalOp__0 (rtkPosOf $1) } |+ tok__symbol__73 { Ctr__RelationalOp__1 (rtkPosOf $1) } |+ tok__symbol__eql__74 { Ctr__RelationalOp__2 (rtkPosOf $1) } |+ tok__symbol__eql__75 { Ctr__RelationalOp__3 (rtkPosOf $1) }++Resource : qq_Resource { Anti_Resource (tkVal_qq_Resource $1) } |+ ParamModifierList Type id tok__eql__10 Expression { Ctr__Resource__0 (rtkPosOf (reverse $1)) (reverse $1) $2 (tkVal_id $3) $5 }++ResourceSpec : qq_ResourceSpec { Anti_ResourceSpec (tkVal_qq_ResourceSpec $1) } |+ tok__lparen__7 Resource Rule_76 Rule_78 tok__rparen__8 { Ctr__ResourceSpec__0 (rtkPosOf $1) $2 (reverse $3) $4 }++Rule_10 : ElementValue Rule_11 Rule_13 { Ctr__Rule_10__0 (rtkPosOf $1) $1 (reverse $2) $3 }++Rule_100 : {- empty -} { [] } |+ Rule_100 Rule_101 { $2 : $1 }++Rule_101 : tok__coma__9 TypeParameter { Ctr__Rule_101__0 (rtkPosOf $1) $2 }++Rule_102 : { Ctr__Rule_102__0 rtkNoPos } |+ Rule_103 { Ctr__Rule_102__1 (rtkPosOf $1) $1 }++Rule_103 : tok_extends_13 Type Rule_104 { Ctr__Rule_103__0 (rtkPosOf $1) $2 (reverse $3) }++Rule_104 : {- empty -} { [] } |+ Rule_104 Rule_105 { $2 : $1 }++Rule_105 : tok__symbol__69 Type { Ctr__Rule_105__0 (rtkPosOf $1) $2 }++ListElem_CompoundNameTail107 : qq_CompoundNameTail { Anti_Rule_106 (tkVal_qq_CompoundNameTail $1) } |+ Rule_106 { $1 }++Rule_106 : tok__dot__4 id { Ctr__Rule_106__1 (rtkPosOf $1) (tkVal_id $2) }++Rule_11 : {- empty -} { [] } |+ Rule_11 Rule_12 { $2 : $1 }++Rule_12 : tok__coma__9 ElementValue { Ctr__Rule_12__0 (rtkPosOf $1) $2 }++Rule_13 : { Ctr__Rule_13__0 rtkNoPos } |+ tok__coma__9 { Ctr__Rule_13__1 (rtkPosOf $1) }++ListElem_ModifierList16 : qq_ModifierList { Anti_Rule_15 (tkVal_qq_ModifierList $1) } |+ Rule_15 { $1 }++Rule_15 : Modifier { Ctr__Rule_15__1 (rtkPosOf $1) $1 } |+ Annotation { Ctr__Rule_15__2 (rtkPosOf $1) $1 }++Rule_17 : {- empty -} { [] } |+ Rule_17 Rule_18 { $2 : $1 }++Rule_18 : tok__coma__9 ClassOrInterfaceType { Ctr__Rule_18__0 (rtkPosOf $1) $2 }++Rule_19 : ClassOrInterfaceType { [$1] } |+ Rule_19 tok__coma__9 ClassOrInterfaceType { $3 : $1 }++Rule_2 : { Ctr__Rule_2__0 rtkNoPos } |+ CompilationUnitRest { Ctr__Rule_2__1 (rtkPosOf $1) $1 }++Rule_21 : { Ctr__Rule_21__0 rtkNoPos } |+ ExtendsList { Ctr__Rule_21__1 (rtkPosOf $1) $1 }++Rule_22 : { Ctr__Rule_22__0 rtkNoPos } |+ ImplementsList { Ctr__Rule_22__1 (rtkPosOf $1) $1 }++Rule_23 : { Ctr__Rule_23__0 rtkNoPos } |+ ExtendsList { Ctr__Rule_23__1 (rtkPosOf $1) $1 }++Rule_25 : { Ctr__Rule_25__0 rtkNoPos } |+ Rule_26 { Ctr__Rule_25__1 (rtkPosOf $1) $1 }++Rule_26 : tok__lparen__7 Arglist tok__rparen__8 { Ctr__Rule_26__0 (rtkPosOf $1) $2 }++Rule_27 : { Ctr__Rule_27__0 rtkNoPos } |+ Rule_28 { Ctr__Rule_27__1 (rtkPosOf $1) $1 }++Rule_28 : tok__symbol__11 FieldDeclarationList tok__symbol__12 { Ctr__Rule_28__0 (rtkPosOf $1) (reverse $2) }++Rule_29 : {- empty -} { [] } |+ Rule_29 Rule_30 { $2 : $1 }++Rule_3 : { Ctr__Rule_3__0 rtkNoPos } |+ tok_static_3 { Ctr__Rule_3__1 (rtkPosOf $1) }++Rule_30 : tok__coma__9 EnumConstant { Ctr__Rule_30__0 (rtkPosOf $1) $2 }++Rule_31 : { Ctr__Rule_31__0 rtkNoPos } |+ tok__coma__9 { Ctr__Rule_31__1 (rtkPosOf $1) }++Rule_32 : { Ctr__Rule_32__0 rtkNoPos } |+ ImplementsList { Ctr__Rule_32__1 (rtkPosOf $1) $1 }++Rule_33 : { Ctr__Rule_33__0 rtkNoPos } |+ Rule_34 { Ctr__Rule_33__1 (rtkPosOf $1) $1 }++Rule_34 : tok__semi__1 FieldDeclarationList { Ctr__Rule_34__0 (rtkPosOf $1) (reverse $2) }++Rule_35 : MemberDeclaration { Ctr__Rule_35__0 (rtkPosOf $1) $1 } |+ TypeDeclRest { Ctr__Rule_35__1 (rtkPosOf $1) $1 } |+ StaticInitializer { Ctr__Rule_35__2 (rtkPosOf $1) $1 }++ListElem_Dims37 : qq_Dims { Anti_Rule_36 (tkVal_qq_Dims $1) } |+ Rule_36 { $1 }++Rule_36 : tok__sq_bkt_l__18 tok__sq_bkt_r__19 { Ctr__Rule_36__1 (rtkPosOf $1) }++ListElem_NonEmptyDims39 : qq_NonEmptyDims { Anti_Rule_38 (tkVal_qq_NonEmptyDims $1) } |+ Rule_38 { $1 }++Rule_38 : tok__sq_bkt_l__18 tok__sq_bkt_r__19 { Ctr__Rule_38__1 (rtkPosOf $1) }++Rule_4 : { Ctr__Rule_4__0 rtkNoPos } |+ Rule_5 { Ctr__Rule_4__1 (rtkPosOf $1) $1 }++Rule_40 : { Ctr__Rule_40__0 rtkNoPos } |+ ParameterList { Ctr__Rule_40__1 (rtkPosOf $1) $1 }++Rule_41 : { Ctr__Rule_41__0 rtkNoPos } |+ ThrowsClause { Ctr__Rule_41__1 (rtkPosOf $1) $1 }++Rule_42 : {- empty -} { [] } |+ Rule_42 Rule_43 { $2 : $1 }++Rule_43 : tok__coma__9 CompoundName { Ctr__Rule_43__0 (rtkPosOf $1) $2 }++Rule_44 : { Ctr__Rule_44__0 rtkNoPos } |+ ParameterList { Ctr__Rule_44__1 (rtkPosOf $1) $1 }++Rule_45 : { Ctr__Rule_45__0 rtkNoPos } |+ ThrowsClause { Ctr__Rule_45__1 (rtkPosOf $1) $1 }++Rule_46 : StatementBlock { Ctr__Rule_46__0 (rtkPosOf $1) $1 } |+ Rule_47 tok__semi__1 { Ctr__Rule_46__1 (rtkPosOf $1) $1 }++Rule_47 : { Ctr__Rule_47__0 rtkNoPos } |+ Rule_48 { Ctr__Rule_47__1 (rtkPosOf $1) $1 }++Rule_48 : tok_default_30 Expression { Ctr__Rule_48__0 (rtkPosOf $1) $2 }++ListElem_MoreVariableDeclarators50 : qq_MoreVariableDeclarators { Anti_Rule_49 (tkVal_qq_MoreVariableDeclarators $1) } |+ Rule_49 { $1 }++Rule_49 : tok__coma__9 VariableDeclarator { Ctr__Rule_49__1 (rtkPosOf $1) $2 }++Rule_5 : tok__lparen__7 Rule_6 tok__rparen__8 { Ctr__Rule_5__0 (rtkPosOf $1) $2 }++Rule_51 : {- empty -} { [] } |+ Rule_51 Rule_52 { $2 : $1 }++Rule_52 : tok__coma__9 VariableDeclarator { Ctr__Rule_52__0 (rtkPosOf $1) $2 }++ListElem_LocalModifierList154 : qq_LocalModifierList1 { Anti_Rule_53 (tkVal_qq_LocalModifierList1 $1) } |+ Rule_53 { $1 }++Rule_53 : tok_final_31 { Ctr__Rule_53__1 (rtkPosOf $1) } |+ Annotation { Ctr__Rule_53__2 (rtkPosOf $1) $1 }++Rule_55 : tok__eql__10 VariableInitializer { Ctr__Rule_55__0 (rtkPosOf $1) $2 }++Rule_56 : VariableInitializer Rule_57 Rule_59 { Ctr__Rule_56__0 (rtkPosOf $1) $1 (reverse $2) $3 }++Rule_57 : {- empty -} { [] } |+ Rule_57 Rule_58 { $2 : $1 }++Rule_58 : tok__coma__9 VariableInitializer { Ctr__Rule_58__0 (rtkPosOf $1) $2 }++Rule_59 : { Ctr__Rule_59__0 rtkNoPos } |+ tok__coma__9 { Ctr__Rule_59__1 (rtkPosOf $1) }++Rule_6 : { Ctr__Rule_6__0 rtkNoPos } |+ AnnotationArguments { Ctr__Rule_6__1 (rtkPosOf $1) $1 }++Rule_60 : {- empty -} { [] } |+ Rule_60 Rule_61 { $2 : $1 }++Rule_61 : tok__coma__9 Parameter { Ctr__Rule_61__0 (rtkPosOf $1) $2 }++ListElem_ParamModifierList63 : qq_ParamModifierList { Anti_Rule_62 (tkVal_qq_ParamModifierList $1) } |+ Rule_62 { $1 }++Rule_62 : tok_final_31 { Ctr__Rule_62__1 (rtkPosOf $1) } |+ Annotation { Ctr__Rule_62__2 (rtkPosOf $1) $1 }++Rule_64 : { Ctr__Rule_64__0 rtkNoPos } |+ tok__dot__dot__dot__32 { Ctr__Rule_64__1 (rtkPosOf $1) }++Rule_66 : { Ctr__Rule_66__0 rtkNoPos } |+ Rule_67 { Ctr__Rule_66__1 (rtkPosOf $1) $1 }++Rule_67 : tok__colon__37 Expression { Ctr__Rule_67__0 (rtkPosOf $1) $2 }++Rule_68 : tok_else_42 Statement { Ctr__Rule_68__0 (rtkPosOf $1) $2 }++Rule_69 : VariableDeclaration { Ctr__Rule_69__0 (rtkPosOf $1) $1 } |+ Expression tok__semi__1 { Ctr__Rule_69__1 (rtkPosOf $1) $1 } |+ tok__semi__1 { Ctr__Rule_69__2 (rtkPosOf $1) }++Rule_7 : {- empty -} { [] } |+ Rule_7 Rule_8 { $2 : $1 }++ListElem_CatchList71 : qq_CatchList { Anti_Rule_70 (tkVal_qq_CatchList $1) } |+ Rule_70 { $1 }++Rule_70 : tok_catch_47 tok__lparen__7 CatchParameter tok__rparen__8 StatementBlock { Ctr__Rule_70__1 (rtkPosOf $1) $3 $5 }++Rule_72 : {- empty -} { [] } |+ Rule_72 Rule_73 { $2 : $1 }++Rule_73 : tok__pipe__48 Type { Ctr__Rule_73__0 (rtkPosOf $1) $2 }++Rule_74 : tok_finally_49 StatementBlock { Ctr__Rule_74__0 (rtkPosOf $1) $2 }++Rule_75 : { Ctr__Rule_75__0 rtkNoPos } |+ ResourceSpec { Ctr__Rule_75__1 (rtkPosOf $1) $1 }++Rule_76 : {- empty -} { [] } |+ Rule_76 Rule_77 { $2 : $1 }++Rule_77 : tok__semi__1 Resource { Ctr__Rule_77__0 (rtkPosOf $1) $2 }++Rule_78 : { Ctr__Rule_78__0 rtkNoPos } |+ tok__semi__1 { Ctr__Rule_78__1 (rtkPosOf $1) }++ListElem_SwitchCaseList80 : qq_SwitchCaseList { Anti_Rule_79 (tkVal_qq_SwitchCaseList $1) } |+ Rule_79 { $1 }++Rule_79 : tok_case_51 Expression tok__colon__37 { Ctr__Rule_79__1 (rtkPosOf $1) $2 } |+ tok_default_30 tok__colon__37 { Ctr__Rule_79__2 (rtkPosOf $1) } |+ Statement { Ctr__Rule_79__3 (rtkPosOf $1) $1 }++Rule_8 : tok__coma__9 AnnotationElement { Ctr__Rule_8__0 (rtkPosOf $1) $2 }++Rule_81 : { Ctr__Rule_81__0 rtkNoPos } |+ Rule_82 { Ctr__Rule_81__1 (rtkPosOf $1) $1 }++Rule_82 : AssignmentOp AssignmentExpression { Ctr__Rule_82__0 (rtkPosOf $1) $1 $2 }++Rule_83 : Rule_84 { [$1] } |+ Rule_83 Rule_84 { $2 : $1 }++Rule_84 : tok__coma__9 id { Ctr__Rule_84__0 (rtkPosOf $1) (tkVal_id $2) }++Rule_85 : { Ctr__Rule_85__0 rtkNoPos } |+ Rule_86 { Ctr__Rule_85__1 (rtkPosOf $1) $1 }++Rule_86 : tok__lparen__7 Arglist tok__rparen__8 { Ctr__Rule_86__0 (rtkPosOf $1) $2 }++Rule_87 : { Ctr__Rule_87__0 rtkNoPos } |+ Rule_88 { Ctr__Rule_87__1 (rtkPosOf $1) $1 }++Rule_88 : tok__lparen__7 Arglist tok__rparen__8 { Ctr__Rule_88__0 (rtkPosOf $1) $2 }++Rule_89 : tok__lparen__7 Arglist tok__rparen__8 Rule_90 { Ctr__Rule_89__0 (rtkPosOf $1) $2 $4 } |+ DimExprs Rule_92 { Ctr__Rule_89__1 (rtkPosOf (reverse $1)) (reverse $1) $2 } |+ NonEmptyDims ArrayInitializer { Ctr__Rule_89__2 (rtkPosOf (reverse $1)) (reverse $1) $2 }++Rule_9 : { Ctr__Rule_9__0 rtkNoPos } |+ Rule_10 { Ctr__Rule_9__1 (rtkPosOf $1) $1 }++Rule_90 : { Ctr__Rule_90__0 rtkNoPos } |+ Rule_91 { Ctr__Rule_90__1 (rtkPosOf $1) $1 }++Rule_91 : tok__symbol__11 FieldDeclarationList tok__symbol__12 { Ctr__Rule_91__0 (rtkPosOf $1) (reverse $2) }++Rule_92 : { Ctr__Rule_92__0 rtkNoPos } |+ NonEmptyDims { Ctr__Rule_92__1 (rtkPosOf (reverse $1)) (reverse $1) }++ListElem_DimExprs94 : qq_DimExprs { Anti_Rule_93 (tkVal_qq_DimExprs $1) } |+ Rule_93 { $1 }++Rule_93 : tok__sq_bkt_l__18 Expression tok__sq_bkt_r__19 { Ctr__Rule_93__1 (rtkPosOf $1) $2 }++Rule_95 : Expression Rule_96 { Ctr__Rule_95__0 (rtkPosOf $1) $1 (reverse $2) }++Rule_96 : {- empty -} { [] } |+ Rule_96 Rule_97 { $2 : $1 }++Rule_97 : tok__coma__9 Expression { Ctr__Rule_97__0 (rtkPosOf $1) $2 }++Rule_98 : {- empty -} { [] } |+ Rule_98 Rule_99 { $2 : $1 }++Rule_99 : tok__coma__9 TypeArgument { Ctr__Rule_99__0 (rtkPosOf $1) $2 }++ShiftOp : qq_ShiftOp { Anti_ShiftOp (tkVal_qq_ShiftOp $1) } |+ tok__symbol__symbol__77 { Ctr__ShiftOp__0 (rtkPosOf $1) } |+ tok__symbol__73 tok__symbol__73 { Ctr__ShiftOp__1 (rtkPosOf $1) } |+ tok__symbol__73 tok__symbol__73 tok__symbol__73 { Ctr__ShiftOp__2 (rtkPosOf $1) }++Statement : qq_Statement { Anti_Statement (tkVal_qq_Statement $1) } |+ VariableDeclaration { Ctr__Statement__0 (rtkPosOf $1) $1 } |+ tok_return_33 OptExpression tok__semi__1 { Ctr__Statement__1 (rtkPosOf $1) $2 } |+ Expression tok__semi__1 { Ctr__Statement__2 (rtkPosOf $1) $1 } |+ StatementBlock { Ctr__Statement__3 (rtkPosOf $1) $1 } |+ IfStatement { Ctr__Statement__4 (rtkPosOf $1) $1 } |+ DoStatement { Ctr__Statement__5 (rtkPosOf $1) $1 } |+ WhileStatement { Ctr__Statement__6 (rtkPosOf $1) $1 } |+ ForStatement { Ctr__Statement__7 (rtkPosOf $1) $1 } |+ TryStatement { Ctr__Statement__8 (rtkPosOf $1) $1 } |+ SwitchStatement { Ctr__Statement__9 (rtkPosOf $1) $1 } |+ tok_synchronized_34 tok__lparen__7 Expression tok__rparen__8 Statement { Ctr__Statement__10 (rtkPosOf $1) $3 $5 } |+ tok_throw_35 Expression tok__semi__1 { Ctr__Statement__11 (rtkPosOf $1) $2 } |+ tok_assert_36 Expression Rule_66 tok__semi__1 { Ctr__Statement__12 (rtkPosOf $1) $2 $3 } |+ id tok__colon__37 Statement { Ctr__Statement__13 (rtkPosOf $1) (tkVal_id $1) $3 } |+ tok_break_38 OptId tok__semi__1 { Ctr__Statement__14 (rtkPosOf $1) $2 } |+ tok_continue_39 OptId tok__semi__1 { Ctr__Statement__15 (rtkPosOf $1) $2 } |+ tok_super_40 tok__lparen__7 Arglist tok__rparen__8 tok__semi__1 { Ctr__Statement__16 (rtkPosOf $1) $3 } |+ tok_this_41 tok__lparen__7 Arglist tok__rparen__8 tok__semi__1 { Ctr__Statement__17 (rtkPosOf $1) $3 } |+ tok__semi__1 { Ctr__Statement__18 (rtkPosOf $1) }++ListElem_StatementList65 : qq_StatementList { Anti_Statement (tkVal_qq_StatementList $1) } |+ Statement { $1 }++StatementBlock : qq_StatementBlock { Anti_StatementBlock (tkVal_qq_StatementBlock $1) } |+ tok__symbol__11 StatementList tok__symbol__12 { Ctr__StatementBlock__0 (rtkPosOf $1) (reverse $2) }++StatementList : {- empty -} { [] } |+ StatementList ListElem_StatementList65 { $2 : $1 }++StaticInitializer : qq_StaticInitializer { Anti_StaticInitializer (tkVal_qq_StaticInitializer $1) } |+ StatementBlock { Ctr__StaticInitializer__0 (rtkPosOf $1) $1 }++SwitchCaseList : {- empty -} { [] } |+ SwitchCaseList ListElem_SwitchCaseList80 { $2 : $1 }++SwitchStatement : qq_SwitchStatement { Anti_SwitchStatement (tkVal_qq_SwitchStatement $1) } |+ tok_switch_52 tok__lparen__7 Expression tok__rparen__8 tok__symbol__11 SwitchCaseList tok__symbol__12 { Ctr__SwitchStatement__0 (rtkPosOf $1) $3 (reverse $6) }++ThrowsClause : qq_ThrowsClause { Anti_ThrowsClause (tkVal_qq_ThrowsClause $1) } |+ tok_throws_29 CompoundName Rule_42 { Ctr__ThrowsClause__0 (rtkPosOf $1) $2 (reverse $3) }++TryStatement : qq_TryStatement { Anti_TryStatement (tkVal_qq_TryStatement $1) } |+ tok_try_50 Rule_75 StatementBlock CatchList OptFinally { Ctr__TryStatement__0 (rtkPosOf $1) $2 $3 (reverse $4) $5 }++Type : qq_Type { Anti_Type (tkVal_qq_Type $1) } |+ PrimitiveTypeKeyword Dims { Ctr__Type__0 (rtkPosOf $1) $1 (reverse $2) } |+ CompoundName NonEmptyTypeArguments Dims { Ctr__Type__1 (rtkPosOf $1) $1 $2 (reverse $3) } |+ CompoundName NonEmptyDims { Ctr__Type__2 (rtkPosOf $1) $1 (reverse $2) } |+ CompoundName { Ctr__Type__3 (rtkPosOf $1) $1 }++TypeArgument : qq_TypeArgument { Anti_TypeArgument (tkVal_qq_TypeArgument $1) } |+ Type { Ctr__TypeArgument__0 (rtkPosOf $1) $1 } |+ WildcardType { Ctr__TypeArgument__1 (rtkPosOf $1) $1 }++TypeArguments : qq_TypeArguments { Anti_TypeArguments (tkVal_qq_TypeArguments $1) } |+ { Ctr__TypeArguments__0 rtkNoPos } |+ NonEmptyTypeArguments { Ctr__TypeArguments__1 (rtkPosOf $1) $1 }++TypeDeclRest : qq_TypeDeclRest { Anti_TypeDeclRest (tkVal_qq_TypeDeclRest $1) } |+ ClassDeclaration { Ctr__TypeDeclRest__0 (rtkPosOf $1) $1 } |+ InterfaceDeclaration { Ctr__TypeDeclRest__1 (rtkPosOf $1) $1 } |+ EnumDeclaration { Ctr__TypeDeclRest__2 (rtkPosOf $1) $1 } |+ AnnotationDeclaration { Ctr__TypeDeclRest__3 (rtkPosOf $1) $1 }++ListElem_TypeDeclarationList0 : qq_TypeDeclarationList { Anti_TypeDeclaration (tkVal_qq_TypeDeclarationList $1) } |+ TypeDeclaration { $1 }++TypeDeclaration : qq_TypeDeclaration { Anti_TypeDeclaration (tkVal_qq_TypeDeclaration $1) } |+ OptDocComment ModifierList TypeDeclRest { Ctr__TypeDeclaration__1 (rtkPosOf $1) $1 (reverse $2) $3 }++TypeDeclarationList : {- empty -} { [] } |+ TypeDeclarationList ListElem_TypeDeclarationList0 { $2 : $1 }++TypeParameter : qq_TypeParameter { Anti_TypeParameter (tkVal_qq_TypeParameter $1) } |+ id Rule_102 { Ctr__TypeParameter__0 (rtkPosOf $1) (tkVal_id $1) $2 }++TypeParameters : qq_TypeParameters { Anti_TypeParameters (tkVal_qq_TypeParameters $1) } |+ { Ctr__TypeParameters__0 rtkNoPos } |+ NonEmptyTypeParameters { Ctr__TypeParameters__1 (rtkPosOf $1) $1 }++TypeSpecifier : qq_TypeSpecifier { Anti_TypeSpecifier (tkVal_qq_TypeSpecifier $1) } |+ tok_boolean_20 { Ctr__TypeSpecifier__0 (rtkPosOf $1) } |+ tok_byte_21 { Ctr__TypeSpecifier__1 (rtkPosOf $1) } |+ tok_char_22 { Ctr__TypeSpecifier__2 (rtkPosOf $1) } |+ tok_short_23 { Ctr__TypeSpecifier__3 (rtkPosOf $1) } |+ tok_int_24 { Ctr__TypeSpecifier__4 (rtkPosOf $1) } |+ tok_float_25 { Ctr__TypeSpecifier__5 (rtkPosOf $1) } |+ tok_long_26 { Ctr__TypeSpecifier__6 (rtkPosOf $1) } |+ tok_double_27 { Ctr__TypeSpecifier__7 (rtkPosOf $1) } |+ tok_void_28 { Ctr__TypeSpecifier__8 (rtkPosOf $1) } |+ CompoundName TypeArguments { Ctr__TypeSpecifier__9 (rtkPosOf $1) $1 $2 }++VariableDeclaration : qq_VariableDeclaration { Anti_VariableDeclaration (tkVal_qq_VariableDeclaration $1) } |+ Type VariableDeclaratorList tok__semi__1 { Ctr__VariableDeclaration__0 (rtkPosOf $1) $1 $2 } |+ LocalModifierList1 Type VariableDeclaratorList tok__semi__1 { Ctr__VariableDeclaration__1 (rtkPosOf (reverse $1)) (reverse $1) $2 $3 }++VariableDeclarator : qq_VariableDeclarator { Anti_VariableDeclarator (tkVal_qq_VariableDeclarator $1) } |+ id Dims OptVariableInitializer { Ctr__VariableDeclarator__0 (rtkPosOf $1) (tkVal_id $1) (reverse $2) $3 }++VariableDeclaratorList : qq_VariableDeclaratorList { Anti_VariableDeclaratorList (tkVal_qq_VariableDeclaratorList $1) } |+ VariableDeclarator Rule_51 { Ctr__VariableDeclaratorList__0 (rtkPosOf $1) $1 (reverse $2) }++VariableInitializer : qq_VariableInitializer { Anti_VariableInitializer (tkVal_qq_VariableInitializer $1) } |+ Expression { Ctr__VariableInitializer__0 (rtkPosOf $1) $1 } |+ ArrayInitializer { Ctr__VariableInitializer__1 (rtkPosOf $1) $1 }++VariableInitializerList : qq_VariableInitializerList { Anti_VariableInitializerList (tkVal_qq_VariableInitializerList $1) } |+ { Ctr__VariableInitializerList__0 rtkNoPos } |+ Rule_56 { Ctr__VariableInitializerList__1 (rtkPosOf $1) $1 }++WhileStatement : qq_WhileStatement { Anti_WhileStatement (tkVal_qq_WhileStatement $1) } |+ tok_while_45 tok__lparen__7 Expression tok__rparen__8 Statement { Ctr__WhileStatement__0 (rtkPosOf $1) $3 $5 }++WildcardType : qq_WildcardType { Anti_WildcardType (tkVal_qq_WildcardType $1) } |+ tok__symbol__65 { Ctr__WildcardType__0 (rtkPosOf $1) } |+ tok__symbol__65 tok_extends_13 Type { Ctr__WildcardType__1 (rtkPosOf $1) $3 } |+ tok__symbol__65 tok_super_40 Type { Ctr__WildcardType__2 (rtkPosOf $1) $3 }+++{+parseError :: [L.PosToken] -> Either String a+parseError [] = Left "unexpected end of input"+parseError (L.PosToken (L.AlexPn _ line col) tok : _) =+ Left $ show line ++ ":" ++ show col ++ ":unexpected " ++ showRtkToken tok++-- Render a token the way it appears in the source, for error messages+showRtkToken :: L.Token -> String+showRtkToken L.EndOfFile = "end of input"+showRtkToken L.Tk__tok_AdditiveOp_dummy_205 = "'tok_AdditiveOp_dummy_205'"+showRtkToken L.Tk__tok_Annotation_dummy_204 = "'tok_Annotation_dummy_204'"+showRtkToken L.Tk__tok_AnnotationArguments_dummy_203 = "'tok_AnnotationArguments_dummy_203'"+showRtkToken L.Tk__tok_AnnotationDeclaration_dummy_202 = "'tok_AnnotationDeclaration_dummy_202'"+showRtkToken L.Tk__tok_AnnotationElement_dummy_201 = "'tok_AnnotationElement_dummy_201'"+showRtkToken L.Tk__tok_AnnotationList_dummy_200 = "'tok_AnnotationList_dummy_200'"+showRtkToken L.Tk__tok_AnnotationTypeElement_dummy_199 = "'tok_AnnotationTypeElement_dummy_199'"+showRtkToken L.Tk__tok_AnnotationTypeElementList_dummy_198 = "'tok_AnnotationTypeElementList_dummy_198'"+showRtkToken L.Tk__tok_Arglist_dummy_197 = "'tok_Arglist_dummy_197'"+showRtkToken L.Tk__tok_ArrayInitializer_dummy_196 = "'tok_ArrayInitializer_dummy_196'"+showRtkToken L.Tk__tok_AssignmentOp_dummy_195 = "'tok_AssignmentOp_dummy_195'"+showRtkToken L.Tk__tok_CatchList_dummy_194 = "'tok_CatchList_dummy_194'"+showRtkToken L.Tk__tok_CatchParameter_dummy_193 = "'tok_CatchParameter_dummy_193'"+showRtkToken L.Tk__tok_ClassDeclaration_dummy_192 = "'tok_ClassDeclaration_dummy_192'"+showRtkToken L.Tk__tok_ClassOrInterfaceType_dummy_191 = "'tok_ClassOrInterfaceType_dummy_191'"+showRtkToken L.Tk__tok_CompilationUnit_dummy_190 = "'tok_CompilationUnit_dummy_190'"+showRtkToken L.Tk__tok_CompilationUnitRest_dummy_189 = "'tok_CompilationUnitRest_dummy_189'"+showRtkToken L.Tk__tok_CompoundName_dummy_188 = "'tok_CompoundName_dummy_188'"+showRtkToken L.Tk__tok_CompoundNameTail_dummy_187 = "'tok_CompoundNameTail_dummy_187'"+showRtkToken L.Tk__tok_CreationExpression_dummy_186 = "'tok_CreationExpression_dummy_186'"+showRtkToken L.Tk__tok_DimExprs_dummy_185 = "'tok_DimExprs_dummy_185'"+showRtkToken L.Tk__tok_Dims_dummy_184 = "'tok_Dims_dummy_184'"+showRtkToken L.Tk__tok_DoStatement_dummy_183 = "'tok_DoStatement_dummy_183'"+showRtkToken L.Tk__tok_DocComment_dummy_182 = "'tok_DocComment_dummy_182'"+showRtkToken L.Tk__tok_ElementValue_dummy_181 = "'tok_ElementValue_dummy_181'"+showRtkToken L.Tk__tok_ElementValueArrayInitializer_dummy_180 = "'tok_ElementValueArrayInitializer_dummy_180'"+showRtkToken L.Tk__tok_EnumConstant_dummy_179 = "'tok_EnumConstant_dummy_179'"+showRtkToken L.Tk__tok_EnumConstantList_dummy_178 = "'tok_EnumConstantList_dummy_178'"+showRtkToken L.Tk__tok_EnumDeclaration_dummy_177 = "'tok_EnumDeclaration_dummy_177'"+showRtkToken L.Tk__tok_EqualityOp_dummy_176 = "'tok_EqualityOp_dummy_176'"+showRtkToken L.Tk__tok_Expression_dummy_175 = "'tok_Expression_dummy_175'"+showRtkToken L.Tk__tok_ExtendsList_dummy_174 = "'tok_ExtendsList_dummy_174'"+showRtkToken L.Tk__tok_FieldDeclaration_dummy_173 = "'tok_FieldDeclaration_dummy_173'"+showRtkToken L.Tk__tok_FieldDeclarationList_dummy_172 = "'tok_FieldDeclarationList_dummy_172'"+showRtkToken L.Tk__tok_ForEachHeader_dummy_171 = "'tok_ForEachHeader_dummy_171'"+showRtkToken L.Tk__tok_ForStatement_dummy_170 = "'tok_ForStatement_dummy_170'"+showRtkToken L.Tk__tok_IfStatement_dummy_169 = "'tok_IfStatement_dummy_169'"+showRtkToken L.Tk__tok_ImplementsList_dummy_168 = "'tok_ImplementsList_dummy_168'"+showRtkToken L.Tk__tok_ImportHead_dummy_167 = "'tok_ImportHead_dummy_167'"+showRtkToken L.Tk__tok_ImportList_dummy_166 = "'tok_ImportList_dummy_166'"+showRtkToken L.Tk__tok_ImportName_dummy_165 = "'tok_ImportName_dummy_165'"+showRtkToken L.Tk__tok_ImportStatement_dummy_164 = "'tok_ImportStatement_dummy_164'"+showRtkToken L.Tk__tok_InterfaceDeclaration_dummy_163 = "'tok_InterfaceDeclaration_dummy_163'"+showRtkToken L.Tk__tok_Java_dummy_206 = "'tok_Java_dummy_206'"+showRtkToken L.Tk__tok_LambdaBody_dummy_162 = "'tok_LambdaBody_dummy_162'"+showRtkToken L.Tk__tok_Literal_dummy_161 = "'tok_Literal_dummy_161'"+showRtkToken L.Tk__tok_LocalModifierList1_dummy_160 = "'tok_LocalModifierList1_dummy_160'"+showRtkToken L.Tk__tok_MemberAfterFirstId_dummy_159 = "'tok_MemberAfterFirstId_dummy_159'"+showRtkToken L.Tk__tok_MemberDeclaration_dummy_158 = "'tok_MemberDeclaration_dummy_158'"+showRtkToken L.Tk__tok_MemberRest_dummy_157 = "'tok_MemberRest_dummy_157'"+showRtkToken L.Tk__tok_Modifier_dummy_156 = "'tok_Modifier_dummy_156'"+showRtkToken L.Tk__tok_ModifierList_dummy_155 = "'tok_ModifierList_dummy_155'"+showRtkToken L.Tk__tok_MoreTypeSpecifier_dummy_154 = "'tok_MoreTypeSpecifier_dummy_154'"+showRtkToken L.Tk__tok_MoreVariableDeclarators_dummy_153 = "'tok_MoreVariableDeclarators_dummy_153'"+showRtkToken L.Tk__tok_MultiplicativeOp_dummy_152 = "'tok_MultiplicativeOp_dummy_152'"+showRtkToken L.Tk__tok_NonEmptyDims_dummy_151 = "'tok_NonEmptyDims_dummy_151'"+showRtkToken L.Tk__tok_NonEmptyTypeArguments_dummy_150 = "'tok_NonEmptyTypeArguments_dummy_150'"+showRtkToken L.Tk__tok_NonEmptyTypeParameters_dummy_149 = "'tok_NonEmptyTypeParameters_dummy_149'"+showRtkToken L.Tk__tok_OptDocComment_dummy_148 = "'tok_OptDocComment_dummy_148'"+showRtkToken L.Tk__tok_OptElsePart_dummy_147 = "'tok_OptElsePart_dummy_147'"+showRtkToken L.Tk__tok_OptExpression_dummy_146 = "'tok_OptExpression_dummy_146'"+showRtkToken L.Tk__tok_OptFinally_dummy_145 = "'tok_OptFinally_dummy_145'"+showRtkToken L.Tk__tok_OptId_dummy_144 = "'tok_OptId_dummy_144'"+showRtkToken L.Tk__tok_OptVariableInitializer_dummy_143 = "'tok_OptVariableInitializer_dummy_143'"+showRtkToken L.Tk__tok_Package_dummy_142 = "'tok_Package_dummy_142'"+showRtkToken L.Tk__tok_ParamModifierList_dummy_141 = "'tok_ParamModifierList_dummy_141'"+showRtkToken L.Tk__tok_Parameter_dummy_140 = "'tok_Parameter_dummy_140'"+showRtkToken L.Tk__tok_ParameterList_dummy_139 = "'tok_ParameterList_dummy_139'"+showRtkToken L.Tk__tok_PostfixOp_dummy_138 = "'tok_PostfixOp_dummy_138'"+showRtkToken L.Tk__tok_PrefixOp_dummy_137 = "'tok_PrefixOp_dummy_137'"+showRtkToken L.Tk__tok_PrimitiveTypeKeyword_dummy_136 = "'tok_PrimitiveTypeKeyword_dummy_136'"+showRtkToken L.Tk__tok_RelationalOp_dummy_135 = "'tok_RelationalOp_dummy_135'"+showRtkToken L.Tk__tok_Resource_dummy_134 = "'tok_Resource_dummy_134'"+showRtkToken L.Tk__tok_ResourceSpec_dummy_133 = "'tok_ResourceSpec_dummy_133'"+showRtkToken L.Tk__tok_ShiftOp_dummy_132 = "'tok_ShiftOp_dummy_132'"+showRtkToken L.Tk__tok_Statement_dummy_131 = "'tok_Statement_dummy_131'"+showRtkToken L.Tk__tok_StatementBlock_dummy_130 = "'tok_StatementBlock_dummy_130'"+showRtkToken L.Tk__tok_StatementList_dummy_129 = "'tok_StatementList_dummy_129'"+showRtkToken L.Tk__tok_StaticInitializer_dummy_128 = "'tok_StaticInitializer_dummy_128'"+showRtkToken L.Tk__tok_SwitchCaseList_dummy_127 = "'tok_SwitchCaseList_dummy_127'"+showRtkToken L.Tk__tok_SwitchStatement_dummy_126 = "'tok_SwitchStatement_dummy_126'"+showRtkToken L.Tk__tok_ThrowsClause_dummy_125 = "'tok_ThrowsClause_dummy_125'"+showRtkToken L.Tk__tok_TryStatement_dummy_124 = "'tok_TryStatement_dummy_124'"+showRtkToken L.Tk__tok_Type_dummy_123 = "'tok_Type_dummy_123'"+showRtkToken L.Tk__tok_TypeArgument_dummy_122 = "'tok_TypeArgument_dummy_122'"+showRtkToken L.Tk__tok_TypeArguments_dummy_121 = "'tok_TypeArguments_dummy_121'"+showRtkToken L.Tk__tok_TypeDeclRest_dummy_120 = "'tok_TypeDeclRest_dummy_120'"+showRtkToken L.Tk__tok_TypeDeclaration_dummy_119 = "'tok_TypeDeclaration_dummy_119'"+showRtkToken L.Tk__tok_TypeDeclarationList_dummy_118 = "'tok_TypeDeclarationList_dummy_118'"+showRtkToken L.Tk__tok_TypeParameter_dummy_117 = "'tok_TypeParameter_dummy_117'"+showRtkToken L.Tk__tok_TypeParameters_dummy_116 = "'tok_TypeParameters_dummy_116'"+showRtkToken L.Tk__tok_TypeSpecifier_dummy_115 = "'tok_TypeSpecifier_dummy_115'"+showRtkToken L.Tk__tok_VariableDeclaration_dummy_114 = "'tok_VariableDeclaration_dummy_114'"+showRtkToken L.Tk__tok_VariableDeclarator_dummy_113 = "'tok_VariableDeclarator_dummy_113'"+showRtkToken L.Tk__tok_VariableDeclaratorList_dummy_112 = "'tok_VariableDeclaratorList_dummy_112'"+showRtkToken L.Tk__tok_VariableInitializer_dummy_111 = "'tok_VariableInitializer_dummy_111'"+showRtkToken L.Tk__tok_VariableInitializerList_dummy_110 = "'tok_VariableInitializerList_dummy_110'"+showRtkToken L.Tk__tok_WhileStatement_dummy_109 = "'tok_WhileStatement_dummy_109'"+showRtkToken L.Tk__tok_WildcardType_dummy_108 = "'tok_WildcardType_dummy_108'"+showRtkToken L.Tk__tok__tilde__84 = "'~'"+showRtkToken L.Tk__tok__symbol__12 = "'}'"+showRtkToken L.Tk__tok__pipe__pipe__66 = "'||'"+showRtkToken L.Tk__tok__pipe__eql__58 = "'|='"+showRtkToken L.Tk__tok__pipe__48 = "'|'"+showRtkToken L.Tk__tok__symbol__11 = "'{'"+showRtkToken L.Tk__tok_while_45 = "'while'"+showRtkToken L.Tk__tok_void_28 = "'void'"+showRtkToken L.Tk__tok_try_50 = "'try'"+showRtkToken L.Tk__tok_true_88 = "'true'"+showRtkToken L.Tk__tok_transient_97 = "'transient'"+showRtkToken L.Tk__tok_throws_29 = "'throws'"+showRtkToken L.Tk__tok_throw_35 = "'throw'"+showRtkToken L.Tk__tok_threadsafe_96 = "'threadsafe'"+showRtkToken L.Tk__tok_this_41 = "'this'"+showRtkToken L.Tk__tok_synchronized_34 = "'synchronized'"+showRtkToken L.Tk__tok_switch_52 = "'switch'"+showRtkToken L.Tk__tok_super_40 = "'super'"+showRtkToken L.Tk__tok_static_3 = "'static'"+showRtkToken L.Tk__tok_short_23 = "'short'"+showRtkToken L.Tk__tok_return_33 = "'return'"+showRtkToken L.Tk__tok_public_91 = "'public'"+showRtkToken L.Tk__tok_protected_93 = "'protected'"+showRtkToken L.Tk__tok_private_92 = "'private'"+showRtkToken L.Tk__tok_package_0 = "'package'"+showRtkToken L.Tk__tok_null_90 = "'null'"+showRtkToken L.Tk__tok_new_87 = "'new'"+showRtkToken L.Tk__tok_native_94 = "'native'"+showRtkToken L.Tk__tok_long_26 = "'long'"+showRtkToken L.Tk__tok_interface_16 = "'interface'"+showRtkToken L.Tk__tok_int_24 = "'int'"+showRtkToken L.Tk__tok_instanceof_76 = "'instanceof'"+showRtkToken L.Tk__tok_import_2 = "'import'"+showRtkToken L.Tk__tok_implements_14 = "'implements'"+showRtkToken L.Tk__tok_if_43 = "'if'"+showRtkToken L.Tk__tok_for_46 = "'for'"+showRtkToken L.Tk__tok_float_25 = "'float'"+showRtkToken L.Tk__tok_finally_49 = "'finally'"+showRtkToken L.Tk__tok_final_31 = "'final'"+showRtkToken L.Tk__tok_false_89 = "'false'"+showRtkToken L.Tk__tok_extends_13 = "'extends'"+showRtkToken L.Tk__tok_enum_17 = "'enum'"+showRtkToken L.Tk__tok_else_42 = "'else'"+showRtkToken L.Tk__tok_double_27 = "'double'"+showRtkToken L.Tk__tok_do_44 = "'do'"+showRtkToken L.Tk__tok_default_30 = "'default'"+showRtkToken L.Tk__tok_continue_39 = "'continue'"+showRtkToken L.Tk__tok_class_15 = "'class'"+showRtkToken L.Tk__tok_char_22 = "'char'"+showRtkToken L.Tk__tok_catch_47 = "'catch'"+showRtkToken L.Tk__tok_case_51 = "'case'"+showRtkToken L.Tk__tok_byte_21 = "'byte'"+showRtkToken L.Tk__tok_break_38 = "'break'"+showRtkToken L.Tk__tok_boolean_20 = "'boolean'"+showRtkToken L.Tk__tok_assert_36 = "'assert'"+showRtkToken L.Tk__tok_abstract_95 = "'abstract'"+showRtkToken L.Tk__tok__symbol__eql__60 = "'^='"+showRtkToken L.Tk__tok__symbol__68 = "'^'"+showRtkToken L.Tk__tok__sq_bkt_r__19 = "']'"+showRtkToken L.Tk__tok__sq_bkt_l__18 = "'['"+showRtkToken L.Tk__tok__symbol__6 = "'@'"+showRtkToken L.Tk__tok__symbol__65 = "'?'"+showRtkToken L.Tk__tok__symbol__symbol__symbol__eql__64 = "'>>>='"+showRtkToken L.Tk__tok__symbol__symbol__eql__63 = "'>>='"+showRtkToken L.Tk__tok__symbol__eql__75 = "'>='"+showRtkToken L.Tk__tok__symbol__73 = "'>'"+showRtkToken L.Tk__tok__eql__eql__70 = "'=='"+showRtkToken L.Tk__tok__eql__10 = "'='"+showRtkToken L.Tk__tok__symbol__eql__74 = "'<='"+showRtkToken L.Tk__tok__symbol__symbol__eql__62 = "'<<='"+showRtkToken L.Tk__tok__symbol__symbol__77 = "'<<'"+showRtkToken L.Tk__tok__symbol__72 = "'<'"+showRtkToken L.Tk__tok__semi__1 = "';'"+showRtkToken L.Tk__tok__colon__colon__86 = "'::'"+showRtkToken L.Tk__tok__colon__37 = "':'"+showRtkToken L.Tk__tok__symbol__eql__57 = "'/='"+showRtkToken L.Tk__tok__symbol__80 = "'/'"+showRtkToken L.Tk__tok__dot__dot__dot__32 = "'...'"+showRtkToken L.Tk__tok__dot__4 = "'.'"+showRtkToken L.Tk__tok__minus__symbol__53 = "'->'"+showRtkToken L.Tk__tok__minus__eql__55 = "'-='"+showRtkToken L.Tk__tok__minus__minus__83 = "'--'"+showRtkToken L.Tk__tok__minus__79 = "'-'"+showRtkToken L.Tk__tok__coma__9 = "','"+showRtkToken L.Tk__tok__plus__eql__54 = "'+='"+showRtkToken L.Tk__tok__plus__plus__82 = "'++'"+showRtkToken L.Tk__tok__plus__78 = "'+'"+showRtkToken L.Tk__tok__star__eql__56 = "'*='"+showRtkToken L.Tk__tok__star__5 = "'*'"+showRtkToken L.Tk__tok__rparen__8 = "')'"+showRtkToken L.Tk__tok__lparen__7 = "'('"+showRtkToken L.Tk__tok__symbol__eql__59 = "'&='"+showRtkToken L.Tk__tok__symbol__symbol__67 = "'&&'"+showRtkToken L.Tk__tok__symbol__69 = "'&'"+showRtkToken L.Tk__tok__symbol__eql__61 = "'%='"+showRtkToken L.Tk__tok__symbol__81 = "'%'"+showRtkToken L.Tk__tok__exclamation__eql__71 = "'!='"+showRtkToken L.Tk__tok__exclamation__85 = "'!'"+showRtkToken (L.Tk__doccomment v) = "doccomment " ++ show v+showRtkToken (L.Tk__id v) = "id " ++ show v+showRtkToken (L.Tk__string v) = "string " ++ show v+showRtkToken (L.Tk__char v) = "char " ++ show v+showRtkToken (L.Tk__floatTypeSuffix v) = "floatTypeSuffix " ++ show v+showRtkToken (L.Tk__exponentPart v) = "exponentPart " ++ show v+showRtkToken (L.Tk__floatLiteral v) = "floatLiteral " ++ show v+showRtkToken (L.Tk__integerLiteral v) = "integerLiteral " ++ show v+showRtkToken (L.Tk__qq_CompoundName v) = "qq_CompoundName " ++ show v+showRtkToken (L.Tk__qq_CompoundNameTail v) = "qq_CompoundNameTail " ++ show v+showRtkToken (L.Tk__qq_Modifier v) = "qq_Modifier " ++ show v+showRtkToken (L.Tk__qq_TypeSpecifier v) = "qq_TypeSpecifier " ++ show v+showRtkToken (L.Tk__qq_Type v) = "qq_Type " ++ show v+showRtkToken (L.Tk__qq_TypeParameter v) = "qq_TypeParameter " ++ show v+showRtkToken (L.Tk__qq_NonEmptyTypeParameters v) = "qq_NonEmptyTypeParameters " ++ show v+showRtkToken (L.Tk__qq_TypeParameters v) = "qq_TypeParameters " ++ show v+showRtkToken (L.Tk__qq_WildcardType v) = "qq_WildcardType " ++ show v+showRtkToken (L.Tk__qq_TypeArgument v) = "qq_TypeArgument " ++ show v+showRtkToken (L.Tk__qq_NonEmptyTypeArguments v) = "qq_NonEmptyTypeArguments " ++ show v+showRtkToken (L.Tk__qq_TypeArguments v) = "qq_TypeArguments " ++ show v+showRtkToken (L.Tk__qq_Arglist v) = "qq_Arglist " ++ show v+showRtkToken (L.Tk__qq_Literal v) = "qq_Literal " ++ show v+showRtkToken (L.Tk__qq_DimExprs v) = "qq_DimExprs " ++ show v+showRtkToken (L.Tk__qq_CreationExpression v) = "qq_CreationExpression " ++ show v+showRtkToken (L.Tk__qq_PostfixOp v) = "qq_PostfixOp " ++ show v+showRtkToken (L.Tk__qq_PrefixOp v) = "qq_PrefixOp " ++ show v+showRtkToken (L.Tk__qq_MultiplicativeOp v) = "qq_MultiplicativeOp " ++ show v+showRtkToken (L.Tk__qq_AdditiveOp v) = "qq_AdditiveOp " ++ show v+showRtkToken (L.Tk__qq_ShiftOp v) = "qq_ShiftOp " ++ show v+showRtkToken (L.Tk__qq_RelationalOp v) = "qq_RelationalOp " ++ show v+showRtkToken (L.Tk__qq_EqualityOp v) = "qq_EqualityOp " ++ show v+showRtkToken (L.Tk__qq_AssignmentOp v) = "qq_AssignmentOp " ++ show v+showRtkToken (L.Tk__qq_LambdaBody v) = "qq_LambdaBody " ++ show v+showRtkToken (L.Tk__qq_Expression v) = "qq_Expression " ++ show v+showRtkToken (L.Tk__qq_SwitchStatement v) = "qq_SwitchStatement " ++ show v+showRtkToken (L.Tk__qq_SwitchCaseList v) = "qq_SwitchCaseList " ++ show v+showRtkToken (L.Tk__qq_Resource v) = "qq_Resource " ++ show v+showRtkToken (L.Tk__qq_ResourceSpec v) = "qq_ResourceSpec " ++ show v+showRtkToken (L.Tk__qq_TryStatement v) = "qq_TryStatement " ++ show v+showRtkToken (L.Tk__qq_OptFinally v) = "qq_OptFinally " ++ show v+showRtkToken (L.Tk__qq_CatchParameter v) = "qq_CatchParameter " ++ show v+showRtkToken (L.Tk__qq_CatchList v) = "qq_CatchList " ++ show v+showRtkToken (L.Tk__qq_ForEachHeader v) = "qq_ForEachHeader " ++ show v+showRtkToken (L.Tk__qq_ForStatement v) = "qq_ForStatement " ++ show v+showRtkToken (L.Tk__qq_WhileStatement v) = "qq_WhileStatement " ++ show v+showRtkToken (L.Tk__qq_DoStatement v) = "qq_DoStatement " ++ show v+showRtkToken (L.Tk__qq_IfStatement v) = "qq_IfStatement " ++ show v+showRtkToken (L.Tk__qq_OptElsePart v) = "qq_OptElsePart " ++ show v+showRtkToken (L.Tk__qq_Statement v) = "qq_Statement " ++ show v+showRtkToken (L.Tk__qq_OptId v) = "qq_OptId " ++ show v+showRtkToken (L.Tk__qq_OptExpression v) = "qq_OptExpression " ++ show v+showRtkToken (L.Tk__qq_StatementList v) = "qq_StatementList " ++ show v+showRtkToken (L.Tk__qq_Parameter v) = "qq_Parameter " ++ show v+showRtkToken (L.Tk__qq_ParamModifierList v) = "qq_ParamModifierList " ++ show v+showRtkToken (L.Tk__qq_ParameterList v) = "qq_ParameterList " ++ show v+showRtkToken (L.Tk__qq_StaticInitializer v) = "qq_StaticInitializer " ++ show v+showRtkToken (L.Tk__qq_ArrayInitializer v) = "qq_ArrayInitializer " ++ show v+showRtkToken (L.Tk__qq_VariableInitializer v) = "qq_VariableInitializer " ++ show v+showRtkToken (L.Tk__qq_VariableInitializerList v) = "qq_VariableInitializerList " ++ show v+showRtkToken (L.Tk__qq_VariableDeclarator v) = "qq_VariableDeclarator " ++ show v+showRtkToken (L.Tk__qq_OptVariableInitializer v) = "qq_OptVariableInitializer " ++ show v+showRtkToken (L.Tk__qq_LocalModifierList1 v) = "qq_LocalModifierList1 " ++ show v+showRtkToken (L.Tk__qq_VariableDeclaration v) = "qq_VariableDeclaration " ++ show v+showRtkToken (L.Tk__qq_VariableDeclaratorList v) = "qq_VariableDeclaratorList " ++ show v+showRtkToken (L.Tk__qq_StatementBlock v) = "qq_StatementBlock " ++ show v+showRtkToken (L.Tk__qq_MoreVariableDeclarators v) = "qq_MoreVariableDeclarators " ++ show v+showRtkToken (L.Tk__qq_MemberRest v) = "qq_MemberRest " ++ show v+showRtkToken (L.Tk__qq_ThrowsClause v) = "qq_ThrowsClause " ++ show v+showRtkToken (L.Tk__qq_MoreTypeSpecifier v) = "qq_MoreTypeSpecifier " ++ show v+showRtkToken (L.Tk__qq_MemberAfterFirstId v) = "qq_MemberAfterFirstId " ++ show v+showRtkToken (L.Tk__qq_PrimitiveTypeKeyword v) = "qq_PrimitiveTypeKeyword " ++ show v+showRtkToken (L.Tk__qq_MemberDeclaration v) = "qq_MemberDeclaration " ++ show v+showRtkToken (L.Tk__qq_NonEmptyDims v) = "qq_NonEmptyDims " ++ show v+showRtkToken (L.Tk__qq_Dims v) = "qq_Dims " ++ show v+showRtkToken (L.Tk__qq_FieldDeclaration v) = "qq_FieldDeclaration " ++ show v+showRtkToken (L.Tk__qq_TypeDeclRest v) = "qq_TypeDeclRest " ++ show v+showRtkToken (L.Tk__qq_EnumDeclaration v) = "qq_EnumDeclaration " ++ show v+showRtkToken (L.Tk__qq_EnumConstantList v) = "qq_EnumConstantList " ++ show v+showRtkToken (L.Tk__qq_EnumConstant v) = "qq_EnumConstant " ++ show v+showRtkToken (L.Tk__qq_AnnotationTypeElement v) = "qq_AnnotationTypeElement " ++ show v+showRtkToken (L.Tk__qq_AnnotationTypeElementList v) = "qq_AnnotationTypeElementList " ++ show v+showRtkToken (L.Tk__qq_AnnotationDeclaration v) = "qq_AnnotationDeclaration " ++ show v+showRtkToken (L.Tk__qq_InterfaceDeclaration v) = "qq_InterfaceDeclaration " ++ show v+showRtkToken (L.Tk__qq_ClassDeclaration v) = "qq_ClassDeclaration " ++ show v+showRtkToken (L.Tk__qq_FieldDeclarationList v) = "qq_FieldDeclarationList " ++ show v+showRtkToken (L.Tk__qq_ImplementsList v) = "qq_ImplementsList " ++ show v+showRtkToken (L.Tk__qq_ExtendsList v) = "qq_ExtendsList " ++ show v+showRtkToken (L.Tk__qq_ClassOrInterfaceType v) = "qq_ClassOrInterfaceType " ++ show v+showRtkToken (L.Tk__qq_ModifierList v) = "qq_ModifierList " ++ show v+showRtkToken (L.Tk__qq_AnnotationList v) = "qq_AnnotationList " ++ show v+showRtkToken (L.Tk__qq_ElementValueArrayInitializer v) = "qq_ElementValueArrayInitializer " ++ show v+showRtkToken (L.Tk__qq_ElementValue v) = "qq_ElementValue " ++ show v+showRtkToken (L.Tk__qq_AnnotationElement v) = "qq_AnnotationElement " ++ show v+showRtkToken (L.Tk__qq_AnnotationArguments v) = "qq_AnnotationArguments " ++ show v+showRtkToken (L.Tk__qq_Annotation v) = "qq_Annotation " ++ show v+showRtkToken (L.Tk__qq_DocComment v) = "qq_DocComment " ++ show v+showRtkToken (L.Tk__qq_ImportHead v) = "qq_ImportHead " ++ show v+showRtkToken (L.Tk__qq_ImportName v) = "qq_ImportName " ++ show v+showRtkToken (L.Tk__qq_ImportStatement v) = "qq_ImportStatement " ++ show v+showRtkToken (L.Tk__qq_Package v) = "qq_Package " ++ show v+showRtkToken (L.Tk__qq_CompilationUnitRest v) = "qq_CompilationUnitRest " ++ show v+showRtkToken (L.Tk__qq_CompilationUnit v) = "qq_CompilationUnit " ++ show v+showRtkToken (L.Tk__qq_ImportList v) = "qq_ImportList " ++ show v+showRtkToken (L.Tk__qq_TypeDeclarationList v) = "qq_TypeDeclarationList " ++ show v+showRtkToken (L.Tk__qq_TypeDeclaration v) = "qq_TypeDeclaration " ++ show v+showRtkToken (L.Tk__qq_OptDocComment v) = "qq_OptDocComment " ++ show v+showRtkToken (L.Tk__qq_Java v) = "qq_Java " ++ show v++-- Source position of a node: every constructor except the Anti_* splice+-- artifacts stores the position of its alternative's first symbol in its+-- first field. Positions are transparent for equality and ordering, so two+-- ASTs that differ only in source positions (e.g. a quasi-quote parsed at+-- compile time vs the same construct parsed at run time) compare equal.+newtype RtkPos = RtkPos L.AlexPosn deriving (Show, Gen.Data, Gen.Typeable)+instance Eq RtkPos where _ == _ = True+instance Ord RtkPos where compare _ _ = EQ++-- The position used where no source token exists: empty productions, empty+-- lists, absent optionals and Anti_* quasi-quote splices+rtkNoPos :: RtkPos+rtkNoPos = RtkPos (L.AlexPn 0 0 0)++class RtkPosOf a where+ rtkPosOf :: a -> RtkPos+instance RtkPosOf L.PosToken where+ rtkPosOf (L.PosToken p _) = RtkPos p+instance RtkPosOf a => RtkPosOf [a] where+ rtkPosOf (x : _) = rtkPosOf x+ rtkPosOf [] = rtkNoPos+instance RtkPosOf a => RtkPosOf (Maybe a) where+ rtkPosOf (Just x) = rtkPosOf x+ rtkPosOf Nothing = rtkNoPos+-- A Char carries no position; this also covers String token payloads+instance RtkPosOf Char where+ rtkPosOf _ = rtkNoPos++-- Recover a token's payload from the whole positioned token: %token+-- bindings keep the L.PosToken so semantic actions can read its position+tkVal_doccomment :: L.PosToken -> String+tkVal_doccomment (L.PosToken _ (L.Tk__doccomment v)) = v+tkVal_doccomment t = error ("rtk internal error: token doccomment expected, got " ++ showRtkToken (L.ptToken t))+tkVal_id :: L.PosToken -> String+tkVal_id (L.PosToken _ (L.Tk__id v)) = v+tkVal_id t = error ("rtk internal error: token id expected, got " ++ showRtkToken (L.ptToken t))+tkVal_string :: L.PosToken -> String+tkVal_string (L.PosToken _ (L.Tk__string v)) = v+tkVal_string t = error ("rtk internal error: token string expected, got " ++ showRtkToken (L.ptToken t))+tkVal_char :: L.PosToken -> String+tkVal_char (L.PosToken _ (L.Tk__char v)) = v+tkVal_char t = error ("rtk internal error: token char expected, got " ++ showRtkToken (L.ptToken t))+tkVal_floatTypeSuffix :: L.PosToken -> String+tkVal_floatTypeSuffix (L.PosToken _ (L.Tk__floatTypeSuffix v)) = v+tkVal_floatTypeSuffix t = error ("rtk internal error: token floatTypeSuffix expected, got " ++ showRtkToken (L.ptToken t))+tkVal_exponentPart :: L.PosToken -> String+tkVal_exponentPart (L.PosToken _ (L.Tk__exponentPart v)) = v+tkVal_exponentPart t = error ("rtk internal error: token exponentPart expected, got " ++ showRtkToken (L.ptToken t))+tkVal_floatLiteral :: L.PosToken -> String+tkVal_floatLiteral (L.PosToken _ (L.Tk__floatLiteral v)) = v+tkVal_floatLiteral t = error ("rtk internal error: token floatLiteral expected, got " ++ showRtkToken (L.ptToken t))+tkVal_integerLiteral :: L.PosToken -> String+tkVal_integerLiteral (L.PosToken _ (L.Tk__integerLiteral v)) = v+tkVal_integerLiteral t = error ("rtk internal error: token integerLiteral expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_CompoundName :: L.PosToken -> String+tkVal_qq_CompoundName (L.PosToken _ (L.Tk__qq_CompoundName v)) = v+tkVal_qq_CompoundName t = error ("rtk internal error: token qq_CompoundName expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_CompoundNameTail :: L.PosToken -> String+tkVal_qq_CompoundNameTail (L.PosToken _ (L.Tk__qq_CompoundNameTail v)) = v+tkVal_qq_CompoundNameTail t = error ("rtk internal error: token qq_CompoundNameTail expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_Modifier :: L.PosToken -> String+tkVal_qq_Modifier (L.PosToken _ (L.Tk__qq_Modifier v)) = v+tkVal_qq_Modifier t = error ("rtk internal error: token qq_Modifier expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_TypeSpecifier :: L.PosToken -> String+tkVal_qq_TypeSpecifier (L.PosToken _ (L.Tk__qq_TypeSpecifier v)) = v+tkVal_qq_TypeSpecifier t = error ("rtk internal error: token qq_TypeSpecifier expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_Type :: L.PosToken -> String+tkVal_qq_Type (L.PosToken _ (L.Tk__qq_Type v)) = v+tkVal_qq_Type t = error ("rtk internal error: token qq_Type expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_TypeParameter :: L.PosToken -> String+tkVal_qq_TypeParameter (L.PosToken _ (L.Tk__qq_TypeParameter v)) = v+tkVal_qq_TypeParameter t = error ("rtk internal error: token qq_TypeParameter expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_NonEmptyTypeParameters :: L.PosToken -> String+tkVal_qq_NonEmptyTypeParameters (L.PosToken _ (L.Tk__qq_NonEmptyTypeParameters v)) = v+tkVal_qq_NonEmptyTypeParameters t = error ("rtk internal error: token qq_NonEmptyTypeParameters expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_TypeParameters :: L.PosToken -> String+tkVal_qq_TypeParameters (L.PosToken _ (L.Tk__qq_TypeParameters v)) = v+tkVal_qq_TypeParameters t = error ("rtk internal error: token qq_TypeParameters expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_WildcardType :: L.PosToken -> String+tkVal_qq_WildcardType (L.PosToken _ (L.Tk__qq_WildcardType v)) = v+tkVal_qq_WildcardType t = error ("rtk internal error: token qq_WildcardType expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_TypeArgument :: L.PosToken -> String+tkVal_qq_TypeArgument (L.PosToken _ (L.Tk__qq_TypeArgument v)) = v+tkVal_qq_TypeArgument t = error ("rtk internal error: token qq_TypeArgument expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_NonEmptyTypeArguments :: L.PosToken -> String+tkVal_qq_NonEmptyTypeArguments (L.PosToken _ (L.Tk__qq_NonEmptyTypeArguments v)) = v+tkVal_qq_NonEmptyTypeArguments t = error ("rtk internal error: token qq_NonEmptyTypeArguments expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_TypeArguments :: L.PosToken -> String+tkVal_qq_TypeArguments (L.PosToken _ (L.Tk__qq_TypeArguments v)) = v+tkVal_qq_TypeArguments t = error ("rtk internal error: token qq_TypeArguments expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_Arglist :: L.PosToken -> String+tkVal_qq_Arglist (L.PosToken _ (L.Tk__qq_Arglist v)) = v+tkVal_qq_Arglist t = error ("rtk internal error: token qq_Arglist expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_Literal :: L.PosToken -> String+tkVal_qq_Literal (L.PosToken _ (L.Tk__qq_Literal v)) = v+tkVal_qq_Literal t = error ("rtk internal error: token qq_Literal expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_DimExprs :: L.PosToken -> String+tkVal_qq_DimExprs (L.PosToken _ (L.Tk__qq_DimExprs v)) = v+tkVal_qq_DimExprs t = error ("rtk internal error: token qq_DimExprs expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_CreationExpression :: L.PosToken -> String+tkVal_qq_CreationExpression (L.PosToken _ (L.Tk__qq_CreationExpression v)) = v+tkVal_qq_CreationExpression t = error ("rtk internal error: token qq_CreationExpression expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_PostfixOp :: L.PosToken -> String+tkVal_qq_PostfixOp (L.PosToken _ (L.Tk__qq_PostfixOp v)) = v+tkVal_qq_PostfixOp t = error ("rtk internal error: token qq_PostfixOp expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_PrefixOp :: L.PosToken -> String+tkVal_qq_PrefixOp (L.PosToken _ (L.Tk__qq_PrefixOp v)) = v+tkVal_qq_PrefixOp t = error ("rtk internal error: token qq_PrefixOp expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_MultiplicativeOp :: L.PosToken -> String+tkVal_qq_MultiplicativeOp (L.PosToken _ (L.Tk__qq_MultiplicativeOp v)) = v+tkVal_qq_MultiplicativeOp t = error ("rtk internal error: token qq_MultiplicativeOp expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_AdditiveOp :: L.PosToken -> String+tkVal_qq_AdditiveOp (L.PosToken _ (L.Tk__qq_AdditiveOp v)) = v+tkVal_qq_AdditiveOp t = error ("rtk internal error: token qq_AdditiveOp expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_ShiftOp :: L.PosToken -> String+tkVal_qq_ShiftOp (L.PosToken _ (L.Tk__qq_ShiftOp v)) = v+tkVal_qq_ShiftOp t = error ("rtk internal error: token qq_ShiftOp expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_RelationalOp :: L.PosToken -> String+tkVal_qq_RelationalOp (L.PosToken _ (L.Tk__qq_RelationalOp v)) = v+tkVal_qq_RelationalOp t = error ("rtk internal error: token qq_RelationalOp expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_EqualityOp :: L.PosToken -> String+tkVal_qq_EqualityOp (L.PosToken _ (L.Tk__qq_EqualityOp v)) = v+tkVal_qq_EqualityOp t = error ("rtk internal error: token qq_EqualityOp expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_AssignmentOp :: L.PosToken -> String+tkVal_qq_AssignmentOp (L.PosToken _ (L.Tk__qq_AssignmentOp v)) = v+tkVal_qq_AssignmentOp t = error ("rtk internal error: token qq_AssignmentOp expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_LambdaBody :: L.PosToken -> String+tkVal_qq_LambdaBody (L.PosToken _ (L.Tk__qq_LambdaBody v)) = v+tkVal_qq_LambdaBody t = error ("rtk internal error: token qq_LambdaBody expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_Expression :: L.PosToken -> String+tkVal_qq_Expression (L.PosToken _ (L.Tk__qq_Expression v)) = v+tkVal_qq_Expression t = error ("rtk internal error: token qq_Expression expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_SwitchStatement :: L.PosToken -> String+tkVal_qq_SwitchStatement (L.PosToken _ (L.Tk__qq_SwitchStatement v)) = v+tkVal_qq_SwitchStatement t = error ("rtk internal error: token qq_SwitchStatement expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_SwitchCaseList :: L.PosToken -> String+tkVal_qq_SwitchCaseList (L.PosToken _ (L.Tk__qq_SwitchCaseList v)) = v+tkVal_qq_SwitchCaseList t = error ("rtk internal error: token qq_SwitchCaseList expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_Resource :: L.PosToken -> String+tkVal_qq_Resource (L.PosToken _ (L.Tk__qq_Resource v)) = v+tkVal_qq_Resource t = error ("rtk internal error: token qq_Resource expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_ResourceSpec :: L.PosToken -> String+tkVal_qq_ResourceSpec (L.PosToken _ (L.Tk__qq_ResourceSpec v)) = v+tkVal_qq_ResourceSpec t = error ("rtk internal error: token qq_ResourceSpec expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_TryStatement :: L.PosToken -> String+tkVal_qq_TryStatement (L.PosToken _ (L.Tk__qq_TryStatement v)) = v+tkVal_qq_TryStatement t = error ("rtk internal error: token qq_TryStatement expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_OptFinally :: L.PosToken -> String+tkVal_qq_OptFinally (L.PosToken _ (L.Tk__qq_OptFinally v)) = v+tkVal_qq_OptFinally t = error ("rtk internal error: token qq_OptFinally expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_CatchParameter :: L.PosToken -> String+tkVal_qq_CatchParameter (L.PosToken _ (L.Tk__qq_CatchParameter v)) = v+tkVal_qq_CatchParameter t = error ("rtk internal error: token qq_CatchParameter expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_CatchList :: L.PosToken -> String+tkVal_qq_CatchList (L.PosToken _ (L.Tk__qq_CatchList v)) = v+tkVal_qq_CatchList t = error ("rtk internal error: token qq_CatchList expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_ForEachHeader :: L.PosToken -> String+tkVal_qq_ForEachHeader (L.PosToken _ (L.Tk__qq_ForEachHeader v)) = v+tkVal_qq_ForEachHeader t = error ("rtk internal error: token qq_ForEachHeader expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_ForStatement :: L.PosToken -> String+tkVal_qq_ForStatement (L.PosToken _ (L.Tk__qq_ForStatement v)) = v+tkVal_qq_ForStatement t = error ("rtk internal error: token qq_ForStatement expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_WhileStatement :: L.PosToken -> String+tkVal_qq_WhileStatement (L.PosToken _ (L.Tk__qq_WhileStatement v)) = v+tkVal_qq_WhileStatement t = error ("rtk internal error: token qq_WhileStatement expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_DoStatement :: L.PosToken -> String+tkVal_qq_DoStatement (L.PosToken _ (L.Tk__qq_DoStatement v)) = v+tkVal_qq_DoStatement t = error ("rtk internal error: token qq_DoStatement expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_IfStatement :: L.PosToken -> String+tkVal_qq_IfStatement (L.PosToken _ (L.Tk__qq_IfStatement v)) = v+tkVal_qq_IfStatement t = error ("rtk internal error: token qq_IfStatement expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_OptElsePart :: L.PosToken -> String+tkVal_qq_OptElsePart (L.PosToken _ (L.Tk__qq_OptElsePart v)) = v+tkVal_qq_OptElsePart t = error ("rtk internal error: token qq_OptElsePart expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_Statement :: L.PosToken -> String+tkVal_qq_Statement (L.PosToken _ (L.Tk__qq_Statement v)) = v+tkVal_qq_Statement t = error ("rtk internal error: token qq_Statement expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_OptId :: L.PosToken -> String+tkVal_qq_OptId (L.PosToken _ (L.Tk__qq_OptId v)) = v+tkVal_qq_OptId t = error ("rtk internal error: token qq_OptId expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_OptExpression :: L.PosToken -> String+tkVal_qq_OptExpression (L.PosToken _ (L.Tk__qq_OptExpression v)) = v+tkVal_qq_OptExpression t = error ("rtk internal error: token qq_OptExpression expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_StatementList :: L.PosToken -> String+tkVal_qq_StatementList (L.PosToken _ (L.Tk__qq_StatementList v)) = v+tkVal_qq_StatementList t = error ("rtk internal error: token qq_StatementList expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_Parameter :: L.PosToken -> String+tkVal_qq_Parameter (L.PosToken _ (L.Tk__qq_Parameter v)) = v+tkVal_qq_Parameter t = error ("rtk internal error: token qq_Parameter expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_ParamModifierList :: L.PosToken -> String+tkVal_qq_ParamModifierList (L.PosToken _ (L.Tk__qq_ParamModifierList v)) = v+tkVal_qq_ParamModifierList t = error ("rtk internal error: token qq_ParamModifierList expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_ParameterList :: L.PosToken -> String+tkVal_qq_ParameterList (L.PosToken _ (L.Tk__qq_ParameterList v)) = v+tkVal_qq_ParameterList t = error ("rtk internal error: token qq_ParameterList expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_StaticInitializer :: L.PosToken -> String+tkVal_qq_StaticInitializer (L.PosToken _ (L.Tk__qq_StaticInitializer v)) = v+tkVal_qq_StaticInitializer t = error ("rtk internal error: token qq_StaticInitializer expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_ArrayInitializer :: L.PosToken -> String+tkVal_qq_ArrayInitializer (L.PosToken _ (L.Tk__qq_ArrayInitializer v)) = v+tkVal_qq_ArrayInitializer t = error ("rtk internal error: token qq_ArrayInitializer expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_VariableInitializer :: L.PosToken -> String+tkVal_qq_VariableInitializer (L.PosToken _ (L.Tk__qq_VariableInitializer v)) = v+tkVal_qq_VariableInitializer t = error ("rtk internal error: token qq_VariableInitializer expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_VariableInitializerList :: L.PosToken -> String+tkVal_qq_VariableInitializerList (L.PosToken _ (L.Tk__qq_VariableInitializerList v)) = v+tkVal_qq_VariableInitializerList t = error ("rtk internal error: token qq_VariableInitializerList expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_VariableDeclarator :: L.PosToken -> String+tkVal_qq_VariableDeclarator (L.PosToken _ (L.Tk__qq_VariableDeclarator v)) = v+tkVal_qq_VariableDeclarator t = error ("rtk internal error: token qq_VariableDeclarator expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_OptVariableInitializer :: L.PosToken -> String+tkVal_qq_OptVariableInitializer (L.PosToken _ (L.Tk__qq_OptVariableInitializer v)) = v+tkVal_qq_OptVariableInitializer t = error ("rtk internal error: token qq_OptVariableInitializer expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_LocalModifierList1 :: L.PosToken -> String+tkVal_qq_LocalModifierList1 (L.PosToken _ (L.Tk__qq_LocalModifierList1 v)) = v+tkVal_qq_LocalModifierList1 t = error ("rtk internal error: token qq_LocalModifierList1 expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_VariableDeclaration :: L.PosToken -> String+tkVal_qq_VariableDeclaration (L.PosToken _ (L.Tk__qq_VariableDeclaration v)) = v+tkVal_qq_VariableDeclaration t = error ("rtk internal error: token qq_VariableDeclaration expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_VariableDeclaratorList :: L.PosToken -> String+tkVal_qq_VariableDeclaratorList (L.PosToken _ (L.Tk__qq_VariableDeclaratorList v)) = v+tkVal_qq_VariableDeclaratorList t = error ("rtk internal error: token qq_VariableDeclaratorList expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_StatementBlock :: L.PosToken -> String+tkVal_qq_StatementBlock (L.PosToken _ (L.Tk__qq_StatementBlock v)) = v+tkVal_qq_StatementBlock t = error ("rtk internal error: token qq_StatementBlock expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_MoreVariableDeclarators :: L.PosToken -> String+tkVal_qq_MoreVariableDeclarators (L.PosToken _ (L.Tk__qq_MoreVariableDeclarators v)) = v+tkVal_qq_MoreVariableDeclarators t = error ("rtk internal error: token qq_MoreVariableDeclarators expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_MemberRest :: L.PosToken -> String+tkVal_qq_MemberRest (L.PosToken _ (L.Tk__qq_MemberRest v)) = v+tkVal_qq_MemberRest t = error ("rtk internal error: token qq_MemberRest expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_ThrowsClause :: L.PosToken -> String+tkVal_qq_ThrowsClause (L.PosToken _ (L.Tk__qq_ThrowsClause v)) = v+tkVal_qq_ThrowsClause t = error ("rtk internal error: token qq_ThrowsClause expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_MoreTypeSpecifier :: L.PosToken -> String+tkVal_qq_MoreTypeSpecifier (L.PosToken _ (L.Tk__qq_MoreTypeSpecifier v)) = v+tkVal_qq_MoreTypeSpecifier t = error ("rtk internal error: token qq_MoreTypeSpecifier expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_MemberAfterFirstId :: L.PosToken -> String+tkVal_qq_MemberAfterFirstId (L.PosToken _ (L.Tk__qq_MemberAfterFirstId v)) = v+tkVal_qq_MemberAfterFirstId t = error ("rtk internal error: token qq_MemberAfterFirstId expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_PrimitiveTypeKeyword :: L.PosToken -> String+tkVal_qq_PrimitiveTypeKeyword (L.PosToken _ (L.Tk__qq_PrimitiveTypeKeyword v)) = v+tkVal_qq_PrimitiveTypeKeyword t = error ("rtk internal error: token qq_PrimitiveTypeKeyword expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_MemberDeclaration :: L.PosToken -> String+tkVal_qq_MemberDeclaration (L.PosToken _ (L.Tk__qq_MemberDeclaration v)) = v+tkVal_qq_MemberDeclaration t = error ("rtk internal error: token qq_MemberDeclaration expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_NonEmptyDims :: L.PosToken -> String+tkVal_qq_NonEmptyDims (L.PosToken _ (L.Tk__qq_NonEmptyDims v)) = v+tkVal_qq_NonEmptyDims t = error ("rtk internal error: token qq_NonEmptyDims expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_Dims :: L.PosToken -> String+tkVal_qq_Dims (L.PosToken _ (L.Tk__qq_Dims v)) = v+tkVal_qq_Dims t = error ("rtk internal error: token qq_Dims expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_FieldDeclaration :: L.PosToken -> String+tkVal_qq_FieldDeclaration (L.PosToken _ (L.Tk__qq_FieldDeclaration v)) = v+tkVal_qq_FieldDeclaration t = error ("rtk internal error: token qq_FieldDeclaration expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_TypeDeclRest :: L.PosToken -> String+tkVal_qq_TypeDeclRest (L.PosToken _ (L.Tk__qq_TypeDeclRest v)) = v+tkVal_qq_TypeDeclRest t = error ("rtk internal error: token qq_TypeDeclRest expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_EnumDeclaration :: L.PosToken -> String+tkVal_qq_EnumDeclaration (L.PosToken _ (L.Tk__qq_EnumDeclaration v)) = v+tkVal_qq_EnumDeclaration t = error ("rtk internal error: token qq_EnumDeclaration expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_EnumConstantList :: L.PosToken -> String+tkVal_qq_EnumConstantList (L.PosToken _ (L.Tk__qq_EnumConstantList v)) = v+tkVal_qq_EnumConstantList t = error ("rtk internal error: token qq_EnumConstantList expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_EnumConstant :: L.PosToken -> String+tkVal_qq_EnumConstant (L.PosToken _ (L.Tk__qq_EnumConstant v)) = v+tkVal_qq_EnumConstant t = error ("rtk internal error: token qq_EnumConstant expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_AnnotationTypeElement :: L.PosToken -> String+tkVal_qq_AnnotationTypeElement (L.PosToken _ (L.Tk__qq_AnnotationTypeElement v)) = v+tkVal_qq_AnnotationTypeElement t = error ("rtk internal error: token qq_AnnotationTypeElement expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_AnnotationTypeElementList :: L.PosToken -> String+tkVal_qq_AnnotationTypeElementList (L.PosToken _ (L.Tk__qq_AnnotationTypeElementList v)) = v+tkVal_qq_AnnotationTypeElementList t = error ("rtk internal error: token qq_AnnotationTypeElementList expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_AnnotationDeclaration :: L.PosToken -> String+tkVal_qq_AnnotationDeclaration (L.PosToken _ (L.Tk__qq_AnnotationDeclaration v)) = v+tkVal_qq_AnnotationDeclaration t = error ("rtk internal error: token qq_AnnotationDeclaration expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_InterfaceDeclaration :: L.PosToken -> String+tkVal_qq_InterfaceDeclaration (L.PosToken _ (L.Tk__qq_InterfaceDeclaration v)) = v+tkVal_qq_InterfaceDeclaration t = error ("rtk internal error: token qq_InterfaceDeclaration expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_ClassDeclaration :: L.PosToken -> String+tkVal_qq_ClassDeclaration (L.PosToken _ (L.Tk__qq_ClassDeclaration v)) = v+tkVal_qq_ClassDeclaration t = error ("rtk internal error: token qq_ClassDeclaration expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_FieldDeclarationList :: L.PosToken -> String+tkVal_qq_FieldDeclarationList (L.PosToken _ (L.Tk__qq_FieldDeclarationList v)) = v+tkVal_qq_FieldDeclarationList t = error ("rtk internal error: token qq_FieldDeclarationList expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_ImplementsList :: L.PosToken -> String+tkVal_qq_ImplementsList (L.PosToken _ (L.Tk__qq_ImplementsList v)) = v+tkVal_qq_ImplementsList t = error ("rtk internal error: token qq_ImplementsList expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_ExtendsList :: L.PosToken -> String+tkVal_qq_ExtendsList (L.PosToken _ (L.Tk__qq_ExtendsList v)) = v+tkVal_qq_ExtendsList t = error ("rtk internal error: token qq_ExtendsList expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_ClassOrInterfaceType :: L.PosToken -> String+tkVal_qq_ClassOrInterfaceType (L.PosToken _ (L.Tk__qq_ClassOrInterfaceType v)) = v+tkVal_qq_ClassOrInterfaceType t = error ("rtk internal error: token qq_ClassOrInterfaceType expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_ModifierList :: L.PosToken -> String+tkVal_qq_ModifierList (L.PosToken _ (L.Tk__qq_ModifierList v)) = v+tkVal_qq_ModifierList t = error ("rtk internal error: token qq_ModifierList expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_AnnotationList :: L.PosToken -> String+tkVal_qq_AnnotationList (L.PosToken _ (L.Tk__qq_AnnotationList v)) = v+tkVal_qq_AnnotationList t = error ("rtk internal error: token qq_AnnotationList expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_ElementValueArrayInitializer :: L.PosToken -> String+tkVal_qq_ElementValueArrayInitializer (L.PosToken _ (L.Tk__qq_ElementValueArrayInitializer v)) = v+tkVal_qq_ElementValueArrayInitializer t = error ("rtk internal error: token qq_ElementValueArrayInitializer expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_ElementValue :: L.PosToken -> String+tkVal_qq_ElementValue (L.PosToken _ (L.Tk__qq_ElementValue v)) = v+tkVal_qq_ElementValue t = error ("rtk internal error: token qq_ElementValue expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_AnnotationElement :: L.PosToken -> String+tkVal_qq_AnnotationElement (L.PosToken _ (L.Tk__qq_AnnotationElement v)) = v+tkVal_qq_AnnotationElement t = error ("rtk internal error: token qq_AnnotationElement expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_AnnotationArguments :: L.PosToken -> String+tkVal_qq_AnnotationArguments (L.PosToken _ (L.Tk__qq_AnnotationArguments v)) = v+tkVal_qq_AnnotationArguments t = error ("rtk internal error: token qq_AnnotationArguments expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_Annotation :: L.PosToken -> String+tkVal_qq_Annotation (L.PosToken _ (L.Tk__qq_Annotation v)) = v+tkVal_qq_Annotation t = error ("rtk internal error: token qq_Annotation expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_DocComment :: L.PosToken -> String+tkVal_qq_DocComment (L.PosToken _ (L.Tk__qq_DocComment v)) = v+tkVal_qq_DocComment t = error ("rtk internal error: token qq_DocComment expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_ImportHead :: L.PosToken -> String+tkVal_qq_ImportHead (L.PosToken _ (L.Tk__qq_ImportHead v)) = v+tkVal_qq_ImportHead t = error ("rtk internal error: token qq_ImportHead expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_ImportName :: L.PosToken -> String+tkVal_qq_ImportName (L.PosToken _ (L.Tk__qq_ImportName v)) = v+tkVal_qq_ImportName t = error ("rtk internal error: token qq_ImportName expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_ImportStatement :: L.PosToken -> String+tkVal_qq_ImportStatement (L.PosToken _ (L.Tk__qq_ImportStatement v)) = v+tkVal_qq_ImportStatement t = error ("rtk internal error: token qq_ImportStatement expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_Package :: L.PosToken -> String+tkVal_qq_Package (L.PosToken _ (L.Tk__qq_Package v)) = v+tkVal_qq_Package t = error ("rtk internal error: token qq_Package expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_CompilationUnitRest :: L.PosToken -> String+tkVal_qq_CompilationUnitRest (L.PosToken _ (L.Tk__qq_CompilationUnitRest v)) = v+tkVal_qq_CompilationUnitRest t = error ("rtk internal error: token qq_CompilationUnitRest expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_CompilationUnit :: L.PosToken -> String+tkVal_qq_CompilationUnit (L.PosToken _ (L.Tk__qq_CompilationUnit v)) = v+tkVal_qq_CompilationUnit t = error ("rtk internal error: token qq_CompilationUnit expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_ImportList :: L.PosToken -> String+tkVal_qq_ImportList (L.PosToken _ (L.Tk__qq_ImportList v)) = v+tkVal_qq_ImportList t = error ("rtk internal error: token qq_ImportList expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_TypeDeclarationList :: L.PosToken -> String+tkVal_qq_TypeDeclarationList (L.PosToken _ (L.Tk__qq_TypeDeclarationList v)) = v+tkVal_qq_TypeDeclarationList t = error ("rtk internal error: token qq_TypeDeclarationList expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_TypeDeclaration :: L.PosToken -> String+tkVal_qq_TypeDeclaration (L.PosToken _ (L.Tk__qq_TypeDeclaration v)) = v+tkVal_qq_TypeDeclaration t = error ("rtk internal error: token qq_TypeDeclaration expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_OptDocComment :: L.PosToken -> String+tkVal_qq_OptDocComment (L.PosToken _ (L.Tk__qq_OptDocComment v)) = v+tkVal_qq_OptDocComment t = error ("rtk internal error: token qq_OptDocComment expected, got " ++ showRtkToken (L.ptToken t))+tkVal_qq_Java :: L.PosToken -> String+tkVal_qq_Java (L.PosToken _ (L.Tk__qq_Java v)) = v+tkVal_qq_Java t = error ("rtk internal error: token qq_Java expected, got " ++ showRtkToken (L.ptToken t))++data Java = Ctr__Java__0 RtkPos Java |+ Ctr__Java__1 RtkPos AdditiveOp |+ Ctr__Java__2 RtkPos Annotation |+ Ctr__Java__3 RtkPos AnnotationArguments |+ Ctr__Java__4 RtkPos AnnotationDeclaration |+ Ctr__Java__5 RtkPos AnnotationElement |+ Ctr__Java__6 RtkPos AnnotationList |+ Ctr__Java__7 RtkPos AnnotationTypeElement |+ Ctr__Java__8 RtkPos AnnotationTypeElementList |+ Ctr__Java__9 RtkPos Arglist |+ Ctr__Java__10 RtkPos ArrayInitializer |+ Ctr__Java__11 RtkPos AssignmentOp |+ Ctr__Java__12 RtkPos CatchList |+ Ctr__Java__13 RtkPos CatchParameter |+ Ctr__Java__14 RtkPos ClassDeclaration |+ Ctr__Java__15 RtkPos ClassOrInterfaceType |+ Ctr__Java__16 RtkPos CompilationUnit |+ Ctr__Java__17 RtkPos CompilationUnitRest |+ Ctr__Java__18 RtkPos CompoundName |+ Ctr__Java__19 RtkPos CompoundNameTail |+ Ctr__Java__20 RtkPos CreationExpression |+ Ctr__Java__21 RtkPos DimExprs |+ Ctr__Java__22 RtkPos Dims |+ Ctr__Java__23 RtkPos DoStatement |+ Ctr__Java__24 RtkPos DocComment |+ Ctr__Java__25 RtkPos ElementValue |+ Ctr__Java__26 RtkPos ElementValueArrayInitializer |+ Ctr__Java__27 RtkPos EnumConstant |+ Ctr__Java__28 RtkPos EnumConstantList |+ Ctr__Java__29 RtkPos EnumDeclaration |+ Ctr__Java__30 RtkPos EqualityOp |+ Ctr__Java__31 RtkPos Expression |+ Ctr__Java__32 RtkPos ExtendsList |+ Ctr__Java__33 RtkPos FieldDeclaration |+ Ctr__Java__34 RtkPos FieldDeclarationList |+ Ctr__Java__35 RtkPos ForEachHeader |+ Ctr__Java__36 RtkPos ForStatement |+ Ctr__Java__37 RtkPos IfStatement |+ Ctr__Java__38 RtkPos ImplementsList |+ Ctr__Java__39 RtkPos ImportHead |+ Ctr__Java__40 RtkPos ImportList |+ Ctr__Java__41 RtkPos ImportName |+ Ctr__Java__42 RtkPos ImportStatement |+ Ctr__Java__43 RtkPos InterfaceDeclaration |+ Ctr__Java__44 RtkPos LambdaBody |+ Ctr__Java__45 RtkPos Literal |+ Ctr__Java__46 RtkPos LocalModifierList1 |+ Ctr__Java__47 RtkPos MemberAfterFirstId |+ Ctr__Java__48 RtkPos MemberDeclaration |+ Ctr__Java__49 RtkPos MemberRest |+ Ctr__Java__50 RtkPos Modifier |+ Ctr__Java__51 RtkPos ModifierList |+ Ctr__Java__52 RtkPos MoreTypeSpecifier |+ Ctr__Java__53 RtkPos MoreVariableDeclarators |+ Ctr__Java__54 RtkPos MultiplicativeOp |+ Ctr__Java__55 RtkPos NonEmptyDims |+ Ctr__Java__56 RtkPos NonEmptyTypeArguments |+ Ctr__Java__57 RtkPos NonEmptyTypeParameters |+ Ctr__Java__58 RtkPos OptDocComment |+ Ctr__Java__59 RtkPos OptElsePart |+ Ctr__Java__60 RtkPos OptExpression |+ Ctr__Java__61 RtkPos OptFinally |+ Ctr__Java__62 RtkPos OptId |+ Ctr__Java__63 RtkPos OptVariableInitializer |+ Ctr__Java__64 RtkPos Package |+ Ctr__Java__65 RtkPos ParamModifierList |+ Ctr__Java__66 RtkPos Parameter |+ Ctr__Java__67 RtkPos ParameterList |+ Ctr__Java__68 RtkPos PostfixOp |+ Ctr__Java__69 RtkPos PrefixOp |+ Ctr__Java__70 RtkPos PrimitiveTypeKeyword |+ Ctr__Java__71 RtkPos RelationalOp |+ Ctr__Java__72 RtkPos Resource |+ Ctr__Java__73 RtkPos ResourceSpec |+ Ctr__Java__74 RtkPos ShiftOp |+ Ctr__Java__75 RtkPos Statement |+ Ctr__Java__76 RtkPos StatementBlock |+ Ctr__Java__77 RtkPos StatementList |+ Ctr__Java__78 RtkPos StaticInitializer |+ Ctr__Java__79 RtkPos SwitchCaseList |+ Ctr__Java__80 RtkPos SwitchStatement |+ Ctr__Java__81 RtkPos ThrowsClause |+ Ctr__Java__82 RtkPos TryStatement |+ Ctr__Java__83 RtkPos Type |+ Ctr__Java__84 RtkPos TypeArgument |+ Ctr__Java__85 RtkPos TypeArguments |+ Ctr__Java__86 RtkPos TypeDeclRest |+ Ctr__Java__87 RtkPos TypeDeclaration |+ Ctr__Java__88 RtkPos TypeDeclarationList |+ Ctr__Java__89 RtkPos TypeParameter |+ Ctr__Java__90 RtkPos TypeParameters |+ Ctr__Java__91 RtkPos TypeSpecifier |+ Ctr__Java__92 RtkPos VariableDeclaration |+ Ctr__Java__93 RtkPos VariableDeclarator |+ Ctr__Java__94 RtkPos VariableDeclaratorList |+ Ctr__Java__95 RtkPos VariableInitializer |+ Ctr__Java__96 RtkPos VariableInitializerList |+ Ctr__Java__97 RtkPos WhileStatement |+ Ctr__Java__98 RtkPos WildcardType |+ Anti_Java String |+ Ctr__Java__99 RtkPos CompilationUnit+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Java where+ rtkPosOf (Ctr__Java__0 p _) = p+ rtkPosOf (Ctr__Java__1 p _) = p+ rtkPosOf (Ctr__Java__2 p _) = p+ rtkPosOf (Ctr__Java__3 p _) = p+ rtkPosOf (Ctr__Java__4 p _) = p+ rtkPosOf (Ctr__Java__5 p _) = p+ rtkPosOf (Ctr__Java__6 p _) = p+ rtkPosOf (Ctr__Java__7 p _) = p+ rtkPosOf (Ctr__Java__8 p _) = p+ rtkPosOf (Ctr__Java__9 p _) = p+ rtkPosOf (Ctr__Java__10 p _) = p+ rtkPosOf (Ctr__Java__11 p _) = p+ rtkPosOf (Ctr__Java__12 p _) = p+ rtkPosOf (Ctr__Java__13 p _) = p+ rtkPosOf (Ctr__Java__14 p _) = p+ rtkPosOf (Ctr__Java__15 p _) = p+ rtkPosOf (Ctr__Java__16 p _) = p+ rtkPosOf (Ctr__Java__17 p _) = p+ rtkPosOf (Ctr__Java__18 p _) = p+ rtkPosOf (Ctr__Java__19 p _) = p+ rtkPosOf (Ctr__Java__20 p _) = p+ rtkPosOf (Ctr__Java__21 p _) = p+ rtkPosOf (Ctr__Java__22 p _) = p+ rtkPosOf (Ctr__Java__23 p _) = p+ rtkPosOf (Ctr__Java__24 p _) = p+ rtkPosOf (Ctr__Java__25 p _) = p+ rtkPosOf (Ctr__Java__26 p _) = p+ rtkPosOf (Ctr__Java__27 p _) = p+ rtkPosOf (Ctr__Java__28 p _) = p+ rtkPosOf (Ctr__Java__29 p _) = p+ rtkPosOf (Ctr__Java__30 p _) = p+ rtkPosOf (Ctr__Java__31 p _) = p+ rtkPosOf (Ctr__Java__32 p _) = p+ rtkPosOf (Ctr__Java__33 p _) = p+ rtkPosOf (Ctr__Java__34 p _) = p+ rtkPosOf (Ctr__Java__35 p _) = p+ rtkPosOf (Ctr__Java__36 p _) = p+ rtkPosOf (Ctr__Java__37 p _) = p+ rtkPosOf (Ctr__Java__38 p _) = p+ rtkPosOf (Ctr__Java__39 p _) = p+ rtkPosOf (Ctr__Java__40 p _) = p+ rtkPosOf (Ctr__Java__41 p _) = p+ rtkPosOf (Ctr__Java__42 p _) = p+ rtkPosOf (Ctr__Java__43 p _) = p+ rtkPosOf (Ctr__Java__44 p _) = p+ rtkPosOf (Ctr__Java__45 p _) = p+ rtkPosOf (Ctr__Java__46 p _) = p+ rtkPosOf (Ctr__Java__47 p _) = p+ rtkPosOf (Ctr__Java__48 p _) = p+ rtkPosOf (Ctr__Java__49 p _) = p+ rtkPosOf (Ctr__Java__50 p _) = p+ rtkPosOf (Ctr__Java__51 p _) = p+ rtkPosOf (Ctr__Java__52 p _) = p+ rtkPosOf (Ctr__Java__53 p _) = p+ rtkPosOf (Ctr__Java__54 p _) = p+ rtkPosOf (Ctr__Java__55 p _) = p+ rtkPosOf (Ctr__Java__56 p _) = p+ rtkPosOf (Ctr__Java__57 p _) = p+ rtkPosOf (Ctr__Java__58 p _) = p+ rtkPosOf (Ctr__Java__59 p _) = p+ rtkPosOf (Ctr__Java__60 p _) = p+ rtkPosOf (Ctr__Java__61 p _) = p+ rtkPosOf (Ctr__Java__62 p _) = p+ rtkPosOf (Ctr__Java__63 p _) = p+ rtkPosOf (Ctr__Java__64 p _) = p+ rtkPosOf (Ctr__Java__65 p _) = p+ rtkPosOf (Ctr__Java__66 p _) = p+ rtkPosOf (Ctr__Java__67 p _) = p+ rtkPosOf (Ctr__Java__68 p _) = p+ rtkPosOf (Ctr__Java__69 p _) = p+ rtkPosOf (Ctr__Java__70 p _) = p+ rtkPosOf (Ctr__Java__71 p _) = p+ rtkPosOf (Ctr__Java__72 p _) = p+ rtkPosOf (Ctr__Java__73 p _) = p+ rtkPosOf (Ctr__Java__74 p _) = p+ rtkPosOf (Ctr__Java__75 p _) = p+ rtkPosOf (Ctr__Java__76 p _) = p+ rtkPosOf (Ctr__Java__77 p _) = p+ rtkPosOf (Ctr__Java__78 p _) = p+ rtkPosOf (Ctr__Java__79 p _) = p+ rtkPosOf (Ctr__Java__80 p _) = p+ rtkPosOf (Ctr__Java__81 p _) = p+ rtkPosOf (Ctr__Java__82 p _) = p+ rtkPosOf (Ctr__Java__83 p _) = p+ rtkPosOf (Ctr__Java__84 p _) = p+ rtkPosOf (Ctr__Java__85 p _) = p+ rtkPosOf (Ctr__Java__86 p _) = p+ rtkPosOf (Ctr__Java__87 p _) = p+ rtkPosOf (Ctr__Java__88 p _) = p+ rtkPosOf (Ctr__Java__89 p _) = p+ rtkPosOf (Ctr__Java__90 p _) = p+ rtkPosOf (Ctr__Java__91 p _) = p+ rtkPosOf (Ctr__Java__92 p _) = p+ rtkPosOf (Ctr__Java__93 p _) = p+ rtkPosOf (Ctr__Java__94 p _) = p+ rtkPosOf (Ctr__Java__95 p _) = p+ rtkPosOf (Ctr__Java__96 p _) = p+ rtkPosOf (Ctr__Java__97 p _) = p+ rtkPosOf (Ctr__Java__98 p _) = p+ rtkPosOf (Anti_Java _) = rtkNoPos+ rtkPosOf (Ctr__Java__99 p _) = p+data AdditiveOp = Anti_AdditiveOp String |+ Ctr__AdditiveOp__0 RtkPos |+ Ctr__AdditiveOp__1 RtkPos+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf AdditiveOp where+ rtkPosOf (Anti_AdditiveOp _) = rtkNoPos+ rtkPosOf (Ctr__AdditiveOp__0 p) = p+ rtkPosOf (Ctr__AdditiveOp__1 p) = p+data Annotation = Anti_Annotation String |+ Ctr__Annotation__1 RtkPos CompoundName Rule_4+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Annotation where+ rtkPosOf (Anti_Annotation _) = rtkNoPos+ rtkPosOf (Ctr__Annotation__1 p _ _) = p+data AnnotationArguments = Anti_AnnotationArguments String |+ Ctr__AnnotationArguments__0 RtkPos AnnotationElement Rule_7+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf AnnotationArguments where+ rtkPosOf (Anti_AnnotationArguments _) = rtkNoPos+ rtkPosOf (Ctr__AnnotationArguments__0 p _ _) = p+data AnnotationDeclaration = Anti_AnnotationDeclaration String |+ Ctr__AnnotationDeclaration__0 RtkPos String AnnotationTypeElementList+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf AnnotationDeclaration where+ rtkPosOf (Anti_AnnotationDeclaration _) = rtkNoPos+ rtkPosOf (Ctr__AnnotationDeclaration__0 p _ _) = p+data AnnotationElement = Anti_AnnotationElement String |+ Ctr__AnnotationElement__0 RtkPos String ElementValue |+ Ctr__AnnotationElement__1 RtkPos ElementValue+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf AnnotationElement where+ rtkPosOf (Anti_AnnotationElement _) = rtkNoPos+ rtkPosOf (Ctr__AnnotationElement__0 p _ _) = p+ rtkPosOf (Ctr__AnnotationElement__1 p _) = p+type AnnotationList = [Annotation]+data AnnotationTypeElement = Anti_AnnotationTypeElement String |+ Ctr__AnnotationTypeElement__0 RtkPos FieldDeclaration+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf AnnotationTypeElement where+ rtkPosOf (Anti_AnnotationTypeElement _) = rtkNoPos+ rtkPosOf (Ctr__AnnotationTypeElement__0 p _) = p+type AnnotationTypeElementList = [AnnotationTypeElement]+data Arglist = Anti_Arglist String |+ Ctr__Arglist__0 RtkPos |+ Ctr__Arglist__1 RtkPos Rule_95+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Arglist where+ rtkPosOf (Anti_Arglist _) = rtkNoPos+ rtkPosOf (Ctr__Arglist__0 p) = p+ rtkPosOf (Ctr__Arglist__1 p _) = p+data ArrayInitializer = Anti_ArrayInitializer String |+ Ctr__ArrayInitializer__0 RtkPos VariableInitializerList+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf ArrayInitializer where+ rtkPosOf (Anti_ArrayInitializer _) = rtkNoPos+ rtkPosOf (Ctr__ArrayInitializer__0 p _) = p+data AssignmentOp = Anti_AssignmentOp String |+ Ctr__AssignmentOp__0 RtkPos |+ Ctr__AssignmentOp__1 RtkPos |+ Ctr__AssignmentOp__2 RtkPos |+ Ctr__AssignmentOp__3 RtkPos |+ Ctr__AssignmentOp__4 RtkPos |+ Ctr__AssignmentOp__5 RtkPos |+ Ctr__AssignmentOp__6 RtkPos |+ Ctr__AssignmentOp__7 RtkPos |+ Ctr__AssignmentOp__8 RtkPos |+ Ctr__AssignmentOp__9 RtkPos |+ Ctr__AssignmentOp__10 RtkPos |+ Ctr__AssignmentOp__11 RtkPos+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf AssignmentOp where+ rtkPosOf (Anti_AssignmentOp _) = rtkNoPos+ rtkPosOf (Ctr__AssignmentOp__0 p) = p+ rtkPosOf (Ctr__AssignmentOp__1 p) = p+ rtkPosOf (Ctr__AssignmentOp__2 p) = p+ rtkPosOf (Ctr__AssignmentOp__3 p) = p+ rtkPosOf (Ctr__AssignmentOp__4 p) = p+ rtkPosOf (Ctr__AssignmentOp__5 p) = p+ rtkPosOf (Ctr__AssignmentOp__6 p) = p+ rtkPosOf (Ctr__AssignmentOp__7 p) = p+ rtkPosOf (Ctr__AssignmentOp__8 p) = p+ rtkPosOf (Ctr__AssignmentOp__9 p) = p+ rtkPosOf (Ctr__AssignmentOp__10 p) = p+ rtkPosOf (Ctr__AssignmentOp__11 p) = p+type CatchList = [Rule_70]+data CatchParameter = Anti_CatchParameter String |+ Ctr__CatchParameter__0 RtkPos ParamModifierList Type Rule_72 String+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf CatchParameter where+ rtkPosOf (Anti_CatchParameter _) = rtkNoPos+ rtkPosOf (Ctr__CatchParameter__0 p _ _ _ _) = p+data ClassDeclaration = Anti_ClassDeclaration String |+ Ctr__ClassDeclaration__0 RtkPos String TypeParameters Rule_21 Rule_22 FieldDeclarationList+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf ClassDeclaration where+ rtkPosOf (Anti_ClassDeclaration _) = rtkNoPos+ rtkPosOf (Ctr__ClassDeclaration__0 p _ _ _ _ _) = p+data ClassOrInterfaceType = Anti_ClassOrInterfaceType String |+ Ctr__ClassOrInterfaceType__0 RtkPos CompoundName TypeArguments+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf ClassOrInterfaceType where+ rtkPosOf (Anti_ClassOrInterfaceType _) = rtkNoPos+ rtkPosOf (Ctr__ClassOrInterfaceType__0 p _ _) = p+data CompilationUnit = Anti_CompilationUnit String |+ Ctr__CompilationUnit__0 RtkPos OptDocComment ModifierList Rule_2+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf CompilationUnit where+ rtkPosOf (Anti_CompilationUnit _) = rtkNoPos+ rtkPosOf (Ctr__CompilationUnit__0 p _ _ _) = p+data CompilationUnitRest = Anti_CompilationUnitRest String |+ UnitPackageFirst RtkPos Package ImportList TypeDeclarationList |+ UnitImportsFirst RtkPos ImportStatement ImportList TypeDeclarationList |+ UnitTypeFirst RtkPos TypeDeclRest TypeDeclarationList+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf CompilationUnitRest where+ rtkPosOf (Anti_CompilationUnitRest _) = rtkNoPos+ rtkPosOf (UnitPackageFirst p _ _ _) = p+ rtkPosOf (UnitImportsFirst p _ _ _) = p+ rtkPosOf (UnitTypeFirst p _ _) = p+data CompoundName = Anti_CompoundName String |+ Ctr__CompoundName__0 RtkPos String CompoundNameTail+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf CompoundName where+ rtkPosOf (Anti_CompoundName _) = rtkNoPos+ rtkPosOf (Ctr__CompoundName__0 p _ _) = p+type CompoundNameTail = [Rule_106]+data CreationExpression = Anti_CreationExpression String |+ Ctr__CreationExpression__0 RtkPos TypeSpecifier Rule_89+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf CreationExpression where+ rtkPosOf (Anti_CreationExpression _) = rtkNoPos+ rtkPosOf (Ctr__CreationExpression__0 p _ _) = p+type DimExprs = [Rule_93]+type Dims = [Rule_36]+data DoStatement = Anti_DoStatement String |+ Ctr__DoStatement__0 RtkPos Statement Expression+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf DoStatement where+ rtkPosOf (Anti_DoStatement _) = rtkNoPos+ rtkPosOf (Ctr__DoStatement__0 p _ _) = p+data DocComment = Anti_DocComment String |+ Ctr__DocComment__0 RtkPos String+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf DocComment where+ rtkPosOf (Anti_DocComment _) = rtkNoPos+ rtkPosOf (Ctr__DocComment__0 p _) = p+data ElementValue = Anti_ElementValue String |+ Ctr__ElementValue__0 RtkPos Expression |+ Ctr__ElementValue__1 RtkPos Annotation |+ Ctr__ElementValue__2 RtkPos ElementValueArrayInitializer+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf ElementValue where+ rtkPosOf (Anti_ElementValue _) = rtkNoPos+ rtkPosOf (Ctr__ElementValue__0 p _) = p+ rtkPosOf (Ctr__ElementValue__1 p _) = p+ rtkPosOf (Ctr__ElementValue__2 p _) = p+data ElementValueArrayInitializer = Anti_ElementValueArrayInitializer String |+ Ctr__ElementValueArrayInitializer__0 RtkPos Rule_9+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf ElementValueArrayInitializer where+ rtkPosOf (Anti_ElementValueArrayInitializer _) = rtkNoPos+ rtkPosOf (Ctr__ElementValueArrayInitializer__0 p _) = p+data EnumConstant = Anti_EnumConstant String |+ Ctr__EnumConstant__0 RtkPos OptDocComment AnnotationList String Rule_25 Rule_27+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf EnumConstant where+ rtkPosOf (Anti_EnumConstant _) = rtkNoPos+ rtkPosOf (Ctr__EnumConstant__0 p _ _ _ _ _) = p+data EnumConstantList = Anti_EnumConstantList String |+ Ctr__EnumConstantList__0 RtkPos EnumConstant Rule_29 Rule_31+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf EnumConstantList where+ rtkPosOf (Anti_EnumConstantList _) = rtkNoPos+ rtkPosOf (Ctr__EnumConstantList__0 p _ _ _) = p+data EnumDeclaration = Anti_EnumDeclaration String |+ Ctr__EnumDeclaration__0 RtkPos String Rule_32 EnumConstantList Rule_33+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf EnumDeclaration where+ rtkPosOf (Anti_EnumDeclaration _) = rtkNoPos+ rtkPosOf (Ctr__EnumDeclaration__0 p _ _ _ _) = p+data EqualityOp = Anti_EqualityOp String |+ Ctr__EqualityOp__0 RtkPos |+ Ctr__EqualityOp__1 RtkPos+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf EqualityOp where+ rtkPosOf (Anti_EqualityOp _) = rtkNoPos+ rtkPosOf (Ctr__EqualityOp__0 p) = p+ rtkPosOf (Ctr__EqualityOp__1 p) = p+data Expression = Anti_Expression String |+ Ctr__Expression__0 RtkPos Literal |+ Ctr__Expression__1 RtkPos |+ Ctr__Expression__2 RtkPos Expression |+ Ctr__Expression__3 RtkPos CreationExpression |+ Ctr__Expression__4 RtkPos CompoundName Rule_85 |+ Ctr__Expression__5 RtkPos CompoundName Expression |+ Ctr__Expression__6 RtkPos String Rule_87 |+ Ctr__Expression__7 RtkPos String CompoundNameTail |+ Ctr__Expression__8 RtkPos String CompoundNameTail |+ Ctr__Expression__9 RtkPos String CompoundNameTail NonEmptyTypeArguments String Arglist |+ Ctr__Expression__10 RtkPos PrimitiveTypeKeyword |+ Ctr__Expression__11 RtkPos Expression |+ Ctr__Expression__12 RtkPos Expression PostfixOp |+ Ctr__Expression__13 RtkPos Expression String |+ Ctr__Expression__14 RtkPos Expression String Arglist |+ Ctr__Expression__15 RtkPos Expression NonEmptyTypeArguments String Arglist |+ Ctr__Expression__16 RtkPos Expression Expression |+ Ctr__Expression__17 RtkPos Expression String |+ Ctr__Expression__18 RtkPos Expression |+ Ctr__Expression__19 RtkPos Expression |+ Ctr__Expression__20 RtkPos Expression |+ Ctr__Expression__21 RtkPos Expression |+ Ctr__Expression__22 RtkPos Expression |+ Ctr__Expression__23 RtkPos PrefixOp Expression |+ Ctr__Expression__24 RtkPos Expression |+ Ctr__Expression__25 RtkPos PrimitiveTypeKeyword Dims Expression |+ Ctr__Expression__26 RtkPos CompoundName NonEmptyTypeArguments Dims Expression |+ Ctr__Expression__27 RtkPos CompoundName NonEmptyDims Expression |+ Ctr__Expression__28 RtkPos Expression Expression |+ Ctr__Expression__29 RtkPos Expression |+ Ctr__Expression__30 RtkPos Expression MultiplicativeOp Expression |+ Ctr__Expression__31 RtkPos Expression |+ Ctr__Expression__32 RtkPos Expression AdditiveOp Expression |+ Ctr__Expression__33 RtkPos Expression |+ Ctr__Expression__34 RtkPos Expression ShiftOp Expression |+ Ctr__Expression__35 RtkPos Expression |+ Ctr__Expression__36 RtkPos Expression RelationalOp Expression |+ Ctr__Expression__37 RtkPos Expression Type |+ Ctr__Expression__38 RtkPos Expression |+ Ctr__Expression__39 RtkPos Expression EqualityOp Expression |+ Ctr__Expression__40 RtkPos Expression |+ Ctr__Expression__41 RtkPos Expression Expression |+ Ctr__Expression__42 RtkPos Expression |+ Ctr__Expression__43 RtkPos Expression Expression |+ Ctr__Expression__44 RtkPos Expression |+ Ctr__Expression__45 RtkPos Expression Expression |+ Ctr__Expression__46 RtkPos Expression |+ Ctr__Expression__47 RtkPos Expression Expression |+ Ctr__Expression__48 RtkPos Expression |+ Ctr__Expression__49 RtkPos Expression Expression |+ Ctr__Expression__50 RtkPos Expression |+ Ctr__Expression__51 RtkPos Expression Expression Expression |+ Ctr__Expression__52 RtkPos Expression Rule_81 |+ Ctr__Expression__53 RtkPos String LambdaBody |+ Ctr__Expression__54 RtkPos LambdaBody |+ Ctr__Expression__55 RtkPos String Rule_83 LambdaBody |+ Ctr__Expression__56 RtkPos Expression LambdaBody |+ Ctr__Expression__57 RtkPos Expression+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Expression where+ rtkPosOf (Anti_Expression _) = rtkNoPos+ rtkPosOf (Ctr__Expression__0 p _) = p+ rtkPosOf (Ctr__Expression__1 p) = p+ rtkPosOf (Ctr__Expression__2 p _) = p+ rtkPosOf (Ctr__Expression__3 p _) = p+ rtkPosOf (Ctr__Expression__4 p _ _) = p+ rtkPosOf (Ctr__Expression__5 p _ _) = p+ rtkPosOf (Ctr__Expression__6 p _ _) = p+ rtkPosOf (Ctr__Expression__7 p _ _) = p+ rtkPosOf (Ctr__Expression__8 p _ _) = p+ rtkPosOf (Ctr__Expression__9 p _ _ _ _ _) = p+ rtkPosOf (Ctr__Expression__10 p _) = p+ rtkPosOf (Ctr__Expression__11 p _) = p+ rtkPosOf (Ctr__Expression__12 p _ _) = p+ rtkPosOf (Ctr__Expression__13 p _ _) = p+ rtkPosOf (Ctr__Expression__14 p _ _ _) = p+ rtkPosOf (Ctr__Expression__15 p _ _ _ _) = p+ rtkPosOf (Ctr__Expression__16 p _ _) = p+ rtkPosOf (Ctr__Expression__17 p _ _) = p+ rtkPosOf (Ctr__Expression__18 p _) = p+ rtkPosOf (Ctr__Expression__19 p _) = p+ rtkPosOf (Ctr__Expression__20 p _) = p+ rtkPosOf (Ctr__Expression__21 p _) = p+ rtkPosOf (Ctr__Expression__22 p _) = p+ rtkPosOf (Ctr__Expression__23 p _ _) = p+ rtkPosOf (Ctr__Expression__24 p _) = p+ rtkPosOf (Ctr__Expression__25 p _ _ _) = p+ rtkPosOf (Ctr__Expression__26 p _ _ _ _) = p+ rtkPosOf (Ctr__Expression__27 p _ _ _) = p+ rtkPosOf (Ctr__Expression__28 p _ _) = p+ rtkPosOf (Ctr__Expression__29 p _) = p+ rtkPosOf (Ctr__Expression__30 p _ _ _) = p+ rtkPosOf (Ctr__Expression__31 p _) = p+ rtkPosOf (Ctr__Expression__32 p _ _ _) = p+ rtkPosOf (Ctr__Expression__33 p _) = p+ rtkPosOf (Ctr__Expression__34 p _ _ _) = p+ rtkPosOf (Ctr__Expression__35 p _) = p+ rtkPosOf (Ctr__Expression__36 p _ _ _) = p+ rtkPosOf (Ctr__Expression__37 p _ _) = p+ rtkPosOf (Ctr__Expression__38 p _) = p+ rtkPosOf (Ctr__Expression__39 p _ _ _) = p+ rtkPosOf (Ctr__Expression__40 p _) = p+ rtkPosOf (Ctr__Expression__41 p _ _) = p+ rtkPosOf (Ctr__Expression__42 p _) = p+ rtkPosOf (Ctr__Expression__43 p _ _) = p+ rtkPosOf (Ctr__Expression__44 p _) = p+ rtkPosOf (Ctr__Expression__45 p _ _) = p+ rtkPosOf (Ctr__Expression__46 p _) = p+ rtkPosOf (Ctr__Expression__47 p _ _) = p+ rtkPosOf (Ctr__Expression__48 p _) = p+ rtkPosOf (Ctr__Expression__49 p _ _) = p+ rtkPosOf (Ctr__Expression__50 p _) = p+ rtkPosOf (Ctr__Expression__51 p _ _ _) = p+ rtkPosOf (Ctr__Expression__52 p _ _) = p+ rtkPosOf (Ctr__Expression__53 p _ _) = p+ rtkPosOf (Ctr__Expression__54 p _) = p+ rtkPosOf (Ctr__Expression__55 p _ _ _) = p+ rtkPosOf (Ctr__Expression__56 p _ _) = p+ rtkPosOf (Ctr__Expression__57 p _) = p+data ExtendsList = Anti_ExtendsList String |+ Ctr__ExtendsList__0 RtkPos ClassOrInterfaceType Rule_17+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf ExtendsList where+ rtkPosOf (Anti_ExtendsList _) = rtkNoPos+ rtkPosOf (Ctr__ExtendsList__0 p _ _) = p+data FieldDeclaration = Anti_FieldDeclaration String |+ Ctr__FieldDeclaration__0 RtkPos OptDocComment ModifierList Rule_35 |+ Ctr__FieldDeclaration__1 RtkPos+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf FieldDeclaration where+ rtkPosOf (Anti_FieldDeclaration _) = rtkNoPos+ rtkPosOf (Ctr__FieldDeclaration__0 p _ _ _) = p+ rtkPosOf (Ctr__FieldDeclaration__1 p) = p+type FieldDeclarationList = [FieldDeclaration]+data ForEachHeader = Anti_ForEachHeader String |+ Ctr__ForEachHeader__0 RtkPos Type String Expression |+ Ctr__ForEachHeader__1 RtkPos LocalModifierList1 Type String Expression+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf ForEachHeader where+ rtkPosOf (Anti_ForEachHeader _) = rtkNoPos+ rtkPosOf (Ctr__ForEachHeader__0 p _ _ _) = p+ rtkPosOf (Ctr__ForEachHeader__1 p _ _ _ _) = p+data ForStatement = Anti_ForStatement String |+ Ctr__ForStatement__0 RtkPos Rule_69 OptExpression OptExpression Statement |+ Ctr__ForStatement__1 RtkPos ForEachHeader Statement+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf ForStatement where+ rtkPosOf (Anti_ForStatement _) = rtkNoPos+ rtkPosOf (Ctr__ForStatement__0 p _ _ _ _) = p+ rtkPosOf (Ctr__ForStatement__1 p _ _) = p+data IfStatement = Anti_IfStatement String |+ Ctr__IfStatement__0 RtkPos Expression Statement OptElsePart+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf IfStatement where+ rtkPosOf (Anti_IfStatement _) = rtkNoPos+ rtkPosOf (Ctr__IfStatement__0 p _ _ _) = p+data ImplementsList = Anti_ImplementsList String |+ Ctr__ImplementsList__0 RtkPos Rule_19+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf ImplementsList where+ rtkPosOf (Anti_ImplementsList _) = rtkNoPos+ rtkPosOf (Ctr__ImplementsList__0 p _) = p+data ImportHead = Anti_ImportHead String |+ Ctr__ImportHead__0 RtkPos String |+ Ctr__ImportHead__1 RtkPos ImportHead String+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf ImportHead where+ rtkPosOf (Anti_ImportHead _) = rtkNoPos+ rtkPosOf (Ctr__ImportHead__0 p _) = p+ rtkPosOf (Ctr__ImportHead__1 p _ _) = p+type ImportList = [ImportStatement]+data ImportName = Anti_ImportName String |+ Ctr__ImportName__0 RtkPos ImportHead |+ Ctr__ImportName__1 RtkPos ImportHead+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf ImportName where+ rtkPosOf (Anti_ImportName _) = rtkNoPos+ rtkPosOf (Ctr__ImportName__0 p _) = p+ rtkPosOf (Ctr__ImportName__1 p _) = p+data ImportStatement = Anti_ImportStatement String |+ Ctr__ImportStatement__0 RtkPos Rule_3 ImportName+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf ImportStatement where+ rtkPosOf (Anti_ImportStatement _) = rtkNoPos+ rtkPosOf (Ctr__ImportStatement__0 p _ _) = p+data InterfaceDeclaration = Anti_InterfaceDeclaration String |+ Ctr__InterfaceDeclaration__0 RtkPos String TypeParameters Rule_23 FieldDeclarationList+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf InterfaceDeclaration where+ rtkPosOf (Anti_InterfaceDeclaration _) = rtkNoPos+ rtkPosOf (Ctr__InterfaceDeclaration__0 p _ _ _ _) = p+data LambdaBody = Anti_LambdaBody String |+ Ctr__LambdaBody__0 RtkPos Expression |+ Ctr__LambdaBody__1 RtkPos StatementBlock+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf LambdaBody where+ rtkPosOf (Anti_LambdaBody _) = rtkNoPos+ rtkPosOf (Ctr__LambdaBody__0 p _) = p+ rtkPosOf (Ctr__LambdaBody__1 p _) = p+data Literal = Anti_Literal String |+ Ctr__Literal__0 RtkPos String |+ Ctr__Literal__1 RtkPos String |+ Ctr__Literal__2 RtkPos |+ Ctr__Literal__3 RtkPos |+ Ctr__Literal__4 RtkPos String |+ Ctr__Literal__5 RtkPos String |+ Ctr__Literal__6 RtkPos+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Literal where+ rtkPosOf (Anti_Literal _) = rtkNoPos+ rtkPosOf (Ctr__Literal__0 p _) = p+ rtkPosOf (Ctr__Literal__1 p _) = p+ rtkPosOf (Ctr__Literal__2 p) = p+ rtkPosOf (Ctr__Literal__3 p) = p+ rtkPosOf (Ctr__Literal__4 p _) = p+ rtkPosOf (Ctr__Literal__5 p _) = p+ rtkPosOf (Ctr__Literal__6 p) = p+type LocalModifierList1 = [Rule_53]+data MemberAfterFirstId = Anti_MemberAfterFirstId String |+ Ctr__MemberAfterFirstId__0 RtkPos Rule_40 Rule_41 StatementBlock |+ Ctr__MemberAfterFirstId__1 RtkPos MoreTypeSpecifier String MemberRest+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf MemberAfterFirstId where+ rtkPosOf (Anti_MemberAfterFirstId _) = rtkNoPos+ rtkPosOf (Ctr__MemberAfterFirstId__0 p _ _ _) = p+ rtkPosOf (Ctr__MemberAfterFirstId__1 p _ _ _) = p+data MemberDeclaration = Anti_MemberDeclaration String |+ Ctr__MemberDeclaration__0 RtkPos PrimitiveTypeKeyword Dims String MemberRest |+ Ctr__MemberDeclaration__1 RtkPos TypeParameters String MoreTypeSpecifier String MemberRest |+ Ctr__MemberDeclaration__2 RtkPos NonEmptyTypeParameters PrimitiveTypeKeyword Dims String MemberRest |+ Ctr__MemberDeclaration__3 RtkPos String MemberAfterFirstId+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf MemberDeclaration where+ rtkPosOf (Anti_MemberDeclaration _) = rtkNoPos+ rtkPosOf (Ctr__MemberDeclaration__0 p _ _ _ _) = p+ rtkPosOf (Ctr__MemberDeclaration__1 p _ _ _ _ _) = p+ rtkPosOf (Ctr__MemberDeclaration__2 p _ _ _ _ _) = p+ rtkPosOf (Ctr__MemberDeclaration__3 p _ _) = p+data MemberRest = Anti_MemberRest String |+ Ctr__MemberRest__0 RtkPos Rule_44 Dims Rule_45 Rule_46 |+ Ctr__MemberRest__1 RtkPos Dims OptVariableInitializer MoreVariableDeclarators+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf MemberRest where+ rtkPosOf (Anti_MemberRest _) = rtkNoPos+ rtkPosOf (Ctr__MemberRest__0 p _ _ _ _) = p+ rtkPosOf (Ctr__MemberRest__1 p _ _ _) = p+data Modifier = Anti_Modifier String |+ Ctr__Modifier__0 RtkPos |+ Ctr__Modifier__1 RtkPos |+ Ctr__Modifier__2 RtkPos |+ Ctr__Modifier__3 RtkPos |+ Ctr__Modifier__4 RtkPos |+ Ctr__Modifier__5 RtkPos |+ Ctr__Modifier__6 RtkPos |+ Ctr__Modifier__7 RtkPos |+ Ctr__Modifier__8 RtkPos |+ Ctr__Modifier__9 RtkPos |+ Ctr__Modifier__10 RtkPos+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Modifier where+ rtkPosOf (Anti_Modifier _) = rtkNoPos+ rtkPosOf (Ctr__Modifier__0 p) = p+ rtkPosOf (Ctr__Modifier__1 p) = p+ rtkPosOf (Ctr__Modifier__2 p) = p+ rtkPosOf (Ctr__Modifier__3 p) = p+ rtkPosOf (Ctr__Modifier__4 p) = p+ rtkPosOf (Ctr__Modifier__5 p) = p+ rtkPosOf (Ctr__Modifier__6 p) = p+ rtkPosOf (Ctr__Modifier__7 p) = p+ rtkPosOf (Ctr__Modifier__8 p) = p+ rtkPosOf (Ctr__Modifier__9 p) = p+ rtkPosOf (Ctr__Modifier__10 p) = p+type ModifierList = [Rule_15]+data MoreTypeSpecifier = Anti_MoreTypeSpecifier String |+ Ctr__MoreTypeSpecifier__0 RtkPos String MoreTypeSpecifier |+ Ctr__MoreTypeSpecifier__1 RtkPos TypeArguments Dims+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf MoreTypeSpecifier where+ rtkPosOf (Anti_MoreTypeSpecifier _) = rtkNoPos+ rtkPosOf (Ctr__MoreTypeSpecifier__0 p _ _) = p+ rtkPosOf (Ctr__MoreTypeSpecifier__1 p _ _) = p+type MoreVariableDeclarators = [Rule_49]+data MultiplicativeOp = Anti_MultiplicativeOp String |+ Ctr__MultiplicativeOp__0 RtkPos |+ Ctr__MultiplicativeOp__1 RtkPos |+ Ctr__MultiplicativeOp__2 RtkPos+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf MultiplicativeOp where+ rtkPosOf (Anti_MultiplicativeOp _) = rtkNoPos+ rtkPosOf (Ctr__MultiplicativeOp__0 p) = p+ rtkPosOf (Ctr__MultiplicativeOp__1 p) = p+ rtkPosOf (Ctr__MultiplicativeOp__2 p) = p+type NonEmptyDims = [Rule_38]+data NonEmptyTypeArguments = Anti_NonEmptyTypeArguments String |+ Ctr__NonEmptyTypeArguments__0 RtkPos TypeArgument Rule_98 |+ Ctr__NonEmptyTypeArguments__1 RtkPos+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf NonEmptyTypeArguments where+ rtkPosOf (Anti_NonEmptyTypeArguments _) = rtkNoPos+ rtkPosOf (Ctr__NonEmptyTypeArguments__0 p _ _) = p+ rtkPosOf (Ctr__NonEmptyTypeArguments__1 p) = p+data NonEmptyTypeParameters = Anti_NonEmptyTypeParameters String |+ Ctr__NonEmptyTypeParameters__0 RtkPos TypeParameter Rule_100+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf NonEmptyTypeParameters where+ rtkPosOf (Anti_NonEmptyTypeParameters _) = rtkNoPos+ rtkPosOf (Ctr__NonEmptyTypeParameters__0 p _ _) = p+data OptDocComment = Anti_OptDocComment String |+ Ctr__OptDocComment__0 RtkPos |+ Ctr__OptDocComment__1 RtkPos DocComment+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf OptDocComment where+ rtkPosOf (Anti_OptDocComment _) = rtkNoPos+ rtkPosOf (Ctr__OptDocComment__0 p) = p+ rtkPosOf (Ctr__OptDocComment__1 p _) = p+data OptElsePart = Anti_OptElsePart String |+ Ctr__OptElsePart__0 RtkPos |+ Ctr__OptElsePart__1 RtkPos Rule_68+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf OptElsePart where+ rtkPosOf (Anti_OptElsePart _) = rtkNoPos+ rtkPosOf (Ctr__OptElsePart__0 p) = p+ rtkPosOf (Ctr__OptElsePart__1 p _) = p+data OptExpression = Anti_OptExpression String |+ Ctr__OptExpression__0 RtkPos |+ Ctr__OptExpression__1 RtkPos Expression+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf OptExpression where+ rtkPosOf (Anti_OptExpression _) = rtkNoPos+ rtkPosOf (Ctr__OptExpression__0 p) = p+ rtkPosOf (Ctr__OptExpression__1 p _) = p+data OptFinally = Anti_OptFinally String |+ Ctr__OptFinally__0 RtkPos |+ Ctr__OptFinally__1 RtkPos Rule_74+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf OptFinally where+ rtkPosOf (Anti_OptFinally _) = rtkNoPos+ rtkPosOf (Ctr__OptFinally__0 p) = p+ rtkPosOf (Ctr__OptFinally__1 p _) = p+data OptId = Anti_OptId String |+ Ctr__OptId__0 RtkPos |+ Ctr__OptId__1 RtkPos String+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf OptId where+ rtkPosOf (Anti_OptId _) = rtkNoPos+ rtkPosOf (Ctr__OptId__0 p) = p+ rtkPosOf (Ctr__OptId__1 p _) = p+data OptVariableInitializer = Anti_OptVariableInitializer String |+ Ctr__OptVariableInitializer__0 RtkPos |+ Ctr__OptVariableInitializer__1 RtkPos Rule_55+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf OptVariableInitializer where+ rtkPosOf (Anti_OptVariableInitializer _) = rtkNoPos+ rtkPosOf (Ctr__OptVariableInitializer__0 p) = p+ rtkPosOf (Ctr__OptVariableInitializer__1 p _) = p+data Package = Anti_Package String |+ Ctr__Package__0 RtkPos CompoundName+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Package where+ rtkPosOf (Anti_Package _) = rtkNoPos+ rtkPosOf (Ctr__Package__0 p _) = p+type ParamModifierList = [Rule_62]+data Parameter = Anti_Parameter String |+ Ctr__Parameter__0 RtkPos ParamModifierList Type Rule_64 String Dims+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Parameter where+ rtkPosOf (Anti_Parameter _) = rtkNoPos+ rtkPosOf (Ctr__Parameter__0 p _ _ _ _ _) = p+data ParameterList = Anti_ParameterList String |+ Ctr__ParameterList__0 RtkPos Parameter Rule_60+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf ParameterList where+ rtkPosOf (Anti_ParameterList _) = rtkNoPos+ rtkPosOf (Ctr__ParameterList__0 p _ _) = p+data PostfixOp = Anti_PostfixOp String |+ Ctr__PostfixOp__0 RtkPos |+ Ctr__PostfixOp__1 RtkPos+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf PostfixOp where+ rtkPosOf (Anti_PostfixOp _) = rtkNoPos+ rtkPosOf (Ctr__PostfixOp__0 p) = p+ rtkPosOf (Ctr__PostfixOp__1 p) = p+data PrefixOp = Anti_PrefixOp String |+ Ctr__PrefixOp__0 RtkPos |+ Ctr__PrefixOp__1 RtkPos |+ Ctr__PrefixOp__2 RtkPos |+ Ctr__PrefixOp__3 RtkPos+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf PrefixOp where+ rtkPosOf (Anti_PrefixOp _) = rtkNoPos+ rtkPosOf (Ctr__PrefixOp__0 p) = p+ rtkPosOf (Ctr__PrefixOp__1 p) = p+ rtkPosOf (Ctr__PrefixOp__2 p) = p+ rtkPosOf (Ctr__PrefixOp__3 p) = p+data PrimitiveTypeKeyword = Anti_PrimitiveTypeKeyword String |+ Ctr__PrimitiveTypeKeyword__0 RtkPos |+ Ctr__PrimitiveTypeKeyword__1 RtkPos |+ Ctr__PrimitiveTypeKeyword__2 RtkPos |+ Ctr__PrimitiveTypeKeyword__3 RtkPos |+ Ctr__PrimitiveTypeKeyword__4 RtkPos |+ Ctr__PrimitiveTypeKeyword__5 RtkPos |+ Ctr__PrimitiveTypeKeyword__6 RtkPos |+ Ctr__PrimitiveTypeKeyword__7 RtkPos |+ Ctr__PrimitiveTypeKeyword__8 RtkPos+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf PrimitiveTypeKeyword where+ rtkPosOf (Anti_PrimitiveTypeKeyword _) = rtkNoPos+ rtkPosOf (Ctr__PrimitiveTypeKeyword__0 p) = p+ rtkPosOf (Ctr__PrimitiveTypeKeyword__1 p) = p+ rtkPosOf (Ctr__PrimitiveTypeKeyword__2 p) = p+ rtkPosOf (Ctr__PrimitiveTypeKeyword__3 p) = p+ rtkPosOf (Ctr__PrimitiveTypeKeyword__4 p) = p+ rtkPosOf (Ctr__PrimitiveTypeKeyword__5 p) = p+ rtkPosOf (Ctr__PrimitiveTypeKeyword__6 p) = p+ rtkPosOf (Ctr__PrimitiveTypeKeyword__7 p) = p+ rtkPosOf (Ctr__PrimitiveTypeKeyword__8 p) = p+data RelationalOp = Anti_RelationalOp String |+ Ctr__RelationalOp__0 RtkPos |+ Ctr__RelationalOp__1 RtkPos |+ Ctr__RelationalOp__2 RtkPos |+ Ctr__RelationalOp__3 RtkPos+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf RelationalOp where+ rtkPosOf (Anti_RelationalOp _) = rtkNoPos+ rtkPosOf (Ctr__RelationalOp__0 p) = p+ rtkPosOf (Ctr__RelationalOp__1 p) = p+ rtkPosOf (Ctr__RelationalOp__2 p) = p+ rtkPosOf (Ctr__RelationalOp__3 p) = p+data Resource = Anti_Resource String |+ Ctr__Resource__0 RtkPos ParamModifierList Type String Expression+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Resource where+ rtkPosOf (Anti_Resource _) = rtkNoPos+ rtkPosOf (Ctr__Resource__0 p _ _ _ _) = p+data ResourceSpec = Anti_ResourceSpec String |+ Ctr__ResourceSpec__0 RtkPos Resource Rule_76 Rule_78+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf ResourceSpec where+ rtkPosOf (Anti_ResourceSpec _) = rtkNoPos+ rtkPosOf (Ctr__ResourceSpec__0 p _ _ _) = p+data Rule_10 = Ctr__Rule_10__0 RtkPos ElementValue Rule_11 Rule_13+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_10 where+ rtkPosOf (Ctr__Rule_10__0 p _ _ _) = p+type Rule_100 = [Rule_101]+data Rule_101 = Ctr__Rule_101__0 RtkPos TypeParameter+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_101 where+ rtkPosOf (Ctr__Rule_101__0 p _) = p+data Rule_102 = Ctr__Rule_102__0 RtkPos |+ Ctr__Rule_102__1 RtkPos Rule_103+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_102 where+ rtkPosOf (Ctr__Rule_102__0 p) = p+ rtkPosOf (Ctr__Rule_102__1 p _) = p+data Rule_103 = Ctr__Rule_103__0 RtkPos Type Rule_104+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_103 where+ rtkPosOf (Ctr__Rule_103__0 p _ _) = p+type Rule_104 = [Rule_105]+data Rule_105 = Ctr__Rule_105__0 RtkPos Type+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_105 where+ rtkPosOf (Ctr__Rule_105__0 p _) = p+data Rule_106 = Anti_Rule_106 String |+ Ctr__Rule_106__1 RtkPos String+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_106 where+ rtkPosOf (Anti_Rule_106 _) = rtkNoPos+ rtkPosOf (Ctr__Rule_106__1 p _) = p+type Rule_11 = [Rule_12]+data Rule_12 = Ctr__Rule_12__0 RtkPos ElementValue+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_12 where+ rtkPosOf (Ctr__Rule_12__0 p _) = p+data Rule_13 = Ctr__Rule_13__0 RtkPos |+ Ctr__Rule_13__1 RtkPos+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_13 where+ rtkPosOf (Ctr__Rule_13__0 p) = p+ rtkPosOf (Ctr__Rule_13__1 p) = p+data Rule_15 = Anti_Rule_15 String |+ Ctr__Rule_15__1 RtkPos Modifier |+ Ctr__Rule_15__2 RtkPos Annotation+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_15 where+ rtkPosOf (Anti_Rule_15 _) = rtkNoPos+ rtkPosOf (Ctr__Rule_15__1 p _) = p+ rtkPosOf (Ctr__Rule_15__2 p _) = p+type Rule_17 = [Rule_18]+data Rule_18 = Ctr__Rule_18__0 RtkPos ClassOrInterfaceType+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_18 where+ rtkPosOf (Ctr__Rule_18__0 p _) = p+type Rule_19 = [ClassOrInterfaceType]+data Rule_2 = Ctr__Rule_2__0 RtkPos |+ Ctr__Rule_2__1 RtkPos CompilationUnitRest+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_2 where+ rtkPosOf (Ctr__Rule_2__0 p) = p+ rtkPosOf (Ctr__Rule_2__1 p _) = p+data Rule_21 = Ctr__Rule_21__0 RtkPos |+ Ctr__Rule_21__1 RtkPos ExtendsList+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_21 where+ rtkPosOf (Ctr__Rule_21__0 p) = p+ rtkPosOf (Ctr__Rule_21__1 p _) = p+data Rule_22 = Ctr__Rule_22__0 RtkPos |+ Ctr__Rule_22__1 RtkPos ImplementsList+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_22 where+ rtkPosOf (Ctr__Rule_22__0 p) = p+ rtkPosOf (Ctr__Rule_22__1 p _) = p+data Rule_23 = Ctr__Rule_23__0 RtkPos |+ Ctr__Rule_23__1 RtkPos ExtendsList+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_23 where+ rtkPosOf (Ctr__Rule_23__0 p) = p+ rtkPosOf (Ctr__Rule_23__1 p _) = p+data Rule_25 = Ctr__Rule_25__0 RtkPos |+ Ctr__Rule_25__1 RtkPos Rule_26+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_25 where+ rtkPosOf (Ctr__Rule_25__0 p) = p+ rtkPosOf (Ctr__Rule_25__1 p _) = p+data Rule_26 = Ctr__Rule_26__0 RtkPos Arglist+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_26 where+ rtkPosOf (Ctr__Rule_26__0 p _) = p+data Rule_27 = Ctr__Rule_27__0 RtkPos |+ Ctr__Rule_27__1 RtkPos Rule_28+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_27 where+ rtkPosOf (Ctr__Rule_27__0 p) = p+ rtkPosOf (Ctr__Rule_27__1 p _) = p+data Rule_28 = Ctr__Rule_28__0 RtkPos FieldDeclarationList+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_28 where+ rtkPosOf (Ctr__Rule_28__0 p _) = p+type Rule_29 = [Rule_30]+data Rule_3 = Ctr__Rule_3__0 RtkPos |+ Ctr__Rule_3__1 RtkPos+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_3 where+ rtkPosOf (Ctr__Rule_3__0 p) = p+ rtkPosOf (Ctr__Rule_3__1 p) = p+data Rule_30 = Ctr__Rule_30__0 RtkPos EnumConstant+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_30 where+ rtkPosOf (Ctr__Rule_30__0 p _) = p+data Rule_31 = Ctr__Rule_31__0 RtkPos |+ Ctr__Rule_31__1 RtkPos+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_31 where+ rtkPosOf (Ctr__Rule_31__0 p) = p+ rtkPosOf (Ctr__Rule_31__1 p) = p+data Rule_32 = Ctr__Rule_32__0 RtkPos |+ Ctr__Rule_32__1 RtkPos ImplementsList+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_32 where+ rtkPosOf (Ctr__Rule_32__0 p) = p+ rtkPosOf (Ctr__Rule_32__1 p _) = p+data Rule_33 = Ctr__Rule_33__0 RtkPos |+ Ctr__Rule_33__1 RtkPos Rule_34+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_33 where+ rtkPosOf (Ctr__Rule_33__0 p) = p+ rtkPosOf (Ctr__Rule_33__1 p _) = p+data Rule_34 = Ctr__Rule_34__0 RtkPos FieldDeclarationList+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_34 where+ rtkPosOf (Ctr__Rule_34__0 p _) = p+data Rule_35 = Ctr__Rule_35__0 RtkPos MemberDeclaration |+ Ctr__Rule_35__1 RtkPos TypeDeclRest |+ Ctr__Rule_35__2 RtkPos StaticInitializer+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_35 where+ rtkPosOf (Ctr__Rule_35__0 p _) = p+ rtkPosOf (Ctr__Rule_35__1 p _) = p+ rtkPosOf (Ctr__Rule_35__2 p _) = p+data Rule_36 = Anti_Rule_36 String |+ Ctr__Rule_36__1 RtkPos+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_36 where+ rtkPosOf (Anti_Rule_36 _) = rtkNoPos+ rtkPosOf (Ctr__Rule_36__1 p) = p+data Rule_38 = Anti_Rule_38 String |+ Ctr__Rule_38__1 RtkPos+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_38 where+ rtkPosOf (Anti_Rule_38 _) = rtkNoPos+ rtkPosOf (Ctr__Rule_38__1 p) = p+data Rule_4 = Ctr__Rule_4__0 RtkPos |+ Ctr__Rule_4__1 RtkPos Rule_5+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_4 where+ rtkPosOf (Ctr__Rule_4__0 p) = p+ rtkPosOf (Ctr__Rule_4__1 p _) = p+data Rule_40 = Ctr__Rule_40__0 RtkPos |+ Ctr__Rule_40__1 RtkPos ParameterList+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_40 where+ rtkPosOf (Ctr__Rule_40__0 p) = p+ rtkPosOf (Ctr__Rule_40__1 p _) = p+data Rule_41 = Ctr__Rule_41__0 RtkPos |+ Ctr__Rule_41__1 RtkPos ThrowsClause+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_41 where+ rtkPosOf (Ctr__Rule_41__0 p) = p+ rtkPosOf (Ctr__Rule_41__1 p _) = p+type Rule_42 = [Rule_43]+data Rule_43 = Ctr__Rule_43__0 RtkPos CompoundName+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_43 where+ rtkPosOf (Ctr__Rule_43__0 p _) = p+data Rule_44 = Ctr__Rule_44__0 RtkPos |+ Ctr__Rule_44__1 RtkPos ParameterList+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_44 where+ rtkPosOf (Ctr__Rule_44__0 p) = p+ rtkPosOf (Ctr__Rule_44__1 p _) = p+data Rule_45 = Ctr__Rule_45__0 RtkPos |+ Ctr__Rule_45__1 RtkPos ThrowsClause+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_45 where+ rtkPosOf (Ctr__Rule_45__0 p) = p+ rtkPosOf (Ctr__Rule_45__1 p _) = p+data Rule_46 = Ctr__Rule_46__0 RtkPos StatementBlock |+ Ctr__Rule_46__1 RtkPos Rule_47+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_46 where+ rtkPosOf (Ctr__Rule_46__0 p _) = p+ rtkPosOf (Ctr__Rule_46__1 p _) = p+data Rule_47 = Ctr__Rule_47__0 RtkPos |+ Ctr__Rule_47__1 RtkPos Rule_48+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_47 where+ rtkPosOf (Ctr__Rule_47__0 p) = p+ rtkPosOf (Ctr__Rule_47__1 p _) = p+data Rule_48 = Ctr__Rule_48__0 RtkPos Expression+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_48 where+ rtkPosOf (Ctr__Rule_48__0 p _) = p+data Rule_49 = Anti_Rule_49 String |+ Ctr__Rule_49__1 RtkPos VariableDeclarator+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_49 where+ rtkPosOf (Anti_Rule_49 _) = rtkNoPos+ rtkPosOf (Ctr__Rule_49__1 p _) = p+data Rule_5 = Ctr__Rule_5__0 RtkPos Rule_6+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_5 where+ rtkPosOf (Ctr__Rule_5__0 p _) = p+type Rule_51 = [Rule_52]+data Rule_52 = Ctr__Rule_52__0 RtkPos VariableDeclarator+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_52 where+ rtkPosOf (Ctr__Rule_52__0 p _) = p+data Rule_53 = Anti_Rule_53 String |+ Ctr__Rule_53__1 RtkPos |+ Ctr__Rule_53__2 RtkPos Annotation+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_53 where+ rtkPosOf (Anti_Rule_53 _) = rtkNoPos+ rtkPosOf (Ctr__Rule_53__1 p) = p+ rtkPosOf (Ctr__Rule_53__2 p _) = p+data Rule_55 = Ctr__Rule_55__0 RtkPos VariableInitializer+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_55 where+ rtkPosOf (Ctr__Rule_55__0 p _) = p+data Rule_56 = Ctr__Rule_56__0 RtkPos VariableInitializer Rule_57 Rule_59+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_56 where+ rtkPosOf (Ctr__Rule_56__0 p _ _ _) = p+type Rule_57 = [Rule_58]+data Rule_58 = Ctr__Rule_58__0 RtkPos VariableInitializer+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_58 where+ rtkPosOf (Ctr__Rule_58__0 p _) = p+data Rule_59 = Ctr__Rule_59__0 RtkPos |+ Ctr__Rule_59__1 RtkPos+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_59 where+ rtkPosOf (Ctr__Rule_59__0 p) = p+ rtkPosOf (Ctr__Rule_59__1 p) = p+data Rule_6 = Ctr__Rule_6__0 RtkPos |+ Ctr__Rule_6__1 RtkPos AnnotationArguments+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_6 where+ rtkPosOf (Ctr__Rule_6__0 p) = p+ rtkPosOf (Ctr__Rule_6__1 p _) = p+type Rule_60 = [Rule_61]+data Rule_61 = Ctr__Rule_61__0 RtkPos Parameter+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_61 where+ rtkPosOf (Ctr__Rule_61__0 p _) = p+data Rule_62 = Anti_Rule_62 String |+ Ctr__Rule_62__1 RtkPos |+ Ctr__Rule_62__2 RtkPos Annotation+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_62 where+ rtkPosOf (Anti_Rule_62 _) = rtkNoPos+ rtkPosOf (Ctr__Rule_62__1 p) = p+ rtkPosOf (Ctr__Rule_62__2 p _) = p+data Rule_64 = Ctr__Rule_64__0 RtkPos |+ Ctr__Rule_64__1 RtkPos+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_64 where+ rtkPosOf (Ctr__Rule_64__0 p) = p+ rtkPosOf (Ctr__Rule_64__1 p) = p+data Rule_66 = Ctr__Rule_66__0 RtkPos |+ Ctr__Rule_66__1 RtkPos Rule_67+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_66 where+ rtkPosOf (Ctr__Rule_66__0 p) = p+ rtkPosOf (Ctr__Rule_66__1 p _) = p+data Rule_67 = Ctr__Rule_67__0 RtkPos Expression+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_67 where+ rtkPosOf (Ctr__Rule_67__0 p _) = p+data Rule_68 = Ctr__Rule_68__0 RtkPos Statement+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_68 where+ rtkPosOf (Ctr__Rule_68__0 p _) = p+data Rule_69 = Ctr__Rule_69__0 RtkPos VariableDeclaration |+ Ctr__Rule_69__1 RtkPos Expression |+ Ctr__Rule_69__2 RtkPos+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_69 where+ rtkPosOf (Ctr__Rule_69__0 p _) = p+ rtkPosOf (Ctr__Rule_69__1 p _) = p+ rtkPosOf (Ctr__Rule_69__2 p) = p+type Rule_7 = [Rule_8]+data Rule_70 = Anti_Rule_70 String |+ Ctr__Rule_70__1 RtkPos CatchParameter StatementBlock+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_70 where+ rtkPosOf (Anti_Rule_70 _) = rtkNoPos+ rtkPosOf (Ctr__Rule_70__1 p _ _) = p+type Rule_72 = [Rule_73]+data Rule_73 = Ctr__Rule_73__0 RtkPos Type+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_73 where+ rtkPosOf (Ctr__Rule_73__0 p _) = p+data Rule_74 = Ctr__Rule_74__0 RtkPos StatementBlock+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_74 where+ rtkPosOf (Ctr__Rule_74__0 p _) = p+data Rule_75 = Ctr__Rule_75__0 RtkPos |+ Ctr__Rule_75__1 RtkPos ResourceSpec+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_75 where+ rtkPosOf (Ctr__Rule_75__0 p) = p+ rtkPosOf (Ctr__Rule_75__1 p _) = p+type Rule_76 = [Rule_77]+data Rule_77 = Ctr__Rule_77__0 RtkPos Resource+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_77 where+ rtkPosOf (Ctr__Rule_77__0 p _) = p+data Rule_78 = Ctr__Rule_78__0 RtkPos |+ Ctr__Rule_78__1 RtkPos+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_78 where+ rtkPosOf (Ctr__Rule_78__0 p) = p+ rtkPosOf (Ctr__Rule_78__1 p) = p+data Rule_79 = Anti_Rule_79 String |+ Ctr__Rule_79__1 RtkPos Expression |+ Ctr__Rule_79__2 RtkPos |+ Ctr__Rule_79__3 RtkPos Statement+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_79 where+ rtkPosOf (Anti_Rule_79 _) = rtkNoPos+ rtkPosOf (Ctr__Rule_79__1 p _) = p+ rtkPosOf (Ctr__Rule_79__2 p) = p+ rtkPosOf (Ctr__Rule_79__3 p _) = p+data Rule_8 = Ctr__Rule_8__0 RtkPos AnnotationElement+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_8 where+ rtkPosOf (Ctr__Rule_8__0 p _) = p+data Rule_81 = Ctr__Rule_81__0 RtkPos |+ Ctr__Rule_81__1 RtkPos Rule_82+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_81 where+ rtkPosOf (Ctr__Rule_81__0 p) = p+ rtkPosOf (Ctr__Rule_81__1 p _) = p+data Rule_82 = Ctr__Rule_82__0 RtkPos AssignmentOp Expression+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_82 where+ rtkPosOf (Ctr__Rule_82__0 p _ _) = p+type Rule_83 = [Rule_84]+data Rule_84 = Ctr__Rule_84__0 RtkPos String+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_84 where+ rtkPosOf (Ctr__Rule_84__0 p _) = p+data Rule_85 = Ctr__Rule_85__0 RtkPos |+ Ctr__Rule_85__1 RtkPos Rule_86+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_85 where+ rtkPosOf (Ctr__Rule_85__0 p) = p+ rtkPosOf (Ctr__Rule_85__1 p _) = p+data Rule_86 = Ctr__Rule_86__0 RtkPos Arglist+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_86 where+ rtkPosOf (Ctr__Rule_86__0 p _) = p+data Rule_87 = Ctr__Rule_87__0 RtkPos |+ Ctr__Rule_87__1 RtkPos Rule_88+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_87 where+ rtkPosOf (Ctr__Rule_87__0 p) = p+ rtkPosOf (Ctr__Rule_87__1 p _) = p+data Rule_88 = Ctr__Rule_88__0 RtkPos Arglist+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_88 where+ rtkPosOf (Ctr__Rule_88__0 p _) = p+data Rule_89 = Ctr__Rule_89__0 RtkPos Arglist Rule_90 |+ Ctr__Rule_89__1 RtkPos DimExprs Rule_92 |+ Ctr__Rule_89__2 RtkPos NonEmptyDims ArrayInitializer+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_89 where+ rtkPosOf (Ctr__Rule_89__0 p _ _) = p+ rtkPosOf (Ctr__Rule_89__1 p _ _) = p+ rtkPosOf (Ctr__Rule_89__2 p _ _) = p+data Rule_9 = Ctr__Rule_9__0 RtkPos |+ Ctr__Rule_9__1 RtkPos Rule_10+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_9 where+ rtkPosOf (Ctr__Rule_9__0 p) = p+ rtkPosOf (Ctr__Rule_9__1 p _) = p+data Rule_90 = Ctr__Rule_90__0 RtkPos |+ Ctr__Rule_90__1 RtkPos Rule_91+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_90 where+ rtkPosOf (Ctr__Rule_90__0 p) = p+ rtkPosOf (Ctr__Rule_90__1 p _) = p+data Rule_91 = Ctr__Rule_91__0 RtkPos FieldDeclarationList+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_91 where+ rtkPosOf (Ctr__Rule_91__0 p _) = p+data Rule_92 = Ctr__Rule_92__0 RtkPos |+ Ctr__Rule_92__1 RtkPos NonEmptyDims+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_92 where+ rtkPosOf (Ctr__Rule_92__0 p) = p+ rtkPosOf (Ctr__Rule_92__1 p _) = p+data Rule_93 = Anti_Rule_93 String |+ Ctr__Rule_93__1 RtkPos Expression+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_93 where+ rtkPosOf (Anti_Rule_93 _) = rtkNoPos+ rtkPosOf (Ctr__Rule_93__1 p _) = p+data Rule_95 = Ctr__Rule_95__0 RtkPos Expression Rule_96+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_95 where+ rtkPosOf (Ctr__Rule_95__0 p _ _) = p+type Rule_96 = [Rule_97]+data Rule_97 = Ctr__Rule_97__0 RtkPos Expression+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_97 where+ rtkPosOf (Ctr__Rule_97__0 p _) = p+type Rule_98 = [Rule_99]+data Rule_99 = Ctr__Rule_99__0 RtkPos TypeArgument+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Rule_99 where+ rtkPosOf (Ctr__Rule_99__0 p _) = p+data ShiftOp = Anti_ShiftOp String |+ Ctr__ShiftOp__0 RtkPos |+ Ctr__ShiftOp__1 RtkPos |+ Ctr__ShiftOp__2 RtkPos+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf ShiftOp where+ rtkPosOf (Anti_ShiftOp _) = rtkNoPos+ rtkPosOf (Ctr__ShiftOp__0 p) = p+ rtkPosOf (Ctr__ShiftOp__1 p) = p+ rtkPosOf (Ctr__ShiftOp__2 p) = p+data Statement = Anti_Statement String |+ Ctr__Statement__0 RtkPos VariableDeclaration |+ Ctr__Statement__1 RtkPos OptExpression |+ Ctr__Statement__2 RtkPos Expression |+ Ctr__Statement__3 RtkPos StatementBlock |+ Ctr__Statement__4 RtkPos IfStatement |+ Ctr__Statement__5 RtkPos DoStatement |+ Ctr__Statement__6 RtkPos WhileStatement |+ Ctr__Statement__7 RtkPos ForStatement |+ Ctr__Statement__8 RtkPos TryStatement |+ Ctr__Statement__9 RtkPos SwitchStatement |+ Ctr__Statement__10 RtkPos Expression Statement |+ Ctr__Statement__11 RtkPos Expression |+ Ctr__Statement__12 RtkPos Expression Rule_66 |+ Ctr__Statement__13 RtkPos String Statement |+ Ctr__Statement__14 RtkPos OptId |+ Ctr__Statement__15 RtkPos OptId |+ Ctr__Statement__16 RtkPos Arglist |+ Ctr__Statement__17 RtkPos Arglist |+ Ctr__Statement__18 RtkPos+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Statement where+ rtkPosOf (Anti_Statement _) = rtkNoPos+ rtkPosOf (Ctr__Statement__0 p _) = p+ rtkPosOf (Ctr__Statement__1 p _) = p+ rtkPosOf (Ctr__Statement__2 p _) = p+ rtkPosOf (Ctr__Statement__3 p _) = p+ rtkPosOf (Ctr__Statement__4 p _) = p+ rtkPosOf (Ctr__Statement__5 p _) = p+ rtkPosOf (Ctr__Statement__6 p _) = p+ rtkPosOf (Ctr__Statement__7 p _) = p+ rtkPosOf (Ctr__Statement__8 p _) = p+ rtkPosOf (Ctr__Statement__9 p _) = p+ rtkPosOf (Ctr__Statement__10 p _ _) = p+ rtkPosOf (Ctr__Statement__11 p _) = p+ rtkPosOf (Ctr__Statement__12 p _ _) = p+ rtkPosOf (Ctr__Statement__13 p _ _) = p+ rtkPosOf (Ctr__Statement__14 p _) = p+ rtkPosOf (Ctr__Statement__15 p _) = p+ rtkPosOf (Ctr__Statement__16 p _) = p+ rtkPosOf (Ctr__Statement__17 p _) = p+ rtkPosOf (Ctr__Statement__18 p) = p+data StatementBlock = Anti_StatementBlock String |+ Ctr__StatementBlock__0 RtkPos StatementList+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf StatementBlock where+ rtkPosOf (Anti_StatementBlock _) = rtkNoPos+ rtkPosOf (Ctr__StatementBlock__0 p _) = p+type StatementList = [Statement]+data StaticInitializer = Anti_StaticInitializer String |+ Ctr__StaticInitializer__0 RtkPos StatementBlock+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf StaticInitializer where+ rtkPosOf (Anti_StaticInitializer _) = rtkNoPos+ rtkPosOf (Ctr__StaticInitializer__0 p _) = p+type SwitchCaseList = [Rule_79]+data SwitchStatement = Anti_SwitchStatement String |+ Ctr__SwitchStatement__0 RtkPos Expression SwitchCaseList+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf SwitchStatement where+ rtkPosOf (Anti_SwitchStatement _) = rtkNoPos+ rtkPosOf (Ctr__SwitchStatement__0 p _ _) = p+data ThrowsClause = Anti_ThrowsClause String |+ Ctr__ThrowsClause__0 RtkPos CompoundName Rule_42+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf ThrowsClause where+ rtkPosOf (Anti_ThrowsClause _) = rtkNoPos+ rtkPosOf (Ctr__ThrowsClause__0 p _ _) = p+data TryStatement = Anti_TryStatement String |+ Ctr__TryStatement__0 RtkPos Rule_75 StatementBlock CatchList OptFinally+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf TryStatement where+ rtkPosOf (Anti_TryStatement _) = rtkNoPos+ rtkPosOf (Ctr__TryStatement__0 p _ _ _ _) = p+data Type = Anti_Type String |+ Ctr__Type__0 RtkPos PrimitiveTypeKeyword Dims |+ Ctr__Type__1 RtkPos CompoundName NonEmptyTypeArguments Dims |+ Ctr__Type__2 RtkPos CompoundName NonEmptyDims |+ Ctr__Type__3 RtkPos CompoundName+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf Type where+ rtkPosOf (Anti_Type _) = rtkNoPos+ rtkPosOf (Ctr__Type__0 p _ _) = p+ rtkPosOf (Ctr__Type__1 p _ _ _) = p+ rtkPosOf (Ctr__Type__2 p _ _) = p+ rtkPosOf (Ctr__Type__3 p _) = p+data TypeArgument = Anti_TypeArgument String |+ Ctr__TypeArgument__0 RtkPos Type |+ Ctr__TypeArgument__1 RtkPos WildcardType+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf TypeArgument where+ rtkPosOf (Anti_TypeArgument _) = rtkNoPos+ rtkPosOf (Ctr__TypeArgument__0 p _) = p+ rtkPosOf (Ctr__TypeArgument__1 p _) = p+data TypeArguments = Anti_TypeArguments String |+ Ctr__TypeArguments__0 RtkPos |+ Ctr__TypeArguments__1 RtkPos NonEmptyTypeArguments+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf TypeArguments where+ rtkPosOf (Anti_TypeArguments _) = rtkNoPos+ rtkPosOf (Ctr__TypeArguments__0 p) = p+ rtkPosOf (Ctr__TypeArguments__1 p _) = p+data TypeDeclRest = Anti_TypeDeclRest String |+ Ctr__TypeDeclRest__0 RtkPos ClassDeclaration |+ Ctr__TypeDeclRest__1 RtkPos InterfaceDeclaration |+ Ctr__TypeDeclRest__2 RtkPos EnumDeclaration |+ Ctr__TypeDeclRest__3 RtkPos AnnotationDeclaration+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf TypeDeclRest where+ rtkPosOf (Anti_TypeDeclRest _) = rtkNoPos+ rtkPosOf (Ctr__TypeDeclRest__0 p _) = p+ rtkPosOf (Ctr__TypeDeclRest__1 p _) = p+ rtkPosOf (Ctr__TypeDeclRest__2 p _) = p+ rtkPosOf (Ctr__TypeDeclRest__3 p _) = p+data TypeDeclaration = Anti_TypeDeclaration String |+ Ctr__TypeDeclaration__1 RtkPos OptDocComment ModifierList TypeDeclRest+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf TypeDeclaration where+ rtkPosOf (Anti_TypeDeclaration _) = rtkNoPos+ rtkPosOf (Ctr__TypeDeclaration__1 p _ _ _) = p+type TypeDeclarationList = [TypeDeclaration]+data TypeParameter = Anti_TypeParameter String |+ Ctr__TypeParameter__0 RtkPos String Rule_102+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf TypeParameter where+ rtkPosOf (Anti_TypeParameter _) = rtkNoPos+ rtkPosOf (Ctr__TypeParameter__0 p _ _) = p+data TypeParameters = Anti_TypeParameters String |+ Ctr__TypeParameters__0 RtkPos |+ Ctr__TypeParameters__1 RtkPos NonEmptyTypeParameters+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf TypeParameters where+ rtkPosOf (Anti_TypeParameters _) = rtkNoPos+ rtkPosOf (Ctr__TypeParameters__0 p) = p+ rtkPosOf (Ctr__TypeParameters__1 p _) = p+data TypeSpecifier = Anti_TypeSpecifier String |+ Ctr__TypeSpecifier__0 RtkPos |+ Ctr__TypeSpecifier__1 RtkPos |+ Ctr__TypeSpecifier__2 RtkPos |+ Ctr__TypeSpecifier__3 RtkPos |+ Ctr__TypeSpecifier__4 RtkPos |+ Ctr__TypeSpecifier__5 RtkPos |+ Ctr__TypeSpecifier__6 RtkPos |+ Ctr__TypeSpecifier__7 RtkPos |+ Ctr__TypeSpecifier__8 RtkPos |+ Ctr__TypeSpecifier__9 RtkPos CompoundName TypeArguments+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf TypeSpecifier where+ rtkPosOf (Anti_TypeSpecifier _) = rtkNoPos+ rtkPosOf (Ctr__TypeSpecifier__0 p) = p+ rtkPosOf (Ctr__TypeSpecifier__1 p) = p+ rtkPosOf (Ctr__TypeSpecifier__2 p) = p+ rtkPosOf (Ctr__TypeSpecifier__3 p) = p+ rtkPosOf (Ctr__TypeSpecifier__4 p) = p+ rtkPosOf (Ctr__TypeSpecifier__5 p) = p+ rtkPosOf (Ctr__TypeSpecifier__6 p) = p+ rtkPosOf (Ctr__TypeSpecifier__7 p) = p+ rtkPosOf (Ctr__TypeSpecifier__8 p) = p+ rtkPosOf (Ctr__TypeSpecifier__9 p _ _) = p+data VariableDeclaration = Anti_VariableDeclaration String |+ Ctr__VariableDeclaration__0 RtkPos Type VariableDeclaratorList |+ Ctr__VariableDeclaration__1 RtkPos LocalModifierList1 Type VariableDeclaratorList+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf VariableDeclaration where+ rtkPosOf (Anti_VariableDeclaration _) = rtkNoPos+ rtkPosOf (Ctr__VariableDeclaration__0 p _ _) = p+ rtkPosOf (Ctr__VariableDeclaration__1 p _ _ _) = p+data VariableDeclarator = Anti_VariableDeclarator String |+ Ctr__VariableDeclarator__0 RtkPos String Dims OptVariableInitializer+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf VariableDeclarator where+ rtkPosOf (Anti_VariableDeclarator _) = rtkNoPos+ rtkPosOf (Ctr__VariableDeclarator__0 p _ _ _) = p+data VariableDeclaratorList = Anti_VariableDeclaratorList String |+ Ctr__VariableDeclaratorList__0 RtkPos VariableDeclarator Rule_51+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf VariableDeclaratorList where+ rtkPosOf (Anti_VariableDeclaratorList _) = rtkNoPos+ rtkPosOf (Ctr__VariableDeclaratorList__0 p _ _) = p+data VariableInitializer = Anti_VariableInitializer String |+ Ctr__VariableInitializer__0 RtkPos Expression |+ Ctr__VariableInitializer__1 RtkPos ArrayInitializer+ deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable)+instance RtkPosOf VariableInitializer where+ rtkPosOf (Anti_VariableInitializer _) = rtkNoPos+ rtkPosOf (Ctr__VariableInitializer__0 p _) = p+ rtkPosOf (Ctr__VariableInitializer__1 p _) = p+data VariableInitializerList = Anti_VariableInitializerList String |+ Ctr__VariableInitializerList__0 RtkPos |+ Ctr__VariableInitializerList__1 RtkPos Rule_56 deriving (Ord, Eq, Show, Gen.Data, Gen.Typeable) instance RtkPosOf VariableInitializerList where rtkPosOf (Anti_VariableInitializerList _) = rtkNoPos
test/golden/java/JavaQQ.hs view
@@ -64,7 +64,7 @@ _ -> err _ -> err -qqShortcuts = M.fromList [ ("java","Java"),("additiveOp","AdditiveOp"),("annotation","Annotation"),("annotationArguments","AnnotationArguments"),("annotationDeclaration","AnnotationDeclaration"),("annotationElement","AnnotationElement"),("annotationList","AnnotationList"),("annotationTypeElement","AnnotationTypeElement"),("annotationTypeElementList","AnnotationTypeElementList"),("arglist","Arglist"),("assignmentOp","AssignmentOp"),("catchList","CatchList"),("classDeclaration","ClassDeclaration"),("classOrInterfaceType","ClassOrInterfaceType"),("compilationUnit","CompilationUnit"),("compoundName","CompoundName"),("compoundNameTail","CompoundNameTail"),("creationExpression","CreationExpression"),("dimExprs","DimExprs"),("dims","Dims"),("doStatement","DoStatement"),("docComment","DocComment"),("enumConstant","EnumConstant"),("enumConstantList","EnumConstantList"),("enumDeclaration","EnumDeclaration"),("equalityOp","EqualityOp"),("expression","Expression"),("extendsList","ExtendsList"),("fieldDeclaration","FieldDeclaration"),("fieldDeclarationList","FieldDeclarationList"),("forStatement","ForStatement"),("ifStatement","IfStatement"),("implementsList","ImplementsList"),("importHead","ImportHead"),("importList","ImportList"),("importName","ImportName"),("importStatement","ImportStatement"),("interfaceDeclaration","InterfaceDeclaration"),("literal","Literal"),("localModifierList1","LocalModifierList1"),("memberAfterFirstId","MemberAfterFirstId"),("memberDeclaration","MemberDeclaration"),("memberRest","MemberRest"),("modifier","Modifier"),("modifierList","ModifierList"),("moreTypeSpecifier","MoreTypeSpecifier"),("moreVariableDeclarators","MoreVariableDeclarators"),("multiplicativeOp","MultiplicativeOp"),("nonEmptyDims","NonEmptyDims"),("nonEmptyTypeArguments","NonEmptyTypeArguments"),("optDocComment","OptDocComment"),("optElsePart","OptElsePart"),("optExpression","OptExpression"),("optFinally","OptFinally"),("optId","OptId"),("optVariableInitializer","OptVariableInitializer"),("package","Package"),("paramModifierList","ParamModifierList"),("parameter","Parameter"),("parameterList","ParameterList"),("postfixOp","PostfixOp"),("prefixOp","PrefixOp"),("primitiveTypeKeyword","PrimitiveTypeKeyword"),("relationalOp","RelationalOp"),("shiftOp","ShiftOp"),("statement","Statement"),("statementBlock","StatementBlock"),("statementList","StatementList"),("staticInitializer","StaticInitializer"),("switchCaseList","SwitchCaseList"),("switchStatement","SwitchStatement"),("throwsClause","ThrowsClause"),("tryStatement","TryStatement"),("type","Type"),("typeArgument","TypeArgument"),("typeArguments","TypeArguments"),("typeDeclRest","TypeDeclRest"),("typeDeclaration","TypeDeclaration"),("typeParameter","TypeParameter"),("typeParameters","TypeParameters"),("typeSpecifier","TypeSpecifier"),("variableDeclaration","VariableDeclaration"),("variableDeclarator","VariableDeclarator"),("variableDeclaratorList","VariableDeclaratorList"),("variableInitializer","VariableInitializer"),("variableInitializerList","VariableInitializerList"),("whileStatement","WhileStatement"),("wildcardType","WildcardType")]+qqShortcuts = M.fromList [ ("java","Java"),("additiveOp","AdditiveOp"),("annotation","Annotation"),("annotationArguments","AnnotationArguments"),("annotationDeclaration","AnnotationDeclaration"),("annotationElement","AnnotationElement"),("annotationList","AnnotationList"),("annotationTypeElement","AnnotationTypeElement"),("annotationTypeElementList","AnnotationTypeElementList"),("arglist","Arglist"),("arrayInitializer","ArrayInitializer"),("assignmentOp","AssignmentOp"),("catchList","CatchList"),("catchParameter","CatchParameter"),("classDeclaration","ClassDeclaration"),("classOrInterfaceType","ClassOrInterfaceType"),("compilationUnit","CompilationUnit"),("compilationUnitRest","CompilationUnitRest"),("compoundName","CompoundName"),("compoundNameTail","CompoundNameTail"),("creationExpression","CreationExpression"),("dimExprs","DimExprs"),("dims","Dims"),("doStatement","DoStatement"),("docComment","DocComment"),("elementValue","ElementValue"),("elementValueArrayInitializer","ElementValueArrayInitializer"),("enumConstant","EnumConstant"),("enumConstantList","EnumConstantList"),("enumDeclaration","EnumDeclaration"),("equalityOp","EqualityOp"),("expression","Expression"),("extendsList","ExtendsList"),("fieldDeclaration","FieldDeclaration"),("fieldDeclarationList","FieldDeclarationList"),("forEachHeader","ForEachHeader"),("forStatement","ForStatement"),("ifStatement","IfStatement"),("implementsList","ImplementsList"),("importHead","ImportHead"),("importList","ImportList"),("importName","ImportName"),("importStatement","ImportStatement"),("interfaceDeclaration","InterfaceDeclaration"),("lambdaBody","LambdaBody"),("literal","Literal"),("localModifierList1","LocalModifierList1"),("memberAfterFirstId","MemberAfterFirstId"),("memberDeclaration","MemberDeclaration"),("memberRest","MemberRest"),("modifier","Modifier"),("modifierList","ModifierList"),("moreTypeSpecifier","MoreTypeSpecifier"),("moreVariableDeclarators","MoreVariableDeclarators"),("multiplicativeOp","MultiplicativeOp"),("nonEmptyDims","NonEmptyDims"),("nonEmptyTypeArguments","NonEmptyTypeArguments"),("nonEmptyTypeParameters","NonEmptyTypeParameters"),("optDocComment","OptDocComment"),("optElsePart","OptElsePart"),("optExpression","OptExpression"),("optFinally","OptFinally"),("optId","OptId"),("optVariableInitializer","OptVariableInitializer"),("package","Package"),("paramModifierList","ParamModifierList"),("parameter","Parameter"),("parameterList","ParameterList"),("postfixOp","PostfixOp"),("prefixOp","PrefixOp"),("primitiveTypeKeyword","PrimitiveTypeKeyword"),("relationalOp","RelationalOp"),("resource","Resource"),("resourceSpec","ResourceSpec"),("shiftOp","ShiftOp"),("statement","Statement"),("statementBlock","StatementBlock"),("statementList","StatementList"),("staticInitializer","StaticInitializer"),("switchCaseList","SwitchCaseList"),("switchStatement","SwitchStatement"),("throwsClause","ThrowsClause"),("tryStatement","TryStatement"),("type","Type"),("typeArgument","TypeArgument"),("typeArguments","TypeArguments"),("typeDeclRest","TypeDeclRest"),("typeDeclaration","TypeDeclaration"),("typeDeclarationList","TypeDeclarationList"),("typeParameter","TypeParameter"),("typeParameters","TypeParameters"),("typeSpecifier","TypeSpecifier"),("variableDeclaration","VariableDeclaration"),("variableDeclarator","VariableDeclarator"),("variableDeclaratorList","VariableDeclaratorList"),("variableInitializer","VariableInitializer"),("variableInitializerList","VariableInitializerList"),("whileStatement","WhileStatement"),("wildcardType","WildcardType")] -- A quasi-quote pattern must match an AST parsed from anywhere in a source -- file, while the pattern itself was parsed from the quote body - so every@@ -81,7 +81,7 @@ Left err -> fail (rtkRenderError err) Right a -> return a let expr = func ast- dataToExpQ (const Nothing `Generics.extQ` antiJavaExp `Generics.extQ` antiOptDocCommentExp `Generics.extQ` antiTypeDeclarationExp `Generics.extQ` antiImportStatementExp `Generics.extQ` antiCompilationUnitExp `Generics.extQ` antiPackageExp `Generics.extQ` antiImportNameExp `Generics.extQ` antiImportHeadExp `Generics.extQ` antiDocCommentExp `Generics.extQ` antiAnnotationExp `Generics.extQ` antiAnnotationArgumentsExp `Generics.extQ` antiAnnotationElementExp `Generics.extQ` antiRule_10Exp `Generics.extQ` antiClassOrInterfaceTypeExp `Generics.extQ` antiExtendsListExp `Generics.extQ` antiImplementsListExp `Generics.extQ` antiFieldDeclarationExp `Generics.extQ` antiClassDeclarationExp `Generics.extQ` antiInterfaceDeclarationExp `Generics.extQ` antiAnnotationDeclarationExp `Generics.extQ` antiAnnotationTypeElementExp `Generics.extQ` antiEnumConstantExp `Generics.extQ` antiEnumConstantListExp `Generics.extQ` antiEnumDeclarationExp `Generics.extQ` antiTypeDeclRestExp `Generics.extQ` antiRule_31Exp `Generics.extQ` antiRule_33Exp `Generics.extQ` antiMemberDeclarationExp `Generics.extQ` antiPrimitiveTypeKeywordExp `Generics.extQ` antiMemberAfterFirstIdExp `Generics.extQ` antiMoreTypeSpecifierExp `Generics.extQ` antiThrowsClauseExp `Generics.extQ` antiMemberRestExp `Generics.extQ` antiRule_44Exp `Generics.extQ` antiStatementBlockExp `Generics.extQ` antiVariableDeclaratorListExp `Generics.extQ` antiVariableDeclarationExp `Generics.extQ` antiRule_48Exp `Generics.extQ` antiOptVariableInitializerExp `Generics.extQ` antiVariableDeclaratorExp `Generics.extQ` antiVariableInitializerListExp `Generics.extQ` antiVariableInitializerExp `Generics.extQ` antiStaticInitializerExp `Generics.extQ` antiParameterListExp `Generics.extQ` antiRule_57Exp `Generics.extQ` antiParameterExp `Generics.extQ` antiStatementExp `Generics.extQ` antiOptExpressionExp `Generics.extQ` antiOptIdExp `Generics.extQ` antiOptElsePartExp `Generics.extQ` antiIfStatementExp `Generics.extQ` antiDoStatementExp `Generics.extQ` antiWhileStatementExp `Generics.extQ` antiForStatementExp `Generics.extQ` antiRule_63Exp `Generics.extQ` antiOptFinallyExp `Generics.extQ` antiTryStatementExp `Generics.extQ` antiRule_66Exp `Generics.extQ` antiSwitchStatementExp `Generics.extQ` antiExpressionExp `Generics.extQ` antiAssignmentOpExp `Generics.extQ` antiEqualityOpExp `Generics.extQ` antiRelationalOpExp `Generics.extQ` antiShiftOpExp `Generics.extQ` antiAdditiveOpExp `Generics.extQ` antiMultiplicativeOpExp `Generics.extQ` antiPrefixOpExp `Generics.extQ` antiPostfixOpExp `Generics.extQ` antiCreationExpressionExp `Generics.extQ` antiRule_76Exp `Generics.extQ` antiLiteralExp `Generics.extQ` antiArglistExp `Generics.extQ` antiTypeArgumentsExp `Generics.extQ` antiNonEmptyTypeArgumentsExp `Generics.extQ` antiTypeArgumentExp `Generics.extQ` antiWildcardTypeExp `Generics.extQ` antiTypeParametersExp `Generics.extQ` antiTypeParameterExp `Generics.extQ` antiTypeExp `Generics.extQ` antiTypeSpecifierExp `Generics.extQ` antiModifierExp `Generics.extQ` antiRule_90Exp `Generics.extQ` antiCompoundNameExp) expr+ dataToExpQ (const Nothing `Generics.extQ` antiJavaExp `Generics.extQ` antiOptDocCommentExp `Generics.extQ` antiTypeDeclarationExp `Generics.extQ` antiImportStatementExp `Generics.extQ` antiCompilationUnitExp `Generics.extQ` antiCompilationUnitRestExp `Generics.extQ` antiPackageExp `Generics.extQ` antiImportNameExp `Generics.extQ` antiImportHeadExp `Generics.extQ` antiDocCommentExp `Generics.extQ` antiAnnotationExp `Generics.extQ` antiAnnotationArgumentsExp `Generics.extQ` antiAnnotationElementExp `Generics.extQ` antiElementValueExp `Generics.extQ` antiElementValueArrayInitializerExp `Generics.extQ` antiRule_15Exp `Generics.extQ` antiClassOrInterfaceTypeExp `Generics.extQ` antiExtendsListExp `Generics.extQ` antiImplementsListExp `Generics.extQ` antiFieldDeclarationExp `Generics.extQ` antiClassDeclarationExp `Generics.extQ` antiInterfaceDeclarationExp `Generics.extQ` antiAnnotationDeclarationExp `Generics.extQ` antiAnnotationTypeElementExp `Generics.extQ` antiEnumConstantExp `Generics.extQ` antiEnumConstantListExp `Generics.extQ` antiEnumDeclarationExp `Generics.extQ` antiTypeDeclRestExp `Generics.extQ` antiRule_36Exp `Generics.extQ` antiRule_38Exp `Generics.extQ` antiMemberDeclarationExp `Generics.extQ` antiPrimitiveTypeKeywordExp `Generics.extQ` antiMemberAfterFirstIdExp `Generics.extQ` antiMoreTypeSpecifierExp `Generics.extQ` antiThrowsClauseExp `Generics.extQ` antiMemberRestExp `Generics.extQ` antiRule_49Exp `Generics.extQ` antiStatementBlockExp `Generics.extQ` antiVariableDeclaratorListExp `Generics.extQ` antiVariableDeclarationExp `Generics.extQ` antiRule_53Exp `Generics.extQ` antiOptVariableInitializerExp `Generics.extQ` antiVariableDeclaratorExp `Generics.extQ` antiVariableInitializerListExp `Generics.extQ` antiVariableInitializerExp `Generics.extQ` antiArrayInitializerExp `Generics.extQ` antiStaticInitializerExp `Generics.extQ` antiParameterListExp `Generics.extQ` antiRule_62Exp `Generics.extQ` antiParameterExp `Generics.extQ` antiStatementExp `Generics.extQ` antiOptExpressionExp `Generics.extQ` antiOptIdExp `Generics.extQ` antiOptElsePartExp `Generics.extQ` antiIfStatementExp `Generics.extQ` antiDoStatementExp `Generics.extQ` antiWhileStatementExp `Generics.extQ` antiForStatementExp `Generics.extQ` antiForEachHeaderExp `Generics.extQ` antiRule_70Exp `Generics.extQ` antiCatchParameterExp `Generics.extQ` antiOptFinallyExp `Generics.extQ` antiTryStatementExp `Generics.extQ` antiResourceSpecExp `Generics.extQ` antiResourceExp `Generics.extQ` antiRule_79Exp `Generics.extQ` antiSwitchStatementExp `Generics.extQ` antiExpressionExp `Generics.extQ` antiLambdaBodyExp `Generics.extQ` antiAssignmentOpExp `Generics.extQ` antiEqualityOpExp `Generics.extQ` antiRelationalOpExp `Generics.extQ` antiShiftOpExp `Generics.extQ` antiAdditiveOpExp `Generics.extQ` antiMultiplicativeOpExp `Generics.extQ` antiPrefixOpExp `Generics.extQ` antiPostfixOpExp `Generics.extQ` antiCreationExpressionExp `Generics.extQ` antiRule_93Exp `Generics.extQ` antiLiteralExp `Generics.extQ` antiArglistExp `Generics.extQ` antiTypeArgumentsExp `Generics.extQ` antiNonEmptyTypeArgumentsExp `Generics.extQ` antiTypeArgumentExp `Generics.extQ` antiWildcardTypeExp `Generics.extQ` antiTypeParametersExp `Generics.extQ` antiNonEmptyTypeParametersExp `Generics.extQ` antiTypeParameterExp `Generics.extQ` antiTypeExp `Generics.extQ` antiTypeSpecifierExp `Generics.extQ` antiModifierExp `Generics.extQ` antiRule_106Exp `Generics.extQ` antiCompoundNameExp) expr quoteJavaPat :: Data.Data a => String -> (Java -> a) -> String -> TH.PatQ quoteJavaPat dummy func s = do s1 <- either fail return (replaceAllPatterns s)@@ -89,19 +89,19 @@ Left err -> fail (rtkRenderError err) Right a -> return a let expr = func ast- dataToPatQ (const Nothing `Generics.extQ` rtkPosWildPat `Generics.extQ` antiJavaPat `Generics.extQ` antiOptDocCommentPat `Generics.extQ` antiTypeDeclarationPat `Generics.extQ` antiImportStatementPat `Generics.extQ` antiCompilationUnitPat `Generics.extQ` antiPackagePat `Generics.extQ` antiImportNamePat `Generics.extQ` antiImportHeadPat `Generics.extQ` antiDocCommentPat `Generics.extQ` antiAnnotationPat `Generics.extQ` antiAnnotationArgumentsPat `Generics.extQ` antiAnnotationElementPat `Generics.extQ` antiRule_10Pat `Generics.extQ` antiClassOrInterfaceTypePat `Generics.extQ` antiExtendsListPat `Generics.extQ` antiImplementsListPat `Generics.extQ` antiFieldDeclarationPat `Generics.extQ` antiClassDeclarationPat `Generics.extQ` antiInterfaceDeclarationPat `Generics.extQ` antiAnnotationDeclarationPat `Generics.extQ` antiAnnotationTypeElementPat `Generics.extQ` antiEnumConstantPat `Generics.extQ` antiEnumConstantListPat `Generics.extQ` antiEnumDeclarationPat `Generics.extQ` antiTypeDeclRestPat `Generics.extQ` antiRule_31Pat `Generics.extQ` antiRule_33Pat `Generics.extQ` antiMemberDeclarationPat `Generics.extQ` antiPrimitiveTypeKeywordPat `Generics.extQ` antiMemberAfterFirstIdPat `Generics.extQ` antiMoreTypeSpecifierPat `Generics.extQ` antiThrowsClausePat `Generics.extQ` antiMemberRestPat `Generics.extQ` antiRule_44Pat `Generics.extQ` antiStatementBlockPat `Generics.extQ` antiVariableDeclaratorListPat `Generics.extQ` antiVariableDeclarationPat `Generics.extQ` antiRule_48Pat `Generics.extQ` antiOptVariableInitializerPat `Generics.extQ` antiVariableDeclaratorPat `Generics.extQ` antiVariableInitializerListPat `Generics.extQ` antiVariableInitializerPat `Generics.extQ` antiStaticInitializerPat `Generics.extQ` antiParameterListPat `Generics.extQ` antiRule_57Pat `Generics.extQ` antiParameterPat `Generics.extQ` antiStatementPat `Generics.extQ` antiOptExpressionPat `Generics.extQ` antiOptIdPat `Generics.extQ` antiOptElsePartPat `Generics.extQ` antiIfStatementPat `Generics.extQ` antiDoStatementPat `Generics.extQ` antiWhileStatementPat `Generics.extQ` antiForStatementPat `Generics.extQ` antiRule_63Pat `Generics.extQ` antiOptFinallyPat `Generics.extQ` antiTryStatementPat `Generics.extQ` antiRule_66Pat `Generics.extQ` antiSwitchStatementPat `Generics.extQ` antiExpressionPat `Generics.extQ` antiAssignmentOpPat `Generics.extQ` antiEqualityOpPat `Generics.extQ` antiRelationalOpPat `Generics.extQ` antiShiftOpPat `Generics.extQ` antiAdditiveOpPat `Generics.extQ` antiMultiplicativeOpPat `Generics.extQ` antiPrefixOpPat `Generics.extQ` antiPostfixOpPat `Generics.extQ` antiCreationExpressionPat `Generics.extQ` antiRule_76Pat `Generics.extQ` antiLiteralPat `Generics.extQ` antiArglistPat `Generics.extQ` antiTypeArgumentsPat `Generics.extQ` antiNonEmptyTypeArgumentsPat `Generics.extQ` antiTypeArgumentPat `Generics.extQ` antiWildcardTypePat `Generics.extQ` antiTypeParametersPat `Generics.extQ` antiTypeParameterPat `Generics.extQ` antiTypePat `Generics.extQ` antiTypeSpecifierPat `Generics.extQ` antiModifierPat `Generics.extQ` antiRule_90Pat `Generics.extQ` antiCompoundNamePat) expr+ dataToPatQ (const Nothing `Generics.extQ` rtkPosWildPat `Generics.extQ` antiJavaPat `Generics.extQ` antiOptDocCommentPat `Generics.extQ` antiTypeDeclarationPat `Generics.extQ` antiImportStatementPat `Generics.extQ` antiCompilationUnitPat `Generics.extQ` antiCompilationUnitRestPat `Generics.extQ` antiPackagePat `Generics.extQ` antiImportNamePat `Generics.extQ` antiImportHeadPat `Generics.extQ` antiDocCommentPat `Generics.extQ` antiAnnotationPat `Generics.extQ` antiAnnotationArgumentsPat `Generics.extQ` antiAnnotationElementPat `Generics.extQ` antiElementValuePat `Generics.extQ` antiElementValueArrayInitializerPat `Generics.extQ` antiRule_15Pat `Generics.extQ` antiClassOrInterfaceTypePat `Generics.extQ` antiExtendsListPat `Generics.extQ` antiImplementsListPat `Generics.extQ` antiFieldDeclarationPat `Generics.extQ` antiClassDeclarationPat `Generics.extQ` antiInterfaceDeclarationPat `Generics.extQ` antiAnnotationDeclarationPat `Generics.extQ` antiAnnotationTypeElementPat `Generics.extQ` antiEnumConstantPat `Generics.extQ` antiEnumConstantListPat `Generics.extQ` antiEnumDeclarationPat `Generics.extQ` antiTypeDeclRestPat `Generics.extQ` antiRule_36Pat `Generics.extQ` antiRule_38Pat `Generics.extQ` antiMemberDeclarationPat `Generics.extQ` antiPrimitiveTypeKeywordPat `Generics.extQ` antiMemberAfterFirstIdPat `Generics.extQ` antiMoreTypeSpecifierPat `Generics.extQ` antiThrowsClausePat `Generics.extQ` antiMemberRestPat `Generics.extQ` antiRule_49Pat `Generics.extQ` antiStatementBlockPat `Generics.extQ` antiVariableDeclaratorListPat `Generics.extQ` antiVariableDeclarationPat `Generics.extQ` antiRule_53Pat `Generics.extQ` antiOptVariableInitializerPat `Generics.extQ` antiVariableDeclaratorPat `Generics.extQ` antiVariableInitializerListPat `Generics.extQ` antiVariableInitializerPat `Generics.extQ` antiArrayInitializerPat `Generics.extQ` antiStaticInitializerPat `Generics.extQ` antiParameterListPat `Generics.extQ` antiRule_62Pat `Generics.extQ` antiParameterPat `Generics.extQ` antiStatementPat `Generics.extQ` antiOptExpressionPat `Generics.extQ` antiOptIdPat `Generics.extQ` antiOptElsePartPat `Generics.extQ` antiIfStatementPat `Generics.extQ` antiDoStatementPat `Generics.extQ` antiWhileStatementPat `Generics.extQ` antiForStatementPat `Generics.extQ` antiForEachHeaderPat `Generics.extQ` antiRule_70Pat `Generics.extQ` antiCatchParameterPat `Generics.extQ` antiOptFinallyPat `Generics.extQ` antiTryStatementPat `Generics.extQ` antiResourceSpecPat `Generics.extQ` antiResourcePat `Generics.extQ` antiRule_79Pat `Generics.extQ` antiSwitchStatementPat `Generics.extQ` antiExpressionPat `Generics.extQ` antiLambdaBodyPat `Generics.extQ` antiAssignmentOpPat `Generics.extQ` antiEqualityOpPat `Generics.extQ` antiRelationalOpPat `Generics.extQ` antiShiftOpPat `Generics.extQ` antiAdditiveOpPat `Generics.extQ` antiMultiplicativeOpPat `Generics.extQ` antiPrefixOpPat `Generics.extQ` antiPostfixOpPat `Generics.extQ` antiCreationExpressionPat `Generics.extQ` antiRule_93Pat `Generics.extQ` antiLiteralPat `Generics.extQ` antiArglistPat `Generics.extQ` antiTypeArgumentsPat `Generics.extQ` antiNonEmptyTypeArgumentsPat `Generics.extQ` antiTypeArgumentPat `Generics.extQ` antiWildcardTypePat `Generics.extQ` antiTypeParametersPat `Generics.extQ` antiNonEmptyTypeParametersPat `Generics.extQ` antiTypeParameterPat `Generics.extQ` antiTypePat `Generics.extQ` antiTypeSpecifierPat `Generics.extQ` antiModifierPat `Generics.extQ` antiRule_106Pat `Generics.extQ` antiCompoundNamePat) expr antiCompoundNameExp :: CompoundName -> Maybe (TH.Q TH.Exp ) antiCompoundNameExp ( Anti_CompoundName v) = Just $ TH.varE (TH.mkName v) antiCompoundNameExp _ = Nothing -antiRule_90Exp :: [ Rule_90 ] -> Maybe (TH.Q TH.Exp)-antiRule_90Exp ((Anti_Rule_90 v):rest) =- let restExp = dataToExpQ (const Nothing `Generics.extQ` antiJavaExp `Generics.extQ` antiOptDocCommentExp `Generics.extQ` antiTypeDeclarationExp `Generics.extQ` antiImportStatementExp `Generics.extQ` antiCompilationUnitExp `Generics.extQ` antiPackageExp `Generics.extQ` antiImportNameExp `Generics.extQ` antiImportHeadExp `Generics.extQ` antiDocCommentExp `Generics.extQ` antiAnnotationExp `Generics.extQ` antiAnnotationArgumentsExp `Generics.extQ` antiAnnotationElementExp `Generics.extQ` antiRule_10Exp `Generics.extQ` antiClassOrInterfaceTypeExp `Generics.extQ` antiExtendsListExp `Generics.extQ` antiImplementsListExp `Generics.extQ` antiFieldDeclarationExp `Generics.extQ` antiClassDeclarationExp `Generics.extQ` antiInterfaceDeclarationExp `Generics.extQ` antiAnnotationDeclarationExp `Generics.extQ` antiAnnotationTypeElementExp `Generics.extQ` antiEnumConstantExp `Generics.extQ` antiEnumConstantListExp `Generics.extQ` antiEnumDeclarationExp `Generics.extQ` antiTypeDeclRestExp `Generics.extQ` antiRule_31Exp `Generics.extQ` antiRule_33Exp `Generics.extQ` antiMemberDeclarationExp `Generics.extQ` antiPrimitiveTypeKeywordExp `Generics.extQ` antiMemberAfterFirstIdExp `Generics.extQ` antiMoreTypeSpecifierExp `Generics.extQ` antiThrowsClauseExp `Generics.extQ` antiMemberRestExp `Generics.extQ` antiRule_44Exp `Generics.extQ` antiStatementBlockExp `Generics.extQ` antiVariableDeclaratorListExp `Generics.extQ` antiVariableDeclarationExp `Generics.extQ` antiRule_48Exp `Generics.extQ` antiOptVariableInitializerExp `Generics.extQ` antiVariableDeclaratorExp `Generics.extQ` antiVariableInitializerListExp `Generics.extQ` antiVariableInitializerExp `Generics.extQ` antiStaticInitializerExp `Generics.extQ` antiParameterListExp `Generics.extQ` antiRule_57Exp `Generics.extQ` antiParameterExp `Generics.extQ` antiStatementExp `Generics.extQ` antiOptExpressionExp `Generics.extQ` antiOptIdExp `Generics.extQ` antiOptElsePartExp `Generics.extQ` antiIfStatementExp `Generics.extQ` antiDoStatementExp `Generics.extQ` antiWhileStatementExp `Generics.extQ` antiForStatementExp `Generics.extQ` antiRule_63Exp `Generics.extQ` antiOptFinallyExp `Generics.extQ` antiTryStatementExp `Generics.extQ` antiRule_66Exp `Generics.extQ` antiSwitchStatementExp `Generics.extQ` antiExpressionExp `Generics.extQ` antiAssignmentOpExp `Generics.extQ` antiEqualityOpExp `Generics.extQ` antiRelationalOpExp `Generics.extQ` antiShiftOpExp `Generics.extQ` antiAdditiveOpExp `Generics.extQ` antiMultiplicativeOpExp `Generics.extQ` antiPrefixOpExp `Generics.extQ` antiPostfixOpExp `Generics.extQ` antiCreationExpressionExp `Generics.extQ` antiRule_76Exp `Generics.extQ` antiLiteralExp `Generics.extQ` antiArglistExp `Generics.extQ` antiTypeArgumentsExp `Generics.extQ` antiNonEmptyTypeArgumentsExp `Generics.extQ` antiTypeArgumentExp `Generics.extQ` antiWildcardTypeExp `Generics.extQ` antiTypeParametersExp `Generics.extQ` antiTypeParameterExp `Generics.extQ` antiTypeExp `Generics.extQ` antiTypeSpecifierExp `Generics.extQ` antiModifierExp `Generics.extQ` antiRule_90Exp `Generics.extQ` antiCompoundNameExp) rest+antiRule_106Exp :: [ Rule_106 ] -> Maybe (TH.Q TH.Exp)+antiRule_106Exp ((Anti_Rule_106 v):rest) =+ let restExp = dataToExpQ (const Nothing `Generics.extQ` antiJavaExp `Generics.extQ` antiOptDocCommentExp `Generics.extQ` antiTypeDeclarationExp `Generics.extQ` antiImportStatementExp `Generics.extQ` antiCompilationUnitExp `Generics.extQ` antiCompilationUnitRestExp `Generics.extQ` antiPackageExp `Generics.extQ` antiImportNameExp `Generics.extQ` antiImportHeadExp `Generics.extQ` antiDocCommentExp `Generics.extQ` antiAnnotationExp `Generics.extQ` antiAnnotationArgumentsExp `Generics.extQ` antiAnnotationElementExp `Generics.extQ` antiElementValueExp `Generics.extQ` antiElementValueArrayInitializerExp `Generics.extQ` antiRule_15Exp `Generics.extQ` antiClassOrInterfaceTypeExp `Generics.extQ` antiExtendsListExp `Generics.extQ` antiImplementsListExp `Generics.extQ` antiFieldDeclarationExp `Generics.extQ` antiClassDeclarationExp `Generics.extQ` antiInterfaceDeclarationExp `Generics.extQ` antiAnnotationDeclarationExp `Generics.extQ` antiAnnotationTypeElementExp `Generics.extQ` antiEnumConstantExp `Generics.extQ` antiEnumConstantListExp `Generics.extQ` antiEnumDeclarationExp `Generics.extQ` antiTypeDeclRestExp `Generics.extQ` antiRule_36Exp `Generics.extQ` antiRule_38Exp `Generics.extQ` antiMemberDeclarationExp `Generics.extQ` antiPrimitiveTypeKeywordExp `Generics.extQ` antiMemberAfterFirstIdExp `Generics.extQ` antiMoreTypeSpecifierExp `Generics.extQ` antiThrowsClauseExp `Generics.extQ` antiMemberRestExp `Generics.extQ` antiRule_49Exp `Generics.extQ` antiStatementBlockExp `Generics.extQ` antiVariableDeclaratorListExp `Generics.extQ` antiVariableDeclarationExp `Generics.extQ` antiRule_53Exp `Generics.extQ` antiOptVariableInitializerExp `Generics.extQ` antiVariableDeclaratorExp `Generics.extQ` antiVariableInitializerListExp `Generics.extQ` antiVariableInitializerExp `Generics.extQ` antiArrayInitializerExp `Generics.extQ` antiStaticInitializerExp `Generics.extQ` antiParameterListExp `Generics.extQ` antiRule_62Exp `Generics.extQ` antiParameterExp `Generics.extQ` antiStatementExp `Generics.extQ` antiOptExpressionExp `Generics.extQ` antiOptIdExp `Generics.extQ` antiOptElsePartExp `Generics.extQ` antiIfStatementExp `Generics.extQ` antiDoStatementExp `Generics.extQ` antiWhileStatementExp `Generics.extQ` antiForStatementExp `Generics.extQ` antiForEachHeaderExp `Generics.extQ` antiRule_70Exp `Generics.extQ` antiCatchParameterExp `Generics.extQ` antiOptFinallyExp `Generics.extQ` antiTryStatementExp `Generics.extQ` antiResourceSpecExp `Generics.extQ` antiResourceExp `Generics.extQ` antiRule_79Exp `Generics.extQ` antiSwitchStatementExp `Generics.extQ` antiExpressionExp `Generics.extQ` antiLambdaBodyExp `Generics.extQ` antiAssignmentOpExp `Generics.extQ` antiEqualityOpExp `Generics.extQ` antiRelationalOpExp `Generics.extQ` antiShiftOpExp `Generics.extQ` antiAdditiveOpExp `Generics.extQ` antiMultiplicativeOpExp `Generics.extQ` antiPrefixOpExp `Generics.extQ` antiPostfixOpExp `Generics.extQ` antiCreationExpressionExp `Generics.extQ` antiRule_93Exp `Generics.extQ` antiLiteralExp `Generics.extQ` antiArglistExp `Generics.extQ` antiTypeArgumentsExp `Generics.extQ` antiNonEmptyTypeArgumentsExp `Generics.extQ` antiTypeArgumentExp `Generics.extQ` antiWildcardTypeExp `Generics.extQ` antiTypeParametersExp `Generics.extQ` antiNonEmptyTypeParametersExp `Generics.extQ` antiTypeParameterExp `Generics.extQ` antiTypeExp `Generics.extQ` antiTypeSpecifierExp `Generics.extQ` antiModifierExp `Generics.extQ` antiRule_106Exp `Generics.extQ` antiCompoundNameExp) rest lvar = TH.varE $ TH.mkName v in Just [| $lvar ++ $restExp |]-antiRule_90Exp _ = Nothing+antiRule_106Exp _ = Nothing antiModifierExp :: Modifier -> Maybe (TH.Q TH.Exp )@@ -124,6 +124,11 @@ antiTypeParameterExp _ = Nothing +antiNonEmptyTypeParametersExp :: NonEmptyTypeParameters -> Maybe (TH.Q TH.Exp )+antiNonEmptyTypeParametersExp ( Anti_NonEmptyTypeParameters v) = Just $ TH.varE (TH.mkName v)+antiNonEmptyTypeParametersExp _ = Nothing++ antiTypeParametersExp :: TypeParameters -> Maybe (TH.Q TH.Exp ) antiTypeParametersExp ( Anti_TypeParameters v) = Just $ TH.varE (TH.mkName v) antiTypeParametersExp _ = Nothing@@ -159,12 +164,12 @@ antiLiteralExp _ = Nothing -antiRule_76Exp :: [ Rule_76 ] -> Maybe (TH.Q TH.Exp)-antiRule_76Exp ((Anti_Rule_76 v):rest) =- let restExp = dataToExpQ (const Nothing `Generics.extQ` antiJavaExp `Generics.extQ` antiOptDocCommentExp `Generics.extQ` antiTypeDeclarationExp `Generics.extQ` antiImportStatementExp `Generics.extQ` antiCompilationUnitExp `Generics.extQ` antiPackageExp `Generics.extQ` antiImportNameExp `Generics.extQ` antiImportHeadExp `Generics.extQ` antiDocCommentExp `Generics.extQ` antiAnnotationExp `Generics.extQ` antiAnnotationArgumentsExp `Generics.extQ` antiAnnotationElementExp `Generics.extQ` antiRule_10Exp `Generics.extQ` antiClassOrInterfaceTypeExp `Generics.extQ` antiExtendsListExp `Generics.extQ` antiImplementsListExp `Generics.extQ` antiFieldDeclarationExp `Generics.extQ` antiClassDeclarationExp `Generics.extQ` antiInterfaceDeclarationExp `Generics.extQ` antiAnnotationDeclarationExp `Generics.extQ` antiAnnotationTypeElementExp `Generics.extQ` antiEnumConstantExp `Generics.extQ` antiEnumConstantListExp `Generics.extQ` antiEnumDeclarationExp `Generics.extQ` antiTypeDeclRestExp `Generics.extQ` antiRule_31Exp `Generics.extQ` antiRule_33Exp `Generics.extQ` antiMemberDeclarationExp `Generics.extQ` antiPrimitiveTypeKeywordExp `Generics.extQ` antiMemberAfterFirstIdExp `Generics.extQ` antiMoreTypeSpecifierExp `Generics.extQ` antiThrowsClauseExp `Generics.extQ` antiMemberRestExp `Generics.extQ` antiRule_44Exp `Generics.extQ` antiStatementBlockExp `Generics.extQ` antiVariableDeclaratorListExp `Generics.extQ` antiVariableDeclarationExp `Generics.extQ` antiRule_48Exp `Generics.extQ` antiOptVariableInitializerExp `Generics.extQ` antiVariableDeclaratorExp `Generics.extQ` antiVariableInitializerListExp `Generics.extQ` antiVariableInitializerExp `Generics.extQ` antiStaticInitializerExp `Generics.extQ` antiParameterListExp `Generics.extQ` antiRule_57Exp `Generics.extQ` antiParameterExp `Generics.extQ` antiStatementExp `Generics.extQ` antiOptExpressionExp `Generics.extQ` antiOptIdExp `Generics.extQ` antiOptElsePartExp `Generics.extQ` antiIfStatementExp `Generics.extQ` antiDoStatementExp `Generics.extQ` antiWhileStatementExp `Generics.extQ` antiForStatementExp `Generics.extQ` antiRule_63Exp `Generics.extQ` antiOptFinallyExp `Generics.extQ` antiTryStatementExp `Generics.extQ` antiRule_66Exp `Generics.extQ` antiSwitchStatementExp `Generics.extQ` antiExpressionExp `Generics.extQ` antiAssignmentOpExp `Generics.extQ` antiEqualityOpExp `Generics.extQ` antiRelationalOpExp `Generics.extQ` antiShiftOpExp `Generics.extQ` antiAdditiveOpExp `Generics.extQ` antiMultiplicativeOpExp `Generics.extQ` antiPrefixOpExp `Generics.extQ` antiPostfixOpExp `Generics.extQ` antiCreationExpressionExp `Generics.extQ` antiRule_76Exp `Generics.extQ` antiLiteralExp `Generics.extQ` antiArglistExp `Generics.extQ` antiTypeArgumentsExp `Generics.extQ` antiNonEmptyTypeArgumentsExp `Generics.extQ` antiTypeArgumentExp `Generics.extQ` antiWildcardTypeExp `Generics.extQ` antiTypeParametersExp `Generics.extQ` antiTypeParameterExp `Generics.extQ` antiTypeExp `Generics.extQ` antiTypeSpecifierExp `Generics.extQ` antiModifierExp `Generics.extQ` antiRule_90Exp `Generics.extQ` antiCompoundNameExp) rest+antiRule_93Exp :: [ Rule_93 ] -> Maybe (TH.Q TH.Exp)+antiRule_93Exp ((Anti_Rule_93 v):rest) =+ let restExp = dataToExpQ (const Nothing `Generics.extQ` antiJavaExp `Generics.extQ` antiOptDocCommentExp `Generics.extQ` antiTypeDeclarationExp `Generics.extQ` antiImportStatementExp `Generics.extQ` antiCompilationUnitExp `Generics.extQ` antiCompilationUnitRestExp `Generics.extQ` antiPackageExp `Generics.extQ` antiImportNameExp `Generics.extQ` antiImportHeadExp `Generics.extQ` antiDocCommentExp `Generics.extQ` antiAnnotationExp `Generics.extQ` antiAnnotationArgumentsExp `Generics.extQ` antiAnnotationElementExp `Generics.extQ` antiElementValueExp `Generics.extQ` antiElementValueArrayInitializerExp `Generics.extQ` antiRule_15Exp `Generics.extQ` antiClassOrInterfaceTypeExp `Generics.extQ` antiExtendsListExp `Generics.extQ` antiImplementsListExp `Generics.extQ` antiFieldDeclarationExp `Generics.extQ` antiClassDeclarationExp `Generics.extQ` antiInterfaceDeclarationExp `Generics.extQ` antiAnnotationDeclarationExp `Generics.extQ` antiAnnotationTypeElementExp `Generics.extQ` antiEnumConstantExp `Generics.extQ` antiEnumConstantListExp `Generics.extQ` antiEnumDeclarationExp `Generics.extQ` antiTypeDeclRestExp `Generics.extQ` antiRule_36Exp `Generics.extQ` antiRule_38Exp `Generics.extQ` antiMemberDeclarationExp `Generics.extQ` antiPrimitiveTypeKeywordExp `Generics.extQ` antiMemberAfterFirstIdExp `Generics.extQ` antiMoreTypeSpecifierExp `Generics.extQ` antiThrowsClauseExp `Generics.extQ` antiMemberRestExp `Generics.extQ` antiRule_49Exp `Generics.extQ` antiStatementBlockExp `Generics.extQ` antiVariableDeclaratorListExp `Generics.extQ` antiVariableDeclarationExp `Generics.extQ` antiRule_53Exp `Generics.extQ` antiOptVariableInitializerExp `Generics.extQ` antiVariableDeclaratorExp `Generics.extQ` antiVariableInitializerListExp `Generics.extQ` antiVariableInitializerExp `Generics.extQ` antiArrayInitializerExp `Generics.extQ` antiStaticInitializerExp `Generics.extQ` antiParameterListExp `Generics.extQ` antiRule_62Exp `Generics.extQ` antiParameterExp `Generics.extQ` antiStatementExp `Generics.extQ` antiOptExpressionExp `Generics.extQ` antiOptIdExp `Generics.extQ` antiOptElsePartExp `Generics.extQ` antiIfStatementExp `Generics.extQ` antiDoStatementExp `Generics.extQ` antiWhileStatementExp `Generics.extQ` antiForStatementExp `Generics.extQ` antiForEachHeaderExp `Generics.extQ` antiRule_70Exp `Generics.extQ` antiCatchParameterExp `Generics.extQ` antiOptFinallyExp `Generics.extQ` antiTryStatementExp `Generics.extQ` antiResourceSpecExp `Generics.extQ` antiResourceExp `Generics.extQ` antiRule_79Exp `Generics.extQ` antiSwitchStatementExp `Generics.extQ` antiExpressionExp `Generics.extQ` antiLambdaBodyExp `Generics.extQ` antiAssignmentOpExp `Generics.extQ` antiEqualityOpExp `Generics.extQ` antiRelationalOpExp `Generics.extQ` antiShiftOpExp `Generics.extQ` antiAdditiveOpExp `Generics.extQ` antiMultiplicativeOpExp `Generics.extQ` antiPrefixOpExp `Generics.extQ` antiPostfixOpExp `Generics.extQ` antiCreationExpressionExp `Generics.extQ` antiRule_93Exp `Generics.extQ` antiLiteralExp `Generics.extQ` antiArglistExp `Generics.extQ` antiTypeArgumentsExp `Generics.extQ` antiNonEmptyTypeArgumentsExp `Generics.extQ` antiTypeArgumentExp `Generics.extQ` antiWildcardTypeExp `Generics.extQ` antiTypeParametersExp `Generics.extQ` antiNonEmptyTypeParametersExp `Generics.extQ` antiTypeParameterExp `Generics.extQ` antiTypeExp `Generics.extQ` antiTypeSpecifierExp `Generics.extQ` antiModifierExp `Generics.extQ` antiRule_106Exp `Generics.extQ` antiCompoundNameExp) rest lvar = TH.varE $ TH.mkName v in Just [| $lvar ++ $restExp |]-antiRule_76Exp _ = Nothing+antiRule_93Exp _ = Nothing antiCreationExpressionExp :: CreationExpression -> Maybe (TH.Q TH.Exp )@@ -212,6 +217,11 @@ antiAssignmentOpExp _ = Nothing +antiLambdaBodyExp :: LambdaBody -> Maybe (TH.Q TH.Exp )+antiLambdaBodyExp ( Anti_LambdaBody v) = Just $ TH.varE (TH.mkName v)+antiLambdaBodyExp _ = Nothing++ antiExpressionExp :: Expression -> Maybe (TH.Q TH.Exp ) antiExpressionExp ( Anti_Expression v) = Just $ TH.varE (TH.mkName v) antiExpressionExp _ = Nothing@@ -222,14 +232,24 @@ antiSwitchStatementExp _ = Nothing -antiRule_66Exp :: [ Rule_66 ] -> Maybe (TH.Q TH.Exp)-antiRule_66Exp ((Anti_Rule_66 v):rest) =- let restExp = dataToExpQ (const Nothing `Generics.extQ` antiJavaExp `Generics.extQ` antiOptDocCommentExp `Generics.extQ` antiTypeDeclarationExp `Generics.extQ` antiImportStatementExp `Generics.extQ` antiCompilationUnitExp `Generics.extQ` antiPackageExp `Generics.extQ` antiImportNameExp `Generics.extQ` antiImportHeadExp `Generics.extQ` antiDocCommentExp `Generics.extQ` antiAnnotationExp `Generics.extQ` antiAnnotationArgumentsExp `Generics.extQ` antiAnnotationElementExp `Generics.extQ` antiRule_10Exp `Generics.extQ` antiClassOrInterfaceTypeExp `Generics.extQ` antiExtendsListExp `Generics.extQ` antiImplementsListExp `Generics.extQ` antiFieldDeclarationExp `Generics.extQ` antiClassDeclarationExp `Generics.extQ` antiInterfaceDeclarationExp `Generics.extQ` antiAnnotationDeclarationExp `Generics.extQ` antiAnnotationTypeElementExp `Generics.extQ` antiEnumConstantExp `Generics.extQ` antiEnumConstantListExp `Generics.extQ` antiEnumDeclarationExp `Generics.extQ` antiTypeDeclRestExp `Generics.extQ` antiRule_31Exp `Generics.extQ` antiRule_33Exp `Generics.extQ` antiMemberDeclarationExp `Generics.extQ` antiPrimitiveTypeKeywordExp `Generics.extQ` antiMemberAfterFirstIdExp `Generics.extQ` antiMoreTypeSpecifierExp `Generics.extQ` antiThrowsClauseExp `Generics.extQ` antiMemberRestExp `Generics.extQ` antiRule_44Exp `Generics.extQ` antiStatementBlockExp `Generics.extQ` antiVariableDeclaratorListExp `Generics.extQ` antiVariableDeclarationExp `Generics.extQ` antiRule_48Exp `Generics.extQ` antiOptVariableInitializerExp `Generics.extQ` antiVariableDeclaratorExp `Generics.extQ` antiVariableInitializerListExp `Generics.extQ` antiVariableInitializerExp `Generics.extQ` antiStaticInitializerExp `Generics.extQ` antiParameterListExp `Generics.extQ` antiRule_57Exp `Generics.extQ` antiParameterExp `Generics.extQ` antiStatementExp `Generics.extQ` antiOptExpressionExp `Generics.extQ` antiOptIdExp `Generics.extQ` antiOptElsePartExp `Generics.extQ` antiIfStatementExp `Generics.extQ` antiDoStatementExp `Generics.extQ` antiWhileStatementExp `Generics.extQ` antiForStatementExp `Generics.extQ` antiRule_63Exp `Generics.extQ` antiOptFinallyExp `Generics.extQ` antiTryStatementExp `Generics.extQ` antiRule_66Exp `Generics.extQ` antiSwitchStatementExp `Generics.extQ` antiExpressionExp `Generics.extQ` antiAssignmentOpExp `Generics.extQ` antiEqualityOpExp `Generics.extQ` antiRelationalOpExp `Generics.extQ` antiShiftOpExp `Generics.extQ` antiAdditiveOpExp `Generics.extQ` antiMultiplicativeOpExp `Generics.extQ` antiPrefixOpExp `Generics.extQ` antiPostfixOpExp `Generics.extQ` antiCreationExpressionExp `Generics.extQ` antiRule_76Exp `Generics.extQ` antiLiteralExp `Generics.extQ` antiArglistExp `Generics.extQ` antiTypeArgumentsExp `Generics.extQ` antiNonEmptyTypeArgumentsExp `Generics.extQ` antiTypeArgumentExp `Generics.extQ` antiWildcardTypeExp `Generics.extQ` antiTypeParametersExp `Generics.extQ` antiTypeParameterExp `Generics.extQ` antiTypeExp `Generics.extQ` antiTypeSpecifierExp `Generics.extQ` antiModifierExp `Generics.extQ` antiRule_90Exp `Generics.extQ` antiCompoundNameExp) rest+antiRule_79Exp :: [ Rule_79 ] -> Maybe (TH.Q TH.Exp)+antiRule_79Exp ((Anti_Rule_79 v):rest) =+ let restExp = dataToExpQ (const Nothing `Generics.extQ` antiJavaExp `Generics.extQ` antiOptDocCommentExp `Generics.extQ` antiTypeDeclarationExp `Generics.extQ` antiImportStatementExp `Generics.extQ` antiCompilationUnitExp `Generics.extQ` antiCompilationUnitRestExp `Generics.extQ` antiPackageExp `Generics.extQ` antiImportNameExp `Generics.extQ` antiImportHeadExp `Generics.extQ` antiDocCommentExp `Generics.extQ` antiAnnotationExp `Generics.extQ` antiAnnotationArgumentsExp `Generics.extQ` antiAnnotationElementExp `Generics.extQ` antiElementValueExp `Generics.extQ` antiElementValueArrayInitializerExp `Generics.extQ` antiRule_15Exp `Generics.extQ` antiClassOrInterfaceTypeExp `Generics.extQ` antiExtendsListExp `Generics.extQ` antiImplementsListExp `Generics.extQ` antiFieldDeclarationExp `Generics.extQ` antiClassDeclarationExp `Generics.extQ` antiInterfaceDeclarationExp `Generics.extQ` antiAnnotationDeclarationExp `Generics.extQ` antiAnnotationTypeElementExp `Generics.extQ` antiEnumConstantExp `Generics.extQ` antiEnumConstantListExp `Generics.extQ` antiEnumDeclarationExp `Generics.extQ` antiTypeDeclRestExp `Generics.extQ` antiRule_36Exp `Generics.extQ` antiRule_38Exp `Generics.extQ` antiMemberDeclarationExp `Generics.extQ` antiPrimitiveTypeKeywordExp `Generics.extQ` antiMemberAfterFirstIdExp `Generics.extQ` antiMoreTypeSpecifierExp `Generics.extQ` antiThrowsClauseExp `Generics.extQ` antiMemberRestExp `Generics.extQ` antiRule_49Exp `Generics.extQ` antiStatementBlockExp `Generics.extQ` antiVariableDeclaratorListExp `Generics.extQ` antiVariableDeclarationExp `Generics.extQ` antiRule_53Exp `Generics.extQ` antiOptVariableInitializerExp `Generics.extQ` antiVariableDeclaratorExp `Generics.extQ` antiVariableInitializerListExp `Generics.extQ` antiVariableInitializerExp `Generics.extQ` antiArrayInitializerExp `Generics.extQ` antiStaticInitializerExp `Generics.extQ` antiParameterListExp `Generics.extQ` antiRule_62Exp `Generics.extQ` antiParameterExp `Generics.extQ` antiStatementExp `Generics.extQ` antiOptExpressionExp `Generics.extQ` antiOptIdExp `Generics.extQ` antiOptElsePartExp `Generics.extQ` antiIfStatementExp `Generics.extQ` antiDoStatementExp `Generics.extQ` antiWhileStatementExp `Generics.extQ` antiForStatementExp `Generics.extQ` antiForEachHeaderExp `Generics.extQ` antiRule_70Exp `Generics.extQ` antiCatchParameterExp `Generics.extQ` antiOptFinallyExp `Generics.extQ` antiTryStatementExp `Generics.extQ` antiResourceSpecExp `Generics.extQ` antiResourceExp `Generics.extQ` antiRule_79Exp `Generics.extQ` antiSwitchStatementExp `Generics.extQ` antiExpressionExp `Generics.extQ` antiLambdaBodyExp `Generics.extQ` antiAssignmentOpExp `Generics.extQ` antiEqualityOpExp `Generics.extQ` antiRelationalOpExp `Generics.extQ` antiShiftOpExp `Generics.extQ` antiAdditiveOpExp `Generics.extQ` antiMultiplicativeOpExp `Generics.extQ` antiPrefixOpExp `Generics.extQ` antiPostfixOpExp `Generics.extQ` antiCreationExpressionExp `Generics.extQ` antiRule_93Exp `Generics.extQ` antiLiteralExp `Generics.extQ` antiArglistExp `Generics.extQ` antiTypeArgumentsExp `Generics.extQ` antiNonEmptyTypeArgumentsExp `Generics.extQ` antiTypeArgumentExp `Generics.extQ` antiWildcardTypeExp `Generics.extQ` antiTypeParametersExp `Generics.extQ` antiNonEmptyTypeParametersExp `Generics.extQ` antiTypeParameterExp `Generics.extQ` antiTypeExp `Generics.extQ` antiTypeSpecifierExp `Generics.extQ` antiModifierExp `Generics.extQ` antiRule_106Exp `Generics.extQ` antiCompoundNameExp) rest lvar = TH.varE $ TH.mkName v in Just [| $lvar ++ $restExp |]-antiRule_66Exp _ = Nothing+antiRule_79Exp _ = Nothing +antiResourceExp :: Resource -> Maybe (TH.Q TH.Exp )+antiResourceExp ( Anti_Resource v) = Just $ TH.varE (TH.mkName v)+antiResourceExp _ = Nothing+++antiResourceSpecExp :: ResourceSpec -> Maybe (TH.Q TH.Exp )+antiResourceSpecExp ( Anti_ResourceSpec v) = Just $ TH.varE (TH.mkName v)+antiResourceSpecExp _ = Nothing++ antiTryStatementExp :: TryStatement -> Maybe (TH.Q TH.Exp ) antiTryStatementExp ( Anti_TryStatement v) = Just $ TH.varE (TH.mkName v) antiTryStatementExp _ = Nothing@@ -240,14 +260,24 @@ antiOptFinallyExp _ = Nothing -antiRule_63Exp :: [ Rule_63 ] -> Maybe (TH.Q TH.Exp)-antiRule_63Exp ((Anti_Rule_63 v):rest) =- let restExp = dataToExpQ (const Nothing `Generics.extQ` antiJavaExp `Generics.extQ` antiOptDocCommentExp `Generics.extQ` antiTypeDeclarationExp `Generics.extQ` antiImportStatementExp `Generics.extQ` antiCompilationUnitExp `Generics.extQ` antiPackageExp `Generics.extQ` antiImportNameExp `Generics.extQ` antiImportHeadExp `Generics.extQ` antiDocCommentExp `Generics.extQ` antiAnnotationExp `Generics.extQ` antiAnnotationArgumentsExp `Generics.extQ` antiAnnotationElementExp `Generics.extQ` antiRule_10Exp `Generics.extQ` antiClassOrInterfaceTypeExp `Generics.extQ` antiExtendsListExp `Generics.extQ` antiImplementsListExp `Generics.extQ` antiFieldDeclarationExp `Generics.extQ` antiClassDeclarationExp `Generics.extQ` antiInterfaceDeclarationExp `Generics.extQ` antiAnnotationDeclarationExp `Generics.extQ` antiAnnotationTypeElementExp `Generics.extQ` antiEnumConstantExp `Generics.extQ` antiEnumConstantListExp `Generics.extQ` antiEnumDeclarationExp `Generics.extQ` antiTypeDeclRestExp `Generics.extQ` antiRule_31Exp `Generics.extQ` antiRule_33Exp `Generics.extQ` antiMemberDeclarationExp `Generics.extQ` antiPrimitiveTypeKeywordExp `Generics.extQ` antiMemberAfterFirstIdExp `Generics.extQ` antiMoreTypeSpecifierExp `Generics.extQ` antiThrowsClauseExp `Generics.extQ` antiMemberRestExp `Generics.extQ` antiRule_44Exp `Generics.extQ` antiStatementBlockExp `Generics.extQ` antiVariableDeclaratorListExp `Generics.extQ` antiVariableDeclarationExp `Generics.extQ` antiRule_48Exp `Generics.extQ` antiOptVariableInitializerExp `Generics.extQ` antiVariableDeclaratorExp `Generics.extQ` antiVariableInitializerListExp `Generics.extQ` antiVariableInitializerExp `Generics.extQ` antiStaticInitializerExp `Generics.extQ` antiParameterListExp `Generics.extQ` antiRule_57Exp `Generics.extQ` antiParameterExp `Generics.extQ` antiStatementExp `Generics.extQ` antiOptExpressionExp `Generics.extQ` antiOptIdExp `Generics.extQ` antiOptElsePartExp `Generics.extQ` antiIfStatementExp `Generics.extQ` antiDoStatementExp `Generics.extQ` antiWhileStatementExp `Generics.extQ` antiForStatementExp `Generics.extQ` antiRule_63Exp `Generics.extQ` antiOptFinallyExp `Generics.extQ` antiTryStatementExp `Generics.extQ` antiRule_66Exp `Generics.extQ` antiSwitchStatementExp `Generics.extQ` antiExpressionExp `Generics.extQ` antiAssignmentOpExp `Generics.extQ` antiEqualityOpExp `Generics.extQ` antiRelationalOpExp `Generics.extQ` antiShiftOpExp `Generics.extQ` antiAdditiveOpExp `Generics.extQ` antiMultiplicativeOpExp `Generics.extQ` antiPrefixOpExp `Generics.extQ` antiPostfixOpExp `Generics.extQ` antiCreationExpressionExp `Generics.extQ` antiRule_76Exp `Generics.extQ` antiLiteralExp `Generics.extQ` antiArglistExp `Generics.extQ` antiTypeArgumentsExp `Generics.extQ` antiNonEmptyTypeArgumentsExp `Generics.extQ` antiTypeArgumentExp `Generics.extQ` antiWildcardTypeExp `Generics.extQ` antiTypeParametersExp `Generics.extQ` antiTypeParameterExp `Generics.extQ` antiTypeExp `Generics.extQ` antiTypeSpecifierExp `Generics.extQ` antiModifierExp `Generics.extQ` antiRule_90Exp `Generics.extQ` antiCompoundNameExp) rest+antiCatchParameterExp :: CatchParameter -> Maybe (TH.Q TH.Exp )+antiCatchParameterExp ( Anti_CatchParameter v) = Just $ TH.varE (TH.mkName v)+antiCatchParameterExp _ = Nothing+++antiRule_70Exp :: [ Rule_70 ] -> Maybe (TH.Q TH.Exp)+antiRule_70Exp ((Anti_Rule_70 v):rest) =+ let restExp = dataToExpQ (const Nothing `Generics.extQ` antiJavaExp `Generics.extQ` antiOptDocCommentExp `Generics.extQ` antiTypeDeclarationExp `Generics.extQ` antiImportStatementExp `Generics.extQ` antiCompilationUnitExp `Generics.extQ` antiCompilationUnitRestExp `Generics.extQ` antiPackageExp `Generics.extQ` antiImportNameExp `Generics.extQ` antiImportHeadExp `Generics.extQ` antiDocCommentExp `Generics.extQ` antiAnnotationExp `Generics.extQ` antiAnnotationArgumentsExp `Generics.extQ` antiAnnotationElementExp `Generics.extQ` antiElementValueExp `Generics.extQ` antiElementValueArrayInitializerExp `Generics.extQ` antiRule_15Exp `Generics.extQ` antiClassOrInterfaceTypeExp `Generics.extQ` antiExtendsListExp `Generics.extQ` antiImplementsListExp `Generics.extQ` antiFieldDeclarationExp `Generics.extQ` antiClassDeclarationExp `Generics.extQ` antiInterfaceDeclarationExp `Generics.extQ` antiAnnotationDeclarationExp `Generics.extQ` antiAnnotationTypeElementExp `Generics.extQ` antiEnumConstantExp `Generics.extQ` antiEnumConstantListExp `Generics.extQ` antiEnumDeclarationExp `Generics.extQ` antiTypeDeclRestExp `Generics.extQ` antiRule_36Exp `Generics.extQ` antiRule_38Exp `Generics.extQ` antiMemberDeclarationExp `Generics.extQ` antiPrimitiveTypeKeywordExp `Generics.extQ` antiMemberAfterFirstIdExp `Generics.extQ` antiMoreTypeSpecifierExp `Generics.extQ` antiThrowsClauseExp `Generics.extQ` antiMemberRestExp `Generics.extQ` antiRule_49Exp `Generics.extQ` antiStatementBlockExp `Generics.extQ` antiVariableDeclaratorListExp `Generics.extQ` antiVariableDeclarationExp `Generics.extQ` antiRule_53Exp `Generics.extQ` antiOptVariableInitializerExp `Generics.extQ` antiVariableDeclaratorExp `Generics.extQ` antiVariableInitializerListExp `Generics.extQ` antiVariableInitializerExp `Generics.extQ` antiArrayInitializerExp `Generics.extQ` antiStaticInitializerExp `Generics.extQ` antiParameterListExp `Generics.extQ` antiRule_62Exp `Generics.extQ` antiParameterExp `Generics.extQ` antiStatementExp `Generics.extQ` antiOptExpressionExp `Generics.extQ` antiOptIdExp `Generics.extQ` antiOptElsePartExp `Generics.extQ` antiIfStatementExp `Generics.extQ` antiDoStatementExp `Generics.extQ` antiWhileStatementExp `Generics.extQ` antiForStatementExp `Generics.extQ` antiForEachHeaderExp `Generics.extQ` antiRule_70Exp `Generics.extQ` antiCatchParameterExp `Generics.extQ` antiOptFinallyExp `Generics.extQ` antiTryStatementExp `Generics.extQ` antiResourceSpecExp `Generics.extQ` antiResourceExp `Generics.extQ` antiRule_79Exp `Generics.extQ` antiSwitchStatementExp `Generics.extQ` antiExpressionExp `Generics.extQ` antiLambdaBodyExp `Generics.extQ` antiAssignmentOpExp `Generics.extQ` antiEqualityOpExp `Generics.extQ` antiRelationalOpExp `Generics.extQ` antiShiftOpExp `Generics.extQ` antiAdditiveOpExp `Generics.extQ` antiMultiplicativeOpExp `Generics.extQ` antiPrefixOpExp `Generics.extQ` antiPostfixOpExp `Generics.extQ` antiCreationExpressionExp `Generics.extQ` antiRule_93Exp `Generics.extQ` antiLiteralExp `Generics.extQ` antiArglistExp `Generics.extQ` antiTypeArgumentsExp `Generics.extQ` antiNonEmptyTypeArgumentsExp `Generics.extQ` antiTypeArgumentExp `Generics.extQ` antiWildcardTypeExp `Generics.extQ` antiTypeParametersExp `Generics.extQ` antiNonEmptyTypeParametersExp `Generics.extQ` antiTypeParameterExp `Generics.extQ` antiTypeExp `Generics.extQ` antiTypeSpecifierExp `Generics.extQ` antiModifierExp `Generics.extQ` antiRule_106Exp `Generics.extQ` antiCompoundNameExp) rest lvar = TH.varE $ TH.mkName v in Just [| $lvar ++ $restExp |]-antiRule_63Exp _ = Nothing+antiRule_70Exp _ = Nothing +antiForEachHeaderExp :: ForEachHeader -> Maybe (TH.Q TH.Exp )+antiForEachHeaderExp ( Anti_ForEachHeader v) = Just $ TH.varE (TH.mkName v)+antiForEachHeaderExp _ = Nothing++ antiForStatementExp :: ForStatement -> Maybe (TH.Q TH.Exp ) antiForStatementExp ( Anti_ForStatement v) = Just $ TH.varE (TH.mkName v) antiForStatementExp _ = Nothing@@ -285,7 +315,7 @@ antiStatementExp :: [ Statement ] -> Maybe (TH.Q TH.Exp) antiStatementExp ((Anti_Statement v):rest) =- let restExp = dataToExpQ (const Nothing `Generics.extQ` antiJavaExp `Generics.extQ` antiOptDocCommentExp `Generics.extQ` antiTypeDeclarationExp `Generics.extQ` antiImportStatementExp `Generics.extQ` antiCompilationUnitExp `Generics.extQ` antiPackageExp `Generics.extQ` antiImportNameExp `Generics.extQ` antiImportHeadExp `Generics.extQ` antiDocCommentExp `Generics.extQ` antiAnnotationExp `Generics.extQ` antiAnnotationArgumentsExp `Generics.extQ` antiAnnotationElementExp `Generics.extQ` antiRule_10Exp `Generics.extQ` antiClassOrInterfaceTypeExp `Generics.extQ` antiExtendsListExp `Generics.extQ` antiImplementsListExp `Generics.extQ` antiFieldDeclarationExp `Generics.extQ` antiClassDeclarationExp `Generics.extQ` antiInterfaceDeclarationExp `Generics.extQ` antiAnnotationDeclarationExp `Generics.extQ` antiAnnotationTypeElementExp `Generics.extQ` antiEnumConstantExp `Generics.extQ` antiEnumConstantListExp `Generics.extQ` antiEnumDeclarationExp `Generics.extQ` antiTypeDeclRestExp `Generics.extQ` antiRule_31Exp `Generics.extQ` antiRule_33Exp `Generics.extQ` antiMemberDeclarationExp `Generics.extQ` antiPrimitiveTypeKeywordExp `Generics.extQ` antiMemberAfterFirstIdExp `Generics.extQ` antiMoreTypeSpecifierExp `Generics.extQ` antiThrowsClauseExp `Generics.extQ` antiMemberRestExp `Generics.extQ` antiRule_44Exp `Generics.extQ` antiStatementBlockExp `Generics.extQ` antiVariableDeclaratorListExp `Generics.extQ` antiVariableDeclarationExp `Generics.extQ` antiRule_48Exp `Generics.extQ` antiOptVariableInitializerExp `Generics.extQ` antiVariableDeclaratorExp `Generics.extQ` antiVariableInitializerListExp `Generics.extQ` antiVariableInitializerExp `Generics.extQ` antiStaticInitializerExp `Generics.extQ` antiParameterListExp `Generics.extQ` antiRule_57Exp `Generics.extQ` antiParameterExp `Generics.extQ` antiStatementExp `Generics.extQ` antiOptExpressionExp `Generics.extQ` antiOptIdExp `Generics.extQ` antiOptElsePartExp `Generics.extQ` antiIfStatementExp `Generics.extQ` antiDoStatementExp `Generics.extQ` antiWhileStatementExp `Generics.extQ` antiForStatementExp `Generics.extQ` antiRule_63Exp `Generics.extQ` antiOptFinallyExp `Generics.extQ` antiTryStatementExp `Generics.extQ` antiRule_66Exp `Generics.extQ` antiSwitchStatementExp `Generics.extQ` antiExpressionExp `Generics.extQ` antiAssignmentOpExp `Generics.extQ` antiEqualityOpExp `Generics.extQ` antiRelationalOpExp `Generics.extQ` antiShiftOpExp `Generics.extQ` antiAdditiveOpExp `Generics.extQ` antiMultiplicativeOpExp `Generics.extQ` antiPrefixOpExp `Generics.extQ` antiPostfixOpExp `Generics.extQ` antiCreationExpressionExp `Generics.extQ` antiRule_76Exp `Generics.extQ` antiLiteralExp `Generics.extQ` antiArglistExp `Generics.extQ` antiTypeArgumentsExp `Generics.extQ` antiNonEmptyTypeArgumentsExp `Generics.extQ` antiTypeArgumentExp `Generics.extQ` antiWildcardTypeExp `Generics.extQ` antiTypeParametersExp `Generics.extQ` antiTypeParameterExp `Generics.extQ` antiTypeExp `Generics.extQ` antiTypeSpecifierExp `Generics.extQ` antiModifierExp `Generics.extQ` antiRule_90Exp `Generics.extQ` antiCompoundNameExp) rest+ let restExp = dataToExpQ (const Nothing `Generics.extQ` antiJavaExp `Generics.extQ` antiOptDocCommentExp `Generics.extQ` antiTypeDeclarationExp `Generics.extQ` antiImportStatementExp `Generics.extQ` antiCompilationUnitExp `Generics.extQ` antiCompilationUnitRestExp `Generics.extQ` antiPackageExp `Generics.extQ` antiImportNameExp `Generics.extQ` antiImportHeadExp `Generics.extQ` antiDocCommentExp `Generics.extQ` antiAnnotationExp `Generics.extQ` antiAnnotationArgumentsExp `Generics.extQ` antiAnnotationElementExp `Generics.extQ` antiElementValueExp `Generics.extQ` antiElementValueArrayInitializerExp `Generics.extQ` antiRule_15Exp `Generics.extQ` antiClassOrInterfaceTypeExp `Generics.extQ` antiExtendsListExp `Generics.extQ` antiImplementsListExp `Generics.extQ` antiFieldDeclarationExp `Generics.extQ` antiClassDeclarationExp `Generics.extQ` antiInterfaceDeclarationExp `Generics.extQ` antiAnnotationDeclarationExp `Generics.extQ` antiAnnotationTypeElementExp `Generics.extQ` antiEnumConstantExp `Generics.extQ` antiEnumConstantListExp `Generics.extQ` antiEnumDeclarationExp `Generics.extQ` antiTypeDeclRestExp `Generics.extQ` antiRule_36Exp `Generics.extQ` antiRule_38Exp `Generics.extQ` antiMemberDeclarationExp `Generics.extQ` antiPrimitiveTypeKeywordExp `Generics.extQ` antiMemberAfterFirstIdExp `Generics.extQ` antiMoreTypeSpecifierExp `Generics.extQ` antiThrowsClauseExp `Generics.extQ` antiMemberRestExp `Generics.extQ` antiRule_49Exp `Generics.extQ` antiStatementBlockExp `Generics.extQ` antiVariableDeclaratorListExp `Generics.extQ` antiVariableDeclarationExp `Generics.extQ` antiRule_53Exp `Generics.extQ` antiOptVariableInitializerExp `Generics.extQ` antiVariableDeclaratorExp `Generics.extQ` antiVariableInitializerListExp `Generics.extQ` antiVariableInitializerExp `Generics.extQ` antiArrayInitializerExp `Generics.extQ` antiStaticInitializerExp `Generics.extQ` antiParameterListExp `Generics.extQ` antiRule_62Exp `Generics.extQ` antiParameterExp `Generics.extQ` antiStatementExp `Generics.extQ` antiOptExpressionExp `Generics.extQ` antiOptIdExp `Generics.extQ` antiOptElsePartExp `Generics.extQ` antiIfStatementExp `Generics.extQ` antiDoStatementExp `Generics.extQ` antiWhileStatementExp `Generics.extQ` antiForStatementExp `Generics.extQ` antiForEachHeaderExp `Generics.extQ` antiRule_70Exp `Generics.extQ` antiCatchParameterExp `Generics.extQ` antiOptFinallyExp `Generics.extQ` antiTryStatementExp `Generics.extQ` antiResourceSpecExp `Generics.extQ` antiResourceExp `Generics.extQ` antiRule_79Exp `Generics.extQ` antiSwitchStatementExp `Generics.extQ` antiExpressionExp `Generics.extQ` antiLambdaBodyExp `Generics.extQ` antiAssignmentOpExp `Generics.extQ` antiEqualityOpExp `Generics.extQ` antiRelationalOpExp `Generics.extQ` antiShiftOpExp `Generics.extQ` antiAdditiveOpExp `Generics.extQ` antiMultiplicativeOpExp `Generics.extQ` antiPrefixOpExp `Generics.extQ` antiPostfixOpExp `Generics.extQ` antiCreationExpressionExp `Generics.extQ` antiRule_93Exp `Generics.extQ` antiLiteralExp `Generics.extQ` antiArglistExp `Generics.extQ` antiTypeArgumentsExp `Generics.extQ` antiNonEmptyTypeArgumentsExp `Generics.extQ` antiTypeArgumentExp `Generics.extQ` antiWildcardTypeExp `Generics.extQ` antiTypeParametersExp `Generics.extQ` antiNonEmptyTypeParametersExp `Generics.extQ` antiTypeParameterExp `Generics.extQ` antiTypeExp `Generics.extQ` antiTypeSpecifierExp `Generics.extQ` antiModifierExp `Generics.extQ` antiRule_106Exp `Generics.extQ` antiCompoundNameExp) rest lvar = TH.varE $ TH.mkName v in Just [| $lvar ++ $restExp |] antiStatementExp _ = Nothing@@ -296,12 +326,12 @@ antiParameterExp _ = Nothing -antiRule_57Exp :: [ Rule_57 ] -> Maybe (TH.Q TH.Exp)-antiRule_57Exp ((Anti_Rule_57 v):rest) =- let restExp = dataToExpQ (const Nothing `Generics.extQ` antiJavaExp `Generics.extQ` antiOptDocCommentExp `Generics.extQ` antiTypeDeclarationExp `Generics.extQ` antiImportStatementExp `Generics.extQ` antiCompilationUnitExp `Generics.extQ` antiPackageExp `Generics.extQ` antiImportNameExp `Generics.extQ` antiImportHeadExp `Generics.extQ` antiDocCommentExp `Generics.extQ` antiAnnotationExp `Generics.extQ` antiAnnotationArgumentsExp `Generics.extQ` antiAnnotationElementExp `Generics.extQ` antiRule_10Exp `Generics.extQ` antiClassOrInterfaceTypeExp `Generics.extQ` antiExtendsListExp `Generics.extQ` antiImplementsListExp `Generics.extQ` antiFieldDeclarationExp `Generics.extQ` antiClassDeclarationExp `Generics.extQ` antiInterfaceDeclarationExp `Generics.extQ` antiAnnotationDeclarationExp `Generics.extQ` antiAnnotationTypeElementExp `Generics.extQ` antiEnumConstantExp `Generics.extQ` antiEnumConstantListExp `Generics.extQ` antiEnumDeclarationExp `Generics.extQ` antiTypeDeclRestExp `Generics.extQ` antiRule_31Exp `Generics.extQ` antiRule_33Exp `Generics.extQ` antiMemberDeclarationExp `Generics.extQ` antiPrimitiveTypeKeywordExp `Generics.extQ` antiMemberAfterFirstIdExp `Generics.extQ` antiMoreTypeSpecifierExp `Generics.extQ` antiThrowsClauseExp `Generics.extQ` antiMemberRestExp `Generics.extQ` antiRule_44Exp `Generics.extQ` antiStatementBlockExp `Generics.extQ` antiVariableDeclaratorListExp `Generics.extQ` antiVariableDeclarationExp `Generics.extQ` antiRule_48Exp `Generics.extQ` antiOptVariableInitializerExp `Generics.extQ` antiVariableDeclaratorExp `Generics.extQ` antiVariableInitializerListExp `Generics.extQ` antiVariableInitializerExp `Generics.extQ` antiStaticInitializerExp `Generics.extQ` antiParameterListExp `Generics.extQ` antiRule_57Exp `Generics.extQ` antiParameterExp `Generics.extQ` antiStatementExp `Generics.extQ` antiOptExpressionExp `Generics.extQ` antiOptIdExp `Generics.extQ` antiOptElsePartExp `Generics.extQ` antiIfStatementExp `Generics.extQ` antiDoStatementExp `Generics.extQ` antiWhileStatementExp `Generics.extQ` antiForStatementExp `Generics.extQ` antiRule_63Exp `Generics.extQ` antiOptFinallyExp `Generics.extQ` antiTryStatementExp `Generics.extQ` antiRule_66Exp `Generics.extQ` antiSwitchStatementExp `Generics.extQ` antiExpressionExp `Generics.extQ` antiAssignmentOpExp `Generics.extQ` antiEqualityOpExp `Generics.extQ` antiRelationalOpExp `Generics.extQ` antiShiftOpExp `Generics.extQ` antiAdditiveOpExp `Generics.extQ` antiMultiplicativeOpExp `Generics.extQ` antiPrefixOpExp `Generics.extQ` antiPostfixOpExp `Generics.extQ` antiCreationExpressionExp `Generics.extQ` antiRule_76Exp `Generics.extQ` antiLiteralExp `Generics.extQ` antiArglistExp `Generics.extQ` antiTypeArgumentsExp `Generics.extQ` antiNonEmptyTypeArgumentsExp `Generics.extQ` antiTypeArgumentExp `Generics.extQ` antiWildcardTypeExp `Generics.extQ` antiTypeParametersExp `Generics.extQ` antiTypeParameterExp `Generics.extQ` antiTypeExp `Generics.extQ` antiTypeSpecifierExp `Generics.extQ` antiModifierExp `Generics.extQ` antiRule_90Exp `Generics.extQ` antiCompoundNameExp) rest+antiRule_62Exp :: [ Rule_62 ] -> Maybe (TH.Q TH.Exp)+antiRule_62Exp ((Anti_Rule_62 v):rest) =+ let restExp = dataToExpQ (const Nothing `Generics.extQ` antiJavaExp `Generics.extQ` antiOptDocCommentExp `Generics.extQ` antiTypeDeclarationExp `Generics.extQ` antiImportStatementExp `Generics.extQ` antiCompilationUnitExp `Generics.extQ` antiCompilationUnitRestExp `Generics.extQ` antiPackageExp `Generics.extQ` antiImportNameExp `Generics.extQ` antiImportHeadExp `Generics.extQ` antiDocCommentExp `Generics.extQ` antiAnnotationExp `Generics.extQ` antiAnnotationArgumentsExp `Generics.extQ` antiAnnotationElementExp `Generics.extQ` antiElementValueExp `Generics.extQ` antiElementValueArrayInitializerExp `Generics.extQ` antiRule_15Exp `Generics.extQ` antiClassOrInterfaceTypeExp `Generics.extQ` antiExtendsListExp `Generics.extQ` antiImplementsListExp `Generics.extQ` antiFieldDeclarationExp `Generics.extQ` antiClassDeclarationExp `Generics.extQ` antiInterfaceDeclarationExp `Generics.extQ` antiAnnotationDeclarationExp `Generics.extQ` antiAnnotationTypeElementExp `Generics.extQ` antiEnumConstantExp `Generics.extQ` antiEnumConstantListExp `Generics.extQ` antiEnumDeclarationExp `Generics.extQ` antiTypeDeclRestExp `Generics.extQ` antiRule_36Exp `Generics.extQ` antiRule_38Exp `Generics.extQ` antiMemberDeclarationExp `Generics.extQ` antiPrimitiveTypeKeywordExp `Generics.extQ` antiMemberAfterFirstIdExp `Generics.extQ` antiMoreTypeSpecifierExp `Generics.extQ` antiThrowsClauseExp `Generics.extQ` antiMemberRestExp `Generics.extQ` antiRule_49Exp `Generics.extQ` antiStatementBlockExp `Generics.extQ` antiVariableDeclaratorListExp `Generics.extQ` antiVariableDeclarationExp `Generics.extQ` antiRule_53Exp `Generics.extQ` antiOptVariableInitializerExp `Generics.extQ` antiVariableDeclaratorExp `Generics.extQ` antiVariableInitializerListExp `Generics.extQ` antiVariableInitializerExp `Generics.extQ` antiArrayInitializerExp `Generics.extQ` antiStaticInitializerExp `Generics.extQ` antiParameterListExp `Generics.extQ` antiRule_62Exp `Generics.extQ` antiParameterExp `Generics.extQ` antiStatementExp `Generics.extQ` antiOptExpressionExp `Generics.extQ` antiOptIdExp `Generics.extQ` antiOptElsePartExp `Generics.extQ` antiIfStatementExp `Generics.extQ` antiDoStatementExp `Generics.extQ` antiWhileStatementExp `Generics.extQ` antiForStatementExp `Generics.extQ` antiForEachHeaderExp `Generics.extQ` antiRule_70Exp `Generics.extQ` antiCatchParameterExp `Generics.extQ` antiOptFinallyExp `Generics.extQ` antiTryStatementExp `Generics.extQ` antiResourceSpecExp `Generics.extQ` antiResourceExp `Generics.extQ` antiRule_79Exp `Generics.extQ` antiSwitchStatementExp `Generics.extQ` antiExpressionExp `Generics.extQ` antiLambdaBodyExp `Generics.extQ` antiAssignmentOpExp `Generics.extQ` antiEqualityOpExp `Generics.extQ` antiRelationalOpExp `Generics.extQ` antiShiftOpExp `Generics.extQ` antiAdditiveOpExp `Generics.extQ` antiMultiplicativeOpExp `Generics.extQ` antiPrefixOpExp `Generics.extQ` antiPostfixOpExp `Generics.extQ` antiCreationExpressionExp `Generics.extQ` antiRule_93Exp `Generics.extQ` antiLiteralExp `Generics.extQ` antiArglistExp `Generics.extQ` antiTypeArgumentsExp `Generics.extQ` antiNonEmptyTypeArgumentsExp `Generics.extQ` antiTypeArgumentExp `Generics.extQ` antiWildcardTypeExp `Generics.extQ` antiTypeParametersExp `Generics.extQ` antiNonEmptyTypeParametersExp `Generics.extQ` antiTypeParameterExp `Generics.extQ` antiTypeExp `Generics.extQ` antiTypeSpecifierExp `Generics.extQ` antiModifierExp `Generics.extQ` antiRule_106Exp `Generics.extQ` antiCompoundNameExp) rest lvar = TH.varE $ TH.mkName v in Just [| $lvar ++ $restExp |]-antiRule_57Exp _ = Nothing+antiRule_62Exp _ = Nothing antiParameterListExp :: ParameterList -> Maybe (TH.Q TH.Exp )@@ -314,6 +344,11 @@ antiStaticInitializerExp _ = Nothing +antiArrayInitializerExp :: ArrayInitializer -> Maybe (TH.Q TH.Exp )+antiArrayInitializerExp ( Anti_ArrayInitializer v) = Just $ TH.varE (TH.mkName v)+antiArrayInitializerExp _ = Nothing++ antiVariableInitializerExp :: VariableInitializer -> Maybe (TH.Q TH.Exp ) antiVariableInitializerExp ( Anti_VariableInitializer v) = Just $ TH.varE (TH.mkName v) antiVariableInitializerExp _ = Nothing@@ -334,12 +369,12 @@ antiOptVariableInitializerExp _ = Nothing -antiRule_48Exp :: [ Rule_48 ] -> Maybe (TH.Q TH.Exp)-antiRule_48Exp ((Anti_Rule_48 v):rest) =- let restExp = dataToExpQ (const Nothing `Generics.extQ` antiJavaExp `Generics.extQ` antiOptDocCommentExp `Generics.extQ` antiTypeDeclarationExp `Generics.extQ` antiImportStatementExp `Generics.extQ` antiCompilationUnitExp `Generics.extQ` antiPackageExp `Generics.extQ` antiImportNameExp `Generics.extQ` antiImportHeadExp `Generics.extQ` antiDocCommentExp `Generics.extQ` antiAnnotationExp `Generics.extQ` antiAnnotationArgumentsExp `Generics.extQ` antiAnnotationElementExp `Generics.extQ` antiRule_10Exp `Generics.extQ` antiClassOrInterfaceTypeExp `Generics.extQ` antiExtendsListExp `Generics.extQ` antiImplementsListExp `Generics.extQ` antiFieldDeclarationExp `Generics.extQ` antiClassDeclarationExp `Generics.extQ` antiInterfaceDeclarationExp `Generics.extQ` antiAnnotationDeclarationExp `Generics.extQ` antiAnnotationTypeElementExp `Generics.extQ` antiEnumConstantExp `Generics.extQ` antiEnumConstantListExp `Generics.extQ` antiEnumDeclarationExp `Generics.extQ` antiTypeDeclRestExp `Generics.extQ` antiRule_31Exp `Generics.extQ` antiRule_33Exp `Generics.extQ` antiMemberDeclarationExp `Generics.extQ` antiPrimitiveTypeKeywordExp `Generics.extQ` antiMemberAfterFirstIdExp `Generics.extQ` antiMoreTypeSpecifierExp `Generics.extQ` antiThrowsClauseExp `Generics.extQ` antiMemberRestExp `Generics.extQ` antiRule_44Exp `Generics.extQ` antiStatementBlockExp `Generics.extQ` antiVariableDeclaratorListExp `Generics.extQ` antiVariableDeclarationExp `Generics.extQ` antiRule_48Exp `Generics.extQ` antiOptVariableInitializerExp `Generics.extQ` antiVariableDeclaratorExp `Generics.extQ` antiVariableInitializerListExp `Generics.extQ` antiVariableInitializerExp `Generics.extQ` antiStaticInitializerExp `Generics.extQ` antiParameterListExp `Generics.extQ` antiRule_57Exp `Generics.extQ` antiParameterExp `Generics.extQ` antiStatementExp `Generics.extQ` antiOptExpressionExp `Generics.extQ` antiOptIdExp `Generics.extQ` antiOptElsePartExp `Generics.extQ` antiIfStatementExp `Generics.extQ` antiDoStatementExp `Generics.extQ` antiWhileStatementExp `Generics.extQ` antiForStatementExp `Generics.extQ` antiRule_63Exp `Generics.extQ` antiOptFinallyExp `Generics.extQ` antiTryStatementExp `Generics.extQ` antiRule_66Exp `Generics.extQ` antiSwitchStatementExp `Generics.extQ` antiExpressionExp `Generics.extQ` antiAssignmentOpExp `Generics.extQ` antiEqualityOpExp `Generics.extQ` antiRelationalOpExp `Generics.extQ` antiShiftOpExp `Generics.extQ` antiAdditiveOpExp `Generics.extQ` antiMultiplicativeOpExp `Generics.extQ` antiPrefixOpExp `Generics.extQ` antiPostfixOpExp `Generics.extQ` antiCreationExpressionExp `Generics.extQ` antiRule_76Exp `Generics.extQ` antiLiteralExp `Generics.extQ` antiArglistExp `Generics.extQ` antiTypeArgumentsExp `Generics.extQ` antiNonEmptyTypeArgumentsExp `Generics.extQ` antiTypeArgumentExp `Generics.extQ` antiWildcardTypeExp `Generics.extQ` antiTypeParametersExp `Generics.extQ` antiTypeParameterExp `Generics.extQ` antiTypeExp `Generics.extQ` antiTypeSpecifierExp `Generics.extQ` antiModifierExp `Generics.extQ` antiRule_90Exp `Generics.extQ` antiCompoundNameExp) rest+antiRule_53Exp :: [ Rule_53 ] -> Maybe (TH.Q TH.Exp)+antiRule_53Exp ((Anti_Rule_53 v):rest) =+ let restExp = dataToExpQ (const Nothing `Generics.extQ` antiJavaExp `Generics.extQ` antiOptDocCommentExp `Generics.extQ` antiTypeDeclarationExp `Generics.extQ` antiImportStatementExp `Generics.extQ` antiCompilationUnitExp `Generics.extQ` antiCompilationUnitRestExp `Generics.extQ` antiPackageExp `Generics.extQ` antiImportNameExp `Generics.extQ` antiImportHeadExp `Generics.extQ` antiDocCommentExp `Generics.extQ` antiAnnotationExp `Generics.extQ` antiAnnotationArgumentsExp `Generics.extQ` antiAnnotationElementExp `Generics.extQ` antiElementValueExp `Generics.extQ` antiElementValueArrayInitializerExp `Generics.extQ` antiRule_15Exp `Generics.extQ` antiClassOrInterfaceTypeExp `Generics.extQ` antiExtendsListExp `Generics.extQ` antiImplementsListExp `Generics.extQ` antiFieldDeclarationExp `Generics.extQ` antiClassDeclarationExp `Generics.extQ` antiInterfaceDeclarationExp `Generics.extQ` antiAnnotationDeclarationExp `Generics.extQ` antiAnnotationTypeElementExp `Generics.extQ` antiEnumConstantExp `Generics.extQ` antiEnumConstantListExp `Generics.extQ` antiEnumDeclarationExp `Generics.extQ` antiTypeDeclRestExp `Generics.extQ` antiRule_36Exp `Generics.extQ` antiRule_38Exp `Generics.extQ` antiMemberDeclarationExp `Generics.extQ` antiPrimitiveTypeKeywordExp `Generics.extQ` antiMemberAfterFirstIdExp `Generics.extQ` antiMoreTypeSpecifierExp `Generics.extQ` antiThrowsClauseExp `Generics.extQ` antiMemberRestExp `Generics.extQ` antiRule_49Exp `Generics.extQ` antiStatementBlockExp `Generics.extQ` antiVariableDeclaratorListExp `Generics.extQ` antiVariableDeclarationExp `Generics.extQ` antiRule_53Exp `Generics.extQ` antiOptVariableInitializerExp `Generics.extQ` antiVariableDeclaratorExp `Generics.extQ` antiVariableInitializerListExp `Generics.extQ` antiVariableInitializerExp `Generics.extQ` antiArrayInitializerExp `Generics.extQ` antiStaticInitializerExp `Generics.extQ` antiParameterListExp `Generics.extQ` antiRule_62Exp `Generics.extQ` antiParameterExp `Generics.extQ` antiStatementExp `Generics.extQ` antiOptExpressionExp `Generics.extQ` antiOptIdExp `Generics.extQ` antiOptElsePartExp `Generics.extQ` antiIfStatementExp `Generics.extQ` antiDoStatementExp `Generics.extQ` antiWhileStatementExp `Generics.extQ` antiForStatementExp `Generics.extQ` antiForEachHeaderExp `Generics.extQ` antiRule_70Exp `Generics.extQ` antiCatchParameterExp `Generics.extQ` antiOptFinallyExp `Generics.extQ` antiTryStatementExp `Generics.extQ` antiResourceSpecExp `Generics.extQ` antiResourceExp `Generics.extQ` antiRule_79Exp `Generics.extQ` antiSwitchStatementExp `Generics.extQ` antiExpressionExp `Generics.extQ` antiLambdaBodyExp `Generics.extQ` antiAssignmentOpExp `Generics.extQ` antiEqualityOpExp `Generics.extQ` antiRelationalOpExp `Generics.extQ` antiShiftOpExp `Generics.extQ` antiAdditiveOpExp `Generics.extQ` antiMultiplicativeOpExp `Generics.extQ` antiPrefixOpExp `Generics.extQ` antiPostfixOpExp `Generics.extQ` antiCreationExpressionExp `Generics.extQ` antiRule_93Exp `Generics.extQ` antiLiteralExp `Generics.extQ` antiArglistExp `Generics.extQ` antiTypeArgumentsExp `Generics.extQ` antiNonEmptyTypeArgumentsExp `Generics.extQ` antiTypeArgumentExp `Generics.extQ` antiWildcardTypeExp `Generics.extQ` antiTypeParametersExp `Generics.extQ` antiNonEmptyTypeParametersExp `Generics.extQ` antiTypeParameterExp `Generics.extQ` antiTypeExp `Generics.extQ` antiTypeSpecifierExp `Generics.extQ` antiModifierExp `Generics.extQ` antiRule_106Exp `Generics.extQ` antiCompoundNameExp) rest lvar = TH.varE $ TH.mkName v in Just [| $lvar ++ $restExp |]-antiRule_48Exp _ = Nothing+antiRule_53Exp _ = Nothing antiVariableDeclarationExp :: VariableDeclaration -> Maybe (TH.Q TH.Exp )@@ -357,12 +392,12 @@ antiStatementBlockExp _ = Nothing -antiRule_44Exp :: [ Rule_44 ] -> Maybe (TH.Q TH.Exp)-antiRule_44Exp ((Anti_Rule_44 v):rest) =- let restExp = dataToExpQ (const Nothing `Generics.extQ` antiJavaExp `Generics.extQ` antiOptDocCommentExp `Generics.extQ` antiTypeDeclarationExp `Generics.extQ` antiImportStatementExp `Generics.extQ` antiCompilationUnitExp `Generics.extQ` antiPackageExp `Generics.extQ` antiImportNameExp `Generics.extQ` antiImportHeadExp `Generics.extQ` antiDocCommentExp `Generics.extQ` antiAnnotationExp `Generics.extQ` antiAnnotationArgumentsExp `Generics.extQ` antiAnnotationElementExp `Generics.extQ` antiRule_10Exp `Generics.extQ` antiClassOrInterfaceTypeExp `Generics.extQ` antiExtendsListExp `Generics.extQ` antiImplementsListExp `Generics.extQ` antiFieldDeclarationExp `Generics.extQ` antiClassDeclarationExp `Generics.extQ` antiInterfaceDeclarationExp `Generics.extQ` antiAnnotationDeclarationExp `Generics.extQ` antiAnnotationTypeElementExp `Generics.extQ` antiEnumConstantExp `Generics.extQ` antiEnumConstantListExp `Generics.extQ` antiEnumDeclarationExp `Generics.extQ` antiTypeDeclRestExp `Generics.extQ` antiRule_31Exp `Generics.extQ` antiRule_33Exp `Generics.extQ` antiMemberDeclarationExp `Generics.extQ` antiPrimitiveTypeKeywordExp `Generics.extQ` antiMemberAfterFirstIdExp `Generics.extQ` antiMoreTypeSpecifierExp `Generics.extQ` antiThrowsClauseExp `Generics.extQ` antiMemberRestExp `Generics.extQ` antiRule_44Exp `Generics.extQ` antiStatementBlockExp `Generics.extQ` antiVariableDeclaratorListExp `Generics.extQ` antiVariableDeclarationExp `Generics.extQ` antiRule_48Exp `Generics.extQ` antiOptVariableInitializerExp `Generics.extQ` antiVariableDeclaratorExp `Generics.extQ` antiVariableInitializerListExp `Generics.extQ` antiVariableInitializerExp `Generics.extQ` antiStaticInitializerExp `Generics.extQ` antiParameterListExp `Generics.extQ` antiRule_57Exp `Generics.extQ` antiParameterExp `Generics.extQ` antiStatementExp `Generics.extQ` antiOptExpressionExp `Generics.extQ` antiOptIdExp `Generics.extQ` antiOptElsePartExp `Generics.extQ` antiIfStatementExp `Generics.extQ` antiDoStatementExp `Generics.extQ` antiWhileStatementExp `Generics.extQ` antiForStatementExp `Generics.extQ` antiRule_63Exp `Generics.extQ` antiOptFinallyExp `Generics.extQ` antiTryStatementExp `Generics.extQ` antiRule_66Exp `Generics.extQ` antiSwitchStatementExp `Generics.extQ` antiExpressionExp `Generics.extQ` antiAssignmentOpExp `Generics.extQ` antiEqualityOpExp `Generics.extQ` antiRelationalOpExp `Generics.extQ` antiShiftOpExp `Generics.extQ` antiAdditiveOpExp `Generics.extQ` antiMultiplicativeOpExp `Generics.extQ` antiPrefixOpExp `Generics.extQ` antiPostfixOpExp `Generics.extQ` antiCreationExpressionExp `Generics.extQ` antiRule_76Exp `Generics.extQ` antiLiteralExp `Generics.extQ` antiArglistExp `Generics.extQ` antiTypeArgumentsExp `Generics.extQ` antiNonEmptyTypeArgumentsExp `Generics.extQ` antiTypeArgumentExp `Generics.extQ` antiWildcardTypeExp `Generics.extQ` antiTypeParametersExp `Generics.extQ` antiTypeParameterExp `Generics.extQ` antiTypeExp `Generics.extQ` antiTypeSpecifierExp `Generics.extQ` antiModifierExp `Generics.extQ` antiRule_90Exp `Generics.extQ` antiCompoundNameExp) rest+antiRule_49Exp :: [ Rule_49 ] -> Maybe (TH.Q TH.Exp)+antiRule_49Exp ((Anti_Rule_49 v):rest) =+ let restExp = dataToExpQ (const Nothing `Generics.extQ` antiJavaExp `Generics.extQ` antiOptDocCommentExp `Generics.extQ` antiTypeDeclarationExp `Generics.extQ` antiImportStatementExp `Generics.extQ` antiCompilationUnitExp `Generics.extQ` antiCompilationUnitRestExp `Generics.extQ` antiPackageExp `Generics.extQ` antiImportNameExp `Generics.extQ` antiImportHeadExp `Generics.extQ` antiDocCommentExp `Generics.extQ` antiAnnotationExp `Generics.extQ` antiAnnotationArgumentsExp `Generics.extQ` antiAnnotationElementExp `Generics.extQ` antiElementValueExp `Generics.extQ` antiElementValueArrayInitializerExp `Generics.extQ` antiRule_15Exp `Generics.extQ` antiClassOrInterfaceTypeExp `Generics.extQ` antiExtendsListExp `Generics.extQ` antiImplementsListExp `Generics.extQ` antiFieldDeclarationExp `Generics.extQ` antiClassDeclarationExp `Generics.extQ` antiInterfaceDeclarationExp `Generics.extQ` antiAnnotationDeclarationExp `Generics.extQ` antiAnnotationTypeElementExp `Generics.extQ` antiEnumConstantExp `Generics.extQ` antiEnumConstantListExp `Generics.extQ` antiEnumDeclarationExp `Generics.extQ` antiTypeDeclRestExp `Generics.extQ` antiRule_36Exp `Generics.extQ` antiRule_38Exp `Generics.extQ` antiMemberDeclarationExp `Generics.extQ` antiPrimitiveTypeKeywordExp `Generics.extQ` antiMemberAfterFirstIdExp `Generics.extQ` antiMoreTypeSpecifierExp `Generics.extQ` antiThrowsClauseExp `Generics.extQ` antiMemberRestExp `Generics.extQ` antiRule_49Exp `Generics.extQ` antiStatementBlockExp `Generics.extQ` antiVariableDeclaratorListExp `Generics.extQ` antiVariableDeclarationExp `Generics.extQ` antiRule_53Exp `Generics.extQ` antiOptVariableInitializerExp `Generics.extQ` antiVariableDeclaratorExp `Generics.extQ` antiVariableInitializerListExp `Generics.extQ` antiVariableInitializerExp `Generics.extQ` antiArrayInitializerExp `Generics.extQ` antiStaticInitializerExp `Generics.extQ` antiParameterListExp `Generics.extQ` antiRule_62Exp `Generics.extQ` antiParameterExp `Generics.extQ` antiStatementExp `Generics.extQ` antiOptExpressionExp `Generics.extQ` antiOptIdExp `Generics.extQ` antiOptElsePartExp `Generics.extQ` antiIfStatementExp `Generics.extQ` antiDoStatementExp `Generics.extQ` antiWhileStatementExp `Generics.extQ` antiForStatementExp `Generics.extQ` antiForEachHeaderExp `Generics.extQ` antiRule_70Exp `Generics.extQ` antiCatchParameterExp `Generics.extQ` antiOptFinallyExp `Generics.extQ` antiTryStatementExp `Generics.extQ` antiResourceSpecExp `Generics.extQ` antiResourceExp `Generics.extQ` antiRule_79Exp `Generics.extQ` antiSwitchStatementExp `Generics.extQ` antiExpressionExp `Generics.extQ` antiLambdaBodyExp `Generics.extQ` antiAssignmentOpExp `Generics.extQ` antiEqualityOpExp `Generics.extQ` antiRelationalOpExp `Generics.extQ` antiShiftOpExp `Generics.extQ` antiAdditiveOpExp `Generics.extQ` antiMultiplicativeOpExp `Generics.extQ` antiPrefixOpExp `Generics.extQ` antiPostfixOpExp `Generics.extQ` antiCreationExpressionExp `Generics.extQ` antiRule_93Exp `Generics.extQ` antiLiteralExp `Generics.extQ` antiArglistExp `Generics.extQ` antiTypeArgumentsExp `Generics.extQ` antiNonEmptyTypeArgumentsExp `Generics.extQ` antiTypeArgumentExp `Generics.extQ` antiWildcardTypeExp `Generics.extQ` antiTypeParametersExp `Generics.extQ` antiNonEmptyTypeParametersExp `Generics.extQ` antiTypeParameterExp `Generics.extQ` antiTypeExp `Generics.extQ` antiTypeSpecifierExp `Generics.extQ` antiModifierExp `Generics.extQ` antiRule_106Exp `Generics.extQ` antiCompoundNameExp) rest lvar = TH.varE $ TH.mkName v in Just [| $lvar ++ $restExp |]-antiRule_44Exp _ = Nothing+antiRule_49Exp _ = Nothing antiMemberRestExp :: MemberRest -> Maybe (TH.Q TH.Exp )@@ -395,20 +430,20 @@ antiMemberDeclarationExp _ = Nothing -antiRule_33Exp :: [ Rule_33 ] -> Maybe (TH.Q TH.Exp)-antiRule_33Exp ((Anti_Rule_33 v):rest) =- let restExp = dataToExpQ (const Nothing `Generics.extQ` antiJavaExp `Generics.extQ` antiOptDocCommentExp `Generics.extQ` antiTypeDeclarationExp `Generics.extQ` antiImportStatementExp `Generics.extQ` antiCompilationUnitExp `Generics.extQ` antiPackageExp `Generics.extQ` antiImportNameExp `Generics.extQ` antiImportHeadExp `Generics.extQ` antiDocCommentExp `Generics.extQ` antiAnnotationExp `Generics.extQ` antiAnnotationArgumentsExp `Generics.extQ` antiAnnotationElementExp `Generics.extQ` antiRule_10Exp `Generics.extQ` antiClassOrInterfaceTypeExp `Generics.extQ` antiExtendsListExp `Generics.extQ` antiImplementsListExp `Generics.extQ` antiFieldDeclarationExp `Generics.extQ` antiClassDeclarationExp `Generics.extQ` antiInterfaceDeclarationExp `Generics.extQ` antiAnnotationDeclarationExp `Generics.extQ` antiAnnotationTypeElementExp `Generics.extQ` antiEnumConstantExp `Generics.extQ` antiEnumConstantListExp `Generics.extQ` antiEnumDeclarationExp `Generics.extQ` antiTypeDeclRestExp `Generics.extQ` antiRule_31Exp `Generics.extQ` antiRule_33Exp `Generics.extQ` antiMemberDeclarationExp `Generics.extQ` antiPrimitiveTypeKeywordExp `Generics.extQ` antiMemberAfterFirstIdExp `Generics.extQ` antiMoreTypeSpecifierExp `Generics.extQ` antiThrowsClauseExp `Generics.extQ` antiMemberRestExp `Generics.extQ` antiRule_44Exp `Generics.extQ` antiStatementBlockExp `Generics.extQ` antiVariableDeclaratorListExp `Generics.extQ` antiVariableDeclarationExp `Generics.extQ` antiRule_48Exp `Generics.extQ` antiOptVariableInitializerExp `Generics.extQ` antiVariableDeclaratorExp `Generics.extQ` antiVariableInitializerListExp `Generics.extQ` antiVariableInitializerExp `Generics.extQ` antiStaticInitializerExp `Generics.extQ` antiParameterListExp `Generics.extQ` antiRule_57Exp `Generics.extQ` antiParameterExp `Generics.extQ` antiStatementExp `Generics.extQ` antiOptExpressionExp `Generics.extQ` antiOptIdExp `Generics.extQ` antiOptElsePartExp `Generics.extQ` antiIfStatementExp `Generics.extQ` antiDoStatementExp `Generics.extQ` antiWhileStatementExp `Generics.extQ` antiForStatementExp `Generics.extQ` antiRule_63Exp `Generics.extQ` antiOptFinallyExp `Generics.extQ` antiTryStatementExp `Generics.extQ` antiRule_66Exp `Generics.extQ` antiSwitchStatementExp `Generics.extQ` antiExpressionExp `Generics.extQ` antiAssignmentOpExp `Generics.extQ` antiEqualityOpExp `Generics.extQ` antiRelationalOpExp `Generics.extQ` antiShiftOpExp `Generics.extQ` antiAdditiveOpExp `Generics.extQ` antiMultiplicativeOpExp `Generics.extQ` antiPrefixOpExp `Generics.extQ` antiPostfixOpExp `Generics.extQ` antiCreationExpressionExp `Generics.extQ` antiRule_76Exp `Generics.extQ` antiLiteralExp `Generics.extQ` antiArglistExp `Generics.extQ` antiTypeArgumentsExp `Generics.extQ` antiNonEmptyTypeArgumentsExp `Generics.extQ` antiTypeArgumentExp `Generics.extQ` antiWildcardTypeExp `Generics.extQ` antiTypeParametersExp `Generics.extQ` antiTypeParameterExp `Generics.extQ` antiTypeExp `Generics.extQ` antiTypeSpecifierExp `Generics.extQ` antiModifierExp `Generics.extQ` antiRule_90Exp `Generics.extQ` antiCompoundNameExp) rest+antiRule_38Exp :: [ Rule_38 ] -> Maybe (TH.Q TH.Exp)+antiRule_38Exp ((Anti_Rule_38 v):rest) =+ let restExp = dataToExpQ (const Nothing `Generics.extQ` antiJavaExp `Generics.extQ` antiOptDocCommentExp `Generics.extQ` antiTypeDeclarationExp `Generics.extQ` antiImportStatementExp `Generics.extQ` antiCompilationUnitExp `Generics.extQ` antiCompilationUnitRestExp `Generics.extQ` antiPackageExp `Generics.extQ` antiImportNameExp `Generics.extQ` antiImportHeadExp `Generics.extQ` antiDocCommentExp `Generics.extQ` antiAnnotationExp `Generics.extQ` antiAnnotationArgumentsExp `Generics.extQ` antiAnnotationElementExp `Generics.extQ` antiElementValueExp `Generics.extQ` antiElementValueArrayInitializerExp `Generics.extQ` antiRule_15Exp `Generics.extQ` antiClassOrInterfaceTypeExp `Generics.extQ` antiExtendsListExp `Generics.extQ` antiImplementsListExp `Generics.extQ` antiFieldDeclarationExp `Generics.extQ` antiClassDeclarationExp `Generics.extQ` antiInterfaceDeclarationExp `Generics.extQ` antiAnnotationDeclarationExp `Generics.extQ` antiAnnotationTypeElementExp `Generics.extQ` antiEnumConstantExp `Generics.extQ` antiEnumConstantListExp `Generics.extQ` antiEnumDeclarationExp `Generics.extQ` antiTypeDeclRestExp `Generics.extQ` antiRule_36Exp `Generics.extQ` antiRule_38Exp `Generics.extQ` antiMemberDeclarationExp `Generics.extQ` antiPrimitiveTypeKeywordExp `Generics.extQ` antiMemberAfterFirstIdExp `Generics.extQ` antiMoreTypeSpecifierExp `Generics.extQ` antiThrowsClauseExp `Generics.extQ` antiMemberRestExp `Generics.extQ` antiRule_49Exp `Generics.extQ` antiStatementBlockExp `Generics.extQ` antiVariableDeclaratorListExp `Generics.extQ` antiVariableDeclarationExp `Generics.extQ` antiRule_53Exp `Generics.extQ` antiOptVariableInitializerExp `Generics.extQ` antiVariableDeclaratorExp `Generics.extQ` antiVariableInitializerListExp `Generics.extQ` antiVariableInitializerExp `Generics.extQ` antiArrayInitializerExp `Generics.extQ` antiStaticInitializerExp `Generics.extQ` antiParameterListExp `Generics.extQ` antiRule_62Exp `Generics.extQ` antiParameterExp `Generics.extQ` antiStatementExp `Generics.extQ` antiOptExpressionExp `Generics.extQ` antiOptIdExp `Generics.extQ` antiOptElsePartExp `Generics.extQ` antiIfStatementExp `Generics.extQ` antiDoStatementExp `Generics.extQ` antiWhileStatementExp `Generics.extQ` antiForStatementExp `Generics.extQ` antiForEachHeaderExp `Generics.extQ` antiRule_70Exp `Generics.extQ` antiCatchParameterExp `Generics.extQ` antiOptFinallyExp `Generics.extQ` antiTryStatementExp `Generics.extQ` antiResourceSpecExp `Generics.extQ` antiResourceExp `Generics.extQ` antiRule_79Exp `Generics.extQ` antiSwitchStatementExp `Generics.extQ` antiExpressionExp `Generics.extQ` antiLambdaBodyExp `Generics.extQ` antiAssignmentOpExp `Generics.extQ` antiEqualityOpExp `Generics.extQ` antiRelationalOpExp `Generics.extQ` antiShiftOpExp `Generics.extQ` antiAdditiveOpExp `Generics.extQ` antiMultiplicativeOpExp `Generics.extQ` antiPrefixOpExp `Generics.extQ` antiPostfixOpExp `Generics.extQ` antiCreationExpressionExp `Generics.extQ` antiRule_93Exp `Generics.extQ` antiLiteralExp `Generics.extQ` antiArglistExp `Generics.extQ` antiTypeArgumentsExp `Generics.extQ` antiNonEmptyTypeArgumentsExp `Generics.extQ` antiTypeArgumentExp `Generics.extQ` antiWildcardTypeExp `Generics.extQ` antiTypeParametersExp `Generics.extQ` antiNonEmptyTypeParametersExp `Generics.extQ` antiTypeParameterExp `Generics.extQ` antiTypeExp `Generics.extQ` antiTypeSpecifierExp `Generics.extQ` antiModifierExp `Generics.extQ` antiRule_106Exp `Generics.extQ` antiCompoundNameExp) rest lvar = TH.varE $ TH.mkName v in Just [| $lvar ++ $restExp |]-antiRule_33Exp _ = Nothing+antiRule_38Exp _ = Nothing -antiRule_31Exp :: [ Rule_31 ] -> Maybe (TH.Q TH.Exp)-antiRule_31Exp ((Anti_Rule_31 v):rest) =- let restExp = dataToExpQ (const Nothing `Generics.extQ` antiJavaExp `Generics.extQ` antiOptDocCommentExp `Generics.extQ` antiTypeDeclarationExp `Generics.extQ` antiImportStatementExp `Generics.extQ` antiCompilationUnitExp `Generics.extQ` antiPackageExp `Generics.extQ` antiImportNameExp `Generics.extQ` antiImportHeadExp `Generics.extQ` antiDocCommentExp `Generics.extQ` antiAnnotationExp `Generics.extQ` antiAnnotationArgumentsExp `Generics.extQ` antiAnnotationElementExp `Generics.extQ` antiRule_10Exp `Generics.extQ` antiClassOrInterfaceTypeExp `Generics.extQ` antiExtendsListExp `Generics.extQ` antiImplementsListExp `Generics.extQ` antiFieldDeclarationExp `Generics.extQ` antiClassDeclarationExp `Generics.extQ` antiInterfaceDeclarationExp `Generics.extQ` antiAnnotationDeclarationExp `Generics.extQ` antiAnnotationTypeElementExp `Generics.extQ` antiEnumConstantExp `Generics.extQ` antiEnumConstantListExp `Generics.extQ` antiEnumDeclarationExp `Generics.extQ` antiTypeDeclRestExp `Generics.extQ` antiRule_31Exp `Generics.extQ` antiRule_33Exp `Generics.extQ` antiMemberDeclarationExp `Generics.extQ` antiPrimitiveTypeKeywordExp `Generics.extQ` antiMemberAfterFirstIdExp `Generics.extQ` antiMoreTypeSpecifierExp `Generics.extQ` antiThrowsClauseExp `Generics.extQ` antiMemberRestExp `Generics.extQ` antiRule_44Exp `Generics.extQ` antiStatementBlockExp `Generics.extQ` antiVariableDeclaratorListExp `Generics.extQ` antiVariableDeclarationExp `Generics.extQ` antiRule_48Exp `Generics.extQ` antiOptVariableInitializerExp `Generics.extQ` antiVariableDeclaratorExp `Generics.extQ` antiVariableInitializerListExp `Generics.extQ` antiVariableInitializerExp `Generics.extQ` antiStaticInitializerExp `Generics.extQ` antiParameterListExp `Generics.extQ` antiRule_57Exp `Generics.extQ` antiParameterExp `Generics.extQ` antiStatementExp `Generics.extQ` antiOptExpressionExp `Generics.extQ` antiOptIdExp `Generics.extQ` antiOptElsePartExp `Generics.extQ` antiIfStatementExp `Generics.extQ` antiDoStatementExp `Generics.extQ` antiWhileStatementExp `Generics.extQ` antiForStatementExp `Generics.extQ` antiRule_63Exp `Generics.extQ` antiOptFinallyExp `Generics.extQ` antiTryStatementExp `Generics.extQ` antiRule_66Exp `Generics.extQ` antiSwitchStatementExp `Generics.extQ` antiExpressionExp `Generics.extQ` antiAssignmentOpExp `Generics.extQ` antiEqualityOpExp `Generics.extQ` antiRelationalOpExp `Generics.extQ` antiShiftOpExp `Generics.extQ` antiAdditiveOpExp `Generics.extQ` antiMultiplicativeOpExp `Generics.extQ` antiPrefixOpExp `Generics.extQ` antiPostfixOpExp `Generics.extQ` antiCreationExpressionExp `Generics.extQ` antiRule_76Exp `Generics.extQ` antiLiteralExp `Generics.extQ` antiArglistExp `Generics.extQ` antiTypeArgumentsExp `Generics.extQ` antiNonEmptyTypeArgumentsExp `Generics.extQ` antiTypeArgumentExp `Generics.extQ` antiWildcardTypeExp `Generics.extQ` antiTypeParametersExp `Generics.extQ` antiTypeParameterExp `Generics.extQ` antiTypeExp `Generics.extQ` antiTypeSpecifierExp `Generics.extQ` antiModifierExp `Generics.extQ` antiRule_90Exp `Generics.extQ` antiCompoundNameExp) rest+antiRule_36Exp :: [ Rule_36 ] -> Maybe (TH.Q TH.Exp)+antiRule_36Exp ((Anti_Rule_36 v):rest) =+ let restExp = dataToExpQ (const Nothing `Generics.extQ` antiJavaExp `Generics.extQ` antiOptDocCommentExp `Generics.extQ` antiTypeDeclarationExp `Generics.extQ` antiImportStatementExp `Generics.extQ` antiCompilationUnitExp `Generics.extQ` antiCompilationUnitRestExp `Generics.extQ` antiPackageExp `Generics.extQ` antiImportNameExp `Generics.extQ` antiImportHeadExp `Generics.extQ` antiDocCommentExp `Generics.extQ` antiAnnotationExp `Generics.extQ` antiAnnotationArgumentsExp `Generics.extQ` antiAnnotationElementExp `Generics.extQ` antiElementValueExp `Generics.extQ` antiElementValueArrayInitializerExp `Generics.extQ` antiRule_15Exp `Generics.extQ` antiClassOrInterfaceTypeExp `Generics.extQ` antiExtendsListExp `Generics.extQ` antiImplementsListExp `Generics.extQ` antiFieldDeclarationExp `Generics.extQ` antiClassDeclarationExp `Generics.extQ` antiInterfaceDeclarationExp `Generics.extQ` antiAnnotationDeclarationExp `Generics.extQ` antiAnnotationTypeElementExp `Generics.extQ` antiEnumConstantExp `Generics.extQ` antiEnumConstantListExp `Generics.extQ` antiEnumDeclarationExp `Generics.extQ` antiTypeDeclRestExp `Generics.extQ` antiRule_36Exp `Generics.extQ` antiRule_38Exp `Generics.extQ` antiMemberDeclarationExp `Generics.extQ` antiPrimitiveTypeKeywordExp `Generics.extQ` antiMemberAfterFirstIdExp `Generics.extQ` antiMoreTypeSpecifierExp `Generics.extQ` antiThrowsClauseExp `Generics.extQ` antiMemberRestExp `Generics.extQ` antiRule_49Exp `Generics.extQ` antiStatementBlockExp `Generics.extQ` antiVariableDeclaratorListExp `Generics.extQ` antiVariableDeclarationExp `Generics.extQ` antiRule_53Exp `Generics.extQ` antiOptVariableInitializerExp `Generics.extQ` antiVariableDeclaratorExp `Generics.extQ` antiVariableInitializerListExp `Generics.extQ` antiVariableInitializerExp `Generics.extQ` antiArrayInitializerExp `Generics.extQ` antiStaticInitializerExp `Generics.extQ` antiParameterListExp `Generics.extQ` antiRule_62Exp `Generics.extQ` antiParameterExp `Generics.extQ` antiStatementExp `Generics.extQ` antiOptExpressionExp `Generics.extQ` antiOptIdExp `Generics.extQ` antiOptElsePartExp `Generics.extQ` antiIfStatementExp `Generics.extQ` antiDoStatementExp `Generics.extQ` antiWhileStatementExp `Generics.extQ` antiForStatementExp `Generics.extQ` antiForEachHeaderExp `Generics.extQ` antiRule_70Exp `Generics.extQ` antiCatchParameterExp `Generics.extQ` antiOptFinallyExp `Generics.extQ` antiTryStatementExp `Generics.extQ` antiResourceSpecExp `Generics.extQ` antiResourceExp `Generics.extQ` antiRule_79Exp `Generics.extQ` antiSwitchStatementExp `Generics.extQ` antiExpressionExp `Generics.extQ` antiLambdaBodyExp `Generics.extQ` antiAssignmentOpExp `Generics.extQ` antiEqualityOpExp `Generics.extQ` antiRelationalOpExp `Generics.extQ` antiShiftOpExp `Generics.extQ` antiAdditiveOpExp `Generics.extQ` antiMultiplicativeOpExp `Generics.extQ` antiPrefixOpExp `Generics.extQ` antiPostfixOpExp `Generics.extQ` antiCreationExpressionExp `Generics.extQ` antiRule_93Exp `Generics.extQ` antiLiteralExp `Generics.extQ` antiArglistExp `Generics.extQ` antiTypeArgumentsExp `Generics.extQ` antiNonEmptyTypeArgumentsExp `Generics.extQ` antiTypeArgumentExp `Generics.extQ` antiWildcardTypeExp `Generics.extQ` antiTypeParametersExp `Generics.extQ` antiNonEmptyTypeParametersExp `Generics.extQ` antiTypeParameterExp `Generics.extQ` antiTypeExp `Generics.extQ` antiTypeSpecifierExp `Generics.extQ` antiModifierExp `Generics.extQ` antiRule_106Exp `Generics.extQ` antiCompoundNameExp) rest lvar = TH.varE $ TH.mkName v in Just [| $lvar ++ $restExp |]-antiRule_31Exp _ = Nothing+antiRule_36Exp _ = Nothing antiTypeDeclRestExp :: TypeDeclRest -> Maybe (TH.Q TH.Exp )@@ -433,7 +468,7 @@ antiAnnotationTypeElementExp :: [ AnnotationTypeElement ] -> Maybe (TH.Q TH.Exp) antiAnnotationTypeElementExp ((Anti_AnnotationTypeElement v):rest) =- let restExp = dataToExpQ (const Nothing `Generics.extQ` antiJavaExp `Generics.extQ` antiOptDocCommentExp `Generics.extQ` antiTypeDeclarationExp `Generics.extQ` antiImportStatementExp `Generics.extQ` antiCompilationUnitExp `Generics.extQ` antiPackageExp `Generics.extQ` antiImportNameExp `Generics.extQ` antiImportHeadExp `Generics.extQ` antiDocCommentExp `Generics.extQ` antiAnnotationExp `Generics.extQ` antiAnnotationArgumentsExp `Generics.extQ` antiAnnotationElementExp `Generics.extQ` antiRule_10Exp `Generics.extQ` antiClassOrInterfaceTypeExp `Generics.extQ` antiExtendsListExp `Generics.extQ` antiImplementsListExp `Generics.extQ` antiFieldDeclarationExp `Generics.extQ` antiClassDeclarationExp `Generics.extQ` antiInterfaceDeclarationExp `Generics.extQ` antiAnnotationDeclarationExp `Generics.extQ` antiAnnotationTypeElementExp `Generics.extQ` antiEnumConstantExp `Generics.extQ` antiEnumConstantListExp `Generics.extQ` antiEnumDeclarationExp `Generics.extQ` antiTypeDeclRestExp `Generics.extQ` antiRule_31Exp `Generics.extQ` antiRule_33Exp `Generics.extQ` antiMemberDeclarationExp `Generics.extQ` antiPrimitiveTypeKeywordExp `Generics.extQ` antiMemberAfterFirstIdExp `Generics.extQ` antiMoreTypeSpecifierExp `Generics.extQ` antiThrowsClauseExp `Generics.extQ` antiMemberRestExp `Generics.extQ` antiRule_44Exp `Generics.extQ` antiStatementBlockExp `Generics.extQ` antiVariableDeclaratorListExp `Generics.extQ` antiVariableDeclarationExp `Generics.extQ` antiRule_48Exp `Generics.extQ` antiOptVariableInitializerExp `Generics.extQ` antiVariableDeclaratorExp `Generics.extQ` antiVariableInitializerListExp `Generics.extQ` antiVariableInitializerExp `Generics.extQ` antiStaticInitializerExp `Generics.extQ` antiParameterListExp `Generics.extQ` antiRule_57Exp `Generics.extQ` antiParameterExp `Generics.extQ` antiStatementExp `Generics.extQ` antiOptExpressionExp `Generics.extQ` antiOptIdExp `Generics.extQ` antiOptElsePartExp `Generics.extQ` antiIfStatementExp `Generics.extQ` antiDoStatementExp `Generics.extQ` antiWhileStatementExp `Generics.extQ` antiForStatementExp `Generics.extQ` antiRule_63Exp `Generics.extQ` antiOptFinallyExp `Generics.extQ` antiTryStatementExp `Generics.extQ` antiRule_66Exp `Generics.extQ` antiSwitchStatementExp `Generics.extQ` antiExpressionExp `Generics.extQ` antiAssignmentOpExp `Generics.extQ` antiEqualityOpExp `Generics.extQ` antiRelationalOpExp `Generics.extQ` antiShiftOpExp `Generics.extQ` antiAdditiveOpExp `Generics.extQ` antiMultiplicativeOpExp `Generics.extQ` antiPrefixOpExp `Generics.extQ` antiPostfixOpExp `Generics.extQ` antiCreationExpressionExp `Generics.extQ` antiRule_76Exp `Generics.extQ` antiLiteralExp `Generics.extQ` antiArglistExp `Generics.extQ` antiTypeArgumentsExp `Generics.extQ` antiNonEmptyTypeArgumentsExp `Generics.extQ` antiTypeArgumentExp `Generics.extQ` antiWildcardTypeExp `Generics.extQ` antiTypeParametersExp `Generics.extQ` antiTypeParameterExp `Generics.extQ` antiTypeExp `Generics.extQ` antiTypeSpecifierExp `Generics.extQ` antiModifierExp `Generics.extQ` antiRule_90Exp `Generics.extQ` antiCompoundNameExp) rest+ let restExp = dataToExpQ (const Nothing `Generics.extQ` antiJavaExp `Generics.extQ` antiOptDocCommentExp `Generics.extQ` antiTypeDeclarationExp `Generics.extQ` antiImportStatementExp `Generics.extQ` antiCompilationUnitExp `Generics.extQ` antiCompilationUnitRestExp `Generics.extQ` antiPackageExp `Generics.extQ` antiImportNameExp `Generics.extQ` antiImportHeadExp `Generics.extQ` antiDocCommentExp `Generics.extQ` antiAnnotationExp `Generics.extQ` antiAnnotationArgumentsExp `Generics.extQ` antiAnnotationElementExp `Generics.extQ` antiElementValueExp `Generics.extQ` antiElementValueArrayInitializerExp `Generics.extQ` antiRule_15Exp `Generics.extQ` antiClassOrInterfaceTypeExp `Generics.extQ` antiExtendsListExp `Generics.extQ` antiImplementsListExp `Generics.extQ` antiFieldDeclarationExp `Generics.extQ` antiClassDeclarationExp `Generics.extQ` antiInterfaceDeclarationExp `Generics.extQ` antiAnnotationDeclarationExp `Generics.extQ` antiAnnotationTypeElementExp `Generics.extQ` antiEnumConstantExp `Generics.extQ` antiEnumConstantListExp `Generics.extQ` antiEnumDeclarationExp `Generics.extQ` antiTypeDeclRestExp `Generics.extQ` antiRule_36Exp `Generics.extQ` antiRule_38Exp `Generics.extQ` antiMemberDeclarationExp `Generics.extQ` antiPrimitiveTypeKeywordExp `Generics.extQ` antiMemberAfterFirstIdExp `Generics.extQ` antiMoreTypeSpecifierExp `Generics.extQ` antiThrowsClauseExp `Generics.extQ` antiMemberRestExp `Generics.extQ` antiRule_49Exp `Generics.extQ` antiStatementBlockExp `Generics.extQ` antiVariableDeclaratorListExp `Generics.extQ` antiVariableDeclarationExp `Generics.extQ` antiRule_53Exp `Generics.extQ` antiOptVariableInitializerExp `Generics.extQ` antiVariableDeclaratorExp `Generics.extQ` antiVariableInitializerListExp `Generics.extQ` antiVariableInitializerExp `Generics.extQ` antiArrayInitializerExp `Generics.extQ` antiStaticInitializerExp `Generics.extQ` antiParameterListExp `Generics.extQ` antiRule_62Exp `Generics.extQ` antiParameterExp `Generics.extQ` antiStatementExp `Generics.extQ` antiOptExpressionExp `Generics.extQ` antiOptIdExp `Generics.extQ` antiOptElsePartExp `Generics.extQ` antiIfStatementExp `Generics.extQ` antiDoStatementExp `Generics.extQ` antiWhileStatementExp `Generics.extQ` antiForStatementExp `Generics.extQ` antiForEachHeaderExp `Generics.extQ` antiRule_70Exp `Generics.extQ` antiCatchParameterExp `Generics.extQ` antiOptFinallyExp `Generics.extQ` antiTryStatementExp `Generics.extQ` antiResourceSpecExp `Generics.extQ` antiResourceExp `Generics.extQ` antiRule_79Exp `Generics.extQ` antiSwitchStatementExp `Generics.extQ` antiExpressionExp `Generics.extQ` antiLambdaBodyExp `Generics.extQ` antiAssignmentOpExp `Generics.extQ` antiEqualityOpExp `Generics.extQ` antiRelationalOpExp `Generics.extQ` antiShiftOpExp `Generics.extQ` antiAdditiveOpExp `Generics.extQ` antiMultiplicativeOpExp `Generics.extQ` antiPrefixOpExp `Generics.extQ` antiPostfixOpExp `Generics.extQ` antiCreationExpressionExp `Generics.extQ` antiRule_93Exp `Generics.extQ` antiLiteralExp `Generics.extQ` antiArglistExp `Generics.extQ` antiTypeArgumentsExp `Generics.extQ` antiNonEmptyTypeArgumentsExp `Generics.extQ` antiTypeArgumentExp `Generics.extQ` antiWildcardTypeExp `Generics.extQ` antiTypeParametersExp `Generics.extQ` antiNonEmptyTypeParametersExp `Generics.extQ` antiTypeParameterExp `Generics.extQ` antiTypeExp `Generics.extQ` antiTypeSpecifierExp `Generics.extQ` antiModifierExp `Generics.extQ` antiRule_106Exp `Generics.extQ` antiCompoundNameExp) rest lvar = TH.varE $ TH.mkName v in Just [| $lvar ++ $restExp |] antiAnnotationTypeElementExp _ = Nothing@@ -456,7 +491,7 @@ antiFieldDeclarationExp :: [ FieldDeclaration ] -> Maybe (TH.Q TH.Exp) antiFieldDeclarationExp ((Anti_FieldDeclaration v):rest) =- let restExp = dataToExpQ (const Nothing `Generics.extQ` antiJavaExp `Generics.extQ` antiOptDocCommentExp `Generics.extQ` antiTypeDeclarationExp `Generics.extQ` antiImportStatementExp `Generics.extQ` antiCompilationUnitExp `Generics.extQ` antiPackageExp `Generics.extQ` antiImportNameExp `Generics.extQ` antiImportHeadExp `Generics.extQ` antiDocCommentExp `Generics.extQ` antiAnnotationExp `Generics.extQ` antiAnnotationArgumentsExp `Generics.extQ` antiAnnotationElementExp `Generics.extQ` antiRule_10Exp `Generics.extQ` antiClassOrInterfaceTypeExp `Generics.extQ` antiExtendsListExp `Generics.extQ` antiImplementsListExp `Generics.extQ` antiFieldDeclarationExp `Generics.extQ` antiClassDeclarationExp `Generics.extQ` antiInterfaceDeclarationExp `Generics.extQ` antiAnnotationDeclarationExp `Generics.extQ` antiAnnotationTypeElementExp `Generics.extQ` antiEnumConstantExp `Generics.extQ` antiEnumConstantListExp `Generics.extQ` antiEnumDeclarationExp `Generics.extQ` antiTypeDeclRestExp `Generics.extQ` antiRule_31Exp `Generics.extQ` antiRule_33Exp `Generics.extQ` antiMemberDeclarationExp `Generics.extQ` antiPrimitiveTypeKeywordExp `Generics.extQ` antiMemberAfterFirstIdExp `Generics.extQ` antiMoreTypeSpecifierExp `Generics.extQ` antiThrowsClauseExp `Generics.extQ` antiMemberRestExp `Generics.extQ` antiRule_44Exp `Generics.extQ` antiStatementBlockExp `Generics.extQ` antiVariableDeclaratorListExp `Generics.extQ` antiVariableDeclarationExp `Generics.extQ` antiRule_48Exp `Generics.extQ` antiOptVariableInitializerExp `Generics.extQ` antiVariableDeclaratorExp `Generics.extQ` antiVariableInitializerListExp `Generics.extQ` antiVariableInitializerExp `Generics.extQ` antiStaticInitializerExp `Generics.extQ` antiParameterListExp `Generics.extQ` antiRule_57Exp `Generics.extQ` antiParameterExp `Generics.extQ` antiStatementExp `Generics.extQ` antiOptExpressionExp `Generics.extQ` antiOptIdExp `Generics.extQ` antiOptElsePartExp `Generics.extQ` antiIfStatementExp `Generics.extQ` antiDoStatementExp `Generics.extQ` antiWhileStatementExp `Generics.extQ` antiForStatementExp `Generics.extQ` antiRule_63Exp `Generics.extQ` antiOptFinallyExp `Generics.extQ` antiTryStatementExp `Generics.extQ` antiRule_66Exp `Generics.extQ` antiSwitchStatementExp `Generics.extQ` antiExpressionExp `Generics.extQ` antiAssignmentOpExp `Generics.extQ` antiEqualityOpExp `Generics.extQ` antiRelationalOpExp `Generics.extQ` antiShiftOpExp `Generics.extQ` antiAdditiveOpExp `Generics.extQ` antiMultiplicativeOpExp `Generics.extQ` antiPrefixOpExp `Generics.extQ` antiPostfixOpExp `Generics.extQ` antiCreationExpressionExp `Generics.extQ` antiRule_76Exp `Generics.extQ` antiLiteralExp `Generics.extQ` antiArglistExp `Generics.extQ` antiTypeArgumentsExp `Generics.extQ` antiNonEmptyTypeArgumentsExp `Generics.extQ` antiTypeArgumentExp `Generics.extQ` antiWildcardTypeExp `Generics.extQ` antiTypeParametersExp `Generics.extQ` antiTypeParameterExp `Generics.extQ` antiTypeExp `Generics.extQ` antiTypeSpecifierExp `Generics.extQ` antiModifierExp `Generics.extQ` antiRule_90Exp `Generics.extQ` antiCompoundNameExp) rest+ let restExp = dataToExpQ (const Nothing `Generics.extQ` antiJavaExp `Generics.extQ` antiOptDocCommentExp `Generics.extQ` antiTypeDeclarationExp `Generics.extQ` antiImportStatementExp `Generics.extQ` antiCompilationUnitExp `Generics.extQ` antiCompilationUnitRestExp `Generics.extQ` antiPackageExp `Generics.extQ` antiImportNameExp `Generics.extQ` antiImportHeadExp `Generics.extQ` antiDocCommentExp `Generics.extQ` antiAnnotationExp `Generics.extQ` antiAnnotationArgumentsExp `Generics.extQ` antiAnnotationElementExp `Generics.extQ` antiElementValueExp `Generics.extQ` antiElementValueArrayInitializerExp `Generics.extQ` antiRule_15Exp `Generics.extQ` antiClassOrInterfaceTypeExp `Generics.extQ` antiExtendsListExp `Generics.extQ` antiImplementsListExp `Generics.extQ` antiFieldDeclarationExp `Generics.extQ` antiClassDeclarationExp `Generics.extQ` antiInterfaceDeclarationExp `Generics.extQ` antiAnnotationDeclarationExp `Generics.extQ` antiAnnotationTypeElementExp `Generics.extQ` antiEnumConstantExp `Generics.extQ` antiEnumConstantListExp `Generics.extQ` antiEnumDeclarationExp `Generics.extQ` antiTypeDeclRestExp `Generics.extQ` antiRule_36Exp `Generics.extQ` antiRule_38Exp `Generics.extQ` antiMemberDeclarationExp `Generics.extQ` antiPrimitiveTypeKeywordExp `Generics.extQ` antiMemberAfterFirstIdExp `Generics.extQ` antiMoreTypeSpecifierExp `Generics.extQ` antiThrowsClauseExp `Generics.extQ` antiMemberRestExp `Generics.extQ` antiRule_49Exp `Generics.extQ` antiStatementBlockExp `Generics.extQ` antiVariableDeclaratorListExp `Generics.extQ` antiVariableDeclarationExp `Generics.extQ` antiRule_53Exp `Generics.extQ` antiOptVariableInitializerExp `Generics.extQ` antiVariableDeclaratorExp `Generics.extQ` antiVariableInitializerListExp `Generics.extQ` antiVariableInitializerExp `Generics.extQ` antiArrayInitializerExp `Generics.extQ` antiStaticInitializerExp `Generics.extQ` antiParameterListExp `Generics.extQ` antiRule_62Exp `Generics.extQ` antiParameterExp `Generics.extQ` antiStatementExp `Generics.extQ` antiOptExpressionExp `Generics.extQ` antiOptIdExp `Generics.extQ` antiOptElsePartExp `Generics.extQ` antiIfStatementExp `Generics.extQ` antiDoStatementExp `Generics.extQ` antiWhileStatementExp `Generics.extQ` antiForStatementExp `Generics.extQ` antiForEachHeaderExp `Generics.extQ` antiRule_70Exp `Generics.extQ` antiCatchParameterExp `Generics.extQ` antiOptFinallyExp `Generics.extQ` antiTryStatementExp `Generics.extQ` antiResourceSpecExp `Generics.extQ` antiResourceExp `Generics.extQ` antiRule_79Exp `Generics.extQ` antiSwitchStatementExp `Generics.extQ` antiExpressionExp `Generics.extQ` antiLambdaBodyExp `Generics.extQ` antiAssignmentOpExp `Generics.extQ` antiEqualityOpExp `Generics.extQ` antiRelationalOpExp `Generics.extQ` antiShiftOpExp `Generics.extQ` antiAdditiveOpExp `Generics.extQ` antiMultiplicativeOpExp `Generics.extQ` antiPrefixOpExp `Generics.extQ` antiPostfixOpExp `Generics.extQ` antiCreationExpressionExp `Generics.extQ` antiRule_93Exp `Generics.extQ` antiLiteralExp `Generics.extQ` antiArglistExp `Generics.extQ` antiTypeArgumentsExp `Generics.extQ` antiNonEmptyTypeArgumentsExp `Generics.extQ` antiTypeArgumentExp `Generics.extQ` antiWildcardTypeExp `Generics.extQ` antiTypeParametersExp `Generics.extQ` antiNonEmptyTypeParametersExp `Generics.extQ` antiTypeParameterExp `Generics.extQ` antiTypeExp `Generics.extQ` antiTypeSpecifierExp `Generics.extQ` antiModifierExp `Generics.extQ` antiRule_106Exp `Generics.extQ` antiCompoundNameExp) rest lvar = TH.varE $ TH.mkName v in Just [| $lvar ++ $restExp |] antiFieldDeclarationExp _ = Nothing@@ -477,14 +512,24 @@ antiClassOrInterfaceTypeExp _ = Nothing -antiRule_10Exp :: [ Rule_10 ] -> Maybe (TH.Q TH.Exp)-antiRule_10Exp ((Anti_Rule_10 v):rest) =- let restExp = dataToExpQ (const Nothing `Generics.extQ` antiJavaExp `Generics.extQ` antiOptDocCommentExp `Generics.extQ` antiTypeDeclarationExp `Generics.extQ` antiImportStatementExp `Generics.extQ` antiCompilationUnitExp `Generics.extQ` antiPackageExp `Generics.extQ` antiImportNameExp `Generics.extQ` antiImportHeadExp `Generics.extQ` antiDocCommentExp `Generics.extQ` antiAnnotationExp `Generics.extQ` antiAnnotationArgumentsExp `Generics.extQ` antiAnnotationElementExp `Generics.extQ` antiRule_10Exp `Generics.extQ` antiClassOrInterfaceTypeExp `Generics.extQ` antiExtendsListExp `Generics.extQ` antiImplementsListExp `Generics.extQ` antiFieldDeclarationExp `Generics.extQ` antiClassDeclarationExp `Generics.extQ` antiInterfaceDeclarationExp `Generics.extQ` antiAnnotationDeclarationExp `Generics.extQ` antiAnnotationTypeElementExp `Generics.extQ` antiEnumConstantExp `Generics.extQ` antiEnumConstantListExp `Generics.extQ` antiEnumDeclarationExp `Generics.extQ` antiTypeDeclRestExp `Generics.extQ` antiRule_31Exp `Generics.extQ` antiRule_33Exp `Generics.extQ` antiMemberDeclarationExp `Generics.extQ` antiPrimitiveTypeKeywordExp `Generics.extQ` antiMemberAfterFirstIdExp `Generics.extQ` antiMoreTypeSpecifierExp `Generics.extQ` antiThrowsClauseExp `Generics.extQ` antiMemberRestExp `Generics.extQ` antiRule_44Exp `Generics.extQ` antiStatementBlockExp `Generics.extQ` antiVariableDeclaratorListExp `Generics.extQ` antiVariableDeclarationExp `Generics.extQ` antiRule_48Exp `Generics.extQ` antiOptVariableInitializerExp `Generics.extQ` antiVariableDeclaratorExp `Generics.extQ` antiVariableInitializerListExp `Generics.extQ` antiVariableInitializerExp `Generics.extQ` antiStaticInitializerExp `Generics.extQ` antiParameterListExp `Generics.extQ` antiRule_57Exp `Generics.extQ` antiParameterExp `Generics.extQ` antiStatementExp `Generics.extQ` antiOptExpressionExp `Generics.extQ` antiOptIdExp `Generics.extQ` antiOptElsePartExp `Generics.extQ` antiIfStatementExp `Generics.extQ` antiDoStatementExp `Generics.extQ` antiWhileStatementExp `Generics.extQ` antiForStatementExp `Generics.extQ` antiRule_63Exp `Generics.extQ` antiOptFinallyExp `Generics.extQ` antiTryStatementExp `Generics.extQ` antiRule_66Exp `Generics.extQ` antiSwitchStatementExp `Generics.extQ` antiExpressionExp `Generics.extQ` antiAssignmentOpExp `Generics.extQ` antiEqualityOpExp `Generics.extQ` antiRelationalOpExp `Generics.extQ` antiShiftOpExp `Generics.extQ` antiAdditiveOpExp `Generics.extQ` antiMultiplicativeOpExp `Generics.extQ` antiPrefixOpExp `Generics.extQ` antiPostfixOpExp `Generics.extQ` antiCreationExpressionExp `Generics.extQ` antiRule_76Exp `Generics.extQ` antiLiteralExp `Generics.extQ` antiArglistExp `Generics.extQ` antiTypeArgumentsExp `Generics.extQ` antiNonEmptyTypeArgumentsExp `Generics.extQ` antiTypeArgumentExp `Generics.extQ` antiWildcardTypeExp `Generics.extQ` antiTypeParametersExp `Generics.extQ` antiTypeParameterExp `Generics.extQ` antiTypeExp `Generics.extQ` antiTypeSpecifierExp `Generics.extQ` antiModifierExp `Generics.extQ` antiRule_90Exp `Generics.extQ` antiCompoundNameExp) rest+antiRule_15Exp :: [ Rule_15 ] -> Maybe (TH.Q TH.Exp)+antiRule_15Exp ((Anti_Rule_15 v):rest) =+ let restExp = dataToExpQ (const Nothing `Generics.extQ` antiJavaExp `Generics.extQ` antiOptDocCommentExp `Generics.extQ` antiTypeDeclarationExp `Generics.extQ` antiImportStatementExp `Generics.extQ` antiCompilationUnitExp `Generics.extQ` antiCompilationUnitRestExp `Generics.extQ` antiPackageExp `Generics.extQ` antiImportNameExp `Generics.extQ` antiImportHeadExp `Generics.extQ` antiDocCommentExp `Generics.extQ` antiAnnotationExp `Generics.extQ` antiAnnotationArgumentsExp `Generics.extQ` antiAnnotationElementExp `Generics.extQ` antiElementValueExp `Generics.extQ` antiElementValueArrayInitializerExp `Generics.extQ` antiRule_15Exp `Generics.extQ` antiClassOrInterfaceTypeExp `Generics.extQ` antiExtendsListExp `Generics.extQ` antiImplementsListExp `Generics.extQ` antiFieldDeclarationExp `Generics.extQ` antiClassDeclarationExp `Generics.extQ` antiInterfaceDeclarationExp `Generics.extQ` antiAnnotationDeclarationExp `Generics.extQ` antiAnnotationTypeElementExp `Generics.extQ` antiEnumConstantExp `Generics.extQ` antiEnumConstantListExp `Generics.extQ` antiEnumDeclarationExp `Generics.extQ` antiTypeDeclRestExp `Generics.extQ` antiRule_36Exp `Generics.extQ` antiRule_38Exp `Generics.extQ` antiMemberDeclarationExp `Generics.extQ` antiPrimitiveTypeKeywordExp `Generics.extQ` antiMemberAfterFirstIdExp `Generics.extQ` antiMoreTypeSpecifierExp `Generics.extQ` antiThrowsClauseExp `Generics.extQ` antiMemberRestExp `Generics.extQ` antiRule_49Exp `Generics.extQ` antiStatementBlockExp `Generics.extQ` antiVariableDeclaratorListExp `Generics.extQ` antiVariableDeclarationExp `Generics.extQ` antiRule_53Exp `Generics.extQ` antiOptVariableInitializerExp `Generics.extQ` antiVariableDeclaratorExp `Generics.extQ` antiVariableInitializerListExp `Generics.extQ` antiVariableInitializerExp `Generics.extQ` antiArrayInitializerExp `Generics.extQ` antiStaticInitializerExp `Generics.extQ` antiParameterListExp `Generics.extQ` antiRule_62Exp `Generics.extQ` antiParameterExp `Generics.extQ` antiStatementExp `Generics.extQ` antiOptExpressionExp `Generics.extQ` antiOptIdExp `Generics.extQ` antiOptElsePartExp `Generics.extQ` antiIfStatementExp `Generics.extQ` antiDoStatementExp `Generics.extQ` antiWhileStatementExp `Generics.extQ` antiForStatementExp `Generics.extQ` antiForEachHeaderExp `Generics.extQ` antiRule_70Exp `Generics.extQ` antiCatchParameterExp `Generics.extQ` antiOptFinallyExp `Generics.extQ` antiTryStatementExp `Generics.extQ` antiResourceSpecExp `Generics.extQ` antiResourceExp `Generics.extQ` antiRule_79Exp `Generics.extQ` antiSwitchStatementExp `Generics.extQ` antiExpressionExp `Generics.extQ` antiLambdaBodyExp `Generics.extQ` antiAssignmentOpExp `Generics.extQ` antiEqualityOpExp `Generics.extQ` antiRelationalOpExp `Generics.extQ` antiShiftOpExp `Generics.extQ` antiAdditiveOpExp `Generics.extQ` antiMultiplicativeOpExp `Generics.extQ` antiPrefixOpExp `Generics.extQ` antiPostfixOpExp `Generics.extQ` antiCreationExpressionExp `Generics.extQ` antiRule_93Exp `Generics.extQ` antiLiteralExp `Generics.extQ` antiArglistExp `Generics.extQ` antiTypeArgumentsExp `Generics.extQ` antiNonEmptyTypeArgumentsExp `Generics.extQ` antiTypeArgumentExp `Generics.extQ` antiWildcardTypeExp `Generics.extQ` antiTypeParametersExp `Generics.extQ` antiNonEmptyTypeParametersExp `Generics.extQ` antiTypeParameterExp `Generics.extQ` antiTypeExp `Generics.extQ` antiTypeSpecifierExp `Generics.extQ` antiModifierExp `Generics.extQ` antiRule_106Exp `Generics.extQ` antiCompoundNameExp) rest lvar = TH.varE $ TH.mkName v in Just [| $lvar ++ $restExp |]-antiRule_10Exp _ = Nothing+antiRule_15Exp _ = Nothing +antiElementValueArrayInitializerExp :: ElementValueArrayInitializer -> Maybe (TH.Q TH.Exp )+antiElementValueArrayInitializerExp ( Anti_ElementValueArrayInitializer v) = Just $ TH.varE (TH.mkName v)+antiElementValueArrayInitializerExp _ = Nothing+++antiElementValueExp :: ElementValue -> Maybe (TH.Q TH.Exp )+antiElementValueExp ( Anti_ElementValue v) = Just $ TH.varE (TH.mkName v)+antiElementValueExp _ = Nothing++ antiAnnotationElementExp :: AnnotationElement -> Maybe (TH.Q TH.Exp ) antiAnnotationElementExp ( Anti_AnnotationElement v) = Just $ TH.varE (TH.mkName v) antiAnnotationElementExp _ = Nothing@@ -520,6 +565,11 @@ antiPackageExp _ = Nothing +antiCompilationUnitRestExp :: CompilationUnitRest -> Maybe (TH.Q TH.Exp )+antiCompilationUnitRestExp ( Anti_CompilationUnitRest v) = Just $ TH.varE (TH.mkName v)+antiCompilationUnitRestExp _ = Nothing++ antiCompilationUnitExp :: CompilationUnit -> Maybe (TH.Q TH.Exp ) antiCompilationUnitExp ( Anti_CompilationUnit v) = Just $ TH.varE (TH.mkName v) antiCompilationUnitExp _ = Nothing@@ -527,7 +577,7 @@ antiImportStatementExp :: [ ImportStatement ] -> Maybe (TH.Q TH.Exp) antiImportStatementExp ((Anti_ImportStatement v):rest) =- let restExp = dataToExpQ (const Nothing `Generics.extQ` antiJavaExp `Generics.extQ` antiOptDocCommentExp `Generics.extQ` antiTypeDeclarationExp `Generics.extQ` antiImportStatementExp `Generics.extQ` antiCompilationUnitExp `Generics.extQ` antiPackageExp `Generics.extQ` antiImportNameExp `Generics.extQ` antiImportHeadExp `Generics.extQ` antiDocCommentExp `Generics.extQ` antiAnnotationExp `Generics.extQ` antiAnnotationArgumentsExp `Generics.extQ` antiAnnotationElementExp `Generics.extQ` antiRule_10Exp `Generics.extQ` antiClassOrInterfaceTypeExp `Generics.extQ` antiExtendsListExp `Generics.extQ` antiImplementsListExp `Generics.extQ` antiFieldDeclarationExp `Generics.extQ` antiClassDeclarationExp `Generics.extQ` antiInterfaceDeclarationExp `Generics.extQ` antiAnnotationDeclarationExp `Generics.extQ` antiAnnotationTypeElementExp `Generics.extQ` antiEnumConstantExp `Generics.extQ` antiEnumConstantListExp `Generics.extQ` antiEnumDeclarationExp `Generics.extQ` antiTypeDeclRestExp `Generics.extQ` antiRule_31Exp `Generics.extQ` antiRule_33Exp `Generics.extQ` antiMemberDeclarationExp `Generics.extQ` antiPrimitiveTypeKeywordExp `Generics.extQ` antiMemberAfterFirstIdExp `Generics.extQ` antiMoreTypeSpecifierExp `Generics.extQ` antiThrowsClauseExp `Generics.extQ` antiMemberRestExp `Generics.extQ` antiRule_44Exp `Generics.extQ` antiStatementBlockExp `Generics.extQ` antiVariableDeclaratorListExp `Generics.extQ` antiVariableDeclarationExp `Generics.extQ` antiRule_48Exp `Generics.extQ` antiOptVariableInitializerExp `Generics.extQ` antiVariableDeclaratorExp `Generics.extQ` antiVariableInitializerListExp `Generics.extQ` antiVariableInitializerExp `Generics.extQ` antiStaticInitializerExp `Generics.extQ` antiParameterListExp `Generics.extQ` antiRule_57Exp `Generics.extQ` antiParameterExp `Generics.extQ` antiStatementExp `Generics.extQ` antiOptExpressionExp `Generics.extQ` antiOptIdExp `Generics.extQ` antiOptElsePartExp `Generics.extQ` antiIfStatementExp `Generics.extQ` antiDoStatementExp `Generics.extQ` antiWhileStatementExp `Generics.extQ` antiForStatementExp `Generics.extQ` antiRule_63Exp `Generics.extQ` antiOptFinallyExp `Generics.extQ` antiTryStatementExp `Generics.extQ` antiRule_66Exp `Generics.extQ` antiSwitchStatementExp `Generics.extQ` antiExpressionExp `Generics.extQ` antiAssignmentOpExp `Generics.extQ` antiEqualityOpExp `Generics.extQ` antiRelationalOpExp `Generics.extQ` antiShiftOpExp `Generics.extQ` antiAdditiveOpExp `Generics.extQ` antiMultiplicativeOpExp `Generics.extQ` antiPrefixOpExp `Generics.extQ` antiPostfixOpExp `Generics.extQ` antiCreationExpressionExp `Generics.extQ` antiRule_76Exp `Generics.extQ` antiLiteralExp `Generics.extQ` antiArglistExp `Generics.extQ` antiTypeArgumentsExp `Generics.extQ` antiNonEmptyTypeArgumentsExp `Generics.extQ` antiTypeArgumentExp `Generics.extQ` antiWildcardTypeExp `Generics.extQ` antiTypeParametersExp `Generics.extQ` antiTypeParameterExp `Generics.extQ` antiTypeExp `Generics.extQ` antiTypeSpecifierExp `Generics.extQ` antiModifierExp `Generics.extQ` antiRule_90Exp `Generics.extQ` antiCompoundNameExp) rest+ let restExp = dataToExpQ (const Nothing `Generics.extQ` antiJavaExp `Generics.extQ` antiOptDocCommentExp `Generics.extQ` antiTypeDeclarationExp `Generics.extQ` antiImportStatementExp `Generics.extQ` antiCompilationUnitExp `Generics.extQ` antiCompilationUnitRestExp `Generics.extQ` antiPackageExp `Generics.extQ` antiImportNameExp `Generics.extQ` antiImportHeadExp `Generics.extQ` antiDocCommentExp `Generics.extQ` antiAnnotationExp `Generics.extQ` antiAnnotationArgumentsExp `Generics.extQ` antiAnnotationElementExp `Generics.extQ` antiElementValueExp `Generics.extQ` antiElementValueArrayInitializerExp `Generics.extQ` antiRule_15Exp `Generics.extQ` antiClassOrInterfaceTypeExp `Generics.extQ` antiExtendsListExp `Generics.extQ` antiImplementsListExp `Generics.extQ` antiFieldDeclarationExp `Generics.extQ` antiClassDeclarationExp `Generics.extQ` antiInterfaceDeclarationExp `Generics.extQ` antiAnnotationDeclarationExp `Generics.extQ` antiAnnotationTypeElementExp `Generics.extQ` antiEnumConstantExp `Generics.extQ` antiEnumConstantListExp `Generics.extQ` antiEnumDeclarationExp `Generics.extQ` antiTypeDeclRestExp `Generics.extQ` antiRule_36Exp `Generics.extQ` antiRule_38Exp `Generics.extQ` antiMemberDeclarationExp `Generics.extQ` antiPrimitiveTypeKeywordExp `Generics.extQ` antiMemberAfterFirstIdExp `Generics.extQ` antiMoreTypeSpecifierExp `Generics.extQ` antiThrowsClauseExp `Generics.extQ` antiMemberRestExp `Generics.extQ` antiRule_49Exp `Generics.extQ` antiStatementBlockExp `Generics.extQ` antiVariableDeclaratorListExp `Generics.extQ` antiVariableDeclarationExp `Generics.extQ` antiRule_53Exp `Generics.extQ` antiOptVariableInitializerExp `Generics.extQ` antiVariableDeclaratorExp `Generics.extQ` antiVariableInitializerListExp `Generics.extQ` antiVariableInitializerExp `Generics.extQ` antiArrayInitializerExp `Generics.extQ` antiStaticInitializerExp `Generics.extQ` antiParameterListExp `Generics.extQ` antiRule_62Exp `Generics.extQ` antiParameterExp `Generics.extQ` antiStatementExp `Generics.extQ` antiOptExpressionExp `Generics.extQ` antiOptIdExp `Generics.extQ` antiOptElsePartExp `Generics.extQ` antiIfStatementExp `Generics.extQ` antiDoStatementExp `Generics.extQ` antiWhileStatementExp `Generics.extQ` antiForStatementExp `Generics.extQ` antiForEachHeaderExp `Generics.extQ` antiRule_70Exp `Generics.extQ` antiCatchParameterExp `Generics.extQ` antiOptFinallyExp `Generics.extQ` antiTryStatementExp `Generics.extQ` antiResourceSpecExp `Generics.extQ` antiResourceExp `Generics.extQ` antiRule_79Exp `Generics.extQ` antiSwitchStatementExp `Generics.extQ` antiExpressionExp `Generics.extQ` antiLambdaBodyExp `Generics.extQ` antiAssignmentOpExp `Generics.extQ` antiEqualityOpExp `Generics.extQ` antiRelationalOpExp `Generics.extQ` antiShiftOpExp `Generics.extQ` antiAdditiveOpExp `Generics.extQ` antiMultiplicativeOpExp `Generics.extQ` antiPrefixOpExp `Generics.extQ` antiPostfixOpExp `Generics.extQ` antiCreationExpressionExp `Generics.extQ` antiRule_93Exp `Generics.extQ` antiLiteralExp `Generics.extQ` antiArglistExp `Generics.extQ` antiTypeArgumentsExp `Generics.extQ` antiNonEmptyTypeArgumentsExp `Generics.extQ` antiTypeArgumentExp `Generics.extQ` antiWildcardTypeExp `Generics.extQ` antiTypeParametersExp `Generics.extQ` antiNonEmptyTypeParametersExp `Generics.extQ` antiTypeParameterExp `Generics.extQ` antiTypeExp `Generics.extQ` antiTypeSpecifierExp `Generics.extQ` antiModifierExp `Generics.extQ` antiRule_106Exp `Generics.extQ` antiCompoundNameExp) rest lvar = TH.varE $ TH.mkName v in Just [| $lvar ++ $restExp |] antiImportStatementExp _ = Nothing@@ -554,9 +604,9 @@ antiCompoundNamePat _ = Nothing -antiRule_90Pat :: [ Rule_90 ] -> Maybe (TH.Q TH.Pat)-antiRule_90Pat [Anti_Rule_90 v] = Just $ TH.varP (TH.mkName v)-antiRule_90Pat _ = Nothing+antiRule_106Pat :: [ Rule_106 ] -> Maybe (TH.Q TH.Pat)+antiRule_106Pat [Anti_Rule_106 v] = Just $ TH.varP (TH.mkName v)+antiRule_106Pat _ = Nothing antiModifierPat :: Modifier -> Maybe (TH.Q TH.Pat )@@ -579,6 +629,11 @@ antiTypeParameterPat _ = Nothing +antiNonEmptyTypeParametersPat :: NonEmptyTypeParameters -> Maybe (TH.Q TH.Pat )+antiNonEmptyTypeParametersPat ( Anti_NonEmptyTypeParameters v) = Just $ TH.varP (TH.mkName v)+antiNonEmptyTypeParametersPat _ = Nothing++ antiTypeParametersPat :: TypeParameters -> Maybe (TH.Q TH.Pat ) antiTypeParametersPat ( Anti_TypeParameters v) = Just $ TH.varP (TH.mkName v) antiTypeParametersPat _ = Nothing@@ -614,9 +669,9 @@ antiLiteralPat _ = Nothing -antiRule_76Pat :: [ Rule_76 ] -> Maybe (TH.Q TH.Pat)-antiRule_76Pat [Anti_Rule_76 v] = Just $ TH.varP (TH.mkName v)-antiRule_76Pat _ = Nothing+antiRule_93Pat :: [ Rule_93 ] -> Maybe (TH.Q TH.Pat)+antiRule_93Pat [Anti_Rule_93 v] = Just $ TH.varP (TH.mkName v)+antiRule_93Pat _ = Nothing antiCreationExpressionPat :: CreationExpression -> Maybe (TH.Q TH.Pat )@@ -664,6 +719,11 @@ antiAssignmentOpPat _ = Nothing +antiLambdaBodyPat :: LambdaBody -> Maybe (TH.Q TH.Pat )+antiLambdaBodyPat ( Anti_LambdaBody v) = Just $ TH.varP (TH.mkName v)+antiLambdaBodyPat _ = Nothing++ antiExpressionPat :: Expression -> Maybe (TH.Q TH.Pat ) antiExpressionPat ( Anti_Expression v) = Just $ TH.varP (TH.mkName v) antiExpressionPat _ = Nothing@@ -674,11 +734,21 @@ antiSwitchStatementPat _ = Nothing -antiRule_66Pat :: [ Rule_66 ] -> Maybe (TH.Q TH.Pat)-antiRule_66Pat [Anti_Rule_66 v] = Just $ TH.varP (TH.mkName v)-antiRule_66Pat _ = Nothing+antiRule_79Pat :: [ Rule_79 ] -> Maybe (TH.Q TH.Pat)+antiRule_79Pat [Anti_Rule_79 v] = Just $ TH.varP (TH.mkName v)+antiRule_79Pat _ = Nothing +antiResourcePat :: Resource -> Maybe (TH.Q TH.Pat )+antiResourcePat ( Anti_Resource v) = Just $ TH.varP (TH.mkName v)+antiResourcePat _ = Nothing+++antiResourceSpecPat :: ResourceSpec -> Maybe (TH.Q TH.Pat )+antiResourceSpecPat ( Anti_ResourceSpec v) = Just $ TH.varP (TH.mkName v)+antiResourceSpecPat _ = Nothing++ antiTryStatementPat :: TryStatement -> Maybe (TH.Q TH.Pat ) antiTryStatementPat ( Anti_TryStatement v) = Just $ TH.varP (TH.mkName v) antiTryStatementPat _ = Nothing@@ -689,11 +759,21 @@ antiOptFinallyPat _ = Nothing -antiRule_63Pat :: [ Rule_63 ] -> Maybe (TH.Q TH.Pat)-antiRule_63Pat [Anti_Rule_63 v] = Just $ TH.varP (TH.mkName v)-antiRule_63Pat _ = Nothing+antiCatchParameterPat :: CatchParameter -> Maybe (TH.Q TH.Pat )+antiCatchParameterPat ( Anti_CatchParameter v) = Just $ TH.varP (TH.mkName v)+antiCatchParameterPat _ = Nothing +antiRule_70Pat :: [ Rule_70 ] -> Maybe (TH.Q TH.Pat)+antiRule_70Pat [Anti_Rule_70 v] = Just $ TH.varP (TH.mkName v)+antiRule_70Pat _ = Nothing+++antiForEachHeaderPat :: ForEachHeader -> Maybe (TH.Q TH.Pat )+antiForEachHeaderPat ( Anti_ForEachHeader v) = Just $ TH.varP (TH.mkName v)+antiForEachHeaderPat _ = Nothing++ antiForStatementPat :: ForStatement -> Maybe (TH.Q TH.Pat ) antiForStatementPat ( Anti_ForStatement v) = Just $ TH.varP (TH.mkName v) antiForStatementPat _ = Nothing@@ -739,9 +819,9 @@ antiParameterPat _ = Nothing -antiRule_57Pat :: [ Rule_57 ] -> Maybe (TH.Q TH.Pat)-antiRule_57Pat [Anti_Rule_57 v] = Just $ TH.varP (TH.mkName v)-antiRule_57Pat _ = Nothing+antiRule_62Pat :: [ Rule_62 ] -> Maybe (TH.Q TH.Pat)+antiRule_62Pat [Anti_Rule_62 v] = Just $ TH.varP (TH.mkName v)+antiRule_62Pat _ = Nothing antiParameterListPat :: ParameterList -> Maybe (TH.Q TH.Pat )@@ -754,6 +834,11 @@ antiStaticInitializerPat _ = Nothing +antiArrayInitializerPat :: ArrayInitializer -> Maybe (TH.Q TH.Pat )+antiArrayInitializerPat ( Anti_ArrayInitializer v) = Just $ TH.varP (TH.mkName v)+antiArrayInitializerPat _ = Nothing++ antiVariableInitializerPat :: VariableInitializer -> Maybe (TH.Q TH.Pat ) antiVariableInitializerPat ( Anti_VariableInitializer v) = Just $ TH.varP (TH.mkName v) antiVariableInitializerPat _ = Nothing@@ -774,9 +859,9 @@ antiOptVariableInitializerPat _ = Nothing -antiRule_48Pat :: [ Rule_48 ] -> Maybe (TH.Q TH.Pat)-antiRule_48Pat [Anti_Rule_48 v] = Just $ TH.varP (TH.mkName v)-antiRule_48Pat _ = Nothing+antiRule_53Pat :: [ Rule_53 ] -> Maybe (TH.Q TH.Pat)+antiRule_53Pat [Anti_Rule_53 v] = Just $ TH.varP (TH.mkName v)+antiRule_53Pat _ = Nothing antiVariableDeclarationPat :: VariableDeclaration -> Maybe (TH.Q TH.Pat )@@ -794,9 +879,9 @@ antiStatementBlockPat _ = Nothing -antiRule_44Pat :: [ Rule_44 ] -> Maybe (TH.Q TH.Pat)-antiRule_44Pat [Anti_Rule_44 v] = Just $ TH.varP (TH.mkName v)-antiRule_44Pat _ = Nothing+antiRule_49Pat :: [ Rule_49 ] -> Maybe (TH.Q TH.Pat)+antiRule_49Pat [Anti_Rule_49 v] = Just $ TH.varP (TH.mkName v)+antiRule_49Pat _ = Nothing antiMemberRestPat :: MemberRest -> Maybe (TH.Q TH.Pat )@@ -829,14 +914,14 @@ antiMemberDeclarationPat _ = Nothing -antiRule_33Pat :: [ Rule_33 ] -> Maybe (TH.Q TH.Pat)-antiRule_33Pat [Anti_Rule_33 v] = Just $ TH.varP (TH.mkName v)-antiRule_33Pat _ = Nothing+antiRule_38Pat :: [ Rule_38 ] -> Maybe (TH.Q TH.Pat)+antiRule_38Pat [Anti_Rule_38 v] = Just $ TH.varP (TH.mkName v)+antiRule_38Pat _ = Nothing -antiRule_31Pat :: [ Rule_31 ] -> Maybe (TH.Q TH.Pat)-antiRule_31Pat [Anti_Rule_31 v] = Just $ TH.varP (TH.mkName v)-antiRule_31Pat _ = Nothing+antiRule_36Pat :: [ Rule_36 ] -> Maybe (TH.Q TH.Pat)+antiRule_36Pat [Anti_Rule_36 v] = Just $ TH.varP (TH.mkName v)+antiRule_36Pat _ = Nothing antiTypeDeclRestPat :: TypeDeclRest -> Maybe (TH.Q TH.Pat )@@ -899,11 +984,21 @@ antiClassOrInterfaceTypePat _ = Nothing -antiRule_10Pat :: [ Rule_10 ] -> Maybe (TH.Q TH.Pat)-antiRule_10Pat [Anti_Rule_10 v] = Just $ TH.varP (TH.mkName v)-antiRule_10Pat _ = Nothing+antiRule_15Pat :: [ Rule_15 ] -> Maybe (TH.Q TH.Pat)+antiRule_15Pat [Anti_Rule_15 v] = Just $ TH.varP (TH.mkName v)+antiRule_15Pat _ = Nothing +antiElementValueArrayInitializerPat :: ElementValueArrayInitializer -> Maybe (TH.Q TH.Pat )+antiElementValueArrayInitializerPat ( Anti_ElementValueArrayInitializer v) = Just $ TH.varP (TH.mkName v)+antiElementValueArrayInitializerPat _ = Nothing+++antiElementValuePat :: ElementValue -> Maybe (TH.Q TH.Pat )+antiElementValuePat ( Anti_ElementValue v) = Just $ TH.varP (TH.mkName v)+antiElementValuePat _ = Nothing++ antiAnnotationElementPat :: AnnotationElement -> Maybe (TH.Q TH.Pat ) antiAnnotationElementPat ( Anti_AnnotationElement v) = Just $ TH.varP (TH.mkName v) antiAnnotationElementPat _ = Nothing@@ -939,6 +1034,11 @@ antiPackagePat _ = Nothing +antiCompilationUnitRestPat :: CompilationUnitRest -> Maybe (TH.Q TH.Pat )+antiCompilationUnitRestPat ( Anti_CompilationUnitRest v) = Just $ TH.varP (TH.mkName v)+antiCompilationUnitRestPat _ = Nothing++ antiCompilationUnitPat :: CompilationUnit -> Maybe (TH.Q TH.Pat ) antiCompilationUnitPat ( Anti_CompilationUnit v) = Just $ TH.varP (TH.mkName v) antiCompilationUnitPat _ = Nothing@@ -972,440 +1072,495 @@ getJava ( Ctr__Java__0 _ s) = s java :: QuasiQuoter-java = QuasiQuoter (quoteJavaExp "tok_Java_dummy_179" getJava ) (quoteJavaPat "tok_Java_dummy_179" getJava ) quoteJavaType quoteJavaDecs+java = QuasiQuoter (quoteJavaExp "tok_Java_dummy_206" getJava ) (quoteJavaPat "tok_Java_dummy_206" getJava ) quoteJavaType quoteJavaDecs getAdditiveOp ( Ctr__Java__1 _ s) = s additiveOp :: QuasiQuoter-additiveOp = QuasiQuoter (quoteJavaExp "tok_AdditiveOp_dummy_178" getAdditiveOp ) (quoteJavaPat "tok_AdditiveOp_dummy_178" getAdditiveOp ) quoteJavaType quoteJavaDecs+additiveOp = QuasiQuoter (quoteJavaExp "tok_AdditiveOp_dummy_205" getAdditiveOp ) (quoteJavaPat "tok_AdditiveOp_dummy_205" getAdditiveOp ) quoteJavaType quoteJavaDecs getAnnotation ( Ctr__Java__2 _ s) = s annotation :: QuasiQuoter-annotation = QuasiQuoter (quoteJavaExp "tok_Annotation_dummy_177" getAnnotation ) (quoteJavaPat "tok_Annotation_dummy_177" getAnnotation ) quoteJavaType quoteJavaDecs+annotation = QuasiQuoter (quoteJavaExp "tok_Annotation_dummy_204" getAnnotation ) (quoteJavaPat "tok_Annotation_dummy_204" getAnnotation ) quoteJavaType quoteJavaDecs getAnnotationArguments ( Ctr__Java__3 _ s) = s annotationArguments :: QuasiQuoter-annotationArguments = QuasiQuoter (quoteJavaExp "tok_AnnotationArguments_dummy_176" getAnnotationArguments ) (quoteJavaPat "tok_AnnotationArguments_dummy_176" getAnnotationArguments ) quoteJavaType quoteJavaDecs+annotationArguments = QuasiQuoter (quoteJavaExp "tok_AnnotationArguments_dummy_203" getAnnotationArguments ) (quoteJavaPat "tok_AnnotationArguments_dummy_203" getAnnotationArguments ) quoteJavaType quoteJavaDecs getAnnotationDeclaration ( Ctr__Java__4 _ s) = s annotationDeclaration :: QuasiQuoter-annotationDeclaration = QuasiQuoter (quoteJavaExp "tok_AnnotationDeclaration_dummy_175" getAnnotationDeclaration ) (quoteJavaPat "tok_AnnotationDeclaration_dummy_175" getAnnotationDeclaration ) quoteJavaType quoteJavaDecs+annotationDeclaration = QuasiQuoter (quoteJavaExp "tok_AnnotationDeclaration_dummy_202" getAnnotationDeclaration ) (quoteJavaPat "tok_AnnotationDeclaration_dummy_202" getAnnotationDeclaration ) quoteJavaType quoteJavaDecs getAnnotationElement ( Ctr__Java__5 _ s) = s annotationElement :: QuasiQuoter-annotationElement = QuasiQuoter (quoteJavaExp "tok_AnnotationElement_dummy_174" getAnnotationElement ) (quoteJavaPat "tok_AnnotationElement_dummy_174" getAnnotationElement ) quoteJavaType quoteJavaDecs+annotationElement = QuasiQuoter (quoteJavaExp "tok_AnnotationElement_dummy_201" getAnnotationElement ) (quoteJavaPat "tok_AnnotationElement_dummy_201" getAnnotationElement ) quoteJavaType quoteJavaDecs getAnnotationList ( Ctr__Java__6 _ s) = s annotationList :: QuasiQuoter-annotationList = QuasiQuoter (quoteJavaExp "tok_AnnotationList_dummy_173" getAnnotationList ) (quoteJavaPat "tok_AnnotationList_dummy_173" getAnnotationList ) quoteJavaType quoteJavaDecs+annotationList = QuasiQuoter (quoteJavaExp "tok_AnnotationList_dummy_200" getAnnotationList ) (quoteJavaPat "tok_AnnotationList_dummy_200" getAnnotationList ) quoteJavaType quoteJavaDecs getAnnotationTypeElement ( Ctr__Java__7 _ s) = s annotationTypeElement :: QuasiQuoter-annotationTypeElement = QuasiQuoter (quoteJavaExp "tok_AnnotationTypeElement_dummy_172" getAnnotationTypeElement ) (quoteJavaPat "tok_AnnotationTypeElement_dummy_172" getAnnotationTypeElement ) quoteJavaType quoteJavaDecs+annotationTypeElement = QuasiQuoter (quoteJavaExp "tok_AnnotationTypeElement_dummy_199" getAnnotationTypeElement ) (quoteJavaPat "tok_AnnotationTypeElement_dummy_199" getAnnotationTypeElement ) quoteJavaType quoteJavaDecs getAnnotationTypeElementList ( Ctr__Java__8 _ s) = s annotationTypeElementList :: QuasiQuoter-annotationTypeElementList = QuasiQuoter (quoteJavaExp "tok_AnnotationTypeElementList_dummy_171" getAnnotationTypeElementList ) (quoteJavaPat "tok_AnnotationTypeElementList_dummy_171" getAnnotationTypeElementList ) quoteJavaType quoteJavaDecs+annotationTypeElementList = QuasiQuoter (quoteJavaExp "tok_AnnotationTypeElementList_dummy_198" getAnnotationTypeElementList ) (quoteJavaPat "tok_AnnotationTypeElementList_dummy_198" getAnnotationTypeElementList ) quoteJavaType quoteJavaDecs getArglist ( Ctr__Java__9 _ s) = s arglist :: QuasiQuoter-arglist = QuasiQuoter (quoteJavaExp "tok_Arglist_dummy_170" getArglist ) (quoteJavaPat "tok_Arglist_dummy_170" getArglist ) quoteJavaType quoteJavaDecs+arglist = QuasiQuoter (quoteJavaExp "tok_Arglist_dummy_197" getArglist ) (quoteJavaPat "tok_Arglist_dummy_197" getArglist ) quoteJavaType quoteJavaDecs -getAssignmentOp ( Ctr__Java__10 _ s) = s+getArrayInitializer ( Ctr__Java__10 _ s) = s +arrayInitializer :: QuasiQuoter+arrayInitializer = QuasiQuoter (quoteJavaExp "tok_ArrayInitializer_dummy_196" getArrayInitializer ) (quoteJavaPat "tok_ArrayInitializer_dummy_196" getArrayInitializer ) quoteJavaType quoteJavaDecs++getAssignmentOp ( Ctr__Java__11 _ s) = s+ assignmentOp :: QuasiQuoter-assignmentOp = QuasiQuoter (quoteJavaExp "tok_AssignmentOp_dummy_169" getAssignmentOp ) (quoteJavaPat "tok_AssignmentOp_dummy_169" getAssignmentOp ) quoteJavaType quoteJavaDecs+assignmentOp = QuasiQuoter (quoteJavaExp "tok_AssignmentOp_dummy_195" getAssignmentOp ) (quoteJavaPat "tok_AssignmentOp_dummy_195" getAssignmentOp ) quoteJavaType quoteJavaDecs -getCatchList ( Ctr__Java__11 _ s) = s+getCatchList ( Ctr__Java__12 _ s) = s catchList :: QuasiQuoter-catchList = QuasiQuoter (quoteJavaExp "tok_CatchList_dummy_168" getCatchList ) (quoteJavaPat "tok_CatchList_dummy_168" getCatchList ) quoteJavaType quoteJavaDecs+catchList = QuasiQuoter (quoteJavaExp "tok_CatchList_dummy_194" getCatchList ) (quoteJavaPat "tok_CatchList_dummy_194" getCatchList ) quoteJavaType quoteJavaDecs -getClassDeclaration ( Ctr__Java__12 _ s) = s+getCatchParameter ( Ctr__Java__13 _ s) = s +catchParameter :: QuasiQuoter+catchParameter = QuasiQuoter (quoteJavaExp "tok_CatchParameter_dummy_193" getCatchParameter ) (quoteJavaPat "tok_CatchParameter_dummy_193" getCatchParameter ) quoteJavaType quoteJavaDecs++getClassDeclaration ( Ctr__Java__14 _ s) = s+ classDeclaration :: QuasiQuoter-classDeclaration = QuasiQuoter (quoteJavaExp "tok_ClassDeclaration_dummy_167" getClassDeclaration ) (quoteJavaPat "tok_ClassDeclaration_dummy_167" getClassDeclaration ) quoteJavaType quoteJavaDecs+classDeclaration = QuasiQuoter (quoteJavaExp "tok_ClassDeclaration_dummy_192" getClassDeclaration ) (quoteJavaPat "tok_ClassDeclaration_dummy_192" getClassDeclaration ) quoteJavaType quoteJavaDecs -getClassOrInterfaceType ( Ctr__Java__13 _ s) = s+getClassOrInterfaceType ( Ctr__Java__15 _ s) = s classOrInterfaceType :: QuasiQuoter-classOrInterfaceType = QuasiQuoter (quoteJavaExp "tok_ClassOrInterfaceType_dummy_166" getClassOrInterfaceType ) (quoteJavaPat "tok_ClassOrInterfaceType_dummy_166" getClassOrInterfaceType ) quoteJavaType quoteJavaDecs+classOrInterfaceType = QuasiQuoter (quoteJavaExp "tok_ClassOrInterfaceType_dummy_191" getClassOrInterfaceType ) (quoteJavaPat "tok_ClassOrInterfaceType_dummy_191" getClassOrInterfaceType ) quoteJavaType quoteJavaDecs -getCompilationUnit ( Ctr__Java__14 _ s) = s+getCompilationUnit ( Ctr__Java__16 _ s) = s compilationUnit :: QuasiQuoter-compilationUnit = QuasiQuoter (quoteJavaExp "tok_CompilationUnit_dummy_165" getCompilationUnit ) (quoteJavaPat "tok_CompilationUnit_dummy_165" getCompilationUnit ) quoteJavaType quoteJavaDecs+compilationUnit = QuasiQuoter (quoteJavaExp "tok_CompilationUnit_dummy_190" getCompilationUnit ) (quoteJavaPat "tok_CompilationUnit_dummy_190" getCompilationUnit ) quoteJavaType quoteJavaDecs -getCompoundName ( Ctr__Java__15 _ s) = s+getCompilationUnitRest ( Ctr__Java__17 _ s) = s +compilationUnitRest :: QuasiQuoter+compilationUnitRest = QuasiQuoter (quoteJavaExp "tok_CompilationUnitRest_dummy_189" getCompilationUnitRest ) (quoteJavaPat "tok_CompilationUnitRest_dummy_189" getCompilationUnitRest ) quoteJavaType quoteJavaDecs++getCompoundName ( Ctr__Java__18 _ s) = s+ compoundName :: QuasiQuoter-compoundName = QuasiQuoter (quoteJavaExp "tok_CompoundName_dummy_164" getCompoundName ) (quoteJavaPat "tok_CompoundName_dummy_164" getCompoundName ) quoteJavaType quoteJavaDecs+compoundName = QuasiQuoter (quoteJavaExp "tok_CompoundName_dummy_188" getCompoundName ) (quoteJavaPat "tok_CompoundName_dummy_188" getCompoundName ) quoteJavaType quoteJavaDecs -getCompoundNameTail ( Ctr__Java__16 _ s) = s+getCompoundNameTail ( Ctr__Java__19 _ s) = s compoundNameTail :: QuasiQuoter-compoundNameTail = QuasiQuoter (quoteJavaExp "tok_CompoundNameTail_dummy_163" getCompoundNameTail ) (quoteJavaPat "tok_CompoundNameTail_dummy_163" getCompoundNameTail ) quoteJavaType quoteJavaDecs+compoundNameTail = QuasiQuoter (quoteJavaExp "tok_CompoundNameTail_dummy_187" getCompoundNameTail ) (quoteJavaPat "tok_CompoundNameTail_dummy_187" getCompoundNameTail ) quoteJavaType quoteJavaDecs -getCreationExpression ( Ctr__Java__17 _ s) = s+getCreationExpression ( Ctr__Java__20 _ s) = s creationExpression :: QuasiQuoter-creationExpression = QuasiQuoter (quoteJavaExp "tok_CreationExpression_dummy_162" getCreationExpression ) (quoteJavaPat "tok_CreationExpression_dummy_162" getCreationExpression ) quoteJavaType quoteJavaDecs+creationExpression = QuasiQuoter (quoteJavaExp "tok_CreationExpression_dummy_186" getCreationExpression ) (quoteJavaPat "tok_CreationExpression_dummy_186" getCreationExpression ) quoteJavaType quoteJavaDecs -getDimExprs ( Ctr__Java__18 _ s) = s+getDimExprs ( Ctr__Java__21 _ s) = s dimExprs :: QuasiQuoter-dimExprs = QuasiQuoter (quoteJavaExp "tok_DimExprs_dummy_161" getDimExprs ) (quoteJavaPat "tok_DimExprs_dummy_161" getDimExprs ) quoteJavaType quoteJavaDecs+dimExprs = QuasiQuoter (quoteJavaExp "tok_DimExprs_dummy_185" getDimExprs ) (quoteJavaPat "tok_DimExprs_dummy_185" getDimExprs ) quoteJavaType quoteJavaDecs -getDims ( Ctr__Java__19 _ s) = s+getDims ( Ctr__Java__22 _ s) = s dims :: QuasiQuoter-dims = QuasiQuoter (quoteJavaExp "tok_Dims_dummy_160" getDims ) (quoteJavaPat "tok_Dims_dummy_160" getDims ) quoteJavaType quoteJavaDecs+dims = QuasiQuoter (quoteJavaExp "tok_Dims_dummy_184" getDims ) (quoteJavaPat "tok_Dims_dummy_184" getDims ) quoteJavaType quoteJavaDecs -getDoStatement ( Ctr__Java__20 _ s) = s+getDoStatement ( Ctr__Java__23 _ s) = s doStatement :: QuasiQuoter-doStatement = QuasiQuoter (quoteJavaExp "tok_DoStatement_dummy_159" getDoStatement ) (quoteJavaPat "tok_DoStatement_dummy_159" getDoStatement ) quoteJavaType quoteJavaDecs+doStatement = QuasiQuoter (quoteJavaExp "tok_DoStatement_dummy_183" getDoStatement ) (quoteJavaPat "tok_DoStatement_dummy_183" getDoStatement ) quoteJavaType quoteJavaDecs -getDocComment ( Ctr__Java__21 _ s) = s+getDocComment ( Ctr__Java__24 _ s) = s docComment :: QuasiQuoter-docComment = QuasiQuoter (quoteJavaExp "tok_DocComment_dummy_158" getDocComment ) (quoteJavaPat "tok_DocComment_dummy_158" getDocComment ) quoteJavaType quoteJavaDecs+docComment = QuasiQuoter (quoteJavaExp "tok_DocComment_dummy_182" getDocComment ) (quoteJavaPat "tok_DocComment_dummy_182" getDocComment ) quoteJavaType quoteJavaDecs -getEnumConstant ( Ctr__Java__22 _ s) = s+getElementValue ( Ctr__Java__25 _ s) = s +elementValue :: QuasiQuoter+elementValue = QuasiQuoter (quoteJavaExp "tok_ElementValue_dummy_181" getElementValue ) (quoteJavaPat "tok_ElementValue_dummy_181" getElementValue ) quoteJavaType quoteJavaDecs++getElementValueArrayInitializer ( Ctr__Java__26 _ s) = s++elementValueArrayInitializer :: QuasiQuoter+elementValueArrayInitializer = QuasiQuoter (quoteJavaExp "tok_ElementValueArrayInitializer_dummy_180" getElementValueArrayInitializer ) (quoteJavaPat "tok_ElementValueArrayInitializer_dummy_180" getElementValueArrayInitializer ) quoteJavaType quoteJavaDecs++getEnumConstant ( Ctr__Java__27 _ s) = s+ enumConstant :: QuasiQuoter-enumConstant = QuasiQuoter (quoteJavaExp "tok_EnumConstant_dummy_157" getEnumConstant ) (quoteJavaPat "tok_EnumConstant_dummy_157" getEnumConstant ) quoteJavaType quoteJavaDecs+enumConstant = QuasiQuoter (quoteJavaExp "tok_EnumConstant_dummy_179" getEnumConstant ) (quoteJavaPat "tok_EnumConstant_dummy_179" getEnumConstant ) quoteJavaType quoteJavaDecs -getEnumConstantList ( Ctr__Java__23 _ s) = s+getEnumConstantList ( Ctr__Java__28 _ s) = s enumConstantList :: QuasiQuoter-enumConstantList = QuasiQuoter (quoteJavaExp "tok_EnumConstantList_dummy_156" getEnumConstantList ) (quoteJavaPat "tok_EnumConstantList_dummy_156" getEnumConstantList ) quoteJavaType quoteJavaDecs+enumConstantList = QuasiQuoter (quoteJavaExp "tok_EnumConstantList_dummy_178" getEnumConstantList ) (quoteJavaPat "tok_EnumConstantList_dummy_178" getEnumConstantList ) quoteJavaType quoteJavaDecs -getEnumDeclaration ( Ctr__Java__24 _ s) = s+getEnumDeclaration ( Ctr__Java__29 _ s) = s enumDeclaration :: QuasiQuoter-enumDeclaration = QuasiQuoter (quoteJavaExp "tok_EnumDeclaration_dummy_155" getEnumDeclaration ) (quoteJavaPat "tok_EnumDeclaration_dummy_155" getEnumDeclaration ) quoteJavaType quoteJavaDecs+enumDeclaration = QuasiQuoter (quoteJavaExp "tok_EnumDeclaration_dummy_177" getEnumDeclaration ) (quoteJavaPat "tok_EnumDeclaration_dummy_177" getEnumDeclaration ) quoteJavaType quoteJavaDecs -getEqualityOp ( Ctr__Java__25 _ s) = s+getEqualityOp ( Ctr__Java__30 _ s) = s equalityOp :: QuasiQuoter-equalityOp = QuasiQuoter (quoteJavaExp "tok_EqualityOp_dummy_154" getEqualityOp ) (quoteJavaPat "tok_EqualityOp_dummy_154" getEqualityOp ) quoteJavaType quoteJavaDecs+equalityOp = QuasiQuoter (quoteJavaExp "tok_EqualityOp_dummy_176" getEqualityOp ) (quoteJavaPat "tok_EqualityOp_dummy_176" getEqualityOp ) quoteJavaType quoteJavaDecs -getExpression ( Ctr__Java__26 _ s) = s+getExpression ( Ctr__Java__31 _ s) = s expression :: QuasiQuoter-expression = QuasiQuoter (quoteJavaExp "tok_Expression_dummy_153" getExpression ) (quoteJavaPat "tok_Expression_dummy_153" getExpression ) quoteJavaType quoteJavaDecs+expression = QuasiQuoter (quoteJavaExp "tok_Expression_dummy_175" getExpression ) (quoteJavaPat "tok_Expression_dummy_175" getExpression ) quoteJavaType quoteJavaDecs -getExtendsList ( Ctr__Java__27 _ s) = s+getExtendsList ( Ctr__Java__32 _ s) = s extendsList :: QuasiQuoter-extendsList = QuasiQuoter (quoteJavaExp "tok_ExtendsList_dummy_152" getExtendsList ) (quoteJavaPat "tok_ExtendsList_dummy_152" getExtendsList ) quoteJavaType quoteJavaDecs+extendsList = QuasiQuoter (quoteJavaExp "tok_ExtendsList_dummy_174" getExtendsList ) (quoteJavaPat "tok_ExtendsList_dummy_174" getExtendsList ) quoteJavaType quoteJavaDecs -getFieldDeclaration ( Ctr__Java__28 _ s) = s+getFieldDeclaration ( Ctr__Java__33 _ s) = s fieldDeclaration :: QuasiQuoter-fieldDeclaration = QuasiQuoter (quoteJavaExp "tok_FieldDeclaration_dummy_151" getFieldDeclaration ) (quoteJavaPat "tok_FieldDeclaration_dummy_151" getFieldDeclaration ) quoteJavaType quoteJavaDecs+fieldDeclaration = QuasiQuoter (quoteJavaExp "tok_FieldDeclaration_dummy_173" getFieldDeclaration ) (quoteJavaPat "tok_FieldDeclaration_dummy_173" getFieldDeclaration ) quoteJavaType quoteJavaDecs -getFieldDeclarationList ( Ctr__Java__29 _ s) = s+getFieldDeclarationList ( Ctr__Java__34 _ s) = s fieldDeclarationList :: QuasiQuoter-fieldDeclarationList = QuasiQuoter (quoteJavaExp "tok_FieldDeclarationList_dummy_150" getFieldDeclarationList ) (quoteJavaPat "tok_FieldDeclarationList_dummy_150" getFieldDeclarationList ) quoteJavaType quoteJavaDecs+fieldDeclarationList = QuasiQuoter (quoteJavaExp "tok_FieldDeclarationList_dummy_172" getFieldDeclarationList ) (quoteJavaPat "tok_FieldDeclarationList_dummy_172" getFieldDeclarationList ) quoteJavaType quoteJavaDecs -getForStatement ( Ctr__Java__30 _ s) = s+getForEachHeader ( Ctr__Java__35 _ s) = s +forEachHeader :: QuasiQuoter+forEachHeader = QuasiQuoter (quoteJavaExp "tok_ForEachHeader_dummy_171" getForEachHeader ) (quoteJavaPat "tok_ForEachHeader_dummy_171" getForEachHeader ) quoteJavaType quoteJavaDecs++getForStatement ( Ctr__Java__36 _ s) = s+ forStatement :: QuasiQuoter-forStatement = QuasiQuoter (quoteJavaExp "tok_ForStatement_dummy_149" getForStatement ) (quoteJavaPat "tok_ForStatement_dummy_149" getForStatement ) quoteJavaType quoteJavaDecs+forStatement = QuasiQuoter (quoteJavaExp "tok_ForStatement_dummy_170" getForStatement ) (quoteJavaPat "tok_ForStatement_dummy_170" getForStatement ) quoteJavaType quoteJavaDecs -getIfStatement ( Ctr__Java__31 _ s) = s+getIfStatement ( Ctr__Java__37 _ s) = s ifStatement :: QuasiQuoter-ifStatement = QuasiQuoter (quoteJavaExp "tok_IfStatement_dummy_148" getIfStatement ) (quoteJavaPat "tok_IfStatement_dummy_148" getIfStatement ) quoteJavaType quoteJavaDecs+ifStatement = QuasiQuoter (quoteJavaExp "tok_IfStatement_dummy_169" getIfStatement ) (quoteJavaPat "tok_IfStatement_dummy_169" getIfStatement ) quoteJavaType quoteJavaDecs -getImplementsList ( Ctr__Java__32 _ s) = s+getImplementsList ( Ctr__Java__38 _ s) = s implementsList :: QuasiQuoter-implementsList = QuasiQuoter (quoteJavaExp "tok_ImplementsList_dummy_147" getImplementsList ) (quoteJavaPat "tok_ImplementsList_dummy_147" getImplementsList ) quoteJavaType quoteJavaDecs+implementsList = QuasiQuoter (quoteJavaExp "tok_ImplementsList_dummy_168" getImplementsList ) (quoteJavaPat "tok_ImplementsList_dummy_168" getImplementsList ) quoteJavaType quoteJavaDecs -getImportHead ( Ctr__Java__33 _ s) = s+getImportHead ( Ctr__Java__39 _ s) = s importHead :: QuasiQuoter-importHead = QuasiQuoter (quoteJavaExp "tok_ImportHead_dummy_146" getImportHead ) (quoteJavaPat "tok_ImportHead_dummy_146" getImportHead ) quoteJavaType quoteJavaDecs+importHead = QuasiQuoter (quoteJavaExp "tok_ImportHead_dummy_167" getImportHead ) (quoteJavaPat "tok_ImportHead_dummy_167" getImportHead ) quoteJavaType quoteJavaDecs -getImportList ( Ctr__Java__34 _ s) = s+getImportList ( Ctr__Java__40 _ s) = s importList :: QuasiQuoter-importList = QuasiQuoter (quoteJavaExp "tok_ImportList_dummy_145" getImportList ) (quoteJavaPat "tok_ImportList_dummy_145" getImportList ) quoteJavaType quoteJavaDecs+importList = QuasiQuoter (quoteJavaExp "tok_ImportList_dummy_166" getImportList ) (quoteJavaPat "tok_ImportList_dummy_166" getImportList ) quoteJavaType quoteJavaDecs -getImportName ( Ctr__Java__35 _ s) = s+getImportName ( Ctr__Java__41 _ s) = s importName :: QuasiQuoter-importName = QuasiQuoter (quoteJavaExp "tok_ImportName_dummy_144" getImportName ) (quoteJavaPat "tok_ImportName_dummy_144" getImportName ) quoteJavaType quoteJavaDecs+importName = QuasiQuoter (quoteJavaExp "tok_ImportName_dummy_165" getImportName ) (quoteJavaPat "tok_ImportName_dummy_165" getImportName ) quoteJavaType quoteJavaDecs -getImportStatement ( Ctr__Java__36 _ s) = s+getImportStatement ( Ctr__Java__42 _ s) = s importStatement :: QuasiQuoter-importStatement = QuasiQuoter (quoteJavaExp "tok_ImportStatement_dummy_143" getImportStatement ) (quoteJavaPat "tok_ImportStatement_dummy_143" getImportStatement ) quoteJavaType quoteJavaDecs+importStatement = QuasiQuoter (quoteJavaExp "tok_ImportStatement_dummy_164" getImportStatement ) (quoteJavaPat "tok_ImportStatement_dummy_164" getImportStatement ) quoteJavaType quoteJavaDecs -getInterfaceDeclaration ( Ctr__Java__37 _ s) = s+getInterfaceDeclaration ( Ctr__Java__43 _ s) = s interfaceDeclaration :: QuasiQuoter-interfaceDeclaration = QuasiQuoter (quoteJavaExp "tok_InterfaceDeclaration_dummy_142" getInterfaceDeclaration ) (quoteJavaPat "tok_InterfaceDeclaration_dummy_142" getInterfaceDeclaration ) quoteJavaType quoteJavaDecs+interfaceDeclaration = QuasiQuoter (quoteJavaExp "tok_InterfaceDeclaration_dummy_163" getInterfaceDeclaration ) (quoteJavaPat "tok_InterfaceDeclaration_dummy_163" getInterfaceDeclaration ) quoteJavaType quoteJavaDecs -getLiteral ( Ctr__Java__38 _ s) = s+getLambdaBody ( Ctr__Java__44 _ s) = s +lambdaBody :: QuasiQuoter+lambdaBody = QuasiQuoter (quoteJavaExp "tok_LambdaBody_dummy_162" getLambdaBody ) (quoteJavaPat "tok_LambdaBody_dummy_162" getLambdaBody ) quoteJavaType quoteJavaDecs++getLiteral ( Ctr__Java__45 _ s) = s+ literal :: QuasiQuoter-literal = QuasiQuoter (quoteJavaExp "tok_Literal_dummy_141" getLiteral ) (quoteJavaPat "tok_Literal_dummy_141" getLiteral ) quoteJavaType quoteJavaDecs+literal = QuasiQuoter (quoteJavaExp "tok_Literal_dummy_161" getLiteral ) (quoteJavaPat "tok_Literal_dummy_161" getLiteral ) quoteJavaType quoteJavaDecs -getLocalModifierList1 ( Ctr__Java__39 _ s) = s+getLocalModifierList1 ( Ctr__Java__46 _ s) = s localModifierList1 :: QuasiQuoter-localModifierList1 = QuasiQuoter (quoteJavaExp "tok_LocalModifierList1_dummy_140" getLocalModifierList1 ) (quoteJavaPat "tok_LocalModifierList1_dummy_140" getLocalModifierList1 ) quoteJavaType quoteJavaDecs+localModifierList1 = QuasiQuoter (quoteJavaExp "tok_LocalModifierList1_dummy_160" getLocalModifierList1 ) (quoteJavaPat "tok_LocalModifierList1_dummy_160" getLocalModifierList1 ) quoteJavaType quoteJavaDecs -getMemberAfterFirstId ( Ctr__Java__40 _ s) = s+getMemberAfterFirstId ( Ctr__Java__47 _ s) = s memberAfterFirstId :: QuasiQuoter-memberAfterFirstId = QuasiQuoter (quoteJavaExp "tok_MemberAfterFirstId_dummy_139" getMemberAfterFirstId ) (quoteJavaPat "tok_MemberAfterFirstId_dummy_139" getMemberAfterFirstId ) quoteJavaType quoteJavaDecs+memberAfterFirstId = QuasiQuoter (quoteJavaExp "tok_MemberAfterFirstId_dummy_159" getMemberAfterFirstId ) (quoteJavaPat "tok_MemberAfterFirstId_dummy_159" getMemberAfterFirstId ) quoteJavaType quoteJavaDecs -getMemberDeclaration ( Ctr__Java__41 _ s) = s+getMemberDeclaration ( Ctr__Java__48 _ s) = s memberDeclaration :: QuasiQuoter-memberDeclaration = QuasiQuoter (quoteJavaExp "tok_MemberDeclaration_dummy_138" getMemberDeclaration ) (quoteJavaPat "tok_MemberDeclaration_dummy_138" getMemberDeclaration ) quoteJavaType quoteJavaDecs+memberDeclaration = QuasiQuoter (quoteJavaExp "tok_MemberDeclaration_dummy_158" getMemberDeclaration ) (quoteJavaPat "tok_MemberDeclaration_dummy_158" getMemberDeclaration ) quoteJavaType quoteJavaDecs -getMemberRest ( Ctr__Java__42 _ s) = s+getMemberRest ( Ctr__Java__49 _ s) = s memberRest :: QuasiQuoter-memberRest = QuasiQuoter (quoteJavaExp "tok_MemberRest_dummy_137" getMemberRest ) (quoteJavaPat "tok_MemberRest_dummy_137" getMemberRest ) quoteJavaType quoteJavaDecs+memberRest = QuasiQuoter (quoteJavaExp "tok_MemberRest_dummy_157" getMemberRest ) (quoteJavaPat "tok_MemberRest_dummy_157" getMemberRest ) quoteJavaType quoteJavaDecs -getModifier ( Ctr__Java__43 _ s) = s+getModifier ( Ctr__Java__50 _ s) = s modifier :: QuasiQuoter-modifier = QuasiQuoter (quoteJavaExp "tok_Modifier_dummy_136" getModifier ) (quoteJavaPat "tok_Modifier_dummy_136" getModifier ) quoteJavaType quoteJavaDecs+modifier = QuasiQuoter (quoteJavaExp "tok_Modifier_dummy_156" getModifier ) (quoteJavaPat "tok_Modifier_dummy_156" getModifier ) quoteJavaType quoteJavaDecs -getModifierList ( Ctr__Java__44 _ s) = s+getModifierList ( Ctr__Java__51 _ s) = s modifierList :: QuasiQuoter-modifierList = QuasiQuoter (quoteJavaExp "tok_ModifierList_dummy_135" getModifierList ) (quoteJavaPat "tok_ModifierList_dummy_135" getModifierList ) quoteJavaType quoteJavaDecs+modifierList = QuasiQuoter (quoteJavaExp "tok_ModifierList_dummy_155" getModifierList ) (quoteJavaPat "tok_ModifierList_dummy_155" getModifierList ) quoteJavaType quoteJavaDecs -getMoreTypeSpecifier ( Ctr__Java__45 _ s) = s+getMoreTypeSpecifier ( Ctr__Java__52 _ s) = s moreTypeSpecifier :: QuasiQuoter-moreTypeSpecifier = QuasiQuoter (quoteJavaExp "tok_MoreTypeSpecifier_dummy_134" getMoreTypeSpecifier ) (quoteJavaPat "tok_MoreTypeSpecifier_dummy_134" getMoreTypeSpecifier ) quoteJavaType quoteJavaDecs+moreTypeSpecifier = QuasiQuoter (quoteJavaExp "tok_MoreTypeSpecifier_dummy_154" getMoreTypeSpecifier ) (quoteJavaPat "tok_MoreTypeSpecifier_dummy_154" getMoreTypeSpecifier ) quoteJavaType quoteJavaDecs -getMoreVariableDeclarators ( Ctr__Java__46 _ s) = s+getMoreVariableDeclarators ( Ctr__Java__53 _ s) = s moreVariableDeclarators :: QuasiQuoter-moreVariableDeclarators = QuasiQuoter (quoteJavaExp "tok_MoreVariableDeclarators_dummy_133" getMoreVariableDeclarators ) (quoteJavaPat "tok_MoreVariableDeclarators_dummy_133" getMoreVariableDeclarators ) quoteJavaType quoteJavaDecs+moreVariableDeclarators = QuasiQuoter (quoteJavaExp "tok_MoreVariableDeclarators_dummy_153" getMoreVariableDeclarators ) (quoteJavaPat "tok_MoreVariableDeclarators_dummy_153" getMoreVariableDeclarators ) quoteJavaType quoteJavaDecs -getMultiplicativeOp ( Ctr__Java__47 _ s) = s+getMultiplicativeOp ( Ctr__Java__54 _ s) = s multiplicativeOp :: QuasiQuoter-multiplicativeOp = QuasiQuoter (quoteJavaExp "tok_MultiplicativeOp_dummy_132" getMultiplicativeOp ) (quoteJavaPat "tok_MultiplicativeOp_dummy_132" getMultiplicativeOp ) quoteJavaType quoteJavaDecs+multiplicativeOp = QuasiQuoter (quoteJavaExp "tok_MultiplicativeOp_dummy_152" getMultiplicativeOp ) (quoteJavaPat "tok_MultiplicativeOp_dummy_152" getMultiplicativeOp ) quoteJavaType quoteJavaDecs -getNonEmptyDims ( Ctr__Java__48 _ s) = s+getNonEmptyDims ( Ctr__Java__55 _ s) = s nonEmptyDims :: QuasiQuoter-nonEmptyDims = QuasiQuoter (quoteJavaExp "tok_NonEmptyDims_dummy_131" getNonEmptyDims ) (quoteJavaPat "tok_NonEmptyDims_dummy_131" getNonEmptyDims ) quoteJavaType quoteJavaDecs+nonEmptyDims = QuasiQuoter (quoteJavaExp "tok_NonEmptyDims_dummy_151" getNonEmptyDims ) (quoteJavaPat "tok_NonEmptyDims_dummy_151" getNonEmptyDims ) quoteJavaType quoteJavaDecs -getNonEmptyTypeArguments ( Ctr__Java__49 _ s) = s+getNonEmptyTypeArguments ( Ctr__Java__56 _ s) = s nonEmptyTypeArguments :: QuasiQuoter-nonEmptyTypeArguments = QuasiQuoter (quoteJavaExp "tok_NonEmptyTypeArguments_dummy_130" getNonEmptyTypeArguments ) (quoteJavaPat "tok_NonEmptyTypeArguments_dummy_130" getNonEmptyTypeArguments ) quoteJavaType quoteJavaDecs+nonEmptyTypeArguments = QuasiQuoter (quoteJavaExp "tok_NonEmptyTypeArguments_dummy_150" getNonEmptyTypeArguments ) (quoteJavaPat "tok_NonEmptyTypeArguments_dummy_150" getNonEmptyTypeArguments ) quoteJavaType quoteJavaDecs -getOptDocComment ( Ctr__Java__50 _ s) = s+getNonEmptyTypeParameters ( Ctr__Java__57 _ s) = s +nonEmptyTypeParameters :: QuasiQuoter+nonEmptyTypeParameters = QuasiQuoter (quoteJavaExp "tok_NonEmptyTypeParameters_dummy_149" getNonEmptyTypeParameters ) (quoteJavaPat "tok_NonEmptyTypeParameters_dummy_149" getNonEmptyTypeParameters ) quoteJavaType quoteJavaDecs++getOptDocComment ( Ctr__Java__58 _ s) = s+ optDocComment :: QuasiQuoter-optDocComment = QuasiQuoter (quoteJavaExp "tok_OptDocComment_dummy_129" getOptDocComment ) (quoteJavaPat "tok_OptDocComment_dummy_129" getOptDocComment ) quoteJavaType quoteJavaDecs+optDocComment = QuasiQuoter (quoteJavaExp "tok_OptDocComment_dummy_148" getOptDocComment ) (quoteJavaPat "tok_OptDocComment_dummy_148" getOptDocComment ) quoteJavaType quoteJavaDecs -getOptElsePart ( Ctr__Java__51 _ s) = s+getOptElsePart ( Ctr__Java__59 _ s) = s optElsePart :: QuasiQuoter-optElsePart = QuasiQuoter (quoteJavaExp "tok_OptElsePart_dummy_128" getOptElsePart ) (quoteJavaPat "tok_OptElsePart_dummy_128" getOptElsePart ) quoteJavaType quoteJavaDecs+optElsePart = QuasiQuoter (quoteJavaExp "tok_OptElsePart_dummy_147" getOptElsePart ) (quoteJavaPat "tok_OptElsePart_dummy_147" getOptElsePart ) quoteJavaType quoteJavaDecs -getOptExpression ( Ctr__Java__52 _ s) = s+getOptExpression ( Ctr__Java__60 _ s) = s optExpression :: QuasiQuoter-optExpression = QuasiQuoter (quoteJavaExp "tok_OptExpression_dummy_127" getOptExpression ) (quoteJavaPat "tok_OptExpression_dummy_127" getOptExpression ) quoteJavaType quoteJavaDecs+optExpression = QuasiQuoter (quoteJavaExp "tok_OptExpression_dummy_146" getOptExpression ) (quoteJavaPat "tok_OptExpression_dummy_146" getOptExpression ) quoteJavaType quoteJavaDecs -getOptFinally ( Ctr__Java__53 _ s) = s+getOptFinally ( Ctr__Java__61 _ s) = s optFinally :: QuasiQuoter-optFinally = QuasiQuoter (quoteJavaExp "tok_OptFinally_dummy_126" getOptFinally ) (quoteJavaPat "tok_OptFinally_dummy_126" getOptFinally ) quoteJavaType quoteJavaDecs+optFinally = QuasiQuoter (quoteJavaExp "tok_OptFinally_dummy_145" getOptFinally ) (quoteJavaPat "tok_OptFinally_dummy_145" getOptFinally ) quoteJavaType quoteJavaDecs -getOptId ( Ctr__Java__54 _ s) = s+getOptId ( Ctr__Java__62 _ s) = s optId :: QuasiQuoter-optId = QuasiQuoter (quoteJavaExp "tok_OptId_dummy_125" getOptId ) (quoteJavaPat "tok_OptId_dummy_125" getOptId ) quoteJavaType quoteJavaDecs+optId = QuasiQuoter (quoteJavaExp "tok_OptId_dummy_144" getOptId ) (quoteJavaPat "tok_OptId_dummy_144" getOptId ) quoteJavaType quoteJavaDecs -getOptVariableInitializer ( Ctr__Java__55 _ s) = s+getOptVariableInitializer ( Ctr__Java__63 _ s) = s optVariableInitializer :: QuasiQuoter-optVariableInitializer = QuasiQuoter (quoteJavaExp "tok_OptVariableInitializer_dummy_124" getOptVariableInitializer ) (quoteJavaPat "tok_OptVariableInitializer_dummy_124" getOptVariableInitializer ) quoteJavaType quoteJavaDecs+optVariableInitializer = QuasiQuoter (quoteJavaExp "tok_OptVariableInitializer_dummy_143" getOptVariableInitializer ) (quoteJavaPat "tok_OptVariableInitializer_dummy_143" getOptVariableInitializer ) quoteJavaType quoteJavaDecs -getPackage ( Ctr__Java__56 _ s) = s+getPackage ( Ctr__Java__64 _ s) = s package :: QuasiQuoter-package = QuasiQuoter (quoteJavaExp "tok_Package_dummy_123" getPackage ) (quoteJavaPat "tok_Package_dummy_123" getPackage ) quoteJavaType quoteJavaDecs+package = QuasiQuoter (quoteJavaExp "tok_Package_dummy_142" getPackage ) (quoteJavaPat "tok_Package_dummy_142" getPackage ) quoteJavaType quoteJavaDecs -getParamModifierList ( Ctr__Java__57 _ s) = s+getParamModifierList ( Ctr__Java__65 _ s) = s paramModifierList :: QuasiQuoter-paramModifierList = QuasiQuoter (quoteJavaExp "tok_ParamModifierList_dummy_122" getParamModifierList ) (quoteJavaPat "tok_ParamModifierList_dummy_122" getParamModifierList ) quoteJavaType quoteJavaDecs+paramModifierList = QuasiQuoter (quoteJavaExp "tok_ParamModifierList_dummy_141" getParamModifierList ) (quoteJavaPat "tok_ParamModifierList_dummy_141" getParamModifierList ) quoteJavaType quoteJavaDecs -getParameter ( Ctr__Java__58 _ s) = s+getParameter ( Ctr__Java__66 _ s) = s parameter :: QuasiQuoter-parameter = QuasiQuoter (quoteJavaExp "tok_Parameter_dummy_121" getParameter ) (quoteJavaPat "tok_Parameter_dummy_121" getParameter ) quoteJavaType quoteJavaDecs+parameter = QuasiQuoter (quoteJavaExp "tok_Parameter_dummy_140" getParameter ) (quoteJavaPat "tok_Parameter_dummy_140" getParameter ) quoteJavaType quoteJavaDecs -getParameterList ( Ctr__Java__59 _ s) = s+getParameterList ( Ctr__Java__67 _ s) = s parameterList :: QuasiQuoter-parameterList = QuasiQuoter (quoteJavaExp "tok_ParameterList_dummy_120" getParameterList ) (quoteJavaPat "tok_ParameterList_dummy_120" getParameterList ) quoteJavaType quoteJavaDecs+parameterList = QuasiQuoter (quoteJavaExp "tok_ParameterList_dummy_139" getParameterList ) (quoteJavaPat "tok_ParameterList_dummy_139" getParameterList ) quoteJavaType quoteJavaDecs -getPostfixOp ( Ctr__Java__60 _ s) = s+getPostfixOp ( Ctr__Java__68 _ s) = s postfixOp :: QuasiQuoter-postfixOp = QuasiQuoter (quoteJavaExp "tok_PostfixOp_dummy_119" getPostfixOp ) (quoteJavaPat "tok_PostfixOp_dummy_119" getPostfixOp ) quoteJavaType quoteJavaDecs+postfixOp = QuasiQuoter (quoteJavaExp "tok_PostfixOp_dummy_138" getPostfixOp ) (quoteJavaPat "tok_PostfixOp_dummy_138" getPostfixOp ) quoteJavaType quoteJavaDecs -getPrefixOp ( Ctr__Java__61 _ s) = s+getPrefixOp ( Ctr__Java__69 _ s) = s prefixOp :: QuasiQuoter-prefixOp = QuasiQuoter (quoteJavaExp "tok_PrefixOp_dummy_118" getPrefixOp ) (quoteJavaPat "tok_PrefixOp_dummy_118" getPrefixOp ) quoteJavaType quoteJavaDecs+prefixOp = QuasiQuoter (quoteJavaExp "tok_PrefixOp_dummy_137" getPrefixOp ) (quoteJavaPat "tok_PrefixOp_dummy_137" getPrefixOp ) quoteJavaType quoteJavaDecs -getPrimitiveTypeKeyword ( Ctr__Java__62 _ s) = s+getPrimitiveTypeKeyword ( Ctr__Java__70 _ s) = s primitiveTypeKeyword :: QuasiQuoter-primitiveTypeKeyword = QuasiQuoter (quoteJavaExp "tok_PrimitiveTypeKeyword_dummy_117" getPrimitiveTypeKeyword ) (quoteJavaPat "tok_PrimitiveTypeKeyword_dummy_117" getPrimitiveTypeKeyword ) quoteJavaType quoteJavaDecs+primitiveTypeKeyword = QuasiQuoter (quoteJavaExp "tok_PrimitiveTypeKeyword_dummy_136" getPrimitiveTypeKeyword ) (quoteJavaPat "tok_PrimitiveTypeKeyword_dummy_136" getPrimitiveTypeKeyword ) quoteJavaType quoteJavaDecs -getRelationalOp ( Ctr__Java__63 _ s) = s+getRelationalOp ( Ctr__Java__71 _ s) = s relationalOp :: QuasiQuoter-relationalOp = QuasiQuoter (quoteJavaExp "tok_RelationalOp_dummy_116" getRelationalOp ) (quoteJavaPat "tok_RelationalOp_dummy_116" getRelationalOp ) quoteJavaType quoteJavaDecs+relationalOp = QuasiQuoter (quoteJavaExp "tok_RelationalOp_dummy_135" getRelationalOp ) (quoteJavaPat "tok_RelationalOp_dummy_135" getRelationalOp ) quoteJavaType quoteJavaDecs -getShiftOp ( Ctr__Java__64 _ s) = s+getResource ( Ctr__Java__72 _ s) = s +resource :: QuasiQuoter+resource = QuasiQuoter (quoteJavaExp "tok_Resource_dummy_134" getResource ) (quoteJavaPat "tok_Resource_dummy_134" getResource ) quoteJavaType quoteJavaDecs++getResourceSpec ( Ctr__Java__73 _ s) = s++resourceSpec :: QuasiQuoter+resourceSpec = QuasiQuoter (quoteJavaExp "tok_ResourceSpec_dummy_133" getResourceSpec ) (quoteJavaPat "tok_ResourceSpec_dummy_133" getResourceSpec ) quoteJavaType quoteJavaDecs++getShiftOp ( Ctr__Java__74 _ s) = s+ shiftOp :: QuasiQuoter-shiftOp = QuasiQuoter (quoteJavaExp "tok_ShiftOp_dummy_115" getShiftOp ) (quoteJavaPat "tok_ShiftOp_dummy_115" getShiftOp ) quoteJavaType quoteJavaDecs+shiftOp = QuasiQuoter (quoteJavaExp "tok_ShiftOp_dummy_132" getShiftOp ) (quoteJavaPat "tok_ShiftOp_dummy_132" getShiftOp ) quoteJavaType quoteJavaDecs -getStatement ( Ctr__Java__65 _ s) = s+getStatement ( Ctr__Java__75 _ s) = s statement :: QuasiQuoter-statement = QuasiQuoter (quoteJavaExp "tok_Statement_dummy_114" getStatement ) (quoteJavaPat "tok_Statement_dummy_114" getStatement ) quoteJavaType quoteJavaDecs+statement = QuasiQuoter (quoteJavaExp "tok_Statement_dummy_131" getStatement ) (quoteJavaPat "tok_Statement_dummy_131" getStatement ) quoteJavaType quoteJavaDecs -getStatementBlock ( Ctr__Java__66 _ s) = s+getStatementBlock ( Ctr__Java__76 _ s) = s statementBlock :: QuasiQuoter-statementBlock = QuasiQuoter (quoteJavaExp "tok_StatementBlock_dummy_113" getStatementBlock ) (quoteJavaPat "tok_StatementBlock_dummy_113" getStatementBlock ) quoteJavaType quoteJavaDecs+statementBlock = QuasiQuoter (quoteJavaExp "tok_StatementBlock_dummy_130" getStatementBlock ) (quoteJavaPat "tok_StatementBlock_dummy_130" getStatementBlock ) quoteJavaType quoteJavaDecs -getStatementList ( Ctr__Java__67 _ s) = s+getStatementList ( Ctr__Java__77 _ s) = s statementList :: QuasiQuoter-statementList = QuasiQuoter (quoteJavaExp "tok_StatementList_dummy_112" getStatementList ) (quoteJavaPat "tok_StatementList_dummy_112" getStatementList ) quoteJavaType quoteJavaDecs+statementList = QuasiQuoter (quoteJavaExp "tok_StatementList_dummy_129" getStatementList ) (quoteJavaPat "tok_StatementList_dummy_129" getStatementList ) quoteJavaType quoteJavaDecs -getStaticInitializer ( Ctr__Java__68 _ s) = s+getStaticInitializer ( Ctr__Java__78 _ s) = s staticInitializer :: QuasiQuoter-staticInitializer = QuasiQuoter (quoteJavaExp "tok_StaticInitializer_dummy_111" getStaticInitializer ) (quoteJavaPat "tok_StaticInitializer_dummy_111" getStaticInitializer ) quoteJavaType quoteJavaDecs+staticInitializer = QuasiQuoter (quoteJavaExp "tok_StaticInitializer_dummy_128" getStaticInitializer ) (quoteJavaPat "tok_StaticInitializer_dummy_128" getStaticInitializer ) quoteJavaType quoteJavaDecs -getSwitchCaseList ( Ctr__Java__69 _ s) = s+getSwitchCaseList ( Ctr__Java__79 _ s) = s switchCaseList :: QuasiQuoter-switchCaseList = QuasiQuoter (quoteJavaExp "tok_SwitchCaseList_dummy_110" getSwitchCaseList ) (quoteJavaPat "tok_SwitchCaseList_dummy_110" getSwitchCaseList ) quoteJavaType quoteJavaDecs+switchCaseList = QuasiQuoter (quoteJavaExp "tok_SwitchCaseList_dummy_127" getSwitchCaseList ) (quoteJavaPat "tok_SwitchCaseList_dummy_127" getSwitchCaseList ) quoteJavaType quoteJavaDecs -getSwitchStatement ( Ctr__Java__70 _ s) = s+getSwitchStatement ( Ctr__Java__80 _ s) = s switchStatement :: QuasiQuoter-switchStatement = QuasiQuoter (quoteJavaExp "tok_SwitchStatement_dummy_109" getSwitchStatement ) (quoteJavaPat "tok_SwitchStatement_dummy_109" getSwitchStatement ) quoteJavaType quoteJavaDecs+switchStatement = QuasiQuoter (quoteJavaExp "tok_SwitchStatement_dummy_126" getSwitchStatement ) (quoteJavaPat "tok_SwitchStatement_dummy_126" getSwitchStatement ) quoteJavaType quoteJavaDecs -getThrowsClause ( Ctr__Java__71 _ s) = s+getThrowsClause ( Ctr__Java__81 _ s) = s throwsClause :: QuasiQuoter-throwsClause = QuasiQuoter (quoteJavaExp "tok_ThrowsClause_dummy_108" getThrowsClause ) (quoteJavaPat "tok_ThrowsClause_dummy_108" getThrowsClause ) quoteJavaType quoteJavaDecs+throwsClause = QuasiQuoter (quoteJavaExp "tok_ThrowsClause_dummy_125" getThrowsClause ) (quoteJavaPat "tok_ThrowsClause_dummy_125" getThrowsClause ) quoteJavaType quoteJavaDecs -getTryStatement ( Ctr__Java__72 _ s) = s+getTryStatement ( Ctr__Java__82 _ s) = s tryStatement :: QuasiQuoter-tryStatement = QuasiQuoter (quoteJavaExp "tok_TryStatement_dummy_107" getTryStatement ) (quoteJavaPat "tok_TryStatement_dummy_107" getTryStatement ) quoteJavaType quoteJavaDecs+tryStatement = QuasiQuoter (quoteJavaExp "tok_TryStatement_dummy_124" getTryStatement ) (quoteJavaPat "tok_TryStatement_dummy_124" getTryStatement ) quoteJavaType quoteJavaDecs -getType ( Ctr__Java__73 _ s) = s+getType ( Ctr__Java__83 _ s) = s __type :: QuasiQuoter-__type = QuasiQuoter (quoteJavaExp "tok_Type_dummy_106" getType ) (quoteJavaPat "tok_Type_dummy_106" getType ) quoteJavaType quoteJavaDecs+__type = QuasiQuoter (quoteJavaExp "tok_Type_dummy_123" getType ) (quoteJavaPat "tok_Type_dummy_123" getType ) quoteJavaType quoteJavaDecs -getTypeArgument ( Ctr__Java__74 _ s) = s+getTypeArgument ( Ctr__Java__84 _ s) = s typeArgument :: QuasiQuoter-typeArgument = QuasiQuoter (quoteJavaExp "tok_TypeArgument_dummy_105" getTypeArgument ) (quoteJavaPat "tok_TypeArgument_dummy_105" getTypeArgument ) quoteJavaType quoteJavaDecs+typeArgument = QuasiQuoter (quoteJavaExp "tok_TypeArgument_dummy_122" getTypeArgument ) (quoteJavaPat "tok_TypeArgument_dummy_122" getTypeArgument ) quoteJavaType quoteJavaDecs -getTypeArguments ( Ctr__Java__75 _ s) = s+getTypeArguments ( Ctr__Java__85 _ s) = s typeArguments :: QuasiQuoter-typeArguments = QuasiQuoter (quoteJavaExp "tok_TypeArguments_dummy_104" getTypeArguments ) (quoteJavaPat "tok_TypeArguments_dummy_104" getTypeArguments ) quoteJavaType quoteJavaDecs+typeArguments = QuasiQuoter (quoteJavaExp "tok_TypeArguments_dummy_121" getTypeArguments ) (quoteJavaPat "tok_TypeArguments_dummy_121" getTypeArguments ) quoteJavaType quoteJavaDecs -getTypeDeclRest ( Ctr__Java__76 _ s) = s+getTypeDeclRest ( Ctr__Java__86 _ s) = s typeDeclRest :: QuasiQuoter-typeDeclRest = QuasiQuoter (quoteJavaExp "tok_TypeDeclRest_dummy_103" getTypeDeclRest ) (quoteJavaPat "tok_TypeDeclRest_dummy_103" getTypeDeclRest ) quoteJavaType quoteJavaDecs+typeDeclRest = QuasiQuoter (quoteJavaExp "tok_TypeDeclRest_dummy_120" getTypeDeclRest ) (quoteJavaPat "tok_TypeDeclRest_dummy_120" getTypeDeclRest ) quoteJavaType quoteJavaDecs -getTypeDeclaration ( Ctr__Java__77 _ s) = s+getTypeDeclaration ( Ctr__Java__87 _ s) = s typeDeclaration :: QuasiQuoter-typeDeclaration = QuasiQuoter (quoteJavaExp "tok_TypeDeclaration_dummy_102" getTypeDeclaration ) (quoteJavaPat "tok_TypeDeclaration_dummy_102" getTypeDeclaration ) quoteJavaType quoteJavaDecs+typeDeclaration = QuasiQuoter (quoteJavaExp "tok_TypeDeclaration_dummy_119" getTypeDeclaration ) (quoteJavaPat "tok_TypeDeclaration_dummy_119" getTypeDeclaration ) quoteJavaType quoteJavaDecs -getTypeParameter ( Ctr__Java__78 _ s) = s+getTypeDeclarationList ( Ctr__Java__88 _ s) = s +typeDeclarationList :: QuasiQuoter+typeDeclarationList = QuasiQuoter (quoteJavaExp "tok_TypeDeclarationList_dummy_118" getTypeDeclarationList ) (quoteJavaPat "tok_TypeDeclarationList_dummy_118" getTypeDeclarationList ) quoteJavaType quoteJavaDecs++getTypeParameter ( Ctr__Java__89 _ s) = s+ typeParameter :: QuasiQuoter-typeParameter = QuasiQuoter (quoteJavaExp "tok_TypeParameter_dummy_101" getTypeParameter ) (quoteJavaPat "tok_TypeParameter_dummy_101" getTypeParameter ) quoteJavaType quoteJavaDecs+typeParameter = QuasiQuoter (quoteJavaExp "tok_TypeParameter_dummy_117" getTypeParameter ) (quoteJavaPat "tok_TypeParameter_dummy_117" getTypeParameter ) quoteJavaType quoteJavaDecs -getTypeParameters ( Ctr__Java__79 _ s) = s+getTypeParameters ( Ctr__Java__90 _ s) = s typeParameters :: QuasiQuoter-typeParameters = QuasiQuoter (quoteJavaExp "tok_TypeParameters_dummy_100" getTypeParameters ) (quoteJavaPat "tok_TypeParameters_dummy_100" getTypeParameters ) quoteJavaType quoteJavaDecs+typeParameters = QuasiQuoter (quoteJavaExp "tok_TypeParameters_dummy_116" getTypeParameters ) (quoteJavaPat "tok_TypeParameters_dummy_116" getTypeParameters ) quoteJavaType quoteJavaDecs -getTypeSpecifier ( Ctr__Java__80 _ s) = s+getTypeSpecifier ( Ctr__Java__91 _ s) = s typeSpecifier :: QuasiQuoter-typeSpecifier = QuasiQuoter (quoteJavaExp "tok_TypeSpecifier_dummy_99" getTypeSpecifier ) (quoteJavaPat "tok_TypeSpecifier_dummy_99" getTypeSpecifier ) quoteJavaType quoteJavaDecs+typeSpecifier = QuasiQuoter (quoteJavaExp "tok_TypeSpecifier_dummy_115" getTypeSpecifier ) (quoteJavaPat "tok_TypeSpecifier_dummy_115" getTypeSpecifier ) quoteJavaType quoteJavaDecs -getVariableDeclaration ( Ctr__Java__81 _ s) = s+getVariableDeclaration ( Ctr__Java__92 _ s) = s variableDeclaration :: QuasiQuoter-variableDeclaration = QuasiQuoter (quoteJavaExp "tok_VariableDeclaration_dummy_98" getVariableDeclaration ) (quoteJavaPat "tok_VariableDeclaration_dummy_98" getVariableDeclaration ) quoteJavaType quoteJavaDecs+variableDeclaration = QuasiQuoter (quoteJavaExp "tok_VariableDeclaration_dummy_114" getVariableDeclaration ) (quoteJavaPat "tok_VariableDeclaration_dummy_114" getVariableDeclaration ) quoteJavaType quoteJavaDecs -getVariableDeclarator ( Ctr__Java__82 _ s) = s+getVariableDeclarator ( Ctr__Java__93 _ s) = s variableDeclarator :: QuasiQuoter-variableDeclarator = QuasiQuoter (quoteJavaExp "tok_VariableDeclarator_dummy_97" getVariableDeclarator ) (quoteJavaPat "tok_VariableDeclarator_dummy_97" getVariableDeclarator ) quoteJavaType quoteJavaDecs+variableDeclarator = QuasiQuoter (quoteJavaExp "tok_VariableDeclarator_dummy_113" getVariableDeclarator ) (quoteJavaPat "tok_VariableDeclarator_dummy_113" getVariableDeclarator ) quoteJavaType quoteJavaDecs -getVariableDeclaratorList ( Ctr__Java__83 _ s) = s+getVariableDeclaratorList ( Ctr__Java__94 _ s) = s variableDeclaratorList :: QuasiQuoter-variableDeclaratorList = QuasiQuoter (quoteJavaExp "tok_VariableDeclaratorList_dummy_96" getVariableDeclaratorList ) (quoteJavaPat "tok_VariableDeclaratorList_dummy_96" getVariableDeclaratorList ) quoteJavaType quoteJavaDecs+variableDeclaratorList = QuasiQuoter (quoteJavaExp "tok_VariableDeclaratorList_dummy_112" getVariableDeclaratorList ) (quoteJavaPat "tok_VariableDeclaratorList_dummy_112" getVariableDeclaratorList ) quoteJavaType quoteJavaDecs -getVariableInitializer ( Ctr__Java__84 _ s) = s+getVariableInitializer ( Ctr__Java__95 _ s) = s variableInitializer :: QuasiQuoter-variableInitializer = QuasiQuoter (quoteJavaExp "tok_VariableInitializer_dummy_95" getVariableInitializer ) (quoteJavaPat "tok_VariableInitializer_dummy_95" getVariableInitializer ) quoteJavaType quoteJavaDecs+variableInitializer = QuasiQuoter (quoteJavaExp "tok_VariableInitializer_dummy_111" getVariableInitializer ) (quoteJavaPat "tok_VariableInitializer_dummy_111" getVariableInitializer ) quoteJavaType quoteJavaDecs -getVariableInitializerList ( Ctr__Java__85 _ s) = s+getVariableInitializerList ( Ctr__Java__96 _ s) = s variableInitializerList :: QuasiQuoter-variableInitializerList = QuasiQuoter (quoteJavaExp "tok_VariableInitializerList_dummy_94" getVariableInitializerList ) (quoteJavaPat "tok_VariableInitializerList_dummy_94" getVariableInitializerList ) quoteJavaType quoteJavaDecs+variableInitializerList = QuasiQuoter (quoteJavaExp "tok_VariableInitializerList_dummy_110" getVariableInitializerList ) (quoteJavaPat "tok_VariableInitializerList_dummy_110" getVariableInitializerList ) quoteJavaType quoteJavaDecs -getWhileStatement ( Ctr__Java__86 _ s) = s+getWhileStatement ( Ctr__Java__97 _ s) = s whileStatement :: QuasiQuoter-whileStatement = QuasiQuoter (quoteJavaExp "tok_WhileStatement_dummy_93" getWhileStatement ) (quoteJavaPat "tok_WhileStatement_dummy_93" getWhileStatement ) quoteJavaType quoteJavaDecs+whileStatement = QuasiQuoter (quoteJavaExp "tok_WhileStatement_dummy_109" getWhileStatement ) (quoteJavaPat "tok_WhileStatement_dummy_109" getWhileStatement ) quoteJavaType quoteJavaDecs -getWildcardType ( Ctr__Java__87 _ s) = s+getWildcardType ( Ctr__Java__98 _ s) = s wildcardType :: QuasiQuoter-wildcardType = QuasiQuoter (quoteJavaExp "tok_WildcardType_dummy_92" getWildcardType ) (quoteJavaPat "tok_WildcardType_dummy_92" getWildcardType ) quoteJavaType quoteJavaDecs+wildcardType = QuasiQuoter (quoteJavaExp "tok_WildcardType_dummy_108" getWildcardType ) (quoteJavaPat "tok_WildcardType_dummy_108" getWildcardType ) quoteJavaType quoteJavaDecs
+ test/golden/p/PPP.hs view
@@ -0,0 +1,45 @@+-- Generated by RTK from grammar 'P'. Do not edit by hand.+-- v1 pretty-printer (task 9): correctness-first, not pretty. Emits exactly+-- one space between tokens, with no indentation or alignment. The only+-- guarantee is the semantic round-trip parse (print ast) == ast; comments+-- and the original whitespace are not recovered (the AST is lossy).+module PPP where+import PParser++ppP :: P -> String+ppP (Ctr__P__0 _ x1) = unwords ["tok_P_dummy_4", (ppP x1), "tok_P_dummy_4"]+ppP (Ctr__P__1 _ x1) = unwords ["tok_E_dummy_3", (ppE x1), "tok_E_dummy_3"]+ppP (Ctr__P__2 _ x1) = unwords ["tok_Id_dummy_2", (ppId x1), "tok_Id_dummy_2"]+ppP (Ctr__P__3 _ x1) = unwords ["tok_Op1_dummy_1", (ppOp1 x1), "tok_Op1_dummy_1"]+ppP (Ctr__P__4 _ x1) = unwords ["tok_Op2_dummy_0", (ppOp2 x1), "tok_Op2_dummy_0"]+ppP (Anti_P x1) = unwords [x1]+ppP (Ctr__P__5 _ x1 x2) = unwords ["(", "lambda", "(", (ppId x1), ")", (ppE x2), ")"]++ppE :: E -> String+ppE (Anti_E x1) = unwords [x1]+ppE (Ctr__E__0 _) = unwords ["0"]+ppE (Ctr__E__1 _) = unwords ["1"]+ppE (Ctr__E__2 _ x1) = unwords [(ppId x1)]+ppE (Ctr__E__3 _ x1 x2 x3) = unwords ["(", "if0", (ppE x1), (ppE x2), (ppE x3), ")"]+ppE (Ctr__E__4 _ x1 x2 x3 x4 x5) = unwords ["(", "fold", (ppE x1), (ppE x2), "(", "lambda", "(", (ppId x3), (ppId x4), ")", (ppE x5), ")", ")"]+ppE (Ctr__E__5 _ x1 x2) = unwords ["(", (ppOp1 x1), (ppE x2), ")"]+ppE (Ctr__E__6 _ x1 x2 x3) = unwords ["(", (ppOp2 x1), (ppE x2), (ppE x3), ")"]++ppId :: Id -> String+ppId (Anti_Id x1) = unwords [x1]+ppId (Ctr__Id__0 _ x1) = unwords [x1]++ppOp1 :: Op1 -> String+ppOp1 (Anti_Op1 x1) = unwords [x1]+ppOp1 (Ctr__Op1__0 _) = unwords ["not"]+ppOp1 (Ctr__Op1__1 _) = unwords ["shl1"]+ppOp1 (Ctr__Op1__2 _) = unwords ["shr1"]+ppOp1 (Ctr__Op1__3 _) = unwords ["shr4"]+ppOp1 (Ctr__Op1__4 _) = unwords ["shr16"]++ppOp2 :: Op2 -> String+ppOp2 (Anti_Op2 x1) = unwords [x1]+ppOp2 (Ctr__Op2__0 _) = unwords ["and"]+ppOp2 (Ctr__Op2__1 _) = unwords ["or"]+ppOp2 (Ctr__Op2__2 _) = unwords ["xor"]+ppOp2 (Ctr__Op2__3 _) = unwords ["plus"]
+ test/golden/sandbox/SandboxPP.hs view
@@ -0,0 +1,12 @@+-- Generated by RTK from grammar 'Sandbox'. Do not edit by hand.+-- v1 pretty-printer (task 9): correctness-first, not pretty. Emits exactly+-- one space between tokens, with no indentation or alignment. The only+-- guarantee is the semantic round-trip parse (print ast) == ast; comments+-- and the original whitespace are not recovered (the AST is lossy).+module SandboxPP where+import SandboxParser++ppSandbox :: Sandbox -> String+ppSandbox (Ctr__Sandbox__0 _ x1) = unwords ["tok_Sandbox_dummy_0", (ppSandbox x1), "tok_Sandbox_dummy_0"]+ppSandbox (Anti_Sandbox x1) = unwords [x1]+ppSandbox (Ctr__Sandbox__1 _ x1) = unwords [x1]