| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
BNFC.Abs
Description
The abstract syntax of language BNFC.
Synopsis
- type Grammar = Grammar' BNFC'Position
- data Grammar' a = Grammar a [Def' a]
- type Def = Def' BNFC'Position
- data Def' a
- = Rule a (Label' a) (Cat' a) (RHS' a)
- | Comment a String
- | Comments a String String
- | Internal a (Label' a) (Cat' a) (RHS' a)
- | Token a Identifier (Reg' a)
- | PosToken a Identifier (Reg' a)
- | Entryp a [Cat' a]
- | Separator a (MinimumSize' a) (Cat' a) String
- | Terminator a (MinimumSize' a) (Cat' a) String
- | Delimiters a (Cat' a) String String (Separation' a) (MinimumSize' a)
- | Coercions a Identifier Integer
- | Rules a Identifier [RHS' a]
- | Function a Identifier [Arg' a] (Exp' a)
- | Layout a [String]
- | LayoutStop a [String]
- | LayoutTop a
- type Item = Item' BNFC'Position
- data Item' a
- type Cat = Cat' BNFC'Position
- data Cat' a
- = ListCat a (Cat' a)
- | IdCat a Identifier
- type Label = Label' BNFC'Position
- data Label' a
- type Arg = Arg' BNFC'Position
- data Arg' a = Arg a Identifier
- type Separation = Separation' BNFC'Position
- data Separation' a
- type Exp = Exp' BNFC'Position
- data Exp' a
- type RHS = RHS' BNFC'Position
- data RHS' a = RHS a [Item' a]
- type MinimumSize = MinimumSize' BNFC'Position
- data MinimumSize' a
- type Reg = Reg' BNFC'Position
- data Reg' a
- newtype Identifier = Identifier ((Int, Int), String)
- type BNFC'Position = Maybe (Int, Int)
- pattern BNFC'NoPosition :: BNFC'Position
- pattern BNFC'Position :: Int -> Int -> BNFC'Position
- class HasPosition a where
- hasPosition :: a -> BNFC'Position
Documentation
type Grammar = Grammar' BNFC'Position Source #
Instances
type Def = Def' BNFC'Position Source #
Constructors
| Rule a (Label' a) (Cat' a) (RHS' a) | |
| Comment a String | |
| Comments a String String | |
| Internal a (Label' a) (Cat' a) (RHS' a) | |
| Token a Identifier (Reg' a) | |
| PosToken a Identifier (Reg' a) | |
| Entryp a [Cat' a] | |
| Separator a (MinimumSize' a) (Cat' a) String | |
| Terminator a (MinimumSize' a) (Cat' a) String | |
| Delimiters a (Cat' a) String String (Separation' a) (MinimumSize' a) | |
| Coercions a Identifier Integer | |
| Rules a Identifier [RHS' a] | |
| Function a Identifier [Arg' a] (Exp' a) | |
| Layout a [String] | |
| LayoutStop a [String] | |
| LayoutTop a |
Instances
type Item = Item' BNFC'Position Source #
Instances
type Cat = Cat' BNFC'Position Source #
Constructors
| ListCat a (Cat' a) | |
| IdCat a Identifier |
Instances
| Functor Cat' Source # | |
| Foldable Cat' Source # | |
Defined in BNFC.Abs Methods fold :: Monoid m => Cat' m -> m Source # foldMap :: Monoid m => (a -> m) -> Cat' a -> m Source # foldMap' :: Monoid m => (a -> m) -> Cat' a -> m Source # foldr :: (a -> b -> b) -> b -> Cat' a -> b Source # foldr' :: (a -> b -> b) -> b -> Cat' a -> b Source # foldl :: (b -> a -> b) -> b -> Cat' a -> b Source # foldl' :: (b -> a -> b) -> b -> Cat' a -> b Source # foldr1 :: (a -> a -> a) -> Cat' a -> a Source # foldl1 :: (a -> a -> a) -> Cat' a -> a Source # toList :: Cat' a -> [a] Source # null :: Cat' a -> Bool Source # length :: Cat' a -> Int Source # elem :: Eq a => a -> Cat' a -> Bool Source # maximum :: Ord a => Cat' a -> a Source # minimum :: Ord a => Cat' a -> a Source # | |
| Traversable Cat' Source # | |
| HasPosition Cat Source # | |
Defined in BNFC.Abs Methods hasPosition :: Cat -> BNFC'Position Source # | |
| AddCategories Cat Source # | Also adds for each list category its element category, transitively. |
Defined in BNFC.Check.Pass1 | |
| Eq a => Eq (Cat' a) Source # | |
| Ord a => Ord (Cat' a) Source # | |
| Read a => Read (Cat' a) Source # | |
| Show a => Show (Cat' a) Source # | |
| Print [Cat' a] Source # | |
| Print (Cat' a) Source # | |
type Label = Label' BNFC'Position Source #
Instances
type Arg = Arg' BNFC'Position Source #
Constructors
| Arg a Identifier |
Instances
type Separation = Separation' BNFC'Position Source #
data Separation' a Source #
Instances
type Exp = Exp' BNFC'Position Source #
Constructors
| Cons a (Exp' a) (Exp' a) | |
| App a Identifier [Exp' a] | |
| Var a Identifier | |
| LitInteger a Integer | |
| LitChar a Char | |
| LitString a String | |
| LitDouble a Double | |
| List a [Exp' a] |
Instances
type RHS = RHS' BNFC'Position Source #
Instances
type MinimumSize = MinimumSize' BNFC'Position Source #
data MinimumSize' a Source #
Instances
type Reg = Reg' BNFC'Position Source #
Constructors
| RAlt a (Reg' a) (Reg' a) | |
| RMinus a (Reg' a) (Reg' a) | |
| RSeq a (Reg' a) (Reg' a) | |
| RStar a (Reg' a) | |
| RPlus a (Reg' a) | |
| ROpt a (Reg' a) | |
| REps a | |
| RChar a Char | |
| RAlts a String | |
| RSeqs a String | |
| RDigit a | |
| RLetter a | |
| RUpper a | |
| RLower a | |
| RAny a |
Instances
| Functor Reg' Source # | |
| Foldable Reg' Source # | |
Defined in BNFC.Abs Methods fold :: Monoid m => Reg' m -> m Source # foldMap :: Monoid m => (a -> m) -> Reg' a -> m Source # foldMap' :: Monoid m => (a -> m) -> Reg' a -> m Source # foldr :: (a -> b -> b) -> b -> Reg' a -> b Source # foldr' :: (a -> b -> b) -> b -> Reg' a -> b Source # foldl :: (b -> a -> b) -> b -> Reg' a -> b Source # foldl' :: (b -> a -> b) -> b -> Reg' a -> b Source # foldr1 :: (a -> a -> a) -> Reg' a -> a Source # foldl1 :: (a -> a -> a) -> Reg' a -> a Source # toList :: Reg' a -> [a] Source # null :: Reg' a -> Bool Source # length :: Reg' a -> Int Source # elem :: Eq a => a -> Reg' a -> Bool Source # maximum :: Ord a => Reg' a -> a Source # minimum :: Ord a => Reg' a -> a Source # | |
| Traversable Reg' Source # | |
| HasPosition Reg Source # | |
Defined in BNFC.Abs Methods hasPosition :: Reg -> BNFC'Position Source # | |
| Eq a => Eq (Reg' a) Source # | |
| Ord a => Ord (Reg' a) Source # | |
| Read a => Read (Reg' a) Source # | |
| Show a => Show (Reg' a) Source # | |
| Print (Reg' a) Source # | |
newtype Identifier Source #
Constructors
| Identifier ((Int, Int), String) |
Instances
| Eq Identifier Source # | |
Defined in BNFC.Abs Methods (==) :: Identifier -> Identifier -> Bool Source # (/=) :: Identifier -> Identifier -> Bool Source # | |
| Ord Identifier Source # | |
Defined in BNFC.Abs Methods compare :: Identifier -> Identifier -> Ordering Source # (<) :: Identifier -> Identifier -> Bool Source # (<=) :: Identifier -> Identifier -> Bool Source # (>) :: Identifier -> Identifier -> Bool Source # (>=) :: Identifier -> Identifier -> Bool Source # max :: Identifier -> Identifier -> Identifier Source # min :: Identifier -> Identifier -> Identifier Source # | |
| Read Identifier Source # | |
| Show Identifier Source # | |
| HasPosition Identifier Source # | |
Defined in BNFC.Abs Methods | |
| Print Identifier Source # | |
Defined in BNFC.Print | |
pattern BNFC'NoPosition :: BNFC'Position Source #
pattern BNFC'Position :: Int -> Int -> BNFC'Position Source #
class HasPosition a where Source #
Get the start position of something.
Methods
hasPosition :: a -> BNFC'Position Source #