uuagc

Desugar

# Documentation

sem_Children :: Children -> T_Children

newtype T_Children

Constructors

T_Children (Map Identifier Attributes -> String -> Options -> Map Identifier Attributes -> ([(Identifier, Identifier)], [(Identifier, Identifier)], Children)) |

data Inh_Children

Constructors

Inh_Children |
Fields inhMap_Inh_Children :: !(Map Identifier Attributes) mainName_Inh_Children :: !String options_Inh_Children :: !Options synMap_Inh_Children :: !(Map Identifier Attributes)

data Syn_Children

Constructors

Syn_Children |
Fields childInhs_Syn_Children :: ![(Identifier, Identifier)] childSyns_Syn_Children :: ![(Identifier, Identifier)] output_Syn_Children :: !Children

wrap_Children :: T_Children -> Inh_Children -> Syn_Children

sem_Children_Cons :: T_Child -> T_Children -> T_Children

sem_Children_Nil :: T_Children

sem_Expression :: Expression -> T_Expression

newtype T_Expression

Constructors

T_Expression ([(Identifier, Identifier)] -> [(Identifier, Identifier)] -> ConstructorIdent -> NontermIdent -> Options -> String -> (Seq Error, Expression)) |

data Inh_Expression

Constructors

Inh_Expression |
Fields childInhs_Inh_Expression :: ![(Identifier, Identifier)] childSyns_Inh_Expression :: ![(Identifier, Identifier)] con_Inh_Expression :: !ConstructorIdent nt_Inh_Expression :: !NontermIdent options_Inh_Expression :: !Options ruleDescr_Inh_Expression :: !String

data Syn_Expression

Constructors

Syn_Expression |
Fields errors_Syn_Expression :: !(Seq Error) output_Syn_Expression :: !Expression

wrap_Expression :: T_Expression -> Inh_Expression -> Syn_Expression

sem_Expression_Expression :: Pos -> [HsToken] -> T_Expression

sem_Grammar :: Grammar -> T_Grammar

newtype T_Grammar

Constructors

T_Grammar (AttrMap -> String -> Options -> (AttrMap, Seq Error, Grammar)) |

data Inh_Grammar

Constructors

Inh_Grammar |
Fields forcedIrrefutables_Inh_Grammar :: !AttrMap mainName_Inh_Grammar :: !String options_Inh_Grammar :: !Options

data Syn_Grammar

Constructors

Syn_Grammar |
Fields allAttributes_Syn_Grammar :: !AttrMap errors_Syn_Grammar :: !(Seq Error) output_Syn_Grammar :: !Grammar

wrap_Grammar :: T_Grammar -> Inh_Grammar -> Syn_Grammar

sem_Grammar_Grammar :: TypeSyns -> UseMap -> Derivings -> Set NontermIdent -> T_Nonterminals -> PragmaMap -> AttrOrderMap -> ParamMap -> ContextMap -> QuantMap -> UniqueMap -> Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])) -> Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])) -> Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression))) -> T_Grammar

sem_HsToken :: HsToken -> T_HsToken

newtype T_HsToken

Constructors

T_HsToken (Int -> [(Identifier, Identifier)] -> [(Identifier, Identifier)] -> ConstructorIdent -> NontermIdent -> String -> Bool -> (Int, Seq Error, HsToken)) |

data Inh_HsToken

Constructors

Inh_HsToken |
Fields addLines_Inh_HsToken :: !Int childInhs_Inh_HsToken :: ![(Identifier, Identifier)] childSyns_Inh_HsToken :: ![(Identifier, Identifier)] con_Inh_HsToken :: !ConstructorIdent nt_Inh_HsToken :: !NontermIdent ruleDescr_Inh_HsToken :: !String useFieldIdent_Inh_HsToken :: !Bool

data Syn_HsToken

Constructors

Syn_HsToken |
Fields addLines_Syn_HsToken :: !Int errors_Syn_HsToken :: !(Seq Error) tks_Syn_HsToken :: !HsToken

wrap_HsToken :: T_HsToken -> Inh_HsToken -> Syn_HsToken

sem_HsToken_AGField :: Identifier -> Identifier -> Pos -> Maybe String -> T_HsToken

sem_HsToken_AGLocal :: Identifier -> Pos -> Maybe String -> T_HsToken

sem_HsToken_CharToken :: String -> Pos -> T_HsToken

sem_HsToken_Err :: String -> Pos -> T_HsToken

sem_HsToken_HsToken :: String -> Pos -> T_HsToken

sem_HsToken_StrToken :: String -> Pos -> T_HsToken

sem_HsTokens :: HsTokens -> T_HsTokens

newtype T_HsTokens

Constructors

T_HsTokens (Int -> [(Identifier, Identifier)] -> [(Identifier, Identifier)] -> ConstructorIdent -> NontermIdent -> String -> Bool -> (Int, Seq Error, HsTokens)) |

data Inh_HsTokens

Constructors

Inh_HsTokens |
Fields addLines_Inh_HsTokens :: !Int childInhs_Inh_HsTokens :: ![(Identifier, Identifier)] childSyns_Inh_HsTokens :: ![(Identifier, Identifier)] con_Inh_HsTokens :: !ConstructorIdent nt_Inh_HsTokens :: !NontermIdent ruleDescr_Inh_HsTokens :: !String useFieldIdent_Inh_HsTokens :: !Bool

data Syn_HsTokens

Constructors

Syn_HsTokens |
Fields addLines_Syn_HsTokens :: !Int errors_Syn_HsTokens :: !(Seq Error) tks_Syn_HsTokens :: !HsTokens

wrap_HsTokens :: T_HsTokens -> Inh_HsTokens -> Syn_HsTokens

sem_HsTokens_Cons :: T_HsToken -> T_HsTokens -> T_HsTokens

sem_HsTokens_Nil :: T_HsTokens

sem_HsTokensRoot :: HsTokensRoot -> T_HsTokensRoot

newtype T_HsTokensRoot

Constructors

T_HsTokensRoot ([(Identifier, Identifier)] -> [(Identifier, Identifier)] -> ConstructorIdent -> NontermIdent -> String -> Bool -> (Seq Error, [HsToken])) |

data Inh_HsTokensRoot

Constructors

Inh_HsTokensRoot |
Fields childInhs_Inh_HsTokensRoot :: ![(Identifier, Identifier)] childSyns_Inh_HsTokensRoot :: ![(Identifier, Identifier)] con_Inh_HsTokensRoot :: !ConstructorIdent nt_Inh_HsTokensRoot :: !NontermIdent ruleDescr_Inh_HsTokensRoot :: !String useFieldIdent_Inh_HsTokensRoot :: !Bool

data Syn_HsTokensRoot

Constructors

Syn_HsTokensRoot |
Fields errors_Syn_HsTokensRoot :: !(Seq Error) tks_Syn_HsTokensRoot :: ![HsToken]

wrap_HsTokensRoot :: T_HsTokensRoot -> Inh_HsTokensRoot -> Syn_HsTokensRoot

sem_HsTokensRoot_HsTokensRoot :: T_HsTokens -> T_HsTokensRoot

sem_Nonterminal :: Nonterminal -> T_Nonterminal

newtype T_Nonterminal

Constructors

T_Nonterminal (Map Identifier Attributes, Map Identifier Attributes, T_Nonterminal_1) |

newtype T_Nonterminal_1

Constructors

T_Nonterminal_1 (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])) -> AttrMap -> Map Identifier Attributes -> String -> Options -> Map Identifier Attributes -> (AttrMap, Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])), Seq Error, Nonterminal)) |

data Inh_Nonterminal

Constructors

Inh_Nonterminal |
Fields augmentsIn_Inh_Nonterminal :: !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) forcedIrrefutables_Inh_Nonterminal :: !AttrMap inhMap_Inh_Nonterminal :: !(Map Identifier Attributes) mainName_Inh_Nonterminal :: !String options_Inh_Nonterminal :: !Options synMap_Inh_Nonterminal :: !(Map Identifier Attributes)

data Syn_Nonterminal

Constructors

Syn_Nonterminal |
Fields allAttributes_Syn_Nonterminal :: !AttrMap augmentsOut_Syn_Nonterminal :: !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) errors_Syn_Nonterminal :: !(Seq Error) inhMap'_Syn_Nonterminal :: !(Map Identifier Attributes) output_Syn_Nonterminal :: !Nonterminal synMap'_Syn_Nonterminal :: !(Map Identifier Attributes)

wrap_Nonterminal :: T_Nonterminal -> Inh_Nonterminal -> Syn_Nonterminal

sem_Nonterminal_Nonterminal :: NontermIdent -> [Identifier] -> Attributes -> Attributes -> T_Productions -> T_Nonterminal

sem_Nonterminals :: Nonterminals -> T_Nonterminals

newtype T_Nonterminals

Constructors

T_Nonterminals (Map Identifier Attributes, Map Identifier Attributes, T_Nonterminals_1) |

newtype T_Nonterminals_1

Constructors

T_Nonterminals_1 (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])) -> AttrMap -> Map Identifier Attributes -> String -> Options -> Map Identifier Attributes -> (AttrMap, Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])), Seq Error, Nonterminals)) |

data Inh_Nonterminals

Constructors

Inh_Nonterminals |
Fields augmentsIn_Inh_Nonterminals :: !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) forcedIrrefutables_Inh_Nonterminals :: !AttrMap inhMap_Inh_Nonterminals :: !(Map Identifier Attributes) mainName_Inh_Nonterminals :: !String options_Inh_Nonterminals :: !Options synMap_Inh_Nonterminals :: !(Map Identifier Attributes)

data Syn_Nonterminals

Constructors

Syn_Nonterminals |
Fields allAttributes_Syn_Nonterminals :: !AttrMap augmentsOut_Syn_Nonterminals :: !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) errors_Syn_Nonterminals :: !(Seq Error) inhMap'_Syn_Nonterminals :: !(Map Identifier Attributes) output_Syn_Nonterminals :: !Nonterminals synMap'_Syn_Nonterminals :: !(Map Identifier Attributes)

wrap_Nonterminals :: T_Nonterminals -> Inh_Nonterminals -> Syn_Nonterminals

sem_Nonterminals_Cons :: T_Nonterminal -> T_Nonterminals -> T_Nonterminals

sem_Nonterminals_Nil :: T_Nonterminals

sem_Pattern :: Pattern -> T_Pattern

newtype T_Pattern

Constructors

T_Pattern (Set (Identifier, Identifier), T_Pattern_1) |

newtype T_Pattern_1

Constructors

T_Pattern_1 ([(Identifier, Identifier)] -> [(Identifier, Identifier)] -> ConstructorIdent -> Set (Identifier, Identifier) -> AttrMap -> NontermIdent -> (AttrMap, Pattern, Seq Error, Pattern)) |

data Inh_Pattern

Constructors

Inh_Pattern |
Fields childInhs_Inh_Pattern :: ![(Identifier, Identifier)] childSyns_Inh_Pattern :: ![(Identifier, Identifier)] con_Inh_Pattern :: !ConstructorIdent defs_Inh_Pattern :: !(Set (Identifier, Identifier)) forcedIrrefutables_Inh_Pattern :: !AttrMap nt_Inh_Pattern :: !NontermIdent

data Syn_Pattern

Constructors

Syn_Pattern |
Fields allAttributes_Syn_Pattern :: !AttrMap copy_Syn_Pattern :: !Pattern defsCollect_Syn_Pattern :: !(Set (Identifier, Identifier)) errors_Syn_Pattern :: !(Seq Error) output_Syn_Pattern :: !Pattern

wrap_Pattern :: T_Pattern -> Inh_Pattern -> Syn_Pattern

sem_Pattern_Alias :: Identifier -> Identifier -> T_Pattern -> T_Pattern

sem_Pattern_Constr :: ConstructorIdent -> T_Patterns -> T_Pattern

sem_Pattern_Irrefutable :: T_Pattern -> T_Pattern

sem_Pattern_Product :: Pos -> T_Patterns -> T_Pattern

sem_Pattern_Underscore :: Pos -> T_Pattern

sem_Patterns :: Patterns -> T_Patterns

newtype T_Patterns

Constructors

T_Patterns (Set (Identifier, Identifier), T_Patterns_1) |

newtype T_Patterns_1

Constructors

T_Patterns_1 ([(Identifier, Identifier)] -> [(Identifier, Identifier)] -> ConstructorIdent -> Set (Identifier, Identifier) -> AttrMap -> NontermIdent -> (AttrMap, Patterns, Seq Error, Patterns)) |

data Inh_Patterns

Constructors

Inh_Patterns |
Fields childInhs_Inh_Patterns :: ![(Identifier, Identifier)] childSyns_Inh_Patterns :: ![(Identifier, Identifier)] con_Inh_Patterns :: !ConstructorIdent defs_Inh_Patterns :: !(Set (Identifier, Identifier)) forcedIrrefutables_Inh_Patterns :: !AttrMap nt_Inh_Patterns :: !NontermIdent

data Syn_Patterns

Constructors

Syn_Patterns |
Fields allAttributes_Syn_Patterns :: !AttrMap copy_Syn_Patterns :: !Patterns defsCollect_Syn_Patterns :: !(Set (Identifier, Identifier)) errors_Syn_Patterns :: !(Seq Error) output_Syn_Patterns :: !Patterns

wrap_Patterns :: T_Patterns -> Inh_Patterns -> Syn_Patterns

sem_Patterns_Cons :: T_Pattern -> T_Patterns -> T_Patterns

sem_Patterns_Nil :: T_Patterns

sem_Production :: Production -> T_Production

newtype T_Production

Constructors

T_Production (Map ConstructorIdent (Map Identifier [Expression]) -> AttrMap -> Map Identifier Attributes -> String -> NontermIdent -> Options -> Map Identifier Attributes -> (AttrMap, Map ConstructorIdent (Map Identifier [Expression]), Seq Error, Production)) |

data Inh_Production

Constructors

Inh_Production |
Fields augmentsIn_Inh_Production :: !(Map ConstructorIdent (Map Identifier [Expression])) forcedIrrefutables_Inh_Production :: !AttrMap inhMap_Inh_Production :: !(Map Identifier Attributes) mainName_Inh_Production :: !String nt_Inh_Production :: !NontermIdent options_Inh_Production :: !Options synMap_Inh_Production :: !(Map Identifier Attributes)

data Syn_Production

Constructors

Syn_Production |
Fields allAttributes_Syn_Production :: !AttrMap augmentsOut_Syn_Production :: !(Map ConstructorIdent (Map Identifier [Expression])) errors_Syn_Production :: !(Seq Error) output_Syn_Production :: !Production

wrap_Production :: T_Production -> Inh_Production -> Syn_Production

sem_Production_Production :: ConstructorIdent -> [Identifier] -> [Type] -> T_Children -> T_Rules -> T_TypeSigs -> MaybeMacro -> T_Production

sem_Productions :: Productions -> T_Productions

newtype T_Productions

Constructors

T_Productions (Map ConstructorIdent (Map Identifier [Expression]) -> AttrMap -> Map Identifier Attributes -> String -> NontermIdent -> Options -> Map Identifier Attributes -> (AttrMap, Map ConstructorIdent (Map Identifier [Expression]), Seq Error, Productions)) |

data Inh_Productions

Constructors

Inh_Productions |
Fields augmentsIn_Inh_Productions :: !(Map ConstructorIdent (Map Identifier [Expression])) forcedIrrefutables_Inh_Productions :: !AttrMap inhMap_Inh_Productions :: !(Map Identifier Attributes) mainName_Inh_Productions :: !String nt_Inh_Productions :: !NontermIdent options_Inh_Productions :: !Options synMap_Inh_Productions :: !(Map Identifier Attributes)

data Syn_Productions

Constructors

Syn_Productions |
Fields allAttributes_Syn_Productions :: !AttrMap augmentsOut_Syn_Productions :: !(Map ConstructorIdent (Map Identifier [Expression])) errors_Syn_Productions :: !(Seq Error) output_Syn_Productions :: !Productions

wrap_Productions :: T_Productions -> Inh_Productions -> Syn_Productions

sem_Productions_Cons :: T_Production -> T_Productions -> T_Productions

sem_Productions_Nil :: T_Productions

sem_Rule :: Rule -> T_Rule

newtype T_Rule

Constructors

T_Rule (Set (Identifier, Identifier), T_Rule_1) |

newtype T_Rule_1

Constructors

T_Rule_1 ([(Identifier, Identifier)] -> [(Identifier, Identifier)] -> ConstructorIdent -> Set (Identifier, Identifier) -> AttrMap -> NontermIdent -> Options -> (AttrMap, Seq Error, Rule)) |

data Inh_Rule

Constructors

Inh_Rule |
Fields childInhs_Inh_Rule :: ![(Identifier, Identifier)] childSyns_Inh_Rule :: ![(Identifier, Identifier)] con_Inh_Rule :: !ConstructorIdent defs_Inh_Rule :: !(Set (Identifier, Identifier)) forcedIrrefutables_Inh_Rule :: !AttrMap nt_Inh_Rule :: !NontermIdent options_Inh_Rule :: !Options

data Syn_Rule

Constructors

Syn_Rule |
Fields allAttributes_Syn_Rule :: !AttrMap defsCollect_Syn_Rule :: !(Set (Identifier, Identifier)) errors_Syn_Rule :: !(Seq Error) output_Syn_Rule :: !Rule

wrap_Rule :: T_Rule -> Inh_Rule -> Syn_Rule

sem_Rule_Rule :: Maybe Identifier -> T_Pattern -> T_Expression -> Bool -> String -> Bool -> Bool -> Bool -> Maybe Error -> Bool -> T_Rule

sem_Rules :: Rules -> T_Rules

newtype T_Rules

Constructors

T_Rules (Set (Identifier, Identifier), T_Rules_1) |

newtype T_Rules_1

Constructors

T_Rules_1 ([(Identifier, Identifier)] -> [(Identifier, Identifier)] -> ConstructorIdent -> Set (Identifier, Identifier) -> AttrMap -> NontermIdent -> Options -> (AttrMap, Seq Error, Rules)) |

data Inh_Rules

Constructors

Inh_Rules |
Fields childInhs_Inh_Rules :: ![(Identifier, Identifier)] childSyns_Inh_Rules :: ![(Identifier, Identifier)] con_Inh_Rules :: !ConstructorIdent defs_Inh_Rules :: !(Set (Identifier, Identifier)) forcedIrrefutables_Inh_Rules :: !AttrMap nt_Inh_Rules :: !NontermIdent options_Inh_Rules :: !Options

data Syn_Rules

Constructors

Syn_Rules |
Fields allAttributes_Syn_Rules :: !AttrMap defsCollect_Syn_Rules :: !(Set (Identifier, Identifier)) errors_Syn_Rules :: !(Seq Error) output_Syn_Rules :: !Rules

wrap_Rules :: T_Rules -> Inh_Rules -> Syn_Rules

sem_Rules_Cons :: T_Rule -> T_Rules -> T_Rules

sem_Rules_Nil :: T_Rules

sem_TypeSig :: TypeSig -> T_TypeSig

newtype T_TypeSig

Constructors

T_TypeSig TypeSig |

data Inh_TypeSig

Constructors

Inh_TypeSig |

data Syn_TypeSig

Constructors

Syn_TypeSig |
Fields output_Syn_TypeSig :: !TypeSig

wrap_TypeSig :: T_TypeSig -> Inh_TypeSig -> Syn_TypeSig

sem_TypeSig_TypeSig :: Identifier -> Type -> T_TypeSig

sem_TypeSigs :: TypeSigs -> T_TypeSigs

newtype T_TypeSigs

Constructors

T_TypeSigs TypeSigs |

data Inh_TypeSigs

Constructors

Inh_TypeSigs |

data Syn_TypeSigs

Constructors

Syn_TypeSigs |
Fields output_Syn_TypeSigs :: !TypeSigs

wrap_TypeSigs :: T_TypeSigs -> Inh_TypeSigs -> Syn_TypeSigs

sem_TypeSigs_Cons :: T_TypeSig -> T_TypeSigs -> T_TypeSigs

sem_TypeSigs_Nil :: T_TypeSigs

sem_Child :: Child -> T_Child

newtype T_Child

Constructors

T_Child (Map Identifier Attributes -> String -> Options -> Map Identifier Attributes -> ([(Identifier, Identifier)], [(Identifier, Identifier)], Child)) |

data Inh_Child

Constructors

Inh_Child |
Fields inhMap_Inh_Child :: !(Map Identifier Attributes) mainName_Inh_Child :: !String options_Inh_Child :: !Options synMap_Inh_Child :: !(Map Identifier Attributes)

data Syn_Child

Constructors

Syn_Child |
Fields childInhs_Syn_Child :: ![(Identifier, Identifier)] childSyns_Syn_Child :: ![(Identifier, Identifier)] output_Syn_Child :: !Child

wrap_Child :: T_Child -> Inh_Child -> Syn_Child

sem_Child_Child :: Identifier -> Type -> ChildKind -> T_Child

addl :: Int -> Pos -> Pos

maybeError :: a -> Error -> Maybe a -> (a, Seq Error)

findField :: Identifier -> Identifier -> [(Identifier, Identifier)] -> Maybe Identifier

mergeAttributes :: AttrMap -> AttrMap -> AttrMap

desugarExprs :: Options -> NontermIdent -> ConstructorIdent -> [(Identifier, Identifier)] -> [(Identifier, Identifier)] -> Seq Error -> [Expression] -> (Seq Error, [Expression])

desugarExpr :: Options -> NontermIdent -> ConstructorIdent -> [(Identifier, Identifier)] -> [(Identifier, Identifier)] -> Seq Error -> Expression -> (Seq Error, Expression)

addLateAttr :: Options -> String -> Attributes