packages feed

BNFC 2.7.0.2 → 2.7.1

raw patch · 92 files changed

+5878/−1868 lines, 92 filesdep +doctestdep ~basePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies added: doctest

Dependency ranges changed: base

API changes (from Hackage documentation)

- Algebra.RingUtils: (!!) :: [a] -> Int -> a
- Algebra.RingUtils: ($!) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b
- Algebra.RingUtils: ($) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b
- Algebra.RingUtils: (&&) :: Bool -> Bool -> Bool
- Algebra.RingUtils: (**) :: Floating a => a -> a -> a
- Algebra.RingUtils: (*>) :: Applicative f => f a -> f b -> f b
- Algebra.RingUtils: (++) :: [a] -> [a] -> [a]
- Algebra.RingUtils: (-) :: Num a => a -> a -> a
- Algebra.RingUtils: (.) :: (b -> c) -> (a -> b) -> a -> c
- Algebra.RingUtils: (/) :: Fractional a => a -> a -> a
- Algebra.RingUtils: (/=) :: Eq a => a -> a -> Bool
- Algebra.RingUtils: (<$) :: Functor f => a -> f b -> f a
- Algebra.RingUtils: (<$>) :: Functor f => (a -> b) -> f a -> f b
- Algebra.RingUtils: (<) :: Ord a => a -> a -> Bool
- Algebra.RingUtils: (<*) :: Applicative f => f a -> f b -> f a
- Algebra.RingUtils: (<*>) :: Applicative f => f (a -> b) -> f a -> f b
- Algebra.RingUtils: (<=) :: Ord a => a -> a -> Bool
- Algebra.RingUtils: (<>) :: Semigroup a => a -> a -> a
- Algebra.RingUtils: (=<<) :: Monad m => (a -> m b) -> m a -> m b
- Algebra.RingUtils: (==) :: Eq a => a -> a -> Bool
- Algebra.RingUtils: (>) :: Ord a => a -> a -> Bool
- Algebra.RingUtils: (>=) :: Ord a => a -> a -> Bool
- Algebra.RingUtils: (>>) :: Monad m => m a -> m b -> m b
- Algebra.RingUtils: (>>=) :: Monad m => m a -> (a -> m b) -> m b
- Algebra.RingUtils: (^) :: (Num a, Integral b) => a -> b -> a
- Algebra.RingUtils: (^^) :: (Fractional a, Integral b) => a -> b -> a
- Algebra.RingUtils: (||) :: Bool -> Bool -> Bool
- Algebra.RingUtils: EQ :: Ordering
- Algebra.RingUtils: False :: Bool
- Algebra.RingUtils: GT :: Ordering
- Algebra.RingUtils: Just :: a -> Maybe a
- Algebra.RingUtils: LT :: Ordering
- Algebra.RingUtils: Left :: a -> Either a b
- Algebra.RingUtils: Nothing :: Maybe a
- Algebra.RingUtils: Right :: b -> Either a b
- Algebra.RingUtils: True :: Bool
- Algebra.RingUtils: [fromO] :: O f g a -> f (g a)
- Algebra.RingUtils: [leftOf] :: Pair a -> a
- Algebra.RingUtils: [rightOf] :: Pair a -> a
- Algebra.RingUtils: abs :: Num a => a -> a
- Algebra.RingUtils: acos :: Floating a => a -> a
- Algebra.RingUtils: acosh :: Floating a => a -> a
- Algebra.RingUtils: all :: Foldable t => (a -> Bool) -> t a -> Bool
- Algebra.RingUtils: and :: Foldable t => t Bool -> Bool
- Algebra.RingUtils: any :: Foldable t => (a -> Bool) -> t a -> Bool
- Algebra.RingUtils: appendFile :: FilePath -> String -> IO ()
- Algebra.RingUtils: asTypeOf :: a -> a -> a
- Algebra.RingUtils: asin :: Floating a => a -> a
- Algebra.RingUtils: asinh :: Floating a => a -> a
- Algebra.RingUtils: atan :: Floating a => a -> a
- Algebra.RingUtils: atan2 :: RealFloat a => a -> a -> a
- Algebra.RingUtils: atanh :: Floating a => a -> a
- Algebra.RingUtils: break :: (a -> Bool) -> [a] -> ([a], [a])
- Algebra.RingUtils: ceiling :: (RealFrac a, Integral b) => a -> b
- Algebra.RingUtils: class Functor f => Applicative (f :: Type -> Type)
- Algebra.RingUtils: class Bounded a
- Algebra.RingUtils: class Enum a
- Algebra.RingUtils: class Eq a
- Algebra.RingUtils: class Fractional a => Floating a
- Algebra.RingUtils: class Foldable (t :: TYPE LiftedRep -> Type)
- Algebra.RingUtils: class Num a => Fractional a
- Algebra.RingUtils: class Functor (f :: Type -> Type)
- Algebra.RingUtils: class (Real a, Enum a) => Integral a
- Algebra.RingUtils: class Applicative m => Monad (m :: Type -> Type)
- Algebra.RingUtils: class Monad m => MonadFail (m :: Type -> Type)
- Algebra.RingUtils: class Semigroup a => Monoid a
- Algebra.RingUtils: class Num a
- Algebra.RingUtils: class Eq a => Ord a
- Algebra.RingUtils: class Read a
- Algebra.RingUtils: class (Num a, Ord a) => Real a
- Algebra.RingUtils: class (RealFrac a, Floating a) => RealFloat a
- Algebra.RingUtils: class (Real a, Fractional a) => RealFrac a
- Algebra.RingUtils: class Semigroup a
- Algebra.RingUtils: class Show a
- Algebra.RingUtils: class (Functor t, Foldable t) => Traversable (t :: Type -> Type)
- Algebra.RingUtils: compare :: Ord a => a -> a -> Ordering
- Algebra.RingUtils: concat :: Foldable t => t [a] -> [a]
- Algebra.RingUtils: concatMap :: Foldable t => (a -> [b]) -> t a -> [b]
- Algebra.RingUtils: const :: a -> b -> a
- Algebra.RingUtils: cos :: Floating a => a -> a
- Algebra.RingUtils: cosh :: Floating a => a -> a
- Algebra.RingUtils: curry :: ((a, b) -> c) -> a -> b -> c
- Algebra.RingUtils: cycle :: [a] -> [a]
- Algebra.RingUtils: data Bool
- Algebra.RingUtils: data Char
- Algebra.RingUtils: data Double
- Algebra.RingUtils: data Either a b
- Algebra.RingUtils: data Float
- Algebra.RingUtils: data IO a
- Algebra.RingUtils: data Int
- Algebra.RingUtils: data Integer
- Algebra.RingUtils: data Maybe a
- Algebra.RingUtils: data Ordering
- Algebra.RingUtils: data Word
- Algebra.RingUtils: decodeFloat :: RealFloat a => a -> (Integer, Int)
- Algebra.RingUtils: div :: Integral a => a -> a -> a
- Algebra.RingUtils: divMod :: Integral a => a -> a -> (a, a)
- Algebra.RingUtils: drop :: Int -> [a] -> [a]
- Algebra.RingUtils: dropWhile :: (a -> Bool) -> [a] -> [a]
- Algebra.RingUtils: either :: (a -> c) -> (b -> c) -> Either a b -> c
- Algebra.RingUtils: elem :: (Foldable t, Eq a) => a -> t a -> Bool
- Algebra.RingUtils: encodeFloat :: RealFloat a => Integer -> Int -> a
- Algebra.RingUtils: enumFrom :: Enum a => a -> [a]
- Algebra.RingUtils: enumFromThen :: Enum a => a -> a -> [a]
- Algebra.RingUtils: enumFromThenTo :: Enum a => a -> a -> a -> [a]
- Algebra.RingUtils: enumFromTo :: Enum a => a -> a -> [a]
- Algebra.RingUtils: error :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => [Char] -> a
- Algebra.RingUtils: errorWithoutStackTrace :: forall (r :: RuntimeRep) (a :: TYPE r). [Char] -> a
- Algebra.RingUtils: even :: Integral a => a -> Bool
- Algebra.RingUtils: exp :: Floating a => a -> a
- Algebra.RingUtils: exponent :: RealFloat a => a -> Int
- Algebra.RingUtils: fail :: MonadFail m => String -> m a
- Algebra.RingUtils: filter :: (a -> Bool) -> [a] -> [a]
- Algebra.RingUtils: flip :: (a -> b -> c) -> b -> a -> c
- Algebra.RingUtils: floatDigits :: RealFloat a => a -> Int
- Algebra.RingUtils: floatRadix :: RealFloat a => a -> Integer
- Algebra.RingUtils: floatRange :: RealFloat a => a -> (Int, Int)
- Algebra.RingUtils: floor :: (RealFrac a, Integral b) => a -> b
- Algebra.RingUtils: fmap :: Functor f => (a -> b) -> f a -> f b
- Algebra.RingUtils: foldMap :: (Foldable t, Monoid m) => (a -> m) -> t a -> m
- Algebra.RingUtils: foldl :: Foldable t => (b -> a -> b) -> b -> t a -> b
- Algebra.RingUtils: foldl1 :: Foldable t => (a -> a -> a) -> t a -> a
- Algebra.RingUtils: foldr :: Foldable t => (a -> b -> b) -> b -> t a -> b
- Algebra.RingUtils: foldr1 :: Foldable t => (a -> a -> a) -> t a -> a
- Algebra.RingUtils: fromEnum :: Enum a => a -> Int
- Algebra.RingUtils: fromInteger :: Num a => Integer -> a
- Algebra.RingUtils: fromIntegral :: (Integral a, Num b) => a -> b
- Algebra.RingUtils: fromRational :: Fractional a => Rational -> a
- Algebra.RingUtils: fst :: (a, b) -> a
- Algebra.RingUtils: gcd :: Integral a => a -> a -> a
- Algebra.RingUtils: getChar :: IO Char
- Algebra.RingUtils: getContents :: IO String
- Algebra.RingUtils: getLine :: IO String
- Algebra.RingUtils: head :: [a] -> a
- Algebra.RingUtils: id :: a -> a
- Algebra.RingUtils: infix 4 `notElem`
- Algebra.RingUtils: infixl 1 >>=
- Algebra.RingUtils: infixl 2 :/:
- Algebra.RingUtils: infixl 4 <$>
- Algebra.RingUtils: infixl 6 +
- Algebra.RingUtils: infixl 7 *
- Algebra.RingUtils: infixl 9 !!
- Algebra.RingUtils: infixr 0 $!
- Algebra.RingUtils: infixr 1 =<<
- Algebra.RingUtils: infixr 2 ||
- Algebra.RingUtils: infixr 3 &&
- Algebra.RingUtils: infixr 5 ++
- Algebra.RingUtils: infixr 6 <>
- Algebra.RingUtils: infixr 8 ^
- Algebra.RingUtils: infixr 9 .
- Algebra.RingUtils: init :: [a] -> [a]
- Algebra.RingUtils: instance (GHC.Base.Functor f, GHC.Base.Functor g) => GHC.Base.Functor (Algebra.RingUtils.O f g)
- Algebra.RingUtils: instance Algebra.RingUtils.AbelianGroup (f (g a)) => Algebra.RingUtils.AbelianGroup (Algebra.RingUtils.O f g a)
- Algebra.RingUtils: instance Algebra.RingUtils.AbelianGroup GHC.Types.Bool
- Algebra.RingUtils: instance Algebra.RingUtils.AbelianGroup GHC.Types.Int
- Algebra.RingUtils: instance Algebra.RingUtils.AbelianGroup a => Algebra.RingUtils.AbelianGroup (Data.Pair.Pair a)
- Algebra.RingUtils: instance Algebra.RingUtils.AbelianGroupZ (f (g a)) => Algebra.RingUtils.AbelianGroupZ (Algebra.RingUtils.O f g a)
- Algebra.RingUtils: instance Algebra.RingUtils.AbelianGroupZ GHC.Types.Int
- Algebra.RingUtils: instance Algebra.RingUtils.AbelianGroupZ a => Algebra.RingUtils.AbelianGroupZ (Data.Pair.Pair a)
- Algebra.RingUtils: instance Algebra.RingUtils.Ring GHC.Types.Int
- Algebra.RingUtils: instance GHC.Show.Show (f (g a)) => GHC.Show.Show (Algebra.RingUtils.O f g a)
- Algebra.RingUtils: interact :: (String -> String) -> IO ()
- Algebra.RingUtils: ioError :: IOError -> IO a
- Algebra.RingUtils: isDenormalized :: RealFloat a => a -> Bool
- Algebra.RingUtils: isIEEE :: RealFloat a => a -> Bool
- Algebra.RingUtils: isInfinite :: RealFloat a => a -> Bool
- Algebra.RingUtils: isNaN :: RealFloat a => a -> Bool
- Algebra.RingUtils: isNegativeZero :: RealFloat a => a -> Bool
- Algebra.RingUtils: iterate :: (a -> a) -> a -> [a]
- Algebra.RingUtils: last :: [a] -> a
- Algebra.RingUtils: lcm :: Integral a => a -> a -> a
- Algebra.RingUtils: length :: Foldable t => t a -> Int
- Algebra.RingUtils: lex :: ReadS String
- Algebra.RingUtils: lines :: String -> [String]
- Algebra.RingUtils: log :: Floating a => a -> a
- Algebra.RingUtils: logBase :: Floating a => a -> a -> a
- Algebra.RingUtils: lookup :: Eq a => a -> [(a, b)] -> Maybe b
- Algebra.RingUtils: map :: (a -> b) -> [a] -> [b]
- Algebra.RingUtils: mapM :: (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b)
- Algebra.RingUtils: mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m ()
- Algebra.RingUtils: mappend :: Monoid a => a -> a -> a
- Algebra.RingUtils: max :: Ord a => a -> a -> a
- Algebra.RingUtils: maxBound :: Bounded a => a
- Algebra.RingUtils: maximum :: (Foldable t, Ord a) => t a -> a
- Algebra.RingUtils: maybe :: b -> (a -> b) -> Maybe a -> b
- Algebra.RingUtils: mconcat :: Monoid a => [a] -> a
- Algebra.RingUtils: mempty :: Monoid a => a
- Algebra.RingUtils: min :: Ord a => a -> a -> a
- Algebra.RingUtils: minBound :: Bounded a => a
- Algebra.RingUtils: minimum :: (Foldable t, Ord a) => t a -> a
- Algebra.RingUtils: mod :: Integral a => a -> a -> a
- Algebra.RingUtils: negate :: Num a => a -> a
- Algebra.RingUtils: not :: Bool -> Bool
- Algebra.RingUtils: notElem :: (Foldable t, Eq a) => a -> t a -> Bool
- Algebra.RingUtils: null :: Foldable t => t a -> Bool
- Algebra.RingUtils: odd :: Integral a => a -> Bool
- Algebra.RingUtils: or :: Foldable t => t Bool -> Bool
- Algebra.RingUtils: otherwise :: Bool
- Algebra.RingUtils: pi :: Floating a => a
- Algebra.RingUtils: pred :: Enum a => a -> a
- Algebra.RingUtils: print :: Show a => a -> IO ()
- Algebra.RingUtils: product :: (Foldable t, Num a) => t a -> a
- Algebra.RingUtils: properFraction :: (RealFrac a, Integral b) => a -> (b, a)
- Algebra.RingUtils: pure :: Applicative f => a -> f a
- Algebra.RingUtils: putChar :: Char -> IO ()
- Algebra.RingUtils: putStr :: String -> IO ()
- Algebra.RingUtils: putStrLn :: String -> IO ()
- Algebra.RingUtils: quot :: Integral a => a -> a -> a
- Algebra.RingUtils: quotRem :: Integral a => a -> a -> (a, a)
- Algebra.RingUtils: read :: Read a => String -> a
- Algebra.RingUtils: readFile :: FilePath -> IO String
- Algebra.RingUtils: readIO :: Read a => String -> IO a
- Algebra.RingUtils: readList :: Read a => ReadS [a]
- Algebra.RingUtils: readLn :: Read a => IO a
- Algebra.RingUtils: readParen :: Bool -> ReadS a -> ReadS a
- Algebra.RingUtils: reads :: Read a => ReadS a
- Algebra.RingUtils: readsPrec :: Read a => Int -> ReadS a
- Algebra.RingUtils: realToFrac :: (Real a, Fractional b) => a -> b
- Algebra.RingUtils: recip :: Fractional a => a -> a
- Algebra.RingUtils: rem :: Integral a => a -> a -> a
- Algebra.RingUtils: repeat :: a -> [a]
- Algebra.RingUtils: replicate :: Int -> a -> [a]
- Algebra.RingUtils: return :: Monad m => a -> m a
- Algebra.RingUtils: reverse :: [a] -> [a]
- Algebra.RingUtils: round :: (RealFrac a, Integral b) => a -> b
- Algebra.RingUtils: scaleFloat :: RealFloat a => Int -> a -> a
- Algebra.RingUtils: scanl :: (b -> a -> b) -> b -> [a] -> [b]
- Algebra.RingUtils: scanl1 :: (a -> a -> a) -> [a] -> [a]
- Algebra.RingUtils: scanr :: (a -> b -> b) -> b -> [a] -> [b]
- Algebra.RingUtils: scanr1 :: (a -> a -> a) -> [a] -> [a]
- Algebra.RingUtils: seq :: forall {r :: RuntimeRep} a (b :: TYPE r). a -> b -> b
- Algebra.RingUtils: sequence :: (Traversable t, Monad m) => t (m a) -> m (t a)
- Algebra.RingUtils: sequenceA :: (Traversable t, Applicative f) => t (f a) -> f (t a)
- Algebra.RingUtils: sequence_ :: (Foldable t, Monad m) => t (m a) -> m ()
- Algebra.RingUtils: show :: Show a => a -> String
- Algebra.RingUtils: showChar :: Char -> ShowS
- Algebra.RingUtils: showList :: Show a => [a] -> ShowS
- Algebra.RingUtils: showParen :: Bool -> ShowS -> ShowS
- Algebra.RingUtils: showString :: String -> ShowS
- Algebra.RingUtils: shows :: Show a => a -> ShowS
- Algebra.RingUtils: showsPrec :: Show a => Int -> a -> ShowS
- Algebra.RingUtils: significand :: RealFloat a => a -> a
- Algebra.RingUtils: signum :: Num a => a -> a
- Algebra.RingUtils: sin :: Floating a => a -> a
- Algebra.RingUtils: sinh :: Floating a => a -> a
- Algebra.RingUtils: snd :: (a, b) -> b
- Algebra.RingUtils: span :: (a -> Bool) -> [a] -> ([a], [a])
- Algebra.RingUtils: sqrt :: Floating a => a -> a
- Algebra.RingUtils: subtract :: Num a => a -> a -> a
- Algebra.RingUtils: succ :: Enum a => a -> a
- Algebra.RingUtils: tail :: [a] -> [a]
- Algebra.RingUtils: take :: Int -> [a] -> [a]
- Algebra.RingUtils: takeWhile :: (a -> Bool) -> [a] -> [a]
- Algebra.RingUtils: tan :: Floating a => a -> a
- Algebra.RingUtils: tanh :: Floating a => a -> a
- Algebra.RingUtils: toEnum :: Enum a => Int -> a
- Algebra.RingUtils: toInteger :: Integral a => a -> Integer
- Algebra.RingUtils: toRational :: Real a => a -> Rational
- Algebra.RingUtils: traverse :: (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b)
- Algebra.RingUtils: truncate :: (RealFrac a, Integral b) => a -> b
- Algebra.RingUtils: type FilePath = String
- Algebra.RingUtils: type IOError = IOException
- Algebra.RingUtils: type Rational = Ratio Integer
- Algebra.RingUtils: type ReadS a = String -> [(a, String)]
- Algebra.RingUtils: type ShowS = String -> String
- Algebra.RingUtils: type String = [Char]
- Algebra.RingUtils: uncurry :: (a -> b -> c) -> (a, b) -> c
- Algebra.RingUtils: undefined :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => a
- Algebra.RingUtils: unlines :: [String] -> String
- Algebra.RingUtils: until :: (a -> Bool) -> (a -> a) -> a -> a
- Algebra.RingUtils: unwords :: [String] -> String
- Algebra.RingUtils: unzip :: [(a, b)] -> ([a], [b])
- Algebra.RingUtils: unzip3 :: [(a, b, c)] -> ([a], [b], [c])
- Algebra.RingUtils: userError :: String -> IOError
- Algebra.RingUtils: words :: String -> [String]
- Algebra.RingUtils: writeFile :: FilePath -> String -> IO ()
- Algebra.RingUtils: zip :: [a] -> [b] -> [(a, b)]
- Algebra.RingUtils: zip3 :: [a] -> [b] -> [c] -> [(a, b, c)]
- Algebra.RingUtils: zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
- Algebra.RingUtils: zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
- Data.Matrix.Class: instance Data.Matrix.Class.Matrix m => Data.Matrix.Class.Matrix (Algebra.RingUtils.O Data.Pair.Pair m)
- Data.Matrix.Class: instance GHC.Classes.Eq Data.Matrix.Class.Dimension
- Data.Matrix.Class: instance GHC.Show.Show Data.Matrix.Class.Dimension
- Data.Matrix.Quad: [:!] :: Vec s a -> Vec s' a -> Vec (Bin s s') a
- Data.Matrix.Quad: [Bin'] :: !Int -> Shape' s -> Shape' s' -> Shape' (Bin s s')
- Data.Matrix.Quad: [Col] :: Mat Leaf y1 a -> Mat Leaf y2 a -> Mat Leaf (Bin y1 y2) a
- Data.Matrix.Quad: [Here] :: Path Leaf
- Data.Matrix.Quad: [High] :: Path s -> Path (Bin s' s)
- Data.Matrix.Quad: [Leaf'] :: Shape' Leaf
- Data.Matrix.Quad: [Low] :: Path s -> Path (Bin s s')
- Data.Matrix.Quad: [O] :: a -> Vec Leaf a
- Data.Matrix.Quad: [One] :: !a -> Mat Leaf Leaf a
- Data.Matrix.Quad: [Quad] :: !Mat x1 y1 a -> !Mat x2 y1 a -> !Mat x1 y2 a -> !Mat x2 y2 a -> Mat (Bin x1 x2) (Bin y1 y2) a
- Data.Matrix.Quad: [Row] :: Mat x1 Leaf a -> Mat x2 Leaf a -> Mat (Bin x1 x2) Leaf a
- Data.Matrix.Quad: [S] :: Shape' s -> SomeShape
- Data.Matrix.Quad: [T] :: Shape' s -> Pair (Mat s s a) -> SomeTri a
- Data.Matrix.Quad: [Z] :: Vec s a
- Data.Matrix.Quad: [Zero] :: Mat x y a
- Data.Matrix.Quad: instance Algebra.RingUtils.AbelianGroup a => Algebra.RingUtils.AbelianGroup (Data.Matrix.Quad.Vec x a)
- Data.Matrix.Quad: instance Algebra.RingUtils.AbelianGroupZ a => Algebra.RingUtils.AbelianGroup (Data.Matrix.Quad.Mat x y a)
- Data.Pair: [leftOf] :: Pair a -> a
- Data.Pair: [rightOf] :: Pair a -> a
- Data.Pair: infixl 2 :/:
- Data.Pair: instance GHC.Base.Applicative Data.Pair.Pair
- Data.Pair: instance GHC.Base.Functor Data.Pair.Pair
- Data.Pair: instance GHC.Show.Show a => GHC.Show.Show (Data.Pair.Pair a)
- Parsing.Chart: instance Algebra.RingUtils.AbelianGroup (Parsing.Chart.Set a)
- Parsing.Chart: instance Algebra.RingUtils.AbelianGroupZ (Parsing.Chart.Set a)
+ Algebra.RingUtils: fromO :: O f g a -> f (g a)
+ Algebra.RingUtils: instance (Functor f, Functor g) => Functor (O f g)
+ Algebra.RingUtils: instance AbelianGroup (f (g a)) => AbelianGroup (O f g a)
+ Algebra.RingUtils: instance AbelianGroup Bool
+ Algebra.RingUtils: instance AbelianGroup Int
+ Algebra.RingUtils: instance AbelianGroup a => AbelianGroup (Pair a)
+ Algebra.RingUtils: instance AbelianGroupZ (f (g a)) => AbelianGroupZ (O f g a)
+ Algebra.RingUtils: instance AbelianGroupZ Int
+ Algebra.RingUtils: instance AbelianGroupZ a => AbelianGroupZ (Pair a)
+ Algebra.RingUtils: instance Ring Int
+ Algebra.RingUtils: instance Show (f (g a)) => Show (O f g a)
+ Algebra.RingUtils: leftOf :: Pair a -> a
+ Algebra.RingUtils: rightOf :: Pair a -> a
+ Data.Matrix.Class: instance Eq Dimension
+ Data.Matrix.Class: instance Matrix m => Matrix (O Pair m)
+ Data.Matrix.Class: instance Show Dimension
+ Data.Matrix.Quad: (:!) :: Vec s a -> Vec s' a -> Vec (Bin s s') a
+ Data.Matrix.Quad: Bin' :: !Int -> Shape' s -> Shape' s' -> Shape' (Bin s s')
+ Data.Matrix.Quad: Col :: Mat Leaf y1 a -> Mat Leaf y2 a -> Mat Leaf (Bin y1 y2) a
+ Data.Matrix.Quad: Here :: Path Leaf
+ Data.Matrix.Quad: High :: Path s -> Path (Bin s' s)
+ Data.Matrix.Quad: Leaf' :: Shape' Leaf
+ Data.Matrix.Quad: Low :: Path s -> Path (Bin s s')
+ Data.Matrix.Quad: O :: a -> Vec Leaf a
+ Data.Matrix.Quad: One :: !a -> Mat Leaf Leaf a
+ Data.Matrix.Quad: Quad :: !(Mat x1 y1 a) -> !(Mat x2 y1 a) -> !(Mat x1 y2 a) -> !(Mat x2 y2 a) -> Mat (Bin x1 x2) (Bin y1 y2) a
+ Data.Matrix.Quad: Row :: Mat x1 Leaf a -> Mat x2 Leaf a -> Mat (Bin x1 x2) Leaf a
+ Data.Matrix.Quad: S :: Shape' s -> SomeShape
+ Data.Matrix.Quad: T :: Shape' s -> Pair (Mat s s a) -> SomeTri a
+ Data.Matrix.Quad: Z :: Vec s a
+ Data.Matrix.Quad: Zero :: Mat x y a
+ Data.Matrix.Quad: instance AbelianGroup a => AbelianGroup (Vec x a)
+ Data.Matrix.Quad: instance AbelianGroupZ a => AbelianGroup (Mat x y a)
+ Data.Pair: instance Applicative Pair
+ Data.Pair: instance Functor Pair
+ Data.Pair: instance Show a => Show (Pair a)
+ Data.Pair: leftOf :: Pair a -> a
+ Data.Pair: rightOf :: Pair a -> a
+ Parsing.Chart: instance AbelianGroup (Set a)
+ Parsing.Chart: instance AbelianGroupZ (Set a)
- Algebra.RingUtils: class (AbelianGroupZ a) => RingP a
+ Algebra.RingUtils: class AbelianGroupZ a => RingP a
- Algebra.RingUtils: onlyLeft :: [a] -> Pair [a]
+ Algebra.RingUtils: onlyLeft :: [t] -> Pair [t]
- Algebra.RingUtils: onlyRight :: [a] -> Pair [a]
+ Algebra.RingUtils: onlyRight :: [t] -> Pair [t]
- Algebra.RingUtils: select :: Bool -> [a] -> Pair [a]
+ Algebra.RingUtils: select :: Bool -> [t] -> Pair [t]
- Data.Matrix.Class: (***) :: (t -> a) -> (t -> b) -> (t, t) -> (a, b)
+ Data.Matrix.Class: (***) :: (t -> t2) -> (t1 -> t3) -> (t, t1) -> (t2, t3)
- Data.Matrix.Class: ext :: Dimension -> (a, a) -> a
+ Data.Matrix.Class: ext :: Dimension -> (t, t) -> t
- Data.Matrix.Class: fingerprint :: (AbelianGroupZ a, Matrix m) => m a -> [[Char]]
+ Data.Matrix.Class: fingerprint :: (Matrix m, AbelianGroupZ a) => m a -> [[Char]]
- Data.Matrix.Class: glueExt :: (AbelianGroup a, AbelianGroup b) => Dimension -> (a, b) -> (a, b) -> (a, b)
+ Data.Matrix.Class: glueExt :: (AbelianGroup t1, AbelianGroup t) => Dimension -> (t, t1) -> (t, t1) -> (t, t1)
- Data.Matrix.Class: quad :: (AbelianGroup a, Matrix m) => m a -> m a -> m a -> m a -> m a
+ Data.Matrix.Class: quad :: (Matrix m, AbelianGroup a) => m a -> m a -> m a -> m a -> m a
- Data.Matrix.Class: splitExt :: Num b => Dimension -> b -> (b, b) -> ((b, b), (b, b))
+ Data.Matrix.Class: splitExt :: Num t => Dimension -> t -> (t, t) -> ((t, t), (t, t))
- Data.Matrix.Quad: fingerprint :: AbelianGroupZ a => SomeTri a -> [[Char]]
+ Data.Matrix.Quad: fingerprint :: AbelianGroupZ t => SomeTri t -> [[Char]]
- Data.Matrix.Quad: first :: (t -> a) -> (t, b) -> (a, b)
+ Data.Matrix.Quad: first :: (t -> t1) -> (t, t2) -> (t1, t2)
- Data.Matrix.Quad: quad :: forall {x1 :: Shape} {y1 :: Shape} {a} {x2 :: Shape} {y2 :: Shape}. Mat x1 y1 a -> Mat x2 y1 a -> Mat x1 y2 a -> Mat x2 y2 a -> Mat ('Bin x1 x2) ('Bin y1 y2) a
+ Data.Matrix.Quad: quad :: Mat x1 y1 a -> Mat x2 y1 a -> Mat x1 y2 a -> Mat x2 y2 a -> Mat (Bin x1 x2) (Bin y1 y2) a
- Data.Matrix.Quad: quad' :: forall {f} {x1 :: Shape} {y1 :: Shape} {a} {x2 :: Shape} {y2 :: Shape}. Applicative f => f (Mat x1 y1 a) -> f (Mat x2 y1 a) -> f (Mat x1 y2 a) -> f (Mat x2 y2 a) -> f (Mat ('Bin x1 x2) ('Bin y1 y2) a)
+ Data.Matrix.Quad: quad' :: Applicative f => f (Mat x1 y1 a) -> f (Mat x2 y1 a) -> f (Mat x1 y2 a) -> f (Mat x2 y2 a) -> f (Mat (Bin x1 x2) (Bin y1 y2) a)
- Data.Matrix.Quad: root :: AbelianGroup p => SomeTri p -> p
+ Data.Matrix.Quad: root :: AbelianGroup t => SomeTri t -> t
- Data.Matrix.Quad: row :: forall {x1 :: Shape} {a} {x2 :: Shape}. Mat x1 'Leaf a -> Mat x2 'Leaf a -> Mat ('Bin x1 x2) 'Leaf a
+ Data.Matrix.Quad: row :: Mat x1 Leaf a -> Mat x2 Leaf a -> Mat (Bin x1 x2) Leaf a
- Data.Matrix.Quad: scatterplot :: AbelianGroup a => SomeTri a -> [Char]
+ Data.Matrix.Quad: scatterplot :: AbelianGroup t => SomeTri t -> [Char]
- Data.Matrix.Quad: second :: (t -> b) -> (a, t) -> (a, b)
+ Data.Matrix.Quad: second :: (t -> t2) -> (t1, t) -> (t1, t2)
- Data.Matrix.Quad: shiftX :: forall {s :: Shape} {b} {c}. Shape' s -> [(Int, b, c)] -> [(Int, b, c)]
+ Data.Matrix.Quad: shiftX :: Shape' s -> [(Int, t, t1)] -> [(Int, t, t1)]
- Data.Matrix.Quad: shiftY :: forall {s :: Shape} {a} {c}. Shape' s -> [(a, Int, c)] -> [(a, Int, c)]
+ Data.Matrix.Quad: shiftY :: Shape' s -> [(t, Int, t1)] -> [(t, Int, t1)]
- Parsing.Chart: fingerprint :: AbelianGroupZ a => SomeTri a -> [[Char]]
+ Parsing.Chart: fingerprint :: AbelianGroupZ t => SomeTri t -> [[Char]]
- Parsing.Chart: root :: AbelianGroup p => SomeTri p -> p
+ Parsing.Chart: root :: AbelianGroup t => SomeTri t -> t
- Parsing.TestProgram: mainTest :: forall category token. (RingP [(category, Any)], Eq category) => ((category, Any) -> String) -> (Bool -> token -> Pair [(category, Any)]) -> (String -> [token]) -> (token -> (Int, Int)) -> (category -> String) -> (category -> [category]) -> IO ()
+ Parsing.TestProgram: mainTest :: (RingP [(category, Any)], Eq category) => ((category, Any) -> String) -> (Bool -> token -> Pair [(category, Any)]) -> (String -> [token]) -> (token -> (Int, Int)) -> (category -> String) -> (category -> [category]) -> IO ()
- Parsing.TestProgram: pairs :: [a] -> [(a, a)]
+ Parsing.TestProgram: pairs :: [t] -> [(t, t)]
- Parsing.TestProgram: resSz :: Num a => (a, b, a) -> a
+ Parsing.TestProgram: resSz :: Num a => (a, t, a) -> a

Files

BNFC.cabal view
@@ -1,13 +1,13 @@-cabal-version: >= 1.10 Name: BNFC-Version: 2.7.0.2+Version: 2.7.1+cabal-version: >= 1.8 build-type: Simple category: Development Copyright: (c) Krasimir Angelov, Jean-Philippe Bernardy, Bjorn Bringert, Johan Broberg, Paul Callaghan, Markus Forsberg, Ola Frid, Peter Gammie, Patrik Jansson, Kristofer Johannisson, Antti-Juhani Kaijanaho, Ulf Norell, Michael Pellauer and Aarne Ranta 2002 - 2012. Free software under GNU General Public License (GPL). License: GPL-2 License-File: LICENSE Maintainer: bnfc-dev@googlegroups.com-Homepage: https://bnfc.digitalgrammars.com/+Homepage: http://bnfc.digitalgrammars.com/ bug-reports: https://github.com/BNFC/bnfc/issues Synopsis: A compiler front-end generator. Description:@@ -22,22 +22,7 @@   a Happy, CUP, or Bison parser generator file,   a pretty-printer as a Haskell/Java/C++/C module,   a Latex file containing a readable specification of the language.-Extra-source-files: src/BNF.cf CHANGELOG.md--tested-with:-  GHC == 9.8.1-  GHC == 9.6.3-  GHC == 9.4.7-  GHC == 9.2.8-  GHC == 9.0.2-  GHC == 8.10.7-  GHC == 8.8.4-  GHC == 8.6.5-  GHC == 8.4.4-  GHC == 8.2.2-  GHC == 8.0.2-  GHC == 7.10.3-  -- Build failures with older GHCs+Extra-source-files: src/BNF.cf TODO changelog  Source-repository head   type: git@@ -46,8 +31,7 @@  Library   hs-source-dirs: runtime, src-  Build-Depends: base>=4.8 && <5, array-  default-language: Haskell2010+  Build-Depends: base>=4.4 && <5, array   exposed-modules:    Algebra.RingUtils    Data.Pair@@ -58,7 +42,7 @@  Executable bnfc   Build-Depends:-    base>=4.8 && <5,+    base>=4.4 && <5,     mtl,     directory,     array,@@ -70,8 +54,8 @@   build-tools:         alex, happy   Main-is: Main.hs   HS-source-dirs: src/-  default-language: Haskell2010-  ghc-options:     -fwarn-incomplete-patterns+  ghc-options:     -W+  extensions: OverloadedStrings   Other-modules:     -- generated by cabal     Paths_BNFC,@@ -193,13 +177,12 @@ -- --- Testing -------------------------------------------------------------- Test-suite unit-tests   Type: exitcode-stdio-1.0-  Build-Depends: base>=4.8 && <5, mtl, directory, array, process, filepath, pretty,+  Build-Depends: base>=4 && <5, mtl, directory, array, process, filepath, pretty,                  hspec, QuickCheck >= 2.5, HUnit,                  temporary, containers, deepseq-  build-tools:   alex, happy, hspec-discover   Main-is: unit-tests.hs   HS-source-dirs: src test/-  default-language: Haskell2010+  extensions: OverloadedStrings   Other-modules:    BNFC.Backend.Common.MakefileSpec    BNFC.OptionsSpec@@ -207,3 +190,10 @@    -- need to be there for alex to work    LexBNF    ParBNF++Test-suite bnfc-doctests+  type:           exitcode-stdio-1.0+  ghc-options:    -threaded+  main-is:        doctests.hs+  build-depends:  base, doctest >= 0.8+  HS-source-dirs: test/
− CHANGELOG.md
@@ -1,11 +0,0 @@--# 2.7.0.2--Andreas Abel <andreas.abel@gu.se>,  2023-10-26--* Make BNFC 2.7.0.1 build with GHC ≥ 7.10-* Tested with GHC 7.10.3 - 9.8.1--# 2.7.0.1--Gregoire Detrez, 2014-09-26
+ TODO view
@@ -0,0 +1,112 @@+Build:+- autoconf+  - verify Alex version.+- tidy up Makefiles a bit+  - and the generated ones too.+    - Use "Makefile" everywhere.+  - follow UNIX conventions...++Functionality:++- Add Bool type.++Bugs:+- Strange unicode space.+- Bison only supports 1 parser per input file.+- Write some clear docs on the Java backend.+- Java backend (and probably others)+  - Need to munge Java keywords like "abstract" "private"+    - Alfa.cf, C.cf fail to compile for this reason.+  - I think I fixed this, but it should be verified (peteg)+  - Add a message on how to run the test file (after a succesful compliation), +    e.g. :+    "to run the test, type : java JavaletteLight/Test <filename>"+Compilers:++- write a JavaCup script++Bug Reports:++--------------+> Fail: formats/java/CFtoJavaPrinter.hs:269: Non-exhaustive patterns in function> getCons+  on Prolog.cf+  Reason: No separator for a list. The same happens in C and C++.++> In Skeleton.c the visit-functions for lists has the wrong variable for+> visiting the+> list elements. It says "visitNAME(LISTNAME->LISTNAME)" but it should be+> "visitNAME(LISTNAME->NAME)".+>+> The parse tree printer and pretty printer writes a newline instead of "\n"+> for+> strings.+--------------+Java backend++If a terminal and non-terminal have the same name, there is a name clash in+the generarted .java files.++Solution: don't do this.+See C.cf for an example. Alfa.cf doesn't work either.++- "separator", etc. decs don't play nice.+  - the list stuff is emitted before the top-level non-terminal.+- need to specify which non-terminal is the top-level one.+  - i.e. a "start with" line must be present.+  - BNFC now crashes if you don't specify an "entrypoint" pragma,+    or use more than one.++Somewhere along the line of BNFC/jlex/jcup the BNFC comment-instruction+(comment "/*" "*/" ;) seems to fail. A file containing only an opening+of a comment manages to pass the parser without any trouble.++--------------+Aarne, Java:++  to get "parse successful" is fast, but then it takes+  quite some time to pretty-print++  the parser gets confused with isolatin characters included+  in string literals++Michael:++http://www.cs.princeton.edu/~appel/modern/java/JLex/current/manual.html#SECTION2.2.14++--------------++Antti-Juhani Kaijanaho:++- A token UIdent declaration (see report) causes a mysterious parse+  error at end of file / perhaps conflicts with predefined Ident?+- If I use "\\/" in a production, Happy is unhappy (you use \/ as the+  Happy token)+- You generate Alex 1.x source.  Could you make it (optionally?)+  generate Alex 2.x source? <peteg: fixed>++Oh, and bnfc returns an exit code indicating success even when there is+an error.++--------------++Bjorn Bringert:++- Specifying coercions etc. for non-existing categories should+  probably be an error.+- Repeated identical rules should be an error.+- Java CUP back end does not support multiple entrypoints.++--------------++Software versions:++ghc 5.04.x++bison 1.875a+flex 2.5.31++alex 2.0+happy 1.13+++--------------
+ changelog view
@@ -0,0 +1,24 @@+2.7.1 Grégoire Détrez <gregoire.detrez@gu.se> October 2014+	* Generated haskell code is now warning free+	* Removed unused terminal in happy+	* Correctly escape backslashes in symbols+	* Fix problem that was preventing custom tokens to work in OCaml if+	they conflict with the build-in Ident+	* BNFC build is also warning free (ghc 7.4.2)+	* Test programs return non-zerro exit code on parse error++2.7.0.0 Grégoire Détrez <gregoire.detrez@gu.se> September 2014+	* Add token support for Ocaml+	* New option parser+	* Adds an optional argument to change Makefile name+	* Add a --ghc option to derive Data, Typeable, Generic in Haskell+	* New online documentation (https://bnfc.readthedocs.org)+	* Derive ``Read`` for newtype decls in Haskell+	* New option to get the version number --version+	* Remove the F# backend+	* Remove the Java4 backend+	* New Applicative and Alternative instances to ``Err``+	* Remove the coupling between building the parser and the pdf from+	latex+	* Improvement to the CNF Backend+	* Bug fixes #92, #21, #34, #33, #90, #30, #60
+ dist/build/bnfc/bnfc-tmp/LexBNF.hs view
@@ -0,0 +1,412 @@+{-# LANGUAGE CPP,MagicHash #-}+{-# LINE 3 "src/LexBNF.x" #-}++{-# OPTIONS -fno-warn-incomplete-patterns #-}+{-# OPTIONS_GHC -w #-}+module LexBNF where++++import qualified Data.Bits+import Data.Word (Word8)++#if __GLASGOW_HASKELL__ >= 603+#include "ghcconfig.h"+#elif defined(__GLASGOW_HASKELL__)+#include "config.h"+#endif+#if __GLASGOW_HASKELL__ >= 503+import Data.Array+import Data.Char (ord)+import Data.Array.Base (unsafeAt)+#else+import Array+import Char (ord)+#endif+#if __GLASGOW_HASKELL__ >= 503+import GHC.Exts+#else+import GlaExts+#endif+alex_base :: AlexAddr+alex_base = AlexA# "\xf8\xff\xff\xff\x49\x00\x00\x00\xc9\xff\xff\xff\xe0\xff\xff\xff\xc9\x00\x00\x00\x9c\x01\x00\x00\x2d\x00\x00\x00\x1c\x02\x00\x00\x1c\x03\x00\x00\x0a\x01\x00\x00\x00\x00\x00\x00\x0d\x03\x00\x00\x0d\x04\x00\x00\xcd\x03\x00\x00\xcd\x04\x00\x00\x91\x05\x00\x00\xef\x05\x00\x00\x8d\x04\x00\x00\x00\x00\x00\x00\xa5\x05\x00\x00\xdb\xff\xff\xff\x47\x00\x00\x00\x5a\x00\x00\x00\xa5\x06\x00\x00\xa6\x06\x00\x00\x69\x07\x00\x00\x29\x07\x00\x00\x00\x00\x00\x00\x1f\x08\x00\x00\x00\x00\x00\x00\x78\x00\x00\x00\xdc\xff\xff\xff\xdd\xff\xff\xff\x00\x00\x00\x00\xdf\xff\xff\xff\xf8\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x72\x00\x00\x00\xe7\x05\x00\x00\x7c\x00\x00\x00"#++alex_table :: AlexAddr+alex_table = AlexA# "\x00\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x21\x00\x25\x00\x16\x00\x1c\x00\x05\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x00\x00\x00\x00\x00\x00\x1e\x00\x02\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x21\x00\x21\x00\x21\x00\x21\x00\x21\x00\x1f\x00\x21\x00\x00\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x22\x00\x21\x00\x00\x00\x21\x00\x00\x00\x21\x00\x00\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x21\x00\x03\x00\x21\x00\x00\x00\x21\x00\x00\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x20\x00\x21\x00\x21\x00\x01\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x03\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1e\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x03\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1d\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x01\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x04\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x00\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x06\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x1a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x00\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x24\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x10\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x00\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x00\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x00\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x00\x00\x0f\x00\x11\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1a\x00\x04\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x13\x00\x07\x00\x0a\x00\x0a\x00\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\x00\x00\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#++alex_check :: AlexAddr+alex_check = AlexA# "\xff\xff\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x3d\x00\x27\x00\x2d\x00\x2d\x00\x2d\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x20\x00\x3a\x00\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\xff\xff\x3d\x00\xff\xff\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x27\x00\x5d\x00\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x2d\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\x5c\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\x74\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7d\x00\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x2d\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\xff\xff\xff\xff\xc2\x00\xc3\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\x27\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5c\x00\x65\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\xff\xff\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xff\xff\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc2\x00\xc3\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#++alex_deflt :: AlexAddr+alex_deflt = AlexA# "\xff\xff\x05\x00\xff\xff\xff\xff\xff\xff\x05\x00\xff\xff\xff\xff\x05\x00\x05\x00\x12\x00\x12\x00\x03\x00\x03\x00\xff\xff\x17\x00\xff\xff\x17\x00\x1b\x00\x1b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x00\x1c\x00\x1c\x00\x1c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#++alex_accept = listArray (0::Int,40) [AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccSkip,AlexAccSkip,AlexAccSkip,AlexAcc (alex_action_3),AlexAcc (alex_action_3),AlexAcc (alex_action_3),AlexAcc (alex_action_3),AlexAcc (alex_action_4),AlexAcc (alex_action_5),AlexAcc (alex_action_6),AlexAcc (alex_action_7),AlexAcc (alex_action_8),AlexAcc (alex_action_8)]+{-# LINE 38 "src/LexBNF.x" #-}+++tok :: (Posn -> String -> Token) -> (Posn -> String -> Token)+tok f p s = f p s++share :: String -> String+share = id++data Tok =+   TS !String !Int    -- reserved words and symbols+ | TL !String         -- string literals+ | TI !String         -- integer literals+ | TV !String         -- identifiers+ | TD !String         -- double precision float literals+ | TC !String         -- character literals++ deriving (Eq,Show,Ord)++data Token =+   PT  Posn Tok+ | Err Posn+  deriving (Eq,Show,Ord)++tokenPos :: [Token] -> String+tokenPos (PT (Pn _ l _) _ :_) = "line " ++ show l+tokenPos (Err (Pn _ l _) :_) = "line " ++ show l+tokenPos _ = "end of file"++tokenPosn :: Token -> Posn+tokenPosn (PT p _) = p+tokenPosn (Err p) = p++tokenLineCol :: Token -> (Int, Int)+tokenLineCol = posLineCol . tokenPosn++posLineCol :: Posn -> (Int, Int)+posLineCol (Pn _ l c) = (l,c)++mkPosToken :: Token -> ((Int, Int), String)+mkPosToken t@(PT p _) = (posLineCol p, prToken t)++prToken :: Token -> String+prToken t = case t of+  PT _ (TS s _) -> s+  PT _ (TL s)   -> s+  PT _ (TI s)   -> s+  PT _ (TV s)   -> s+  PT _ (TD s)   -> s+  PT _ (TC s)   -> s+++data BTree = N | B String Tok BTree BTree deriving (Show)++eitherResIdent :: (String -> Tok) -> String -> Tok+eitherResIdent tv s = treeFind resWords+  where+  treeFind N = tv s+  treeFind (B a t left right) | s < a  = treeFind left+                              | s > a  = treeFind right+                              | s == a = t++resWords :: BTree+resWords = b "digit" 21 (b "=" 11 (b "-" 6 (b "*" 3 (b ")" 2 (b "(" 1 N N) N) (b "," 5 (b "+" 4 N N) N)) (b "::=" 9 (b ":" 8 (b "." 7 N N) N) (b ";" 10 N N))) (b "char" 16 (b "]" 14 (b "[" 13 (b "?" 12 N N) N) (b "_" 15 N N)) (b "define" 19 (b "comment" 18 (b "coercions" 17 N N) N) (b "delimiters" 20 N N)))) (b "separator" 31 (b "letter" 26 (b "internal" 24 (b "eps" 23 (b "entrypoints" 22 N N) N) (b "layout" 25 N N)) (b "position" 29 (b "nonempty" 28 (b "lower" 27 N N) N) (b "rules" 30 N N))) (b "upper" 36 (b "token" 34 (b "terminator" 33 (b "stop" 32 N N) N) (b "toplevel" 35 N N)) (b "|" 39 (b "{" 38 (b "views" 37 N N) N) (b "}" 40 N N))))+   where b s n = let bs = id s+                  in B bs (TS bs n)++unescapeInitTail :: String -> String+unescapeInitTail = id . unesc . tail . id where+  unesc s = case s of+    '\\':c:cs | elem c ['\"', '\\', '\''] -> c : unesc cs+    '\\':'n':cs  -> '\n' : unesc cs+    '\\':'t':cs  -> '\t' : unesc cs+    '"':[]    -> []+    c:cs      -> c : unesc cs+    _         -> []++-------------------------------------------------------------------+-- Alex wrapper code.+-- A modified "posn" wrapper.+-------------------------------------------------------------------++data Posn = Pn !Int !Int !Int+      deriving (Eq, Show,Ord)++alexStartPos :: Posn+alexStartPos = Pn 0 1 1++alexMove :: Posn -> Char -> Posn+alexMove (Pn a l c) '\t' = Pn (a+1)  l     (((c+7) `div` 8)*8+1)+alexMove (Pn a l c) '\n' = Pn (a+1) (l+1)   1+alexMove (Pn a l c) _    = Pn (a+1)  l     (c+1)++type Byte = Word8++type AlexInput = (Posn,     -- current position,+                  Char,     -- previous char+                  [Byte],   -- pending bytes on the current char+                  String)   -- current input string++tokens :: String -> [Token]+tokens str = go (alexStartPos, '\n', [], str)+    where+      go :: AlexInput -> [Token]+      go inp@(pos, _, _, str) =+               case alexScan inp 0 of+                AlexEOF                   -> []+                AlexError (pos, _, _, _)  -> [Err pos]+                AlexSkip  inp' len        -> go inp'+                AlexToken inp' len act    -> act pos (take len str) : (go inp')++alexGetByte :: AlexInput -> Maybe (Byte,AlexInput)+alexGetByte (p, c, (b:bs), s) = Just (b, (p, c, bs, s))+alexGetByte (p, _, [], s) =+  case  s of+    []  -> Nothing+    (c:s) ->+             let p'     = alexMove p c+                 (b:bs) = utf8Encode c+              in p' `seq` Just (b, (p', c, bs, s))++alexInputPrevChar :: AlexInput -> Char+alexInputPrevChar (p, c, bs, s) = c++-- | Encode a Haskell String to a list of Word8 values, in UTF8 format.+utf8Encode :: Char -> [Word8]+utf8Encode = map fromIntegral . go . ord+ where+  go oc+   | oc <= 0x7f       = [oc]++   | oc <= 0x7ff      = [ 0xc0 + (oc `Data.Bits.shiftR` 6)+                        , 0x80 + oc Data.Bits..&. 0x3f+                        ]++   | oc <= 0xffff     = [ 0xe0 + (oc `Data.Bits.shiftR` 12)+                        , 0x80 + ((oc `Data.Bits.shiftR` 6) Data.Bits..&. 0x3f)+                        , 0x80 + oc Data.Bits..&. 0x3f+                        ]+   | otherwise        = [ 0xf0 + (oc `Data.Bits.shiftR` 18)+                        , 0x80 + ((oc `Data.Bits.shiftR` 12) Data.Bits..&. 0x3f)+                        , 0x80 + ((oc `Data.Bits.shiftR` 6) Data.Bits..&. 0x3f)+                        , 0x80 + oc Data.Bits..&. 0x3f+                        ]++alex_action_3 =  tok (\p s -> PT p (eitherResIdent (TV . share) s)) +alex_action_4 =  tok (\p s -> PT p (eitherResIdent (TV . share) s)) +alex_action_5 =  tok (\p s -> PT p (TL $ share $ unescapeInitTail s)) +alex_action_6 =  tok (\p s -> PT p (TC $ share s))  +alex_action_7 =  tok (\p s -> PT p (TI $ share s))    +alex_action_8 =  tok (\p s -> PT p (TD $ share s)) +{-# LINE 1 "templates/GenericTemplate.hs" #-}+{-# LINE 1 "templates/GenericTemplate.hs" #-}+{-# LINE 1 "<built-in>" #-}+{-# LINE 1 "<command-line>" #-}++++++++# 1 "/usr/include/stdc-predef.h" 1 3 4++# 17 "/usr/include/stdc-predef.h" 3 4++++++++++++++++++++++++{-# LINE 7 "<command-line>" #-}+{-# LINE 1 "templates/GenericTemplate.hs" #-}+-- -----------------------------------------------------------------------------+-- ALEX TEMPLATE+--+-- This code is in the PUBLIC DOMAIN; you may copy it freely and use+-- it for any purpose whatsoever.++-- -----------------------------------------------------------------------------+-- INTERNALS and main scanner engine++{-# LINE 21 "templates/GenericTemplate.hs" #-}++++++-- Do not remove this comment. Required to fix CPP parsing when using GCC and a clang-compiled alex.+#if __GLASGOW_HASKELL__ > 706+#define GTE(n,m) (tagToEnum# (n >=# m))+#define EQ(n,m) (tagToEnum# (n ==# m))+#else+#define GTE(n,m) (n >=# m)+#define EQ(n,m) (n ==# m)+#endif+{-# LINE 51 "templates/GenericTemplate.hs" #-}+++data AlexAddr = AlexA# Addr#+-- Do not remove this comment. Required to fix CPP parsing when using GCC and a clang-compiled alex.+#if __GLASGOW_HASKELL__ < 503+uncheckedShiftL# = shiftL#+#endif++{-# INLINE alexIndexInt16OffAddr #-}+alexIndexInt16OffAddr (AlexA# arr) off =+#ifdef WORDS_BIGENDIAN+  narrow16Int# i+  where+        i    = word2Int# ((high `uncheckedShiftL#` 8#) `or#` low)+        high = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1#)))+        low  = int2Word# (ord# (indexCharOffAddr# arr off'))+        off' = off *# 2#+#else+  indexInt16OffAddr# arr off+#endif++++++{-# INLINE alexIndexInt32OffAddr #-}+alexIndexInt32OffAddr (AlexA# arr) off = +#ifdef WORDS_BIGENDIAN+  narrow32Int# i+  where+   i    = word2Int# ((b3 `uncheckedShiftL#` 24#) `or#`+		     (b2 `uncheckedShiftL#` 16#) `or#`+		     (b1 `uncheckedShiftL#` 8#) `or#` b0)+   b3   = int2Word# (ord# (indexCharOffAddr# arr (off' +# 3#)))+   b2   = int2Word# (ord# (indexCharOffAddr# arr (off' +# 2#)))+   b1   = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1#)))+   b0   = int2Word# (ord# (indexCharOffAddr# arr off'))+   off' = off *# 4#+#else+  indexInt32OffAddr# arr off+#endif+++++++#if __GLASGOW_HASKELL__ < 503+quickIndex arr i = arr ! i+#else+-- GHC >= 503, unsafeAt is available from Data.Array.Base.+quickIndex = unsafeAt+#endif+++++-- -----------------------------------------------------------------------------+-- Main lexing routines++data AlexReturn a+  = AlexEOF+  | AlexError  !AlexInput+  | AlexSkip   !AlexInput !Int+  | AlexToken  !AlexInput !Int a++-- alexScan :: AlexInput -> StartCode -> AlexReturn a+alexScan input (I# (sc))+  = alexScanUser undefined input (I# (sc))++alexScanUser user input (I# (sc))+  = case alex_scan_tkn user input 0# input sc AlexNone of+	(AlexNone, input') ->+		case alexGetByte input of+			Nothing -> ++++				   AlexEOF+			Just _ ->++++				   AlexError input'++	(AlexLastSkip input'' len, _) ->++++		AlexSkip input'' len++	(AlexLastAcc k input''' len, _) ->++++		AlexToken input''' len k+++-- Push the input through the DFA, remembering the most recent accepting+-- state it encountered.++alex_scan_tkn user orig_input len input s last_acc =+  input `seq` -- strict in the input+  let +	new_acc = (check_accs (alex_accept `quickIndex` (I# (s))))+  in+  new_acc `seq`+  case alexGetByte input of+     Nothing -> (new_acc, input)+     Just (c, new_input) -> ++++      case fromIntegral c of { (I# (ord_c)) ->+        let+                base   = alexIndexInt32OffAddr alex_base s+                offset = (base +# ord_c)+                check  = alexIndexInt16OffAddr alex_check offset+		+                new_s = if GTE(offset,0#) && EQ(check,ord_c)+			  then alexIndexInt16OffAddr alex_table offset+			  else alexIndexInt16OffAddr alex_deflt s+	in+        case new_s of+	    -1# -> (new_acc, input)+		-- on an error, we want to keep the input *before* the+		-- character that failed, not after.+    	    _ -> alex_scan_tkn user orig_input (if c < 0x80 || c >= 0xC0 then (len +# 1#) else len)+                                                -- note that the length is increased ONLY if this is the 1st byte in a char encoding)+			new_input new_s new_acc+      }+  where+	check_accs (AlexAccNone) = last_acc+	check_accs (AlexAcc a  ) = AlexLastAcc a input (I# (len))+	check_accs (AlexAccSkip) = AlexLastSkip  input (I# (len))+{-# LINE 198 "templates/GenericTemplate.hs" #-}++data AlexLastAcc a+  = AlexNone+  | AlexLastAcc a !AlexInput !Int+  | AlexLastSkip  !AlexInput !Int++instance Functor AlexLastAcc where+    fmap f AlexNone = AlexNone+    fmap f (AlexLastAcc x y z) = AlexLastAcc (f x) y z+    fmap f (AlexLastSkip x y) = AlexLastSkip x y++data AlexAcc a user+  = AlexAccNone+  | AlexAcc a+  | AlexAccSkip+{-# LINE 242 "templates/GenericTemplate.hs" #-}++-- used by wrappers+iUnbox (I# (i)) = i
+ dist/build/bnfc/bnfc-tmp/ParBNF.hs view
@@ -0,0 +1,1751 @@+{-# OPTIONS_GHC -w #-}+{-# OPTIONS -fglasgow-exts -cpp #-}+{-# OPTIONS_GHC -fno-warn-incomplete-patterns -fno-warn-overlapping-patterns #-}+module ParBNF where+import AbsBNF+import LexBNF+import ErrM+import qualified Data.Array as Happy_Data_Array+import qualified GHC.Exts as Happy_GHC_Exts+import Control.Applicative(Applicative(..))++-- parser produced by Happy Version 1.19.4++newtype HappyAbsSyn  = HappyAbsSyn HappyAny+#if __GLASGOW_HASKELL__ >= 607+type HappyAny = Happy_GHC_Exts.Any+#else+type HappyAny = forall a . a+#endif+happyIn36 :: (String) -> (HappyAbsSyn )+happyIn36 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn36 #-}+happyOut36 :: (HappyAbsSyn ) -> (String)+happyOut36 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut36 #-}+happyIn37 :: (Ident) -> (HappyAbsSyn )+happyIn37 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn37 #-}+happyOut37 :: (HappyAbsSyn ) -> (Ident)+happyOut37 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut37 #-}+happyIn38 :: (Integer) -> (HappyAbsSyn )+happyIn38 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn38 #-}+happyOut38 :: (HappyAbsSyn ) -> (Integer)+happyOut38 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut38 #-}+happyIn39 :: (Char) -> (HappyAbsSyn )+happyIn39 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn39 #-}+happyOut39 :: (HappyAbsSyn ) -> (Char)+happyOut39 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut39 #-}+happyIn40 :: (Double) -> (HappyAbsSyn )+happyIn40 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn40 #-}+happyOut40 :: (HappyAbsSyn ) -> (Double)+happyOut40 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut40 #-}+happyIn41 :: (LGrammar) -> (HappyAbsSyn )+happyIn41 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn41 #-}+happyOut41 :: (HappyAbsSyn ) -> (LGrammar)+happyOut41 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut41 #-}+happyIn42 :: (LDef) -> (HappyAbsSyn )+happyIn42 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn42 #-}+happyOut42 :: (HappyAbsSyn ) -> (LDef)+happyOut42 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut42 #-}+happyIn43 :: ([LDef]) -> (HappyAbsSyn )+happyIn43 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn43 #-}+happyOut43 :: (HappyAbsSyn ) -> ([LDef])+happyOut43 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut43 #-}+happyIn44 :: (Grammar) -> (HappyAbsSyn )+happyIn44 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn44 #-}+happyOut44 :: (HappyAbsSyn ) -> (Grammar)+happyOut44 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut44 #-}+happyIn45 :: ([Def]) -> (HappyAbsSyn )+happyIn45 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn45 #-}+happyOut45 :: (HappyAbsSyn ) -> ([Def])+happyOut45 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut45 #-}+happyIn46 :: ([Item]) -> (HappyAbsSyn )+happyIn46 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn46 #-}+happyOut46 :: (HappyAbsSyn ) -> ([Item])+happyOut46 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut46 #-}+happyIn47 :: (Def) -> (HappyAbsSyn )+happyIn47 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn47 #-}+happyOut47 :: (HappyAbsSyn ) -> (Def)+happyOut47 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut47 #-}+happyIn48 :: (Item) -> (HappyAbsSyn )+happyIn48 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn48 #-}+happyOut48 :: (HappyAbsSyn ) -> (Item)+happyOut48 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut48 #-}+happyIn49 :: (Cat) -> (HappyAbsSyn )+happyIn49 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn49 #-}+happyOut49 :: (HappyAbsSyn ) -> (Cat)+happyOut49 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut49 #-}+happyIn50 :: (Label) -> (HappyAbsSyn )+happyIn50 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn50 #-}+happyOut50 :: (HappyAbsSyn ) -> (Label)+happyOut50 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut50 #-}+happyIn51 :: (LabelId) -> (HappyAbsSyn )+happyIn51 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn51 #-}+happyOut51 :: (HappyAbsSyn ) -> (LabelId)+happyOut51 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut51 #-}+happyIn52 :: (ProfItem) -> (HappyAbsSyn )+happyIn52 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn52 #-}+happyOut52 :: (HappyAbsSyn ) -> (ProfItem)+happyOut52 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut52 #-}+happyIn53 :: (IntList) -> (HappyAbsSyn )+happyIn53 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn53 #-}+happyOut53 :: (HappyAbsSyn ) -> (IntList)+happyOut53 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut53 #-}+happyIn54 :: ([Integer]) -> (HappyAbsSyn )+happyIn54 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn54 #-}+happyOut54 :: (HappyAbsSyn ) -> ([Integer])+happyOut54 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut54 #-}+happyIn55 :: ([IntList]) -> (HappyAbsSyn )+happyIn55 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn55 #-}+happyOut55 :: (HappyAbsSyn ) -> ([IntList])+happyOut55 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut55 #-}+happyIn56 :: ([ProfItem]) -> (HappyAbsSyn )+happyIn56 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn56 #-}+happyOut56 :: (HappyAbsSyn ) -> ([ProfItem])+happyOut56 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut56 #-}+happyIn57 :: (Separation) -> (HappyAbsSyn )+happyIn57 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn57 #-}+happyOut57 :: (HappyAbsSyn ) -> (Separation)+happyOut57 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut57 #-}+happyIn58 :: (Arg) -> (HappyAbsSyn )+happyIn58 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn58 #-}+happyOut58 :: (HappyAbsSyn ) -> (Arg)+happyOut58 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut58 #-}+happyIn59 :: ([Arg]) -> (HappyAbsSyn )+happyIn59 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn59 #-}+happyOut59 :: (HappyAbsSyn ) -> ([Arg])+happyOut59 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut59 #-}+happyIn60 :: (Exp) -> (HappyAbsSyn )+happyIn60 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn60 #-}+happyOut60 :: (HappyAbsSyn ) -> (Exp)+happyOut60 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut60 #-}+happyIn61 :: (Exp) -> (HappyAbsSyn )+happyIn61 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn61 #-}+happyOut61 :: (HappyAbsSyn ) -> (Exp)+happyOut61 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut61 #-}+happyIn62 :: (Exp) -> (HappyAbsSyn )+happyIn62 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn62 #-}+happyOut62 :: (HappyAbsSyn ) -> (Exp)+happyOut62 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut62 #-}+happyIn63 :: ([Exp]) -> (HappyAbsSyn )+happyIn63 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn63 #-}+happyOut63 :: (HappyAbsSyn ) -> ([Exp])+happyOut63 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut63 #-}+happyIn64 :: ([Exp]) -> (HappyAbsSyn )+happyIn64 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn64 #-}+happyOut64 :: (HappyAbsSyn ) -> ([Exp])+happyOut64 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut64 #-}+happyIn65 :: ([String]) -> (HappyAbsSyn )+happyIn65 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn65 #-}+happyOut65 :: (HappyAbsSyn ) -> ([String])+happyOut65 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut65 #-}+happyIn66 :: ([RHS]) -> (HappyAbsSyn )+happyIn66 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn66 #-}+happyOut66 :: (HappyAbsSyn ) -> ([RHS])+happyOut66 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut66 #-}+happyIn67 :: (RHS) -> (HappyAbsSyn )+happyIn67 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn67 #-}+happyOut67 :: (HappyAbsSyn ) -> (RHS)+happyOut67 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut67 #-}+happyIn68 :: (MinimumSize) -> (HappyAbsSyn )+happyIn68 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn68 #-}+happyOut68 :: (HappyAbsSyn ) -> (MinimumSize)+happyOut68 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut68 #-}+happyIn69 :: (Reg) -> (HappyAbsSyn )+happyIn69 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn69 #-}+happyOut69 :: (HappyAbsSyn ) -> (Reg)+happyOut69 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut69 #-}+happyIn70 :: (Reg) -> (HappyAbsSyn )+happyIn70 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn70 #-}+happyOut70 :: (HappyAbsSyn ) -> (Reg)+happyOut70 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut70 #-}+happyIn71 :: (Reg) -> (HappyAbsSyn )+happyIn71 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn71 #-}+happyOut71 :: (HappyAbsSyn ) -> (Reg)+happyOut71 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut71 #-}+happyIn72 :: (Reg) -> (HappyAbsSyn )+happyIn72 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn72 #-}+happyOut72 :: (HappyAbsSyn ) -> (Reg)+happyOut72 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut72 #-}+happyIn73 :: ([Ident]) -> (HappyAbsSyn )+happyIn73 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn73 #-}+happyOut73 :: (HappyAbsSyn ) -> ([Ident])+happyOut73 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut73 #-}+happyInTok :: (Token) -> (HappyAbsSyn )+happyInTok x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyInTok #-}+happyOutTok :: (HappyAbsSyn ) -> (Token)+happyOutTok x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOutTok #-}+++happyActOffsets :: HappyAddr+happyActOffsets = HappyA# "\x45\x00\x45\x00\x45\x00\x64\x00\x64\x00\x00\x00\x64\x00\xbc\x00\xbd\x00\x71\x00\x71\x00\xda\x01\xd9\x01\xd8\x01\xd6\x01\xd7\x01\x7e\x01\xd5\x01\x00\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\xd4\x01\x00\x00\x00\x00\xd3\x01\x29\x00\x29\x00\x29\x00\x29\x00\xd2\x01\xcc\x01\x00\x00\xd1\x01\xcb\x01\x00\x00\x00\x00\x11\x00\xd0\x01\x89\x01\xc8\x01\x29\x00\xc9\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc9\x01\x00\x00\x3e\x00\xe2\xff\x01\x00\xc5\x01\x00\x00\xbc\x00\xc5\x01\xc5\x01\xc4\x01\xcf\x01\xc3\x01\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\xce\x01\xca\x01\x00\x00\xc2\x01\x07\x00\x07\x00\x00\x00\x00\x00\x00\x00\x07\x00\xc2\x01\xc2\x01\xc2\x01\xc2\x01\x6a\x01\x00\x00\xc2\x01\xc2\x01\xc1\x01\xc1\x01\xcd\x01\xbf\x01\xc0\x01\xc7\x01\xbe\x01\xbc\x01\xc6\x01\xba\x01\xba\x01\xba\x01\x00\x00\xba\x01\xbd\x01\xb9\x01\x00\x00\xb4\x01\x5e\x00\x00\x00\xb4\x01\xbd\x00\x00\x00\xb4\x01\x00\x00\xb4\x01\xbb\x01\xb6\x01\xb5\x01\xb3\x01\xbd\x00\xb3\x01\x44\x00\x68\x01\xaf\x01\xad\x01\xa8\x01\xa8\x01\xa6\x01\x7c\x00\x9c\x01\xb7\x01\x9b\x01\x00\x00\x8b\x00\xb0\x01\x9a\x01\x00\x00\xb8\x01\x99\x01\x98\x01\x98\x01\x00\x00\x00\x00\x64\x00\x45\x00\x93\x01\x64\x00\x00\x00\x29\x00\xbd\x00\xbd\x00\xb2\x01\x8e\x01\x00\x00\x96\x01\x00\x00\xae\x01\x00\x00\x95\x01\x00\x00\x95\x01\x91\x01\xbd\x00\xab\x01\xb1\x01\x00\x00\xfe\xff\x00\x00\x6e\x00\x84\x01\xa9\x01\xa7\x01\xa7\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa5\x01\xac\x01\x07\x00\x07\x00\x00\x00\x8d\x01\x00\x00\x10\x01\x29\x00\x00\x00\x00\x00\x00\x00\x85\x01\xa3\x01\xaa\x01\x29\x00\x29\x00\x00\x00\x00\x00\x00\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x01\x00\x00\x00\x00\x00\x00\x00\x00\x9d\x01\x00\x00\x00\x00\xa1\x01\x00\x00\x00\x00\xf6\xff\x80\x01\xbd\x00\x00\x00\x29\x00\x00\x00\x80\x01\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x01\x7e\x01\x07\x00\x00\x00\xa4\x01\xa0\x01\x97\x01\x00\x00\xbc\x00\x00\x00\x8c\x01\x00\x00\xbc\x00\x00\x00\x78\x01\x94\x01\x9f\x01\x00\x00\x00\x00"#++happyGotoOffsets :: HappyAddr+happyGotoOffsets = HappyA# "\x86\x00\xa3\x00\xa1\x00\x58\x01\x6e\x01\x90\x01\x70\x01\x82\x01\x86\x01\x77\x01\x06\x00\x87\x01\x8f\x01\xb2\x00\x8b\x01\x48\x01\x74\x01\x0c\x00\x7f\x01\x30\x01\x4b\x01\x50\x01\x05\x01\xf6\x00\xc7\x00\x3c\x01\x31\x00\x3e\x01\xc0\x00\xb0\x00\x46\x00\xaa\x00\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x92\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8a\x01\x00\x00\x00\x00\x00\x00\x1c\x00\x00\x00\x00\x00\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x01\xd9\x00\x00\x00\x00\x00\x00\x00\xfb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x7a\x01\x6b\x01\x28\x01\x00\x00\x00\x00\x00\x00\x00\x00\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x01\x00\x00\x00\x00\x83\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x73\x01\x5d\x01\x56\x01\x61\x01\x22\x00\x72\x01\xc5\x00\x00\x00\x46\x01\x1d\x01\xfe\x00\x0b\x01\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5e\x01\x91\x00\x04\x00\x67\x01\x00\x00\x9a\x00\x35\x01\x0a\x01\x00\x00\xee\x00\x00\x00\x79\x00\x00\x00\x00\x00\x00\x00\xe9\x00\xfc\xff\xe0\x00\xce\x00\xe7\x00\x00\x00\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7d\x00\x00\x00\x88\x01\x24\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x26\x01\xd4\x00\x00\x00\x4b\x00\x37\x01\x00\x00\x39\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x1c\x00\x00\x00\x00\x00\x00\x00\x1c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\xcf\x00\x02\x00\x00\x00\x96\x00\x42\x00\xb5\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8e\x00\x21\x01\x94\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\x00\x00\x00\xec\xff\x13\x00\xde\x00\x00\x00\x72\x00\x00\x00\x00\x00\x00\x00\x00\x00"#++happyDefActions :: HappyAddr+happyDefActions = HappyA# "\xd5\xff\x00\x00\xd5\xff\xd1\xff\xd1\xff\xce\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\xff\xaa\xff\x00\x00\xa5\xff\x00\x00\xa1\xff\x00\x00\x00\x00\x00\x00\x00\x00\x92\xff\x00\x00\xce\xff\xce\xff\x89\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\xff\x75\xff\x00\x00\xdd\xff\x7f\xff\x84\xff\x76\xff\x87\xff\x00\x00\x00\x00\x00\x00\x78\xff\x7c\xff\x80\xff\x7b\xff\x79\xff\x7a\xff\x00\x00\xdb\xff\x00\x00\x00\x00\x00\x00\x00\x00\x8a\xff\x8b\xff\x00\x00\x00\x00\x8d\xff\x8f\xff\x00\x00\x98\xff\x9b\xff\x9a\xff\x99\xff\x97\xff\x91\xff\x9e\xff\x9c\xff\x00\x00\x00\x00\x92\xff\xdc\xff\xda\xff\x9b\xff\x94\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\xff\x00\x00\x00\x00\x00\x00\x00\x00\xa7\xff\x00\x00\x00\x00\xa9\xff\x00\x00\xad\xff\xac\xff\x00\x00\x00\x00\x00\x00\xb4\xff\x00\x00\x00\x00\x00\x00\xb3\xff\x00\x00\xb8\xff\xb9\xff\x00\x00\x00\x00\xbc\xff\x00\x00\xbb\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x89\xff\x89\xff\x00\x00\x00\x00\x00\x00\xd0\xff\x00\x00\xd2\xff\xb4\xff\xd4\xff\x00\x00\xd8\xff\x00\x00\x00\x00\x00\x00\x00\x00\xd9\xff\xd6\xff\x00\x00\xd5\xff\x00\x00\xd1\xff\xcd\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbf\xff\x00\x00\xbd\xff\x00\x00\xc6\xff\x00\x00\xa1\xff\xcb\xff\x00\x00\x00\x00\x00\x00\xb5\xff\xb7\xff\x00\x00\xb2\xff\x00\x00\xad\xff\x00\x00\xaa\xff\xaa\xff\xa6\xff\xa4\xff\xa3\xff\xa0\xff\x93\xff\x00\x00\x00\x00\x00\x00\x92\xff\x9d\xff\x00\x00\xce\xff\x88\xff\x00\x00\x83\xff\x82\xff\x81\xff\x00\x00\x00\x00\x00\x00\x00\x00\x85\xff\x77\xff\x7e\xff\x7d\xff\x86\xff\x8c\xff\x8e\xff\x90\xff\x9f\xff\x95\xff\x96\xff\x00\x00\xa8\xff\xae\xff\xab\xff\xb1\xff\x00\x00\xb6\xff\xba\xff\x00\x00\xc2\xff\xca\xff\x00\x00\x00\x00\x00\x00\xbe\xff\x00\x00\xce\xff\x00\x00\x00\x00\xc8\xff\xcf\xff\x74\xff\xd3\xff\xd7\xff\xc4\xff\xc5\xff\xc1\xff\xc7\xff\x00\x00\xa5\xff\x00\x00\xce\xff\x00\x00\x00\x00\x00\x00\xb0\xff\xcc\xff\xc0\xff\x89\xff\xce\xff\xc9\xff\xc3\xff\xad\xff\x00\x00\x00\x00\xaf\xff"#++happyCheck :: HappyAddr+happyCheck = HappyA# "\xff\xff\x0b\x00\x01\x00\x01\x00\x01\x00\x01\x00\x08\x00\x01\x00\x01\x00\x27\x00\x01\x00\x0d\x00\x20\x00\x01\x00\x0d\x00\x0d\x00\x2e\x00\x10\x00\x01\x00\x17\x00\x0d\x00\x0f\x00\x15\x00\x06\x00\x17\x00\x16\x00\x03\x00\x1a\x00\x1b\x00\x0a\x00\x0d\x00\x03\x00\x2a\x00\x10\x00\x16\x00\x01\x00\x01\x00\x24\x00\x15\x00\x26\x00\x17\x00\x25\x00\x01\x00\x1a\x00\x1b\x00\x2c\x00\x25\x00\x2e\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x24\x00\x0d\x00\x26\x00\x21\x00\x10\x00\x23\x00\x0a\x00\x03\x00\x2c\x00\x15\x00\x23\x00\x17\x00\x03\x00\x04\x00\x1a\x00\x1b\x00\x01\x00\x01\x00\x25\x00\x25\x00\x03\x00\x0c\x00\x00\x00\x0a\x00\x24\x00\x00\x00\x26\x00\x1f\x00\x0d\x00\x0d\x00\x0f\x00\x0f\x00\x2c\x00\x11\x00\x12\x00\x13\x00\x14\x00\x21\x00\x16\x00\x23\x00\x18\x00\x19\x00\x01\x00\x1e\x00\x1f\x00\x1d\x00\x1e\x00\x1f\x00\x01\x00\x21\x00\x22\x00\x1d\x00\x23\x00\x25\x00\x0d\x00\x2e\x00\x0f\x00\x2a\x00\x2a\x00\x02\x00\x0d\x00\x01\x00\x0f\x00\x02\x00\x11\x00\x12\x00\x13\x00\x14\x00\x00\x00\x16\x00\x0d\x00\x18\x00\x19\x00\x0d\x00\x02\x00\x0f\x00\x1d\x00\x1e\x00\x1f\x00\x12\x00\x21\x00\x22\x00\x01\x00\x2a\x00\x0d\x00\x02\x00\x05\x00\x06\x00\x07\x00\x2a\x00\x12\x00\x05\x00\x0b\x00\x01\x00\x08\x00\x0e\x00\x0f\x00\x1d\x00\x06\x00\x07\x00\x03\x00\x12\x00\x2a\x00\x0b\x00\x03\x00\x0a\x00\x0e\x00\x0f\x00\x03\x00\x01\x00\x15\x00\x01\x00\x29\x00\x2a\x00\x06\x00\x07\x00\x06\x00\x2e\x00\x25\x00\x0b\x00\x03\x00\x0b\x00\x0e\x00\x0f\x00\x0e\x00\x0f\x00\x03\x00\x02\x00\x00\x00\x25\x00\x21\x00\x22\x00\x23\x00\x24\x00\x21\x00\x22\x00\x23\x00\x24\x00\x21\x00\x22\x00\x23\x00\x24\x00\x03\x00\x12\x00\x00\x00\x25\x00\x00\x00\x25\x00\x0d\x00\x0d\x00\x21\x00\x22\x00\x23\x00\x24\x00\x00\x00\x02\x00\x21\x00\x22\x00\x23\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x00\x00\x01\x00\x00\x00\x21\x00\x1d\x00\x23\x00\x1d\x00\x29\x00\x2a\x00\x2a\x00\x01\x00\x00\x00\x0c\x00\x0d\x00\x18\x00\x19\x00\x1a\x00\x01\x00\x1c\x00\x18\x00\x19\x00\x1a\x00\x0d\x00\x1c\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x01\x00\x01\x00\x01\x00\x10\x00\x18\x00\x19\x00\x1a\x00\x14\x00\x1c\x00\x03\x00\x04\x00\x1a\x00\x1b\x00\x0d\x00\x0f\x00\x10\x00\x1a\x00\x1b\x00\x0c\x00\x14\x00\x20\x00\x1a\x00\x1b\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x11\x00\x01\x00\x13\x00\x10\x00\x18\x00\x19\x00\x1a\x00\x14\x00\x20\x00\x18\x00\x19\x00\x1a\x00\x0a\x00\x0d\x00\x18\x00\x19\x00\x1a\x00\x0a\x00\x01\x00\x18\x00\x19\x00\x1a\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x1e\x00\x1f\x00\x01\x00\x10\x00\x01\x00\x1e\x00\x1f\x00\x14\x00\x00\x00\x20\x00\x01\x00\x08\x00\x09\x00\x01\x00\x0b\x00\x19\x00\x1a\x00\x0e\x00\x0f\x00\x01\x00\x0b\x00\x1a\x00\x00\x00\x0e\x00\x0f\x00\x0d\x00\x01\x00\x09\x00\x01\x00\x0b\x00\x01\x00\x01\x00\x0e\x00\x0f\x00\x09\x00\x01\x00\x0b\x00\x00\x00\x0b\x00\x0e\x00\x0f\x00\x0e\x00\x0f\x00\x0e\x00\x0f\x00\x00\x00\x01\x00\x01\x00\x0e\x00\x0f\x00\x01\x00\x20\x00\x15\x00\x00\x00\x23\x00\x03\x00\x04\x00\x0c\x00\x0d\x00\x0d\x00\x29\x00\x00\x00\x0d\x00\x2a\x00\x0c\x00\x17\x00\x10\x00\x2e\x00\x11\x00\x0a\x00\x13\x00\x11\x00\x1f\x00\x13\x00\x21\x00\x11\x00\x02\x00\x0e\x00\x2b\x00\x0d\x00\x05\x00\x02\x00\x09\x00\x1c\x00\x29\x00\x09\x00\x0e\x00\x02\x00\x28\x00\x02\x00\x2b\x00\x0e\x00\x0e\x00\x01\x00\x0e\x00\x0d\x00\x07\x00\x29\x00\x0e\x00\x2a\x00\x0e\x00\x0a\x00\x09\x00\x2b\x00\x2a\x00\x29\x00\x29\x00\x08\x00\x0a\x00\x07\x00\x2a\x00\x1c\x00\x08\x00\x2e\x00\x0e\x00\x2e\x00\x2e\x00\x2e\x00\x05\x00\x05\x00\x0d\x00\x01\x00\xff\xff\x2a\x00\x22\x00\x08\x00\x05\x00\x05\x00\xff\xff\x05\x00\x2a\x00\x01\x00\xff\xff\xff\xff\x01\x00\xff\xff\x2a\x00\x29\x00\xff\xff\x2a\x00\xff\xff\x2e\x00\x0d\x00\xff\xff\xff\xff\x0d\x00\x2b\x00\x2e\x00\xff\xff\x29\x00\x27\x00\x2e\x00\x2e\x00\xff\xff\x1c\x00\x2e\x00\x2e\x00\x29\x00\x2e\x00\xff\xff\x29\x00\x2e\x00\x27\x00\xff\xff\x2e\x00\xff\xff\xff\xff\x2a\x00\x29\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#++happyTable :: HappyAddr+happyTable = HappyA# "\x00\x00\xea\x00\x2c\x00\x6a\x00\x54\x00\x23\x00\xa7\x00\x63\x00\x4a\x00\xb9\x00\x23\x00\xab\x00\xf4\x00\x54\x00\x2d\x00\xe7\x00\xff\xff\x2e\x00\x2c\x00\xd6\x00\x4b\x00\x64\x00\x2f\x00\xc0\x00\x30\x00\xae\x00\x26\x00\x31\x00\x32\x00\xf3\x00\x2d\x00\x26\x00\x26\x00\x2e\x00\x55\x00\x23\x00\x23\x00\x33\x00\x2f\x00\x34\x00\x30\x00\xe0\x00\x2c\x00\x31\x00\x32\x00\x35\x00\x8c\x00\xff\xff\x23\x00\x26\x00\x4c\x00\x35\x00\x4d\x00\x33\x00\x2d\x00\x34\x00\xc0\x00\x2e\x00\x29\x00\x3a\x00\x26\x00\x35\x00\x2f\x00\xb7\x00\x30\x00\xba\x00\xbb\x00\x31\x00\x32\x00\x66\x00\x66\x00\x9b\x00\x24\x00\x26\x00\xbc\x00\x3e\x00\x3a\x00\x33\x00\xe3\x00\x34\x00\x3b\x00\x67\x00\x67\x00\x68\x00\x68\x00\x35\x00\x73\x00\x74\x00\x75\x00\x76\x00\xc4\x00\x77\x00\x29\x00\x78\x00\x79\x00\xa5\x00\xe5\x00\x3d\x00\x7a\x00\x7b\x00\x7c\x00\x66\x00\x7d\x00\x7e\x00\xc6\x00\x35\x00\x89\x00\x67\x00\xff\xff\x68\x00\x26\x00\x26\x00\xd0\x00\x67\x00\x66\x00\x68\x00\x5f\x00\x73\x00\x74\x00\x75\x00\x76\x00\x3e\x00\x77\x00\xd1\x00\x78\x00\x79\x00\x67\x00\x5f\x00\x68\x00\x7a\x00\x7b\x00\x7c\x00\xf6\x00\x7d\x00\x7e\x00\x83\x00\x26\x00\x6d\x00\x5f\x00\x8a\x00\x84\x00\x8b\x00\x26\x00\xce\x00\x90\x00\x86\x00\x83\x00\x75\xff\x71\x00\x69\x00\xd9\x00\x84\x00\xe1\x00\x26\x00\xa8\x00\x26\x00\x86\x00\x26\x00\xef\x00\x71\x00\x69\x00\x26\x00\x83\x00\xf1\x00\x83\x00\x23\x00\x26\x00\x84\x00\x85\x00\x89\x00\xff\xff\x87\x00\x86\x00\x26\x00\x86\x00\x71\x00\x69\x00\x71\x00\x69\x00\x26\x00\x5f\x00\xe4\x00\x87\x00\x27\x00\x28\x00\x29\x00\xe6\x00\x27\x00\x28\x00\x29\x00\xde\x00\x27\x00\x28\x00\x29\x00\xbe\x00\x26\x00\x60\x00\x3e\x00\x87\x00\x3e\x00\x87\x00\x6d\x00\x6d\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xe8\x00\xd4\x00\x27\x00\x36\x00\x29\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x6d\x00\x6a\x00\xd5\x00\x37\x00\x97\x00\x29\x00\x3f\x00\x23\x00\x26\x00\x26\x00\x6a\x00\xd7\x00\x91\x00\x6f\x00\x45\x00\x46\x00\x47\x00\xda\x00\xc7\x00\x45\x00\x46\x00\x47\x00\xd3\x00\xb0\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x40\x00\x4d\x00\x42\x00\x43\x00\x44\x00\x40\x00\x4d\x00\x42\x00\x43\x00\x44\x00\x40\x00\x4d\x00\x42\x00\x43\x00\x44\x00\x63\x00\x6a\x00\x92\x00\x59\x00\x45\x00\x46\x00\x47\x00\xd1\x00\x48\x00\xba\x00\xbb\x00\x4e\x00\xaf\x00\xdc\x00\xa2\x00\x59\x00\x4e\x00\xb4\x00\xbc\x00\xa3\x00\x93\x00\x4e\x00\x4f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x5c\x00\x6a\x00\xcb\x00\x59\x00\xf0\x00\x46\x00\x47\x00\xab\x00\x94\x00\xc8\x00\x46\x00\x47\x00\x3a\x00\xdd\x00\xb1\x00\x46\x00\x47\x00\x3a\x00\x95\x00\x52\x00\x46\x00\x47\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x40\x00\x4d\x00\x42\x00\x43\x00\x44\x00\xc5\x00\x3d\x00\x9d\x00\x59\x00\x63\x00\x3c\x00\x3d\x00\x5a\x00\x9e\x00\x38\x00\x63\x00\x81\x00\x82\x00\x6a\x00\x80\x00\x51\x00\x47\x00\x71\x00\x69\x00\x63\x00\xe2\x00\x50\x00\xac\x00\x71\x00\x69\x00\x9c\x00\x63\x00\xdf\x00\x63\x00\x80\x00\x63\x00\x9f\x00\x71\x00\x69\x00\x7f\x00\x63\x00\x80\x00\xad\x00\x70\x00\x71\x00\x69\x00\x71\x00\x69\x00\x9a\x00\x69\x00\x6d\x00\x6a\x00\x6a\x00\x68\x00\x69\x00\x6a\x00\x99\x00\x56\x00\xbc\x00\x9a\x00\xba\x00\xbb\x00\x6e\x00\x6f\x00\xa1\x00\x23\x00\xbd\x00\x6b\x00\x26\x00\xbc\x00\x53\x00\x62\x00\xff\xff\x5c\x00\x7e\x00\xcc\x00\x5c\x00\x58\x00\x5d\x00\x59\x00\x61\x00\xf9\x00\xf8\x00\x4c\x00\xf6\x00\xee\x00\xef\x00\xf3\x00\x3a\x00\x23\x00\xeb\x00\xec\x00\xc2\x00\xc4\x00\xca\x00\x4c\x00\xed\x00\xc3\x00\x5c\x00\xcb\x00\x5f\x00\xd9\x00\x23\x00\xce\x00\x26\x00\xd3\x00\x8f\x00\xdc\x00\x4c\x00\x26\x00\x23\x00\x23\x00\x8e\x00\x91\x00\xa1\x00\x26\x00\x3a\x00\xa7\x00\xff\xff\xa6\x00\xff\xff\xff\xff\xff\xff\xa8\x00\xaa\x00\xab\x00\x5c\x00\x00\x00\x26\x00\x97\x00\xb3\x00\xb4\x00\xb6\x00\x00\x00\x90\x00\x26\x00\x5c\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x26\x00\x23\x00\x00\x00\x26\x00\x00\x00\xff\xff\x5f\x00\x00\x00\x00\x00\x5f\x00\x4c\x00\xff\xff\x00\x00\x23\x00\xb7\x00\xff\xff\xff\xff\x00\x00\x3a\x00\xff\xff\xff\xff\x23\x00\xff\xff\x00\x00\x23\x00\xff\xff\xb9\x00\x00\x00\xff\xff\x00\x00\x00\x00\x26\x00\x23\x00\x00\x00\x26\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#++happyReduceArr = Happy_Data_Array.array (33, 139) [+	(33 , happyReduce_33),+	(34 , happyReduce_34),+	(35 , happyReduce_35),+	(36 , happyReduce_36),+	(37 , happyReduce_37),+	(38 , happyReduce_38),+	(39 , happyReduce_39),+	(40 , happyReduce_40),+	(41 , happyReduce_41),+	(42 , happyReduce_42),+	(43 , happyReduce_43),+	(44 , happyReduce_44),+	(45 , happyReduce_45),+	(46 , happyReduce_46),+	(47 , happyReduce_47),+	(48 , happyReduce_48),+	(49 , happyReduce_49),+	(50 , happyReduce_50),+	(51 , happyReduce_51),+	(52 , happyReduce_52),+	(53 , happyReduce_53),+	(54 , happyReduce_54),+	(55 , happyReduce_55),+	(56 , happyReduce_56),+	(57 , happyReduce_57),+	(58 , happyReduce_58),+	(59 , happyReduce_59),+	(60 , happyReduce_60),+	(61 , happyReduce_61),+	(62 , happyReduce_62),+	(63 , happyReduce_63),+	(64 , happyReduce_64),+	(65 , happyReduce_65),+	(66 , happyReduce_66),+	(67 , happyReduce_67),+	(68 , happyReduce_68),+	(69 , happyReduce_69),+	(70 , happyReduce_70),+	(71 , happyReduce_71),+	(72 , happyReduce_72),+	(73 , happyReduce_73),+	(74 , happyReduce_74),+	(75 , happyReduce_75),+	(76 , happyReduce_76),+	(77 , happyReduce_77),+	(78 , happyReduce_78),+	(79 , happyReduce_79),+	(80 , happyReduce_80),+	(81 , happyReduce_81),+	(82 , happyReduce_82),+	(83 , happyReduce_83),+	(84 , happyReduce_84),+	(85 , happyReduce_85),+	(86 , happyReduce_86),+	(87 , happyReduce_87),+	(88 , happyReduce_88),+	(89 , happyReduce_89),+	(90 , happyReduce_90),+	(91 , happyReduce_91),+	(92 , happyReduce_92),+	(93 , happyReduce_93),+	(94 , happyReduce_94),+	(95 , happyReduce_95),+	(96 , happyReduce_96),+	(97 , happyReduce_97),+	(98 , happyReduce_98),+	(99 , happyReduce_99),+	(100 , happyReduce_100),+	(101 , happyReduce_101),+	(102 , happyReduce_102),+	(103 , happyReduce_103),+	(104 , happyReduce_104),+	(105 , happyReduce_105),+	(106 , happyReduce_106),+	(107 , happyReduce_107),+	(108 , happyReduce_108),+	(109 , happyReduce_109),+	(110 , happyReduce_110),+	(111 , happyReduce_111),+	(112 , happyReduce_112),+	(113 , happyReduce_113),+	(114 , happyReduce_114),+	(115 , happyReduce_115),+	(116 , happyReduce_116),+	(117 , happyReduce_117),+	(118 , happyReduce_118),+	(119 , happyReduce_119),+	(120 , happyReduce_120),+	(121 , happyReduce_121),+	(122 , happyReduce_122),+	(123 , happyReduce_123),+	(124 , happyReduce_124),+	(125 , happyReduce_125),+	(126 , happyReduce_126),+	(127 , happyReduce_127),+	(128 , happyReduce_128),+	(129 , happyReduce_129),+	(130 , happyReduce_130),+	(131 , happyReduce_131),+	(132 , happyReduce_132),+	(133 , happyReduce_133),+	(134 , happyReduce_134),+	(135 , happyReduce_135),+	(136 , happyReduce_136),+	(137 , happyReduce_137),+	(138 , happyReduce_138),+	(139 , happyReduce_139)+	]++happy_n_terms = 47 :: Int+happy_n_nonterms = 38 :: Int++happyReduce_33 = happySpecReduce_1  0# happyReduction_33+happyReduction_33 happy_x_1+	 =  case happyOutTok happy_x_1 of { (PT _ (TL happy_var_1)) -> +	happyIn36+		 (happy_var_1+	)}++happyReduce_34 = happySpecReduce_1  1# happyReduction_34+happyReduction_34 happy_x_1+	 =  case happyOutTok happy_x_1 of { (PT _ (TV happy_var_1)) -> +	happyIn37+		 (Ident happy_var_1+	)}++happyReduce_35 = happySpecReduce_1  2# happyReduction_35+happyReduction_35 happy_x_1+	 =  case happyOutTok happy_x_1 of { (PT _ (TI happy_var_1)) -> +	happyIn38+		 ((read ( happy_var_1)) :: Integer+	)}++happyReduce_36 = happySpecReduce_1  3# happyReduction_36+happyReduction_36 happy_x_1+	 =  case happyOutTok happy_x_1 of { (PT _ (TC happy_var_1)) -> +	happyIn39+		 ((read ( happy_var_1)) :: Char+	)}++happyReduce_37 = happySpecReduce_1  4# happyReduction_37+happyReduction_37 happy_x_1+	 =  case happyOutTok happy_x_1 of { (PT _ (TD happy_var_1)) -> +	happyIn40+		 ((read ( happy_var_1)) :: Double+	)}++happyReduce_38 = happySpecReduce_1  5# happyReduction_38+happyReduction_38 happy_x_1+	 =  case happyOut43 happy_x_1 of { happy_var_1 -> +	happyIn41+		 (LGr happy_var_1+	)}++happyReduce_39 = happySpecReduce_1  6# happyReduction_39+happyReduction_39 happy_x_1+	 =  case happyOut47 happy_x_1 of { happy_var_1 -> +	happyIn42+		 (DefAll happy_var_1+	)}++happyReduce_40 = happySpecReduce_3  6# happyReduction_40+happyReduction_40 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut73 happy_x_1 of { happy_var_1 -> +	case happyOut47 happy_x_3 of { happy_var_3 -> +	happyIn42+		 (DefSome happy_var_1 happy_var_3+	)}}++happyReduce_41 = happySpecReduce_2  6# happyReduction_41+happyReduction_41 happy_x_2+	happy_x_1+	 =  case happyOut73 happy_x_2 of { happy_var_2 -> +	happyIn42+		 (LDefView happy_var_2+	)}++happyReduce_42 = happySpecReduce_0  7# happyReduction_42+happyReduction_42  =  happyIn43+		 ([]+	)++happyReduce_43 = happySpecReduce_1  7# happyReduction_43+happyReduction_43 happy_x_1+	 =  case happyOut42 happy_x_1 of { happy_var_1 -> +	happyIn43+		 ((:[]) happy_var_1+	)}++happyReduce_44 = happySpecReduce_3  7# happyReduction_44+happyReduction_44 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut42 happy_x_1 of { happy_var_1 -> +	case happyOut43 happy_x_3 of { happy_var_3 -> +	happyIn43+		 ((:) happy_var_1 happy_var_3+	)}}++happyReduce_45 = happySpecReduce_1  8# happyReduction_45+happyReduction_45 happy_x_1+	 =  case happyOut45 happy_x_1 of { happy_var_1 -> +	happyIn44+		 (Grammar happy_var_1+	)}++happyReduce_46 = happySpecReduce_0  9# happyReduction_46+happyReduction_46  =  happyIn45+		 ([]+	)++happyReduce_47 = happySpecReduce_1  9# happyReduction_47+happyReduction_47 happy_x_1+	 =  case happyOut47 happy_x_1 of { happy_var_1 -> +	happyIn45+		 ((:[]) happy_var_1+	)}++happyReduce_48 = happySpecReduce_3  9# happyReduction_48+happyReduction_48 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut47 happy_x_1 of { happy_var_1 -> +	case happyOut45 happy_x_3 of { happy_var_3 -> +	happyIn45+		 ((:) happy_var_1 happy_var_3+	)}}++happyReduce_49 = happySpecReduce_0  10# happyReduction_49+happyReduction_49  =  happyIn46+		 ([]+	)++happyReduce_50 = happySpecReduce_2  10# happyReduction_50+happyReduction_50 happy_x_2+	happy_x_1+	 =  case happyOut46 happy_x_1 of { happy_var_1 -> +	case happyOut48 happy_x_2 of { happy_var_2 -> +	happyIn46+		 (flip (:) happy_var_1 happy_var_2+	)}}++happyReduce_51 = happyReduce 5# 11# happyReduction_51+happyReduction_51 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut50 happy_x_1 of { happy_var_1 -> +	case happyOut49 happy_x_3 of { happy_var_3 -> +	case happyOut46 happy_x_5 of { happy_var_5 -> +	happyIn47+		 (Rule happy_var_1 happy_var_3 (reverse happy_var_5)+	) `HappyStk` happyRest}}}++happyReduce_52 = happySpecReduce_2  11# happyReduction_52+happyReduction_52 happy_x_2+	happy_x_1+	 =  case happyOut36 happy_x_2 of { happy_var_2 -> +	happyIn47+		 (Comment happy_var_2+	)}++happyReduce_53 = happySpecReduce_3  11# happyReduction_53+happyReduction_53 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut36 happy_x_2 of { happy_var_2 -> +	case happyOut36 happy_x_3 of { happy_var_3 -> +	happyIn47+		 (Comments happy_var_2 happy_var_3+	)}}++happyReduce_54 = happyReduce 6# 11# happyReduction_54+happyReduction_54 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut50 happy_x_2 of { happy_var_2 -> +	case happyOut49 happy_x_4 of { happy_var_4 -> +	case happyOut46 happy_x_6 of { happy_var_6 -> +	happyIn47+		 (Internal happy_var_2 happy_var_4 (reverse happy_var_6)+	) `HappyStk` happyRest}}}++happyReduce_55 = happySpecReduce_3  11# happyReduction_55+happyReduction_55 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut37 happy_x_2 of { happy_var_2 -> +	case happyOut72 happy_x_3 of { happy_var_3 -> +	happyIn47+		 (Token happy_var_2 happy_var_3+	)}}++happyReduce_56 = happyReduce 4# 11# happyReduction_56+happyReduction_56 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut37 happy_x_3 of { happy_var_3 -> +	case happyOut72 happy_x_4 of { happy_var_4 -> +	happyIn47+		 (PosToken happy_var_3 happy_var_4+	) `HappyStk` happyRest}}++happyReduce_57 = happySpecReduce_2  11# happyReduction_57+happyReduction_57 happy_x_2+	happy_x_1+	 =  case happyOut73 happy_x_2 of { happy_var_2 -> +	happyIn47+		 (Entryp happy_var_2+	)}++happyReduce_58 = happyReduce 4# 11# happyReduction_58+happyReduction_58 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut68 happy_x_2 of { happy_var_2 -> +	case happyOut49 happy_x_3 of { happy_var_3 -> +	case happyOut36 happy_x_4 of { happy_var_4 -> +	happyIn47+		 (Separator happy_var_2 happy_var_3 happy_var_4+	) `HappyStk` happyRest}}}++happyReduce_59 = happyReduce 4# 11# happyReduction_59+happyReduction_59 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut68 happy_x_2 of { happy_var_2 -> +	case happyOut49 happy_x_3 of { happy_var_3 -> +	case happyOut36 happy_x_4 of { happy_var_4 -> +	happyIn47+		 (Terminator happy_var_2 happy_var_3 happy_var_4+	) `HappyStk` happyRest}}}++happyReduce_60 = happyReduce 6# 11# happyReduction_60+happyReduction_60 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut49 happy_x_2 of { happy_var_2 -> +	case happyOut36 happy_x_3 of { happy_var_3 -> +	case happyOut36 happy_x_4 of { happy_var_4 -> +	case happyOut57 happy_x_5 of { happy_var_5 -> +	case happyOut68 happy_x_6 of { happy_var_6 -> +	happyIn47+		 (Delimiters happy_var_2 happy_var_3 happy_var_4 happy_var_5 happy_var_6+	) `HappyStk` happyRest}}}}}++happyReduce_61 = happySpecReduce_3  11# happyReduction_61+happyReduction_61 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut37 happy_x_2 of { happy_var_2 -> +	case happyOut38 happy_x_3 of { happy_var_3 -> +	happyIn47+		 (Coercions happy_var_2 happy_var_3+	)}}++happyReduce_62 = happyReduce 4# 11# happyReduction_62+happyReduction_62 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut37 happy_x_2 of { happy_var_2 -> +	case happyOut66 happy_x_4 of { happy_var_4 -> +	happyIn47+		 (Rules happy_var_2 happy_var_4+	) `HappyStk` happyRest}}++happyReduce_63 = happyReduce 5# 11# happyReduction_63+happyReduction_63 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut37 happy_x_2 of { happy_var_2 -> +	case happyOut59 happy_x_3 of { happy_var_3 -> +	case happyOut60 happy_x_5 of { happy_var_5 -> +	happyIn47+		 (Function happy_var_2 (reverse happy_var_3) happy_var_5+	) `HappyStk` happyRest}}}++happyReduce_64 = happySpecReduce_2  11# happyReduction_64+happyReduction_64 happy_x_2+	happy_x_1+	 =  case happyOut65 happy_x_2 of { happy_var_2 -> +	happyIn47+		 (Layout happy_var_2+	)}++happyReduce_65 = happySpecReduce_3  11# happyReduction_65+happyReduction_65 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut65 happy_x_3 of { happy_var_3 -> +	happyIn47+		 (LayoutStop happy_var_3+	)}++happyReduce_66 = happySpecReduce_2  11# happyReduction_66+happyReduction_66 happy_x_2+	happy_x_1+	 =  happyIn47+		 (LayoutTop+	)++happyReduce_67 = happySpecReduce_1  12# happyReduction_67+happyReduction_67 happy_x_1+	 =  case happyOut36 happy_x_1 of { happy_var_1 -> +	happyIn48+		 (Terminal happy_var_1+	)}++happyReduce_68 = happySpecReduce_1  12# happyReduction_68+happyReduction_68 happy_x_1+	 =  case happyOut49 happy_x_1 of { happy_var_1 -> +	happyIn48+		 (NTerminal happy_var_1+	)}++happyReduce_69 = happySpecReduce_3  13# happyReduction_69+happyReduction_69 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut49 happy_x_2 of { happy_var_2 -> +	happyIn49+		 (ListCat happy_var_2+	)}++happyReduce_70 = happySpecReduce_1  13# happyReduction_70+happyReduction_70 happy_x_1+	 =  case happyOut37 happy_x_1 of { happy_var_1 -> +	happyIn49+		 (IdCat happy_var_1+	)}++happyReduce_71 = happySpecReduce_1  14# happyReduction_71+happyReduction_71 happy_x_1+	 =  case happyOut51 happy_x_1 of { happy_var_1 -> +	happyIn50+		 (LabNoP happy_var_1+	)}++happyReduce_72 = happySpecReduce_2  14# happyReduction_72+happyReduction_72 happy_x_2+	happy_x_1+	 =  case happyOut51 happy_x_1 of { happy_var_1 -> +	case happyOut56 happy_x_2 of { happy_var_2 -> +	happyIn50+		 (LabP happy_var_1 happy_var_2+	)}}++happyReduce_73 = happySpecReduce_3  14# happyReduction_73+happyReduction_73 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut51 happy_x_1 of { happy_var_1 -> +	case happyOut51 happy_x_2 of { happy_var_2 -> +	case happyOut56 happy_x_3 of { happy_var_3 -> +	happyIn50+		 (LabPF happy_var_1 happy_var_2 happy_var_3+	)}}}++happyReduce_74 = happySpecReduce_2  14# happyReduction_74+happyReduction_74 happy_x_2+	happy_x_1+	 =  case happyOut51 happy_x_1 of { happy_var_1 -> +	case happyOut51 happy_x_2 of { happy_var_2 -> +	happyIn50+		 (LabF happy_var_1 happy_var_2+	)}}++happyReduce_75 = happySpecReduce_1  15# happyReduction_75+happyReduction_75 happy_x_1+	 =  case happyOut37 happy_x_1 of { happy_var_1 -> +	happyIn51+		 (Id happy_var_1+	)}++happyReduce_76 = happySpecReduce_1  15# happyReduction_76+happyReduction_76 happy_x_1+	 =  happyIn51+		 (Wild+	)++happyReduce_77 = happySpecReduce_2  15# happyReduction_77+happyReduction_77 happy_x_2+	happy_x_1+	 =  happyIn51+		 (ListE+	)++happyReduce_78 = happySpecReduce_3  15# happyReduction_78+happyReduction_78 happy_x_3+	happy_x_2+	happy_x_1+	 =  happyIn51+		 (ListCons+	)++happyReduce_79 = happyReduce 5# 15# happyReduction_79+happyReduction_79 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = happyIn51+		 (ListOne+	) `HappyStk` happyRest++happyReduce_80 = happyReduce 9# 16# happyReduction_80+happyReduction_80 (happy_x_9 `HappyStk`+	happy_x_8 `HappyStk`+	happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut55 happy_x_3 of { happy_var_3 -> +	case happyOut54 happy_x_7 of { happy_var_7 -> +	happyIn52+		 (ProfIt happy_var_3 happy_var_7+	) `HappyStk` happyRest}}++happyReduce_81 = happySpecReduce_3  17# happyReduction_81+happyReduction_81 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut54 happy_x_2 of { happy_var_2 -> +	happyIn53+		 (Ints happy_var_2+	)}++happyReduce_82 = happySpecReduce_0  18# happyReduction_82+happyReduction_82  =  happyIn54+		 ([]+	)++happyReduce_83 = happySpecReduce_1  18# happyReduction_83+happyReduction_83 happy_x_1+	 =  case happyOut38 happy_x_1 of { happy_var_1 -> +	happyIn54+		 ((:[]) happy_var_1+	)}++happyReduce_84 = happySpecReduce_3  18# happyReduction_84+happyReduction_84 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut38 happy_x_1 of { happy_var_1 -> +	case happyOut54 happy_x_3 of { happy_var_3 -> +	happyIn54+		 ((:) happy_var_1 happy_var_3+	)}}++happyReduce_85 = happySpecReduce_0  19# happyReduction_85+happyReduction_85  =  happyIn55+		 ([]+	)++happyReduce_86 = happySpecReduce_1  19# happyReduction_86+happyReduction_86 happy_x_1+	 =  case happyOut53 happy_x_1 of { happy_var_1 -> +	happyIn55+		 ((:[]) happy_var_1+	)}++happyReduce_87 = happySpecReduce_3  19# happyReduction_87+happyReduction_87 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut53 happy_x_1 of { happy_var_1 -> +	case happyOut55 happy_x_3 of { happy_var_3 -> +	happyIn55+		 ((:) happy_var_1 happy_var_3+	)}}++happyReduce_88 = happySpecReduce_1  20# happyReduction_88+happyReduction_88 happy_x_1+	 =  case happyOut52 happy_x_1 of { happy_var_1 -> +	happyIn56+		 ((:[]) happy_var_1+	)}++happyReduce_89 = happySpecReduce_2  20# happyReduction_89+happyReduction_89 happy_x_2+	happy_x_1+	 =  case happyOut52 happy_x_1 of { happy_var_1 -> +	case happyOut56 happy_x_2 of { happy_var_2 -> +	happyIn56+		 ((:) happy_var_1 happy_var_2+	)}}++happyReduce_90 = happySpecReduce_0  21# happyReduction_90+happyReduction_90  =  happyIn57+		 (SepNone+	)++happyReduce_91 = happySpecReduce_2  21# happyReduction_91+happyReduction_91 happy_x_2+	happy_x_1+	 =  case happyOut36 happy_x_2 of { happy_var_2 -> +	happyIn57+		 (SepTerm happy_var_2+	)}++happyReduce_92 = happySpecReduce_2  21# happyReduction_92+happyReduction_92 happy_x_2+	happy_x_1+	 =  case happyOut36 happy_x_2 of { happy_var_2 -> +	happyIn57+		 (SepSepar happy_var_2+	)}++happyReduce_93 = happySpecReduce_1  22# happyReduction_93+happyReduction_93 happy_x_1+	 =  case happyOut37 happy_x_1 of { happy_var_1 -> +	happyIn58+		 (Arg happy_var_1+	)}++happyReduce_94 = happySpecReduce_0  23# happyReduction_94+happyReduction_94  =  happyIn59+		 ([]+	)++happyReduce_95 = happySpecReduce_2  23# happyReduction_95+happyReduction_95 happy_x_2+	happy_x_1+	 =  case happyOut59 happy_x_1 of { happy_var_1 -> +	case happyOut58 happy_x_2 of { happy_var_2 -> +	happyIn59+		 (flip (:) happy_var_1 happy_var_2+	)}}++happyReduce_96 = happySpecReduce_3  24# happyReduction_96+happyReduction_96 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut61 happy_x_1 of { happy_var_1 -> +	case happyOut60 happy_x_3 of { happy_var_3 -> +	happyIn60+		 (Cons happy_var_1 happy_var_3+	)}}++happyReduce_97 = happySpecReduce_1  24# happyReduction_97+happyReduction_97 happy_x_1+	 =  case happyOut61 happy_x_1 of { happy_var_1 -> +	happyIn60+		 (happy_var_1+	)}++happyReduce_98 = happySpecReduce_2  25# happyReduction_98+happyReduction_98 happy_x_2+	happy_x_1+	 =  case happyOut37 happy_x_1 of { happy_var_1 -> +	case happyOut63 happy_x_2 of { happy_var_2 -> +	happyIn61+		 (App happy_var_1 happy_var_2+	)}}++happyReduce_99 = happySpecReduce_1  25# happyReduction_99+happyReduction_99 happy_x_1+	 =  case happyOut62 happy_x_1 of { happy_var_1 -> +	happyIn61+		 (happy_var_1+	)}++happyReduce_100 = happySpecReduce_1  26# happyReduction_100+happyReduction_100 happy_x_1+	 =  case happyOut37 happy_x_1 of { happy_var_1 -> +	happyIn62+		 (Var happy_var_1+	)}++happyReduce_101 = happySpecReduce_1  26# happyReduction_101+happyReduction_101 happy_x_1+	 =  case happyOut38 happy_x_1 of { happy_var_1 -> +	happyIn62+		 (LitInt happy_var_1+	)}++happyReduce_102 = happySpecReduce_1  26# happyReduction_102+happyReduction_102 happy_x_1+	 =  case happyOut39 happy_x_1 of { happy_var_1 -> +	happyIn62+		 (LitChar happy_var_1+	)}++happyReduce_103 = happySpecReduce_1  26# happyReduction_103+happyReduction_103 happy_x_1+	 =  case happyOut36 happy_x_1 of { happy_var_1 -> +	happyIn62+		 (LitString happy_var_1+	)}++happyReduce_104 = happySpecReduce_1  26# happyReduction_104+happyReduction_104 happy_x_1+	 =  case happyOut40 happy_x_1 of { happy_var_1 -> +	happyIn62+		 (LitDouble happy_var_1+	)}++happyReduce_105 = happySpecReduce_3  26# happyReduction_105+happyReduction_105 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut64 happy_x_2 of { happy_var_2 -> +	happyIn62+		 (List happy_var_2+	)}++happyReduce_106 = happySpecReduce_3  26# happyReduction_106+happyReduction_106 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut60 happy_x_2 of { happy_var_2 -> +	happyIn62+		 (happy_var_2+	)}++happyReduce_107 = happySpecReduce_1  27# happyReduction_107+happyReduction_107 happy_x_1+	 =  case happyOut62 happy_x_1 of { happy_var_1 -> +	happyIn63+		 ((:[]) happy_var_1+	)}++happyReduce_108 = happySpecReduce_2  27# happyReduction_108+happyReduction_108 happy_x_2+	happy_x_1+	 =  case happyOut62 happy_x_1 of { happy_var_1 -> +	case happyOut63 happy_x_2 of { happy_var_2 -> +	happyIn63+		 ((:) happy_var_1 happy_var_2+	)}}++happyReduce_109 = happySpecReduce_0  28# happyReduction_109+happyReduction_109  =  happyIn64+		 ([]+	)++happyReduce_110 = happySpecReduce_1  28# happyReduction_110+happyReduction_110 happy_x_1+	 =  case happyOut60 happy_x_1 of { happy_var_1 -> +	happyIn64+		 ((:[]) happy_var_1+	)}++happyReduce_111 = happySpecReduce_3  28# happyReduction_111+happyReduction_111 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut60 happy_x_1 of { happy_var_1 -> +	case happyOut64 happy_x_3 of { happy_var_3 -> +	happyIn64+		 ((:) happy_var_1 happy_var_3+	)}}++happyReduce_112 = happySpecReduce_1  29# happyReduction_112+happyReduction_112 happy_x_1+	 =  case happyOut36 happy_x_1 of { happy_var_1 -> +	happyIn65+		 ((:[]) happy_var_1+	)}++happyReduce_113 = happySpecReduce_3  29# happyReduction_113+happyReduction_113 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut36 happy_x_1 of { happy_var_1 -> +	case happyOut65 happy_x_3 of { happy_var_3 -> +	happyIn65+		 ((:) happy_var_1 happy_var_3+	)}}++happyReduce_114 = happySpecReduce_1  30# happyReduction_114+happyReduction_114 happy_x_1+	 =  case happyOut67 happy_x_1 of { happy_var_1 -> +	happyIn66+		 ((:[]) happy_var_1+	)}++happyReduce_115 = happySpecReduce_3  30# happyReduction_115+happyReduction_115 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut67 happy_x_1 of { happy_var_1 -> +	case happyOut66 happy_x_3 of { happy_var_3 -> +	happyIn66+		 ((:) happy_var_1 happy_var_3+	)}}++happyReduce_116 = happySpecReduce_1  31# happyReduction_116+happyReduction_116 happy_x_1+	 =  case happyOut46 happy_x_1 of { happy_var_1 -> +	happyIn67+		 (RHS (reverse happy_var_1)+	)}++happyReduce_117 = happySpecReduce_1  32# happyReduction_117+happyReduction_117 happy_x_1+	 =  happyIn68+		 (MNonempty+	)++happyReduce_118 = happySpecReduce_0  32# happyReduction_118+happyReduction_118  =  happyIn68+		 (MEmpty+	)++happyReduce_119 = happySpecReduce_2  33# happyReduction_119+happyReduction_119 happy_x_2+	happy_x_1+	 =  case happyOut69 happy_x_1 of { happy_var_1 -> +	case happyOut71 happy_x_2 of { happy_var_2 -> +	happyIn69+		 (RSeq happy_var_1 happy_var_2+	)}}++happyReduce_120 = happySpecReduce_1  33# happyReduction_120+happyReduction_120 happy_x_1+	 =  case happyOut71 happy_x_1 of { happy_var_1 -> +	happyIn69+		 (happy_var_1+	)}++happyReduce_121 = happySpecReduce_3  34# happyReduction_121+happyReduction_121 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut70 happy_x_1 of { happy_var_1 -> +	case happyOut69 happy_x_3 of { happy_var_3 -> +	happyIn70+		 (RAlt happy_var_1 happy_var_3+	)}}++happyReduce_122 = happySpecReduce_3  34# happyReduction_122+happyReduction_122 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut69 happy_x_1 of { happy_var_1 -> +	case happyOut69 happy_x_3 of { happy_var_3 -> +	happyIn70+		 (RMinus happy_var_1 happy_var_3+	)}}++happyReduce_123 = happySpecReduce_1  34# happyReduction_123+happyReduction_123 happy_x_1+	 =  case happyOut69 happy_x_1 of { happy_var_1 -> +	happyIn70+		 (happy_var_1+	)}++happyReduce_124 = happySpecReduce_2  35# happyReduction_124+happyReduction_124 happy_x_2+	happy_x_1+	 =  case happyOut71 happy_x_1 of { happy_var_1 -> +	happyIn71+		 (RStar happy_var_1+	)}++happyReduce_125 = happySpecReduce_2  35# happyReduction_125+happyReduction_125 happy_x_2+	happy_x_1+	 =  case happyOut71 happy_x_1 of { happy_var_1 -> +	happyIn71+		 (RPlus happy_var_1+	)}++happyReduce_126 = happySpecReduce_2  35# happyReduction_126+happyReduction_126 happy_x_2+	happy_x_1+	 =  case happyOut71 happy_x_1 of { happy_var_1 -> +	happyIn71+		 (ROpt happy_var_1+	)}++happyReduce_127 = happySpecReduce_1  35# happyReduction_127+happyReduction_127 happy_x_1+	 =  happyIn71+		 (REps+	)++happyReduce_128 = happySpecReduce_1  35# happyReduction_128+happyReduction_128 happy_x_1+	 =  case happyOut39 happy_x_1 of { happy_var_1 -> +	happyIn71+		 (RChar happy_var_1+	)}++happyReduce_129 = happySpecReduce_3  35# happyReduction_129+happyReduction_129 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut36 happy_x_2 of { happy_var_2 -> +	happyIn71+		 (RAlts happy_var_2+	)}++happyReduce_130 = happySpecReduce_3  35# happyReduction_130+happyReduction_130 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut36 happy_x_2 of { happy_var_2 -> +	happyIn71+		 (RSeqs happy_var_2+	)}++happyReduce_131 = happySpecReduce_1  35# happyReduction_131+happyReduction_131 happy_x_1+	 =  happyIn71+		 (RDigit+	)++happyReduce_132 = happySpecReduce_1  35# happyReduction_132+happyReduction_132 happy_x_1+	 =  happyIn71+		 (RLetter+	)++happyReduce_133 = happySpecReduce_1  35# happyReduction_133+happyReduction_133 happy_x_1+	 =  happyIn71+		 (RUpper+	)++happyReduce_134 = happySpecReduce_1  35# happyReduction_134+happyReduction_134 happy_x_1+	 =  happyIn71+		 (RLower+	)++happyReduce_135 = happySpecReduce_1  35# happyReduction_135+happyReduction_135 happy_x_1+	 =  happyIn71+		 (RAny+	)++happyReduce_136 = happySpecReduce_3  35# happyReduction_136+happyReduction_136 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut72 happy_x_2 of { happy_var_2 -> +	happyIn71+		 (happy_var_2+	)}++happyReduce_137 = happySpecReduce_1  36# happyReduction_137+happyReduction_137 happy_x_1+	 =  case happyOut70 happy_x_1 of { happy_var_1 -> +	happyIn72+		 (happy_var_1+	)}++happyReduce_138 = happySpecReduce_1  37# happyReduction_138+happyReduction_138 happy_x_1+	 =  case happyOut37 happy_x_1 of { happy_var_1 -> +	happyIn73+		 ((:[]) happy_var_1+	)}++happyReduce_139 = happySpecReduce_3  37# happyReduction_139+happyReduction_139 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut37 happy_x_1 of { happy_var_1 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	happyIn73+		 ((:) happy_var_1 happy_var_3+	)}}++happyNewToken action sts stk [] =+	happyDoAction 46# notHappyAtAll action sts stk []++happyNewToken action sts stk (tk:tks) =+	let cont i = happyDoAction i tk action sts stk tks in+	case tk of {+	PT _ (TS _ 1) -> cont 1#;+	PT _ (TS _ 2) -> cont 2#;+	PT _ (TS _ 3) -> cont 3#;+	PT _ (TS _ 4) -> cont 4#;+	PT _ (TS _ 5) -> cont 5#;+	PT _ (TS _ 6) -> cont 6#;+	PT _ (TS _ 7) -> cont 7#;+	PT _ (TS _ 8) -> cont 8#;+	PT _ (TS _ 9) -> cont 9#;+	PT _ (TS _ 10) -> cont 10#;+	PT _ (TS _ 11) -> cont 11#;+	PT _ (TS _ 12) -> cont 12#;+	PT _ (TS _ 13) -> cont 13#;+	PT _ (TS _ 14) -> cont 14#;+	PT _ (TS _ 15) -> cont 15#;+	PT _ (TS _ 16) -> cont 16#;+	PT _ (TS _ 17) -> cont 17#;+	PT _ (TS _ 18) -> cont 18#;+	PT _ (TS _ 19) -> cont 19#;+	PT _ (TS _ 20) -> cont 20#;+	PT _ (TS _ 21) -> cont 21#;+	PT _ (TS _ 22) -> cont 22#;+	PT _ (TS _ 23) -> cont 23#;+	PT _ (TS _ 24) -> cont 24#;+	PT _ (TS _ 25) -> cont 25#;+	PT _ (TS _ 26) -> cont 26#;+	PT _ (TS _ 27) -> cont 27#;+	PT _ (TS _ 28) -> cont 28#;+	PT _ (TS _ 29) -> cont 29#;+	PT _ (TS _ 30) -> cont 30#;+	PT _ (TS _ 31) -> cont 31#;+	PT _ (TS _ 32) -> cont 32#;+	PT _ (TS _ 33) -> cont 33#;+	PT _ (TS _ 34) -> cont 34#;+	PT _ (TS _ 35) -> cont 35#;+	PT _ (TS _ 36) -> cont 36#;+	PT _ (TS _ 37) -> cont 37#;+	PT _ (TS _ 38) -> cont 38#;+	PT _ (TS _ 39) -> cont 39#;+	PT _ (TS _ 40) -> cont 40#;+	PT _ (TL happy_dollar_dollar) -> cont 41#;+	PT _ (TV happy_dollar_dollar) -> cont 42#;+	PT _ (TI happy_dollar_dollar) -> cont 43#;+	PT _ (TC happy_dollar_dollar) -> cont 44#;+	PT _ (TD happy_dollar_dollar) -> cont 45#;+	_ -> happyError' (tk:tks)+	}++happyError_ 46# tk tks = happyError' tks+happyError_ _ tk tks = happyError' (tk:tks)++happyThen :: () => Err a -> (a -> Err b) -> Err b+happyThen = (thenM)+happyReturn :: () => a -> Err a+happyReturn = (returnM)+happyThen1 m k tks = (thenM) m (\a -> k a tks)+happyReturn1 :: () => a -> b -> Err a+happyReturn1 = \a tks -> (returnM) a+happyError' :: () => [(Token)] -> Err a+happyError' = happyError++pLGrammar tks = happySomeParser where+  happySomeParser = happyThen (happyParse 0# tks) (\x -> happyReturn (happyOut41 x))++pLDef tks = happySomeParser where+  happySomeParser = happyThen (happyParse 1# tks) (\x -> happyReturn (happyOut42 x))++pListLDef tks = happySomeParser where+  happySomeParser = happyThen (happyParse 2# tks) (\x -> happyReturn (happyOut43 x))++pGrammar tks = happySomeParser where+  happySomeParser = happyThen (happyParse 3# tks) (\x -> happyReturn (happyOut44 x))++pListDef tks = happySomeParser where+  happySomeParser = happyThen (happyParse 4# tks) (\x -> happyReturn (happyOut45 x))++pListItem tks = happySomeParser where+  happySomeParser = happyThen (happyParse 5# tks) (\x -> happyReturn (happyOut46 x))++pDef tks = happySomeParser where+  happySomeParser = happyThen (happyParse 6# tks) (\x -> happyReturn (happyOut47 x))++pItem tks = happySomeParser where+  happySomeParser = happyThen (happyParse 7# tks) (\x -> happyReturn (happyOut48 x))++pCat tks = happySomeParser where+  happySomeParser = happyThen (happyParse 8# tks) (\x -> happyReturn (happyOut49 x))++pLabel tks = happySomeParser where+  happySomeParser = happyThen (happyParse 9# tks) (\x -> happyReturn (happyOut50 x))++pLabelId tks = happySomeParser where+  happySomeParser = happyThen (happyParse 10# tks) (\x -> happyReturn (happyOut51 x))++pProfItem tks = happySomeParser where+  happySomeParser = happyThen (happyParse 11# tks) (\x -> happyReturn (happyOut52 x))++pIntList tks = happySomeParser where+  happySomeParser = happyThen (happyParse 12# tks) (\x -> happyReturn (happyOut53 x))++pListInteger tks = happySomeParser where+  happySomeParser = happyThen (happyParse 13# tks) (\x -> happyReturn (happyOut54 x))++pListIntList tks = happySomeParser where+  happySomeParser = happyThen (happyParse 14# tks) (\x -> happyReturn (happyOut55 x))++pListProfItem tks = happySomeParser where+  happySomeParser = happyThen (happyParse 15# tks) (\x -> happyReturn (happyOut56 x))++pSeparation tks = happySomeParser where+  happySomeParser = happyThen (happyParse 16# tks) (\x -> happyReturn (happyOut57 x))++pArg tks = happySomeParser where+  happySomeParser = happyThen (happyParse 17# tks) (\x -> happyReturn (happyOut58 x))++pListArg tks = happySomeParser where+  happySomeParser = happyThen (happyParse 18# tks) (\x -> happyReturn (happyOut59 x))++pExp tks = happySomeParser where+  happySomeParser = happyThen (happyParse 19# tks) (\x -> happyReturn (happyOut60 x))++pExp1 tks = happySomeParser where+  happySomeParser = happyThen (happyParse 20# tks) (\x -> happyReturn (happyOut61 x))++pExp2 tks = happySomeParser where+  happySomeParser = happyThen (happyParse 21# tks) (\x -> happyReturn (happyOut62 x))++pListExp2 tks = happySomeParser where+  happySomeParser = happyThen (happyParse 22# tks) (\x -> happyReturn (happyOut63 x))++pListExp tks = happySomeParser where+  happySomeParser = happyThen (happyParse 23# tks) (\x -> happyReturn (happyOut64 x))++pListString tks = happySomeParser where+  happySomeParser = happyThen (happyParse 24# tks) (\x -> happyReturn (happyOut65 x))++pListRHS tks = happySomeParser where+  happySomeParser = happyThen (happyParse 25# tks) (\x -> happyReturn (happyOut66 x))++pRHS tks = happySomeParser where+  happySomeParser = happyThen (happyParse 26# tks) (\x -> happyReturn (happyOut67 x))++pMinimumSize tks = happySomeParser where+  happySomeParser = happyThen (happyParse 27# tks) (\x -> happyReturn (happyOut68 x))++pReg2 tks = happySomeParser where+  happySomeParser = happyThen (happyParse 28# tks) (\x -> happyReturn (happyOut69 x))++pReg1 tks = happySomeParser where+  happySomeParser = happyThen (happyParse 29# tks) (\x -> happyReturn (happyOut70 x))++pReg3 tks = happySomeParser where+  happySomeParser = happyThen (happyParse 30# tks) (\x -> happyReturn (happyOut71 x))++pReg tks = happySomeParser where+  happySomeParser = happyThen (happyParse 31# tks) (\x -> happyReturn (happyOut72 x))++pListIdent tks = happySomeParser where+  happySomeParser = happyThen (happyParse 32# tks) (\x -> happyReturn (happyOut73 x))++happySeq = happyDontSeq+++returnM :: a -> Err a+returnM = return++thenM :: Err a -> (a -> Err b) -> Err b+thenM = (>>=)++happyError :: [Token] -> Err a+happyError ts =+  Bad $ "syntax error at " ++ tokenPos ts ++ +  case ts of+    [] -> []+    [Err _] -> " due to lexer error"+    _ -> " before " ++ unwords (map (id . prToken) (take 4 ts))++myLexer = tokens+{-# LINE 1 "templates/GenericTemplate.hs" #-}+{-# LINE 1 "templates/GenericTemplate.hs" #-}+{-# LINE 1 "<built-in>" #-}+{-# LINE 1 "<command-line>" #-}+{-# LINE 8 "<command-line>" #-}+# 1 "/usr/include/stdc-predef.h" 1 3 4++# 17 "/usr/include/stdc-predef.h" 3 4++++++++++++++++++++++++{-# LINE 8 "<command-line>" #-}+{-# LINE 1 "templates/GenericTemplate.hs" #-}+-- Id: GenericTemplate.hs,v 1.26 2005/01/14 14:47:22 simonmar Exp ++{-# LINE 13 "templates/GenericTemplate.hs" #-}++++++-- Do not remove this comment. Required to fix CPP parsing when using GCC and a clang-compiled alex.+#if __GLASGOW_HASKELL__ > 706+#define LT(n,m) ((Happy_GHC_Exts.tagToEnum# (n Happy_GHC_Exts.<# m)) :: Bool)+#define GTE(n,m) ((Happy_GHC_Exts.tagToEnum# (n Happy_GHC_Exts.>=# m)) :: Bool)+#define EQ(n,m) ((Happy_GHC_Exts.tagToEnum# (n Happy_GHC_Exts.==# m)) :: Bool)+#else+#define LT(n,m) (n Happy_GHC_Exts.<# m)+#define GTE(n,m) (n Happy_GHC_Exts.>=# m)+#define EQ(n,m) (n Happy_GHC_Exts.==# m)+#endif+{-# LINE 46 "templates/GenericTemplate.hs" #-}+++data Happy_IntList = HappyCons Happy_GHC_Exts.Int# Happy_IntList++++++{-# LINE 67 "templates/GenericTemplate.hs" #-}++{-# LINE 77 "templates/GenericTemplate.hs" #-}++{-# LINE 86 "templates/GenericTemplate.hs" #-}++infixr 9 `HappyStk`+data HappyStk a = HappyStk a (HappyStk a)++-----------------------------------------------------------------------------+-- starting the parse++happyParse start_state = happyNewToken start_state notHappyAtAll notHappyAtAll++-----------------------------------------------------------------------------+-- Accepting the parse++-- If the current token is 0#, it means we've just accepted a partial+-- parse (a %partial parser).  We must ignore the saved token on the top of+-- the stack in this case.+happyAccept 0# tk st sts (_ `HappyStk` ans `HappyStk` _) =+        happyReturn1 ans+happyAccept j tk st sts (HappyStk ans _) = +        (happyTcHack j (happyTcHack st)) (happyReturn1 ans)++-----------------------------------------------------------------------------+-- Arrays only: do the next action++++happyDoAction i tk st+        = {- nothing -}+++          case action of+                0#           -> {- nothing -}+                                     happyFail i tk st+                -1#          -> {- nothing -}+                                     happyAccept i tk st+                n | LT(n,(0# :: Happy_GHC_Exts.Int#)) -> {- nothing -}++                                                   (happyReduceArr Happy_Data_Array.! rule) i tk st+                                                   where rule = (Happy_GHC_Exts.I# ((Happy_GHC_Exts.negateInt# ((n Happy_GHC_Exts.+# (1# :: Happy_GHC_Exts.Int#))))))+                n                 -> {- nothing -}+++                                     happyShift new_state i tk st+                                     where new_state = (n Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#))+   where off    = indexShortOffAddr happyActOffsets st+         off_i  = (off Happy_GHC_Exts.+# i)+         check  = if GTE(off_i,(0# :: Happy_GHC_Exts.Int#))+                  then EQ(indexShortOffAddr happyCheck off_i, i)+                  else False+         action+          | check     = indexShortOffAddr happyTable off_i+          | otherwise = indexShortOffAddr happyDefActions st+++indexShortOffAddr (HappyA# arr) off =+        Happy_GHC_Exts.narrow16Int# i+  where+        i = Happy_GHC_Exts.word2Int# (Happy_GHC_Exts.or# (Happy_GHC_Exts.uncheckedShiftL# high 8#) low)+        high = Happy_GHC_Exts.int2Word# (Happy_GHC_Exts.ord# (Happy_GHC_Exts.indexCharOffAddr# arr (off' Happy_GHC_Exts.+# 1#)))+        low  = Happy_GHC_Exts.int2Word# (Happy_GHC_Exts.ord# (Happy_GHC_Exts.indexCharOffAddr# arr off'))+        off' = off Happy_GHC_Exts.*# 2#++++++data HappyAddr = HappyA# Happy_GHC_Exts.Addr#+++++-----------------------------------------------------------------------------+-- HappyState data type (not arrays)++{-# LINE 170 "templates/GenericTemplate.hs" #-}++-----------------------------------------------------------------------------+-- Shifting a token++happyShift new_state 0# tk st sts stk@(x `HappyStk` _) =+     let i = (case Happy_GHC_Exts.unsafeCoerce# x of { (Happy_GHC_Exts.I# (i)) -> i }) in+--     trace "shifting the error token" $+     happyDoAction i tk new_state (HappyCons (st) (sts)) (stk)++happyShift new_state i tk st sts stk =+     happyNewToken new_state (HappyCons (st) (sts)) ((happyInTok (tk))`HappyStk`stk)++-- happyReduce is specialised for the common cases.++happySpecReduce_0 i fn 0# tk st sts stk+     = happyFail 0# tk st sts stk+happySpecReduce_0 nt fn j tk st@((action)) sts stk+     = happyGoto nt j tk st (HappyCons (st) (sts)) (fn `HappyStk` stk)++happySpecReduce_1 i fn 0# tk st sts stk+     = happyFail 0# tk st sts stk+happySpecReduce_1 nt fn j tk _ sts@((HappyCons (st@(action)) (_))) (v1`HappyStk`stk')+     = let r = fn v1 in+       happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk'))++happySpecReduce_2 i fn 0# tk st sts stk+     = happyFail 0# tk st sts stk+happySpecReduce_2 nt fn j tk _ (HappyCons (_) (sts@((HappyCons (st@(action)) (_))))) (v1`HappyStk`v2`HappyStk`stk')+     = let r = fn v1 v2 in+       happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk'))++happySpecReduce_3 i fn 0# tk st sts stk+     = happyFail 0# tk st sts stk+happySpecReduce_3 nt fn j tk _ (HappyCons (_) ((HappyCons (_) (sts@((HappyCons (st@(action)) (_))))))) (v1`HappyStk`v2`HappyStk`v3`HappyStk`stk')+     = let r = fn v1 v2 v3 in+       happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk'))++happyReduce k i fn 0# tk st sts stk+     = happyFail 0# tk st sts stk+happyReduce k nt fn j tk st sts stk+     = case happyDrop (k Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#)) sts of+         sts1@((HappyCons (st1@(action)) (_))) ->+                let r = fn stk in  -- it doesn't hurt to always seq here...+                happyDoSeq r (happyGoto nt j tk st1 sts1 r)++happyMonadReduce k nt fn 0# tk st sts stk+     = happyFail 0# tk st sts stk+happyMonadReduce k nt fn j tk st sts stk =+      case happyDrop k (HappyCons (st) (sts)) of+        sts1@((HappyCons (st1@(action)) (_))) ->+          let drop_stk = happyDropStk k stk in+          happyThen1 (fn stk tk) (\r -> happyGoto nt j tk st1 sts1 (r `HappyStk` drop_stk))++happyMonad2Reduce k nt fn 0# tk st sts stk+     = happyFail 0# tk st sts stk+happyMonad2Reduce k nt fn j tk st sts stk =+      case happyDrop k (HappyCons (st) (sts)) of+        sts1@((HappyCons (st1@(action)) (_))) ->+         let drop_stk = happyDropStk k stk++             off = indexShortOffAddr happyGotoOffsets st1+             off_i = (off Happy_GHC_Exts.+# nt)+             new_state = indexShortOffAddr happyTable off_i++++          in+          happyThen1 (fn stk tk) (\r -> happyNewToken new_state sts1 (r `HappyStk` drop_stk))++happyDrop 0# l = l+happyDrop n (HappyCons (_) (t)) = happyDrop (n Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#)) t++happyDropStk 0# l = l+happyDropStk n (x `HappyStk` xs) = happyDropStk (n Happy_GHC_Exts.-# (1#::Happy_GHC_Exts.Int#)) xs++-----------------------------------------------------------------------------+-- Moving to a new state after a reduction+++happyGoto nt j tk st = +   {- nothing -}+   happyDoAction j tk new_state+   where off = indexShortOffAddr happyGotoOffsets st+         off_i = (off Happy_GHC_Exts.+# nt)+         new_state = indexShortOffAddr happyTable off_i+++++-----------------------------------------------------------------------------+-- Error recovery (0# is the error token)++-- parse error if we are in recovery and we fail again+happyFail 0# tk old_st _ stk@(x `HappyStk` _) =+     let i = (case Happy_GHC_Exts.unsafeCoerce# x of { (Happy_GHC_Exts.I# (i)) -> i }) in+--      trace "failing" $ +        happyError_ i tk++{-  We don't need state discarding for our restricted implementation of+    "error".  In fact, it can cause some bogus parses, so I've disabled it+    for now --SDM++-- discard a state+happyFail  0# tk old_st (HappyCons ((action)) (sts)) +                                                (saved_tok `HappyStk` _ `HappyStk` stk) =+--      trace ("discarding state, depth " ++ show (length stk))  $+        happyDoAction 0# tk action sts ((saved_tok`HappyStk`stk))+-}++-- Enter error recovery: generate an error token,+--                       save the old token and carry on.+happyFail  i tk (action) sts stk =+--      trace "entering error recovery" $+        happyDoAction 0# tk action sts ( (Happy_GHC_Exts.unsafeCoerce# (Happy_GHC_Exts.I# (i))) `HappyStk` stk)++-- Internal happy errors:++notHappyAtAll :: a+notHappyAtAll = error "Internal Happy error\n"++-----------------------------------------------------------------------------+-- Hack to get the typechecker to accept our action functions+++happyTcHack :: Happy_GHC_Exts.Int# -> a -> a+happyTcHack x y = y+{-# INLINE happyTcHack #-}+++-----------------------------------------------------------------------------+-- Seq-ing.  If the --strict flag is given, then Happy emits +--      happySeq = happyDoSeq+-- otherwise it emits+--      happySeq = happyDontSeq++happyDoSeq, happyDontSeq :: a -> b -> b+happyDoSeq   a b = a `seq` b+happyDontSeq a b = b++-----------------------------------------------------------------------------+-- Don't inline any functions from the template.  GHC has a nasty habit+-- of deciding to inline happyGoto everywhere, which increases the size of+-- the generated parser quite a bit.+++{-# NOINLINE happyDoAction #-}+{-# NOINLINE happyTable #-}+{-# NOINLINE happyCheck #-}+{-# NOINLINE happyActOffsets #-}+{-# NOINLINE happyGotoOffsets #-}+{-# NOINLINE happyDefActions #-}++{-# NOINLINE happyShift #-}+{-# NOINLINE happySpecReduce_0 #-}+{-# NOINLINE happySpecReduce_1 #-}+{-# NOINLINE happySpecReduce_2 #-}+{-# NOINLINE happySpecReduce_3 #-}+{-# NOINLINE happyReduce #-}+{-# NOINLINE happyMonadReduce #-}+{-# NOINLINE happyGoto #-}+{-# NOINLINE happyFail #-}++-- end of Happy Template.
+ dist/build/unit-tests/unit-tests-tmp/LexBNF.hs view
@@ -0,0 +1,412 @@+{-# LANGUAGE CPP,MagicHash #-}+{-# LINE 3 "src/LexBNF.x" #-}++{-# OPTIONS -fno-warn-incomplete-patterns #-}+{-# OPTIONS_GHC -w #-}+module LexBNF where++++import qualified Data.Bits+import Data.Word (Word8)++#if __GLASGOW_HASKELL__ >= 603+#include "ghcconfig.h"+#elif defined(__GLASGOW_HASKELL__)+#include "config.h"+#endif+#if __GLASGOW_HASKELL__ >= 503+import Data.Array+import Data.Char (ord)+import Data.Array.Base (unsafeAt)+#else+import Array+import Char (ord)+#endif+#if __GLASGOW_HASKELL__ >= 503+import GHC.Exts+#else+import GlaExts+#endif+alex_base :: AlexAddr+alex_base = AlexA# "\xf8\xff\xff\xff\x49\x00\x00\x00\xc9\xff\xff\xff\xe0\xff\xff\xff\xc9\x00\x00\x00\x9c\x01\x00\x00\x2d\x00\x00\x00\x1c\x02\x00\x00\x1c\x03\x00\x00\x0a\x01\x00\x00\x00\x00\x00\x00\x0d\x03\x00\x00\x0d\x04\x00\x00\xcd\x03\x00\x00\xcd\x04\x00\x00\x91\x05\x00\x00\xef\x05\x00\x00\x8d\x04\x00\x00\x00\x00\x00\x00\xa5\x05\x00\x00\xdb\xff\xff\xff\x47\x00\x00\x00\x5a\x00\x00\x00\xa5\x06\x00\x00\xa6\x06\x00\x00\x69\x07\x00\x00\x29\x07\x00\x00\x00\x00\x00\x00\x1f\x08\x00\x00\x00\x00\x00\x00\x78\x00\x00\x00\xdc\xff\xff\xff\xdd\xff\xff\xff\x00\x00\x00\x00\xdf\xff\xff\xff\xf8\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x72\x00\x00\x00\xe7\x05\x00\x00\x7c\x00\x00\x00"#++alex_table :: AlexAddr+alex_table = AlexA# "\x00\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x21\x00\x25\x00\x16\x00\x1c\x00\x05\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x00\x00\x00\x00\x00\x00\x1e\x00\x02\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x21\x00\x21\x00\x21\x00\x21\x00\x21\x00\x1f\x00\x21\x00\x00\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x22\x00\x21\x00\x00\x00\x21\x00\x00\x00\x21\x00\x00\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x21\x00\x03\x00\x21\x00\x00\x00\x21\x00\x00\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x20\x00\x21\x00\x21\x00\x01\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x03\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1e\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x03\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x26\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1d\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x01\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x04\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x00\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x06\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x1a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x00\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x24\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x10\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x17\x00\x00\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x00\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x00\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x00\x00\x0f\x00\x11\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1a\x00\x04\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x13\x00\x07\x00\x0a\x00\x0a\x00\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\x00\x00\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#++alex_check :: AlexAddr+alex_check = AlexA# "\xff\xff\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x3d\x00\x27\x00\x2d\x00\x2d\x00\x2d\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x20\x00\x3a\x00\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\xff\xff\x3d\x00\xff\xff\x3f\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x27\x00\x5d\x00\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x2d\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\x5c\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\x74\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7d\x00\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x2d\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\xff\xff\xff\xff\xc2\x00\xc3\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\x27\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5c\x00\x65\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\xff\xff\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xff\xff\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc2\x00\xc3\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#++alex_deflt :: AlexAddr+alex_deflt = AlexA# "\xff\xff\x05\x00\xff\xff\xff\xff\xff\xff\x05\x00\xff\xff\xff\xff\x05\x00\x05\x00\x12\x00\x12\x00\x03\x00\x03\x00\xff\xff\x17\x00\xff\xff\x17\x00\x1b\x00\x1b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x00\x1c\x00\x1c\x00\x1c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#++alex_accept = listArray (0::Int,40) [AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccNone,AlexAccSkip,AlexAccSkip,AlexAccSkip,AlexAcc (alex_action_3),AlexAcc (alex_action_3),AlexAcc (alex_action_3),AlexAcc (alex_action_3),AlexAcc (alex_action_4),AlexAcc (alex_action_5),AlexAcc (alex_action_6),AlexAcc (alex_action_7),AlexAcc (alex_action_8),AlexAcc (alex_action_8)]+{-# LINE 38 "src/LexBNF.x" #-}+++tok :: (Posn -> String -> Token) -> (Posn -> String -> Token)+tok f p s = f p s++share :: String -> String+share = id++data Tok =+   TS !String !Int    -- reserved words and symbols+ | TL !String         -- string literals+ | TI !String         -- integer literals+ | TV !String         -- identifiers+ | TD !String         -- double precision float literals+ | TC !String         -- character literals++ deriving (Eq,Show,Ord)++data Token =+   PT  Posn Tok+ | Err Posn+  deriving (Eq,Show,Ord)++tokenPos :: [Token] -> String+tokenPos (PT (Pn _ l _) _ :_) = "line " ++ show l+tokenPos (Err (Pn _ l _) :_) = "line " ++ show l+tokenPos _ = "end of file"++tokenPosn :: Token -> Posn+tokenPosn (PT p _) = p+tokenPosn (Err p) = p++tokenLineCol :: Token -> (Int, Int)+tokenLineCol = posLineCol . tokenPosn++posLineCol :: Posn -> (Int, Int)+posLineCol (Pn _ l c) = (l,c)++mkPosToken :: Token -> ((Int, Int), String)+mkPosToken t@(PT p _) = (posLineCol p, prToken t)++prToken :: Token -> String+prToken t = case t of+  PT _ (TS s _) -> s+  PT _ (TL s)   -> s+  PT _ (TI s)   -> s+  PT _ (TV s)   -> s+  PT _ (TD s)   -> s+  PT _ (TC s)   -> s+++data BTree = N | B String Tok BTree BTree deriving (Show)++eitherResIdent :: (String -> Tok) -> String -> Tok+eitherResIdent tv s = treeFind resWords+  where+  treeFind N = tv s+  treeFind (B a t left right) | s < a  = treeFind left+                              | s > a  = treeFind right+                              | s == a = t++resWords :: BTree+resWords = b "digit" 21 (b "=" 11 (b "-" 6 (b "*" 3 (b ")" 2 (b "(" 1 N N) N) (b "," 5 (b "+" 4 N N) N)) (b "::=" 9 (b ":" 8 (b "." 7 N N) N) (b ";" 10 N N))) (b "char" 16 (b "]" 14 (b "[" 13 (b "?" 12 N N) N) (b "_" 15 N N)) (b "define" 19 (b "comment" 18 (b "coercions" 17 N N) N) (b "delimiters" 20 N N)))) (b "separator" 31 (b "letter" 26 (b "internal" 24 (b "eps" 23 (b "entrypoints" 22 N N) N) (b "layout" 25 N N)) (b "position" 29 (b "nonempty" 28 (b "lower" 27 N N) N) (b "rules" 30 N N))) (b "upper" 36 (b "token" 34 (b "terminator" 33 (b "stop" 32 N N) N) (b "toplevel" 35 N N)) (b "|" 39 (b "{" 38 (b "views" 37 N N) N) (b "}" 40 N N))))+   where b s n = let bs = id s+                  in B bs (TS bs n)++unescapeInitTail :: String -> String+unescapeInitTail = id . unesc . tail . id where+  unesc s = case s of+    '\\':c:cs | elem c ['\"', '\\', '\''] -> c : unesc cs+    '\\':'n':cs  -> '\n' : unesc cs+    '\\':'t':cs  -> '\t' : unesc cs+    '"':[]    -> []+    c:cs      -> c : unesc cs+    _         -> []++-------------------------------------------------------------------+-- Alex wrapper code.+-- A modified "posn" wrapper.+-------------------------------------------------------------------++data Posn = Pn !Int !Int !Int+      deriving (Eq, Show,Ord)++alexStartPos :: Posn+alexStartPos = Pn 0 1 1++alexMove :: Posn -> Char -> Posn+alexMove (Pn a l c) '\t' = Pn (a+1)  l     (((c+7) `div` 8)*8+1)+alexMove (Pn a l c) '\n' = Pn (a+1) (l+1)   1+alexMove (Pn a l c) _    = Pn (a+1)  l     (c+1)++type Byte = Word8++type AlexInput = (Posn,     -- current position,+                  Char,     -- previous char+                  [Byte],   -- pending bytes on the current char+                  String)   -- current input string++tokens :: String -> [Token]+tokens str = go (alexStartPos, '\n', [], str)+    where+      go :: AlexInput -> [Token]+      go inp@(pos, _, _, str) =+               case alexScan inp 0 of+                AlexEOF                   -> []+                AlexError (pos, _, _, _)  -> [Err pos]+                AlexSkip  inp' len        -> go inp'+                AlexToken inp' len act    -> act pos (take len str) : (go inp')++alexGetByte :: AlexInput -> Maybe (Byte,AlexInput)+alexGetByte (p, c, (b:bs), s) = Just (b, (p, c, bs, s))+alexGetByte (p, _, [], s) =+  case  s of+    []  -> Nothing+    (c:s) ->+             let p'     = alexMove p c+                 (b:bs) = utf8Encode c+              in p' `seq` Just (b, (p', c, bs, s))++alexInputPrevChar :: AlexInput -> Char+alexInputPrevChar (p, c, bs, s) = c++-- | Encode a Haskell String to a list of Word8 values, in UTF8 format.+utf8Encode :: Char -> [Word8]+utf8Encode = map fromIntegral . go . ord+ where+  go oc+   | oc <= 0x7f       = [oc]++   | oc <= 0x7ff      = [ 0xc0 + (oc `Data.Bits.shiftR` 6)+                        , 0x80 + oc Data.Bits..&. 0x3f+                        ]++   | oc <= 0xffff     = [ 0xe0 + (oc `Data.Bits.shiftR` 12)+                        , 0x80 + ((oc `Data.Bits.shiftR` 6) Data.Bits..&. 0x3f)+                        , 0x80 + oc Data.Bits..&. 0x3f+                        ]+   | otherwise        = [ 0xf0 + (oc `Data.Bits.shiftR` 18)+                        , 0x80 + ((oc `Data.Bits.shiftR` 12) Data.Bits..&. 0x3f)+                        , 0x80 + ((oc `Data.Bits.shiftR` 6) Data.Bits..&. 0x3f)+                        , 0x80 + oc Data.Bits..&. 0x3f+                        ]++alex_action_3 =  tok (\p s -> PT p (eitherResIdent (TV . share) s)) +alex_action_4 =  tok (\p s -> PT p (eitherResIdent (TV . share) s)) +alex_action_5 =  tok (\p s -> PT p (TL $ share $ unescapeInitTail s)) +alex_action_6 =  tok (\p s -> PT p (TC $ share s))  +alex_action_7 =  tok (\p s -> PT p (TI $ share s))    +alex_action_8 =  tok (\p s -> PT p (TD $ share s)) +{-# LINE 1 "templates/GenericTemplate.hs" #-}+{-# LINE 1 "templates/GenericTemplate.hs" #-}+{-# LINE 1 "<built-in>" #-}+{-# LINE 1 "<command-line>" #-}++++++++# 1 "/usr/include/stdc-predef.h" 1 3 4++# 17 "/usr/include/stdc-predef.h" 3 4++++++++++++++++++++++++{-# LINE 7 "<command-line>" #-}+{-# LINE 1 "templates/GenericTemplate.hs" #-}+-- -----------------------------------------------------------------------------+-- ALEX TEMPLATE+--+-- This code is in the PUBLIC DOMAIN; you may copy it freely and use+-- it for any purpose whatsoever.++-- -----------------------------------------------------------------------------+-- INTERNALS and main scanner engine++{-# LINE 21 "templates/GenericTemplate.hs" #-}++++++-- Do not remove this comment. Required to fix CPP parsing when using GCC and a clang-compiled alex.+#if __GLASGOW_HASKELL__ > 706+#define GTE(n,m) (tagToEnum# (n >=# m))+#define EQ(n,m) (tagToEnum# (n ==# m))+#else+#define GTE(n,m) (n >=# m)+#define EQ(n,m) (n ==# m)+#endif+{-# LINE 51 "templates/GenericTemplate.hs" #-}+++data AlexAddr = AlexA# Addr#+-- Do not remove this comment. Required to fix CPP parsing when using GCC and a clang-compiled alex.+#if __GLASGOW_HASKELL__ < 503+uncheckedShiftL# = shiftL#+#endif++{-# INLINE alexIndexInt16OffAddr #-}+alexIndexInt16OffAddr (AlexA# arr) off =+#ifdef WORDS_BIGENDIAN+  narrow16Int# i+  where+        i    = word2Int# ((high `uncheckedShiftL#` 8#) `or#` low)+        high = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1#)))+        low  = int2Word# (ord# (indexCharOffAddr# arr off'))+        off' = off *# 2#+#else+  indexInt16OffAddr# arr off+#endif++++++{-# INLINE alexIndexInt32OffAddr #-}+alexIndexInt32OffAddr (AlexA# arr) off = +#ifdef WORDS_BIGENDIAN+  narrow32Int# i+  where+   i    = word2Int# ((b3 `uncheckedShiftL#` 24#) `or#`+		     (b2 `uncheckedShiftL#` 16#) `or#`+		     (b1 `uncheckedShiftL#` 8#) `or#` b0)+   b3   = int2Word# (ord# (indexCharOffAddr# arr (off' +# 3#)))+   b2   = int2Word# (ord# (indexCharOffAddr# arr (off' +# 2#)))+   b1   = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1#)))+   b0   = int2Word# (ord# (indexCharOffAddr# arr off'))+   off' = off *# 4#+#else+  indexInt32OffAddr# arr off+#endif+++++++#if __GLASGOW_HASKELL__ < 503+quickIndex arr i = arr ! i+#else+-- GHC >= 503, unsafeAt is available from Data.Array.Base.+quickIndex = unsafeAt+#endif+++++-- -----------------------------------------------------------------------------+-- Main lexing routines++data AlexReturn a+  = AlexEOF+  | AlexError  !AlexInput+  | AlexSkip   !AlexInput !Int+  | AlexToken  !AlexInput !Int a++-- alexScan :: AlexInput -> StartCode -> AlexReturn a+alexScan input (I# (sc))+  = alexScanUser undefined input (I# (sc))++alexScanUser user input (I# (sc))+  = case alex_scan_tkn user input 0# input sc AlexNone of+	(AlexNone, input') ->+		case alexGetByte input of+			Nothing -> ++++				   AlexEOF+			Just _ ->++++				   AlexError input'++	(AlexLastSkip input'' len, _) ->++++		AlexSkip input'' len++	(AlexLastAcc k input''' len, _) ->++++		AlexToken input''' len k+++-- Push the input through the DFA, remembering the most recent accepting+-- state it encountered.++alex_scan_tkn user orig_input len input s last_acc =+  input `seq` -- strict in the input+  let +	new_acc = (check_accs (alex_accept `quickIndex` (I# (s))))+  in+  new_acc `seq`+  case alexGetByte input of+     Nothing -> (new_acc, input)+     Just (c, new_input) -> ++++      case fromIntegral c of { (I# (ord_c)) ->+        let+                base   = alexIndexInt32OffAddr alex_base s+                offset = (base +# ord_c)+                check  = alexIndexInt16OffAddr alex_check offset+		+                new_s = if GTE(offset,0#) && EQ(check,ord_c)+			  then alexIndexInt16OffAddr alex_table offset+			  else alexIndexInt16OffAddr alex_deflt s+	in+        case new_s of+	    -1# -> (new_acc, input)+		-- on an error, we want to keep the input *before* the+		-- character that failed, not after.+    	    _ -> alex_scan_tkn user orig_input (if c < 0x80 || c >= 0xC0 then (len +# 1#) else len)+                                                -- note that the length is increased ONLY if this is the 1st byte in a char encoding)+			new_input new_s new_acc+      }+  where+	check_accs (AlexAccNone) = last_acc+	check_accs (AlexAcc a  ) = AlexLastAcc a input (I# (len))+	check_accs (AlexAccSkip) = AlexLastSkip  input (I# (len))+{-# LINE 198 "templates/GenericTemplate.hs" #-}++data AlexLastAcc a+  = AlexNone+  | AlexLastAcc a !AlexInput !Int+  | AlexLastSkip  !AlexInput !Int++instance Functor AlexLastAcc where+    fmap f AlexNone = AlexNone+    fmap f (AlexLastAcc x y z) = AlexLastAcc (f x) y z+    fmap f (AlexLastSkip x y) = AlexLastSkip x y++data AlexAcc a user+  = AlexAccNone+  | AlexAcc a+  | AlexAccSkip+{-# LINE 242 "templates/GenericTemplate.hs" #-}++-- used by wrappers+iUnbox (I# (i)) = i
+ dist/build/unit-tests/unit-tests-tmp/ParBNF.hs view
@@ -0,0 +1,1751 @@+{-# OPTIONS_GHC -w #-}+{-# OPTIONS -fglasgow-exts -cpp #-}+{-# OPTIONS_GHC -fno-warn-incomplete-patterns -fno-warn-overlapping-patterns #-}+module ParBNF where+import AbsBNF+import LexBNF+import ErrM+import qualified Data.Array as Happy_Data_Array+import qualified GHC.Exts as Happy_GHC_Exts+import Control.Applicative(Applicative(..))++-- parser produced by Happy Version 1.19.4++newtype HappyAbsSyn  = HappyAbsSyn HappyAny+#if __GLASGOW_HASKELL__ >= 607+type HappyAny = Happy_GHC_Exts.Any+#else+type HappyAny = forall a . a+#endif+happyIn36 :: (String) -> (HappyAbsSyn )+happyIn36 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn36 #-}+happyOut36 :: (HappyAbsSyn ) -> (String)+happyOut36 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut36 #-}+happyIn37 :: (Ident) -> (HappyAbsSyn )+happyIn37 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn37 #-}+happyOut37 :: (HappyAbsSyn ) -> (Ident)+happyOut37 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut37 #-}+happyIn38 :: (Integer) -> (HappyAbsSyn )+happyIn38 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn38 #-}+happyOut38 :: (HappyAbsSyn ) -> (Integer)+happyOut38 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut38 #-}+happyIn39 :: (Char) -> (HappyAbsSyn )+happyIn39 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn39 #-}+happyOut39 :: (HappyAbsSyn ) -> (Char)+happyOut39 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut39 #-}+happyIn40 :: (Double) -> (HappyAbsSyn )+happyIn40 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn40 #-}+happyOut40 :: (HappyAbsSyn ) -> (Double)+happyOut40 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut40 #-}+happyIn41 :: (LGrammar) -> (HappyAbsSyn )+happyIn41 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn41 #-}+happyOut41 :: (HappyAbsSyn ) -> (LGrammar)+happyOut41 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut41 #-}+happyIn42 :: (LDef) -> (HappyAbsSyn )+happyIn42 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn42 #-}+happyOut42 :: (HappyAbsSyn ) -> (LDef)+happyOut42 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut42 #-}+happyIn43 :: ([LDef]) -> (HappyAbsSyn )+happyIn43 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn43 #-}+happyOut43 :: (HappyAbsSyn ) -> ([LDef])+happyOut43 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut43 #-}+happyIn44 :: (Grammar) -> (HappyAbsSyn )+happyIn44 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn44 #-}+happyOut44 :: (HappyAbsSyn ) -> (Grammar)+happyOut44 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut44 #-}+happyIn45 :: ([Def]) -> (HappyAbsSyn )+happyIn45 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn45 #-}+happyOut45 :: (HappyAbsSyn ) -> ([Def])+happyOut45 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut45 #-}+happyIn46 :: ([Item]) -> (HappyAbsSyn )+happyIn46 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn46 #-}+happyOut46 :: (HappyAbsSyn ) -> ([Item])+happyOut46 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut46 #-}+happyIn47 :: (Def) -> (HappyAbsSyn )+happyIn47 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn47 #-}+happyOut47 :: (HappyAbsSyn ) -> (Def)+happyOut47 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut47 #-}+happyIn48 :: (Item) -> (HappyAbsSyn )+happyIn48 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn48 #-}+happyOut48 :: (HappyAbsSyn ) -> (Item)+happyOut48 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut48 #-}+happyIn49 :: (Cat) -> (HappyAbsSyn )+happyIn49 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn49 #-}+happyOut49 :: (HappyAbsSyn ) -> (Cat)+happyOut49 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut49 #-}+happyIn50 :: (Label) -> (HappyAbsSyn )+happyIn50 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn50 #-}+happyOut50 :: (HappyAbsSyn ) -> (Label)+happyOut50 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut50 #-}+happyIn51 :: (LabelId) -> (HappyAbsSyn )+happyIn51 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn51 #-}+happyOut51 :: (HappyAbsSyn ) -> (LabelId)+happyOut51 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut51 #-}+happyIn52 :: (ProfItem) -> (HappyAbsSyn )+happyIn52 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn52 #-}+happyOut52 :: (HappyAbsSyn ) -> (ProfItem)+happyOut52 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut52 #-}+happyIn53 :: (IntList) -> (HappyAbsSyn )+happyIn53 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn53 #-}+happyOut53 :: (HappyAbsSyn ) -> (IntList)+happyOut53 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut53 #-}+happyIn54 :: ([Integer]) -> (HappyAbsSyn )+happyIn54 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn54 #-}+happyOut54 :: (HappyAbsSyn ) -> ([Integer])+happyOut54 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut54 #-}+happyIn55 :: ([IntList]) -> (HappyAbsSyn )+happyIn55 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn55 #-}+happyOut55 :: (HappyAbsSyn ) -> ([IntList])+happyOut55 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut55 #-}+happyIn56 :: ([ProfItem]) -> (HappyAbsSyn )+happyIn56 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn56 #-}+happyOut56 :: (HappyAbsSyn ) -> ([ProfItem])+happyOut56 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut56 #-}+happyIn57 :: (Separation) -> (HappyAbsSyn )+happyIn57 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn57 #-}+happyOut57 :: (HappyAbsSyn ) -> (Separation)+happyOut57 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut57 #-}+happyIn58 :: (Arg) -> (HappyAbsSyn )+happyIn58 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn58 #-}+happyOut58 :: (HappyAbsSyn ) -> (Arg)+happyOut58 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut58 #-}+happyIn59 :: ([Arg]) -> (HappyAbsSyn )+happyIn59 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn59 #-}+happyOut59 :: (HappyAbsSyn ) -> ([Arg])+happyOut59 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut59 #-}+happyIn60 :: (Exp) -> (HappyAbsSyn )+happyIn60 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn60 #-}+happyOut60 :: (HappyAbsSyn ) -> (Exp)+happyOut60 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut60 #-}+happyIn61 :: (Exp) -> (HappyAbsSyn )+happyIn61 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn61 #-}+happyOut61 :: (HappyAbsSyn ) -> (Exp)+happyOut61 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut61 #-}+happyIn62 :: (Exp) -> (HappyAbsSyn )+happyIn62 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn62 #-}+happyOut62 :: (HappyAbsSyn ) -> (Exp)+happyOut62 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut62 #-}+happyIn63 :: ([Exp]) -> (HappyAbsSyn )+happyIn63 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn63 #-}+happyOut63 :: (HappyAbsSyn ) -> ([Exp])+happyOut63 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut63 #-}+happyIn64 :: ([Exp]) -> (HappyAbsSyn )+happyIn64 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn64 #-}+happyOut64 :: (HappyAbsSyn ) -> ([Exp])+happyOut64 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut64 #-}+happyIn65 :: ([String]) -> (HappyAbsSyn )+happyIn65 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn65 #-}+happyOut65 :: (HappyAbsSyn ) -> ([String])+happyOut65 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut65 #-}+happyIn66 :: ([RHS]) -> (HappyAbsSyn )+happyIn66 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn66 #-}+happyOut66 :: (HappyAbsSyn ) -> ([RHS])+happyOut66 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut66 #-}+happyIn67 :: (RHS) -> (HappyAbsSyn )+happyIn67 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn67 #-}+happyOut67 :: (HappyAbsSyn ) -> (RHS)+happyOut67 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut67 #-}+happyIn68 :: (MinimumSize) -> (HappyAbsSyn )+happyIn68 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn68 #-}+happyOut68 :: (HappyAbsSyn ) -> (MinimumSize)+happyOut68 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut68 #-}+happyIn69 :: (Reg) -> (HappyAbsSyn )+happyIn69 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn69 #-}+happyOut69 :: (HappyAbsSyn ) -> (Reg)+happyOut69 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut69 #-}+happyIn70 :: (Reg) -> (HappyAbsSyn )+happyIn70 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn70 #-}+happyOut70 :: (HappyAbsSyn ) -> (Reg)+happyOut70 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut70 #-}+happyIn71 :: (Reg) -> (HappyAbsSyn )+happyIn71 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn71 #-}+happyOut71 :: (HappyAbsSyn ) -> (Reg)+happyOut71 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut71 #-}+happyIn72 :: (Reg) -> (HappyAbsSyn )+happyIn72 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn72 #-}+happyOut72 :: (HappyAbsSyn ) -> (Reg)+happyOut72 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut72 #-}+happyIn73 :: ([Ident]) -> (HappyAbsSyn )+happyIn73 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyIn73 #-}+happyOut73 :: (HappyAbsSyn ) -> ([Ident])+happyOut73 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut73 #-}+happyInTok :: (Token) -> (HappyAbsSyn )+happyInTok x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyInTok #-}+happyOutTok :: (HappyAbsSyn ) -> (Token)+happyOutTok x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOutTok #-}+++happyActOffsets :: HappyAddr+happyActOffsets = HappyA# "\x45\x00\x45\x00\x45\x00\x64\x00\x64\x00\x00\x00\x64\x00\xbc\x00\xbd\x00\x71\x00\x71\x00\xda\x01\xd9\x01\xd8\x01\xd6\x01\xd7\x01\x7e\x01\xd5\x01\x00\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\xd4\x01\x00\x00\x00\x00\xd3\x01\x29\x00\x29\x00\x29\x00\x29\x00\xd2\x01\xcc\x01\x00\x00\xd1\x01\xcb\x01\x00\x00\x00\x00\x11\x00\xd0\x01\x89\x01\xc8\x01\x29\x00\xc9\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc9\x01\x00\x00\x3e\x00\xe2\xff\x01\x00\xc5\x01\x00\x00\xbc\x00\xc5\x01\xc5\x01\xc4\x01\xcf\x01\xc3\x01\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\xce\x01\xca\x01\x00\x00\xc2\x01\x07\x00\x07\x00\x00\x00\x00\x00\x00\x00\x07\x00\xc2\x01\xc2\x01\xc2\x01\xc2\x01\x6a\x01\x00\x00\xc2\x01\xc2\x01\xc1\x01\xc1\x01\xcd\x01\xbf\x01\xc0\x01\xc7\x01\xbe\x01\xbc\x01\xc6\x01\xba\x01\xba\x01\xba\x01\x00\x00\xba\x01\xbd\x01\xb9\x01\x00\x00\xb4\x01\x5e\x00\x00\x00\xb4\x01\xbd\x00\x00\x00\xb4\x01\x00\x00\xb4\x01\xbb\x01\xb6\x01\xb5\x01\xb3\x01\xbd\x00\xb3\x01\x44\x00\x68\x01\xaf\x01\xad\x01\xa8\x01\xa8\x01\xa6\x01\x7c\x00\x9c\x01\xb7\x01\x9b\x01\x00\x00\x8b\x00\xb0\x01\x9a\x01\x00\x00\xb8\x01\x99\x01\x98\x01\x98\x01\x00\x00\x00\x00\x64\x00\x45\x00\x93\x01\x64\x00\x00\x00\x29\x00\xbd\x00\xbd\x00\xb2\x01\x8e\x01\x00\x00\x96\x01\x00\x00\xae\x01\x00\x00\x95\x01\x00\x00\x95\x01\x91\x01\xbd\x00\xab\x01\xb1\x01\x00\x00\xfe\xff\x00\x00\x6e\x00\x84\x01\xa9\x01\xa7\x01\xa7\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa5\x01\xac\x01\x07\x00\x07\x00\x00\x00\x8d\x01\x00\x00\x10\x01\x29\x00\x00\x00\x00\x00\x00\x00\x85\x01\xa3\x01\xaa\x01\x29\x00\x29\x00\x00\x00\x00\x00\x00\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x01\x00\x00\x00\x00\x00\x00\x00\x00\x9d\x01\x00\x00\x00\x00\xa1\x01\x00\x00\x00\x00\xf6\xff\x80\x01\xbd\x00\x00\x00\x29\x00\x00\x00\x80\x01\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x01\x7e\x01\x07\x00\x00\x00\xa4\x01\xa0\x01\x97\x01\x00\x00\xbc\x00\x00\x00\x8c\x01\x00\x00\xbc\x00\x00\x00\x78\x01\x94\x01\x9f\x01\x00\x00\x00\x00"#++happyGotoOffsets :: HappyAddr+happyGotoOffsets = HappyA# "\x86\x00\xa3\x00\xa1\x00\x58\x01\x6e\x01\x90\x01\x70\x01\x82\x01\x86\x01\x77\x01\x06\x00\x87\x01\x8f\x01\xb2\x00\x8b\x01\x48\x01\x74\x01\x0c\x00\x7f\x01\x30\x01\x4b\x01\x50\x01\x05\x01\xf6\x00\xc7\x00\x3c\x01\x31\x00\x3e\x01\xc0\x00\xb0\x00\x46\x00\xaa\x00\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x92\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8a\x01\x00\x00\x00\x00\x00\x00\x1c\x00\x00\x00\x00\x00\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x01\xd9\x00\x00\x00\x00\x00\x00\x00\xfb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x7a\x01\x6b\x01\x28\x01\x00\x00\x00\x00\x00\x00\x00\x00\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x01\x00\x00\x00\x00\x83\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x73\x01\x5d\x01\x56\x01\x61\x01\x22\x00\x72\x01\xc5\x00\x00\x00\x46\x01\x1d\x01\xfe\x00\x0b\x01\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5e\x01\x91\x00\x04\x00\x67\x01\x00\x00\x9a\x00\x35\x01\x0a\x01\x00\x00\xee\x00\x00\x00\x79\x00\x00\x00\x00\x00\x00\x00\xe9\x00\xfc\xff\xe0\x00\xce\x00\xe7\x00\x00\x00\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7d\x00\x00\x00\x88\x01\x24\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x26\x01\xd4\x00\x00\x00\x4b\x00\x37\x01\x00\x00\x39\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x1c\x00\x00\x00\x00\x00\x00\x00\x1c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\xcf\x00\x02\x00\x00\x00\x96\x00\x42\x00\xb5\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8e\x00\x21\x01\x94\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\x00\x00\x00\xec\xff\x13\x00\xde\x00\x00\x00\x72\x00\x00\x00\x00\x00\x00\x00\x00\x00"#++happyDefActions :: HappyAddr+happyDefActions = HappyA# "\xd5\xff\x00\x00\xd5\xff\xd1\xff\xd1\xff\xce\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\xff\xaa\xff\x00\x00\xa5\xff\x00\x00\xa1\xff\x00\x00\x00\x00\x00\x00\x00\x00\x92\xff\x00\x00\xce\xff\xce\xff\x89\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\xff\x75\xff\x00\x00\xdd\xff\x7f\xff\x84\xff\x76\xff\x87\xff\x00\x00\x00\x00\x00\x00\x78\xff\x7c\xff\x80\xff\x7b\xff\x79\xff\x7a\xff\x00\x00\xdb\xff\x00\x00\x00\x00\x00\x00\x00\x00\x8a\xff\x8b\xff\x00\x00\x00\x00\x8d\xff\x8f\xff\x00\x00\x98\xff\x9b\xff\x9a\xff\x99\xff\x97\xff\x91\xff\x9e\xff\x9c\xff\x00\x00\x00\x00\x92\xff\xdc\xff\xda\xff\x9b\xff\x94\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\xff\x00\x00\x00\x00\x00\x00\x00\x00\xa7\xff\x00\x00\x00\x00\xa9\xff\x00\x00\xad\xff\xac\xff\x00\x00\x00\x00\x00\x00\xb4\xff\x00\x00\x00\x00\x00\x00\xb3\xff\x00\x00\xb8\xff\xb9\xff\x00\x00\x00\x00\xbc\xff\x00\x00\xbb\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x89\xff\x89\xff\x00\x00\x00\x00\x00\x00\xd0\xff\x00\x00\xd2\xff\xb4\xff\xd4\xff\x00\x00\xd8\xff\x00\x00\x00\x00\x00\x00\x00\x00\xd9\xff\xd6\xff\x00\x00\xd5\xff\x00\x00\xd1\xff\xcd\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbf\xff\x00\x00\xbd\xff\x00\x00\xc6\xff\x00\x00\xa1\xff\xcb\xff\x00\x00\x00\x00\x00\x00\xb5\xff\xb7\xff\x00\x00\xb2\xff\x00\x00\xad\xff\x00\x00\xaa\xff\xaa\xff\xa6\xff\xa4\xff\xa3\xff\xa0\xff\x93\xff\x00\x00\x00\x00\x00\x00\x92\xff\x9d\xff\x00\x00\xce\xff\x88\xff\x00\x00\x83\xff\x82\xff\x81\xff\x00\x00\x00\x00\x00\x00\x00\x00\x85\xff\x77\xff\x7e\xff\x7d\xff\x86\xff\x8c\xff\x8e\xff\x90\xff\x9f\xff\x95\xff\x96\xff\x00\x00\xa8\xff\xae\xff\xab\xff\xb1\xff\x00\x00\xb6\xff\xba\xff\x00\x00\xc2\xff\xca\xff\x00\x00\x00\x00\x00\x00\xbe\xff\x00\x00\xce\xff\x00\x00\x00\x00\xc8\xff\xcf\xff\x74\xff\xd3\xff\xd7\xff\xc4\xff\xc5\xff\xc1\xff\xc7\xff\x00\x00\xa5\xff\x00\x00\xce\xff\x00\x00\x00\x00\x00\x00\xb0\xff\xcc\xff\xc0\xff\x89\xff\xce\xff\xc9\xff\xc3\xff\xad\xff\x00\x00\x00\x00\xaf\xff"#++happyCheck :: HappyAddr+happyCheck = HappyA# "\xff\xff\x0b\x00\x01\x00\x01\x00\x01\x00\x01\x00\x08\x00\x01\x00\x01\x00\x27\x00\x01\x00\x0d\x00\x20\x00\x01\x00\x0d\x00\x0d\x00\x2e\x00\x10\x00\x01\x00\x17\x00\x0d\x00\x0f\x00\x15\x00\x06\x00\x17\x00\x16\x00\x03\x00\x1a\x00\x1b\x00\x0a\x00\x0d\x00\x03\x00\x2a\x00\x10\x00\x16\x00\x01\x00\x01\x00\x24\x00\x15\x00\x26\x00\x17\x00\x25\x00\x01\x00\x1a\x00\x1b\x00\x2c\x00\x25\x00\x2e\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x24\x00\x0d\x00\x26\x00\x21\x00\x10\x00\x23\x00\x0a\x00\x03\x00\x2c\x00\x15\x00\x23\x00\x17\x00\x03\x00\x04\x00\x1a\x00\x1b\x00\x01\x00\x01\x00\x25\x00\x25\x00\x03\x00\x0c\x00\x00\x00\x0a\x00\x24\x00\x00\x00\x26\x00\x1f\x00\x0d\x00\x0d\x00\x0f\x00\x0f\x00\x2c\x00\x11\x00\x12\x00\x13\x00\x14\x00\x21\x00\x16\x00\x23\x00\x18\x00\x19\x00\x01\x00\x1e\x00\x1f\x00\x1d\x00\x1e\x00\x1f\x00\x01\x00\x21\x00\x22\x00\x1d\x00\x23\x00\x25\x00\x0d\x00\x2e\x00\x0f\x00\x2a\x00\x2a\x00\x02\x00\x0d\x00\x01\x00\x0f\x00\x02\x00\x11\x00\x12\x00\x13\x00\x14\x00\x00\x00\x16\x00\x0d\x00\x18\x00\x19\x00\x0d\x00\x02\x00\x0f\x00\x1d\x00\x1e\x00\x1f\x00\x12\x00\x21\x00\x22\x00\x01\x00\x2a\x00\x0d\x00\x02\x00\x05\x00\x06\x00\x07\x00\x2a\x00\x12\x00\x05\x00\x0b\x00\x01\x00\x08\x00\x0e\x00\x0f\x00\x1d\x00\x06\x00\x07\x00\x03\x00\x12\x00\x2a\x00\x0b\x00\x03\x00\x0a\x00\x0e\x00\x0f\x00\x03\x00\x01\x00\x15\x00\x01\x00\x29\x00\x2a\x00\x06\x00\x07\x00\x06\x00\x2e\x00\x25\x00\x0b\x00\x03\x00\x0b\x00\x0e\x00\x0f\x00\x0e\x00\x0f\x00\x03\x00\x02\x00\x00\x00\x25\x00\x21\x00\x22\x00\x23\x00\x24\x00\x21\x00\x22\x00\x23\x00\x24\x00\x21\x00\x22\x00\x23\x00\x24\x00\x03\x00\x12\x00\x00\x00\x25\x00\x00\x00\x25\x00\x0d\x00\x0d\x00\x21\x00\x22\x00\x23\x00\x24\x00\x00\x00\x02\x00\x21\x00\x22\x00\x23\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x00\x00\x01\x00\x00\x00\x21\x00\x1d\x00\x23\x00\x1d\x00\x29\x00\x2a\x00\x2a\x00\x01\x00\x00\x00\x0c\x00\x0d\x00\x18\x00\x19\x00\x1a\x00\x01\x00\x1c\x00\x18\x00\x19\x00\x1a\x00\x0d\x00\x1c\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x01\x00\x01\x00\x01\x00\x10\x00\x18\x00\x19\x00\x1a\x00\x14\x00\x1c\x00\x03\x00\x04\x00\x1a\x00\x1b\x00\x0d\x00\x0f\x00\x10\x00\x1a\x00\x1b\x00\x0c\x00\x14\x00\x20\x00\x1a\x00\x1b\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x11\x00\x01\x00\x13\x00\x10\x00\x18\x00\x19\x00\x1a\x00\x14\x00\x20\x00\x18\x00\x19\x00\x1a\x00\x0a\x00\x0d\x00\x18\x00\x19\x00\x1a\x00\x0a\x00\x01\x00\x18\x00\x19\x00\x1a\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x1e\x00\x1f\x00\x01\x00\x10\x00\x01\x00\x1e\x00\x1f\x00\x14\x00\x00\x00\x20\x00\x01\x00\x08\x00\x09\x00\x01\x00\x0b\x00\x19\x00\x1a\x00\x0e\x00\x0f\x00\x01\x00\x0b\x00\x1a\x00\x00\x00\x0e\x00\x0f\x00\x0d\x00\x01\x00\x09\x00\x01\x00\x0b\x00\x01\x00\x01\x00\x0e\x00\x0f\x00\x09\x00\x01\x00\x0b\x00\x00\x00\x0b\x00\x0e\x00\x0f\x00\x0e\x00\x0f\x00\x0e\x00\x0f\x00\x00\x00\x01\x00\x01\x00\x0e\x00\x0f\x00\x01\x00\x20\x00\x15\x00\x00\x00\x23\x00\x03\x00\x04\x00\x0c\x00\x0d\x00\x0d\x00\x29\x00\x00\x00\x0d\x00\x2a\x00\x0c\x00\x17\x00\x10\x00\x2e\x00\x11\x00\x0a\x00\x13\x00\x11\x00\x1f\x00\x13\x00\x21\x00\x11\x00\x02\x00\x0e\x00\x2b\x00\x0d\x00\x05\x00\x02\x00\x09\x00\x1c\x00\x29\x00\x09\x00\x0e\x00\x02\x00\x28\x00\x02\x00\x2b\x00\x0e\x00\x0e\x00\x01\x00\x0e\x00\x0d\x00\x07\x00\x29\x00\x0e\x00\x2a\x00\x0e\x00\x0a\x00\x09\x00\x2b\x00\x2a\x00\x29\x00\x29\x00\x08\x00\x0a\x00\x07\x00\x2a\x00\x1c\x00\x08\x00\x2e\x00\x0e\x00\x2e\x00\x2e\x00\x2e\x00\x05\x00\x05\x00\x0d\x00\x01\x00\xff\xff\x2a\x00\x22\x00\x08\x00\x05\x00\x05\x00\xff\xff\x05\x00\x2a\x00\x01\x00\xff\xff\xff\xff\x01\x00\xff\xff\x2a\x00\x29\x00\xff\xff\x2a\x00\xff\xff\x2e\x00\x0d\x00\xff\xff\xff\xff\x0d\x00\x2b\x00\x2e\x00\xff\xff\x29\x00\x27\x00\x2e\x00\x2e\x00\xff\xff\x1c\x00\x2e\x00\x2e\x00\x29\x00\x2e\x00\xff\xff\x29\x00\x2e\x00\x27\x00\xff\xff\x2e\x00\xff\xff\xff\xff\x2a\x00\x29\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x2b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#++happyTable :: HappyAddr+happyTable = HappyA# "\x00\x00\xea\x00\x2c\x00\x6a\x00\x54\x00\x23\x00\xa7\x00\x63\x00\x4a\x00\xb9\x00\x23\x00\xab\x00\xf4\x00\x54\x00\x2d\x00\xe7\x00\xff\xff\x2e\x00\x2c\x00\xd6\x00\x4b\x00\x64\x00\x2f\x00\xc0\x00\x30\x00\xae\x00\x26\x00\x31\x00\x32\x00\xf3\x00\x2d\x00\x26\x00\x26\x00\x2e\x00\x55\x00\x23\x00\x23\x00\x33\x00\x2f\x00\x34\x00\x30\x00\xe0\x00\x2c\x00\x31\x00\x32\x00\x35\x00\x8c\x00\xff\xff\x23\x00\x26\x00\x4c\x00\x35\x00\x4d\x00\x33\x00\x2d\x00\x34\x00\xc0\x00\x2e\x00\x29\x00\x3a\x00\x26\x00\x35\x00\x2f\x00\xb7\x00\x30\x00\xba\x00\xbb\x00\x31\x00\x32\x00\x66\x00\x66\x00\x9b\x00\x24\x00\x26\x00\xbc\x00\x3e\x00\x3a\x00\x33\x00\xe3\x00\x34\x00\x3b\x00\x67\x00\x67\x00\x68\x00\x68\x00\x35\x00\x73\x00\x74\x00\x75\x00\x76\x00\xc4\x00\x77\x00\x29\x00\x78\x00\x79\x00\xa5\x00\xe5\x00\x3d\x00\x7a\x00\x7b\x00\x7c\x00\x66\x00\x7d\x00\x7e\x00\xc6\x00\x35\x00\x89\x00\x67\x00\xff\xff\x68\x00\x26\x00\x26\x00\xd0\x00\x67\x00\x66\x00\x68\x00\x5f\x00\x73\x00\x74\x00\x75\x00\x76\x00\x3e\x00\x77\x00\xd1\x00\x78\x00\x79\x00\x67\x00\x5f\x00\x68\x00\x7a\x00\x7b\x00\x7c\x00\xf6\x00\x7d\x00\x7e\x00\x83\x00\x26\x00\x6d\x00\x5f\x00\x8a\x00\x84\x00\x8b\x00\x26\x00\xce\x00\x90\x00\x86\x00\x83\x00\x75\xff\x71\x00\x69\x00\xd9\x00\x84\x00\xe1\x00\x26\x00\xa8\x00\x26\x00\x86\x00\x26\x00\xef\x00\x71\x00\x69\x00\x26\x00\x83\x00\xf1\x00\x83\x00\x23\x00\x26\x00\x84\x00\x85\x00\x89\x00\xff\xff\x87\x00\x86\x00\x26\x00\x86\x00\x71\x00\x69\x00\x71\x00\x69\x00\x26\x00\x5f\x00\xe4\x00\x87\x00\x27\x00\x28\x00\x29\x00\xe6\x00\x27\x00\x28\x00\x29\x00\xde\x00\x27\x00\x28\x00\x29\x00\xbe\x00\x26\x00\x60\x00\x3e\x00\x87\x00\x3e\x00\x87\x00\x6d\x00\x6d\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xe8\x00\xd4\x00\x27\x00\x36\x00\x29\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x6d\x00\x6a\x00\xd5\x00\x37\x00\x97\x00\x29\x00\x3f\x00\x23\x00\x26\x00\x26\x00\x6a\x00\xd7\x00\x91\x00\x6f\x00\x45\x00\x46\x00\x47\x00\xda\x00\xc7\x00\x45\x00\x46\x00\x47\x00\xd3\x00\xb0\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x40\x00\x4d\x00\x42\x00\x43\x00\x44\x00\x40\x00\x4d\x00\x42\x00\x43\x00\x44\x00\x40\x00\x4d\x00\x42\x00\x43\x00\x44\x00\x63\x00\x6a\x00\x92\x00\x59\x00\x45\x00\x46\x00\x47\x00\xd1\x00\x48\x00\xba\x00\xbb\x00\x4e\x00\xaf\x00\xdc\x00\xa2\x00\x59\x00\x4e\x00\xb4\x00\xbc\x00\xa3\x00\x93\x00\x4e\x00\x4f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x5c\x00\x6a\x00\xcb\x00\x59\x00\xf0\x00\x46\x00\x47\x00\xab\x00\x94\x00\xc8\x00\x46\x00\x47\x00\x3a\x00\xdd\x00\xb1\x00\x46\x00\x47\x00\x3a\x00\x95\x00\x52\x00\x46\x00\x47\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x40\x00\x4d\x00\x42\x00\x43\x00\x44\x00\xc5\x00\x3d\x00\x9d\x00\x59\x00\x63\x00\x3c\x00\x3d\x00\x5a\x00\x9e\x00\x38\x00\x63\x00\x81\x00\x82\x00\x6a\x00\x80\x00\x51\x00\x47\x00\x71\x00\x69\x00\x63\x00\xe2\x00\x50\x00\xac\x00\x71\x00\x69\x00\x9c\x00\x63\x00\xdf\x00\x63\x00\x80\x00\x63\x00\x9f\x00\x71\x00\x69\x00\x7f\x00\x63\x00\x80\x00\xad\x00\x70\x00\x71\x00\x69\x00\x71\x00\x69\x00\x9a\x00\x69\x00\x6d\x00\x6a\x00\x6a\x00\x68\x00\x69\x00\x6a\x00\x99\x00\x56\x00\xbc\x00\x9a\x00\xba\x00\xbb\x00\x6e\x00\x6f\x00\xa1\x00\x23\x00\xbd\x00\x6b\x00\x26\x00\xbc\x00\x53\x00\x62\x00\xff\xff\x5c\x00\x7e\x00\xcc\x00\x5c\x00\x58\x00\x5d\x00\x59\x00\x61\x00\xf9\x00\xf8\x00\x4c\x00\xf6\x00\xee\x00\xef\x00\xf3\x00\x3a\x00\x23\x00\xeb\x00\xec\x00\xc2\x00\xc4\x00\xca\x00\x4c\x00\xed\x00\xc3\x00\x5c\x00\xcb\x00\x5f\x00\xd9\x00\x23\x00\xce\x00\x26\x00\xd3\x00\x8f\x00\xdc\x00\x4c\x00\x26\x00\x23\x00\x23\x00\x8e\x00\x91\x00\xa1\x00\x26\x00\x3a\x00\xa7\x00\xff\xff\xa6\x00\xff\xff\xff\xff\xff\xff\xa8\x00\xaa\x00\xab\x00\x5c\x00\x00\x00\x26\x00\x97\x00\xb3\x00\xb4\x00\xb6\x00\x00\x00\x90\x00\x26\x00\x5c\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x26\x00\x23\x00\x00\x00\x26\x00\x00\x00\xff\xff\x5f\x00\x00\x00\x00\x00\x5f\x00\x4c\x00\xff\xff\x00\x00\x23\x00\xb7\x00\xff\xff\xff\xff\x00\x00\x3a\x00\xff\xff\xff\xff\x23\x00\xff\xff\x00\x00\x23\x00\xff\xff\xb9\x00\x00\x00\xff\xff\x00\x00\x00\x00\x26\x00\x23\x00\x00\x00\x26\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#++happyReduceArr = Happy_Data_Array.array (33, 139) [+	(33 , happyReduce_33),+	(34 , happyReduce_34),+	(35 , happyReduce_35),+	(36 , happyReduce_36),+	(37 , happyReduce_37),+	(38 , happyReduce_38),+	(39 , happyReduce_39),+	(40 , happyReduce_40),+	(41 , happyReduce_41),+	(42 , happyReduce_42),+	(43 , happyReduce_43),+	(44 , happyReduce_44),+	(45 , happyReduce_45),+	(46 , happyReduce_46),+	(47 , happyReduce_47),+	(48 , happyReduce_48),+	(49 , happyReduce_49),+	(50 , happyReduce_50),+	(51 , happyReduce_51),+	(52 , happyReduce_52),+	(53 , happyReduce_53),+	(54 , happyReduce_54),+	(55 , happyReduce_55),+	(56 , happyReduce_56),+	(57 , happyReduce_57),+	(58 , happyReduce_58),+	(59 , happyReduce_59),+	(60 , happyReduce_60),+	(61 , happyReduce_61),+	(62 , happyReduce_62),+	(63 , happyReduce_63),+	(64 , happyReduce_64),+	(65 , happyReduce_65),+	(66 , happyReduce_66),+	(67 , happyReduce_67),+	(68 , happyReduce_68),+	(69 , happyReduce_69),+	(70 , happyReduce_70),+	(71 , happyReduce_71),+	(72 , happyReduce_72),+	(73 , happyReduce_73),+	(74 , happyReduce_74),+	(75 , happyReduce_75),+	(76 , happyReduce_76),+	(77 , happyReduce_77),+	(78 , happyReduce_78),+	(79 , happyReduce_79),+	(80 , happyReduce_80),+	(81 , happyReduce_81),+	(82 , happyReduce_82),+	(83 , happyReduce_83),+	(84 , happyReduce_84),+	(85 , happyReduce_85),+	(86 , happyReduce_86),+	(87 , happyReduce_87),+	(88 , happyReduce_88),+	(89 , happyReduce_89),+	(90 , happyReduce_90),+	(91 , happyReduce_91),+	(92 , happyReduce_92),+	(93 , happyReduce_93),+	(94 , happyReduce_94),+	(95 , happyReduce_95),+	(96 , happyReduce_96),+	(97 , happyReduce_97),+	(98 , happyReduce_98),+	(99 , happyReduce_99),+	(100 , happyReduce_100),+	(101 , happyReduce_101),+	(102 , happyReduce_102),+	(103 , happyReduce_103),+	(104 , happyReduce_104),+	(105 , happyReduce_105),+	(106 , happyReduce_106),+	(107 , happyReduce_107),+	(108 , happyReduce_108),+	(109 , happyReduce_109),+	(110 , happyReduce_110),+	(111 , happyReduce_111),+	(112 , happyReduce_112),+	(113 , happyReduce_113),+	(114 , happyReduce_114),+	(115 , happyReduce_115),+	(116 , happyReduce_116),+	(117 , happyReduce_117),+	(118 , happyReduce_118),+	(119 , happyReduce_119),+	(120 , happyReduce_120),+	(121 , happyReduce_121),+	(122 , happyReduce_122),+	(123 , happyReduce_123),+	(124 , happyReduce_124),+	(125 , happyReduce_125),+	(126 , happyReduce_126),+	(127 , happyReduce_127),+	(128 , happyReduce_128),+	(129 , happyReduce_129),+	(130 , happyReduce_130),+	(131 , happyReduce_131),+	(132 , happyReduce_132),+	(133 , happyReduce_133),+	(134 , happyReduce_134),+	(135 , happyReduce_135),+	(136 , happyReduce_136),+	(137 , happyReduce_137),+	(138 , happyReduce_138),+	(139 , happyReduce_139)+	]++happy_n_terms = 47 :: Int+happy_n_nonterms = 38 :: Int++happyReduce_33 = happySpecReduce_1  0# happyReduction_33+happyReduction_33 happy_x_1+	 =  case happyOutTok happy_x_1 of { (PT _ (TL happy_var_1)) -> +	happyIn36+		 (happy_var_1+	)}++happyReduce_34 = happySpecReduce_1  1# happyReduction_34+happyReduction_34 happy_x_1+	 =  case happyOutTok happy_x_1 of { (PT _ (TV happy_var_1)) -> +	happyIn37+		 (Ident happy_var_1+	)}++happyReduce_35 = happySpecReduce_1  2# happyReduction_35+happyReduction_35 happy_x_1+	 =  case happyOutTok happy_x_1 of { (PT _ (TI happy_var_1)) -> +	happyIn38+		 ((read ( happy_var_1)) :: Integer+	)}++happyReduce_36 = happySpecReduce_1  3# happyReduction_36+happyReduction_36 happy_x_1+	 =  case happyOutTok happy_x_1 of { (PT _ (TC happy_var_1)) -> +	happyIn39+		 ((read ( happy_var_1)) :: Char+	)}++happyReduce_37 = happySpecReduce_1  4# happyReduction_37+happyReduction_37 happy_x_1+	 =  case happyOutTok happy_x_1 of { (PT _ (TD happy_var_1)) -> +	happyIn40+		 ((read ( happy_var_1)) :: Double+	)}++happyReduce_38 = happySpecReduce_1  5# happyReduction_38+happyReduction_38 happy_x_1+	 =  case happyOut43 happy_x_1 of { happy_var_1 -> +	happyIn41+		 (LGr happy_var_1+	)}++happyReduce_39 = happySpecReduce_1  6# happyReduction_39+happyReduction_39 happy_x_1+	 =  case happyOut47 happy_x_1 of { happy_var_1 -> +	happyIn42+		 (DefAll happy_var_1+	)}++happyReduce_40 = happySpecReduce_3  6# happyReduction_40+happyReduction_40 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut73 happy_x_1 of { happy_var_1 -> +	case happyOut47 happy_x_3 of { happy_var_3 -> +	happyIn42+		 (DefSome happy_var_1 happy_var_3+	)}}++happyReduce_41 = happySpecReduce_2  6# happyReduction_41+happyReduction_41 happy_x_2+	happy_x_1+	 =  case happyOut73 happy_x_2 of { happy_var_2 -> +	happyIn42+		 (LDefView happy_var_2+	)}++happyReduce_42 = happySpecReduce_0  7# happyReduction_42+happyReduction_42  =  happyIn43+		 ([]+	)++happyReduce_43 = happySpecReduce_1  7# happyReduction_43+happyReduction_43 happy_x_1+	 =  case happyOut42 happy_x_1 of { happy_var_1 -> +	happyIn43+		 ((:[]) happy_var_1+	)}++happyReduce_44 = happySpecReduce_3  7# happyReduction_44+happyReduction_44 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut42 happy_x_1 of { happy_var_1 -> +	case happyOut43 happy_x_3 of { happy_var_3 -> +	happyIn43+		 ((:) happy_var_1 happy_var_3+	)}}++happyReduce_45 = happySpecReduce_1  8# happyReduction_45+happyReduction_45 happy_x_1+	 =  case happyOut45 happy_x_1 of { happy_var_1 -> +	happyIn44+		 (Grammar happy_var_1+	)}++happyReduce_46 = happySpecReduce_0  9# happyReduction_46+happyReduction_46  =  happyIn45+		 ([]+	)++happyReduce_47 = happySpecReduce_1  9# happyReduction_47+happyReduction_47 happy_x_1+	 =  case happyOut47 happy_x_1 of { happy_var_1 -> +	happyIn45+		 ((:[]) happy_var_1+	)}++happyReduce_48 = happySpecReduce_3  9# happyReduction_48+happyReduction_48 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut47 happy_x_1 of { happy_var_1 -> +	case happyOut45 happy_x_3 of { happy_var_3 -> +	happyIn45+		 ((:) happy_var_1 happy_var_3+	)}}++happyReduce_49 = happySpecReduce_0  10# happyReduction_49+happyReduction_49  =  happyIn46+		 ([]+	)++happyReduce_50 = happySpecReduce_2  10# happyReduction_50+happyReduction_50 happy_x_2+	happy_x_1+	 =  case happyOut46 happy_x_1 of { happy_var_1 -> +	case happyOut48 happy_x_2 of { happy_var_2 -> +	happyIn46+		 (flip (:) happy_var_1 happy_var_2+	)}}++happyReduce_51 = happyReduce 5# 11# happyReduction_51+happyReduction_51 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut50 happy_x_1 of { happy_var_1 -> +	case happyOut49 happy_x_3 of { happy_var_3 -> +	case happyOut46 happy_x_5 of { happy_var_5 -> +	happyIn47+		 (Rule happy_var_1 happy_var_3 (reverse happy_var_5)+	) `HappyStk` happyRest}}}++happyReduce_52 = happySpecReduce_2  11# happyReduction_52+happyReduction_52 happy_x_2+	happy_x_1+	 =  case happyOut36 happy_x_2 of { happy_var_2 -> +	happyIn47+		 (Comment happy_var_2+	)}++happyReduce_53 = happySpecReduce_3  11# happyReduction_53+happyReduction_53 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut36 happy_x_2 of { happy_var_2 -> +	case happyOut36 happy_x_3 of { happy_var_3 -> +	happyIn47+		 (Comments happy_var_2 happy_var_3+	)}}++happyReduce_54 = happyReduce 6# 11# happyReduction_54+happyReduction_54 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut50 happy_x_2 of { happy_var_2 -> +	case happyOut49 happy_x_4 of { happy_var_4 -> +	case happyOut46 happy_x_6 of { happy_var_6 -> +	happyIn47+		 (Internal happy_var_2 happy_var_4 (reverse happy_var_6)+	) `HappyStk` happyRest}}}++happyReduce_55 = happySpecReduce_3  11# happyReduction_55+happyReduction_55 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut37 happy_x_2 of { happy_var_2 -> +	case happyOut72 happy_x_3 of { happy_var_3 -> +	happyIn47+		 (Token happy_var_2 happy_var_3+	)}}++happyReduce_56 = happyReduce 4# 11# happyReduction_56+happyReduction_56 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut37 happy_x_3 of { happy_var_3 -> +	case happyOut72 happy_x_4 of { happy_var_4 -> +	happyIn47+		 (PosToken happy_var_3 happy_var_4+	) `HappyStk` happyRest}}++happyReduce_57 = happySpecReduce_2  11# happyReduction_57+happyReduction_57 happy_x_2+	happy_x_1+	 =  case happyOut73 happy_x_2 of { happy_var_2 -> +	happyIn47+		 (Entryp happy_var_2+	)}++happyReduce_58 = happyReduce 4# 11# happyReduction_58+happyReduction_58 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut68 happy_x_2 of { happy_var_2 -> +	case happyOut49 happy_x_3 of { happy_var_3 -> +	case happyOut36 happy_x_4 of { happy_var_4 -> +	happyIn47+		 (Separator happy_var_2 happy_var_3 happy_var_4+	) `HappyStk` happyRest}}}++happyReduce_59 = happyReduce 4# 11# happyReduction_59+happyReduction_59 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut68 happy_x_2 of { happy_var_2 -> +	case happyOut49 happy_x_3 of { happy_var_3 -> +	case happyOut36 happy_x_4 of { happy_var_4 -> +	happyIn47+		 (Terminator happy_var_2 happy_var_3 happy_var_4+	) `HappyStk` happyRest}}}++happyReduce_60 = happyReduce 6# 11# happyReduction_60+happyReduction_60 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut49 happy_x_2 of { happy_var_2 -> +	case happyOut36 happy_x_3 of { happy_var_3 -> +	case happyOut36 happy_x_4 of { happy_var_4 -> +	case happyOut57 happy_x_5 of { happy_var_5 -> +	case happyOut68 happy_x_6 of { happy_var_6 -> +	happyIn47+		 (Delimiters happy_var_2 happy_var_3 happy_var_4 happy_var_5 happy_var_6+	) `HappyStk` happyRest}}}}}++happyReduce_61 = happySpecReduce_3  11# happyReduction_61+happyReduction_61 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut37 happy_x_2 of { happy_var_2 -> +	case happyOut38 happy_x_3 of { happy_var_3 -> +	happyIn47+		 (Coercions happy_var_2 happy_var_3+	)}}++happyReduce_62 = happyReduce 4# 11# happyReduction_62+happyReduction_62 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut37 happy_x_2 of { happy_var_2 -> +	case happyOut66 happy_x_4 of { happy_var_4 -> +	happyIn47+		 (Rules happy_var_2 happy_var_4+	) `HappyStk` happyRest}}++happyReduce_63 = happyReduce 5# 11# happyReduction_63+happyReduction_63 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut37 happy_x_2 of { happy_var_2 -> +	case happyOut59 happy_x_3 of { happy_var_3 -> +	case happyOut60 happy_x_5 of { happy_var_5 -> +	happyIn47+		 (Function happy_var_2 (reverse happy_var_3) happy_var_5+	) `HappyStk` happyRest}}}++happyReduce_64 = happySpecReduce_2  11# happyReduction_64+happyReduction_64 happy_x_2+	happy_x_1+	 =  case happyOut65 happy_x_2 of { happy_var_2 -> +	happyIn47+		 (Layout happy_var_2+	)}++happyReduce_65 = happySpecReduce_3  11# happyReduction_65+happyReduction_65 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut65 happy_x_3 of { happy_var_3 -> +	happyIn47+		 (LayoutStop happy_var_3+	)}++happyReduce_66 = happySpecReduce_2  11# happyReduction_66+happyReduction_66 happy_x_2+	happy_x_1+	 =  happyIn47+		 (LayoutTop+	)++happyReduce_67 = happySpecReduce_1  12# happyReduction_67+happyReduction_67 happy_x_1+	 =  case happyOut36 happy_x_1 of { happy_var_1 -> +	happyIn48+		 (Terminal happy_var_1+	)}++happyReduce_68 = happySpecReduce_1  12# happyReduction_68+happyReduction_68 happy_x_1+	 =  case happyOut49 happy_x_1 of { happy_var_1 -> +	happyIn48+		 (NTerminal happy_var_1+	)}++happyReduce_69 = happySpecReduce_3  13# happyReduction_69+happyReduction_69 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut49 happy_x_2 of { happy_var_2 -> +	happyIn49+		 (ListCat happy_var_2+	)}++happyReduce_70 = happySpecReduce_1  13# happyReduction_70+happyReduction_70 happy_x_1+	 =  case happyOut37 happy_x_1 of { happy_var_1 -> +	happyIn49+		 (IdCat happy_var_1+	)}++happyReduce_71 = happySpecReduce_1  14# happyReduction_71+happyReduction_71 happy_x_1+	 =  case happyOut51 happy_x_1 of { happy_var_1 -> +	happyIn50+		 (LabNoP happy_var_1+	)}++happyReduce_72 = happySpecReduce_2  14# happyReduction_72+happyReduction_72 happy_x_2+	happy_x_1+	 =  case happyOut51 happy_x_1 of { happy_var_1 -> +	case happyOut56 happy_x_2 of { happy_var_2 -> +	happyIn50+		 (LabP happy_var_1 happy_var_2+	)}}++happyReduce_73 = happySpecReduce_3  14# happyReduction_73+happyReduction_73 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut51 happy_x_1 of { happy_var_1 -> +	case happyOut51 happy_x_2 of { happy_var_2 -> +	case happyOut56 happy_x_3 of { happy_var_3 -> +	happyIn50+		 (LabPF happy_var_1 happy_var_2 happy_var_3+	)}}}++happyReduce_74 = happySpecReduce_2  14# happyReduction_74+happyReduction_74 happy_x_2+	happy_x_1+	 =  case happyOut51 happy_x_1 of { happy_var_1 -> +	case happyOut51 happy_x_2 of { happy_var_2 -> +	happyIn50+		 (LabF happy_var_1 happy_var_2+	)}}++happyReduce_75 = happySpecReduce_1  15# happyReduction_75+happyReduction_75 happy_x_1+	 =  case happyOut37 happy_x_1 of { happy_var_1 -> +	happyIn51+		 (Id happy_var_1+	)}++happyReduce_76 = happySpecReduce_1  15# happyReduction_76+happyReduction_76 happy_x_1+	 =  happyIn51+		 (Wild+	)++happyReduce_77 = happySpecReduce_2  15# happyReduction_77+happyReduction_77 happy_x_2+	happy_x_1+	 =  happyIn51+		 (ListE+	)++happyReduce_78 = happySpecReduce_3  15# happyReduction_78+happyReduction_78 happy_x_3+	happy_x_2+	happy_x_1+	 =  happyIn51+		 (ListCons+	)++happyReduce_79 = happyReduce 5# 15# happyReduction_79+happyReduction_79 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = happyIn51+		 (ListOne+	) `HappyStk` happyRest++happyReduce_80 = happyReduce 9# 16# happyReduction_80+happyReduction_80 (happy_x_9 `HappyStk`+	happy_x_8 `HappyStk`+	happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut55 happy_x_3 of { happy_var_3 -> +	case happyOut54 happy_x_7 of { happy_var_7 -> +	happyIn52+		 (ProfIt happy_var_3 happy_var_7+	) `HappyStk` happyRest}}++happyReduce_81 = happySpecReduce_3  17# happyReduction_81+happyReduction_81 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut54 happy_x_2 of { happy_var_2 -> +	happyIn53+		 (Ints happy_var_2+	)}++happyReduce_82 = happySpecReduce_0  18# happyReduction_82+happyReduction_82  =  happyIn54+		 ([]+	)++happyReduce_83 = happySpecReduce_1  18# happyReduction_83+happyReduction_83 happy_x_1+	 =  case happyOut38 happy_x_1 of { happy_var_1 -> +	happyIn54+		 ((:[]) happy_var_1+	)}++happyReduce_84 = happySpecReduce_3  18# happyReduction_84+happyReduction_84 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut38 happy_x_1 of { happy_var_1 -> +	case happyOut54 happy_x_3 of { happy_var_3 -> +	happyIn54+		 ((:) happy_var_1 happy_var_3+	)}}++happyReduce_85 = happySpecReduce_0  19# happyReduction_85+happyReduction_85  =  happyIn55+		 ([]+	)++happyReduce_86 = happySpecReduce_1  19# happyReduction_86+happyReduction_86 happy_x_1+	 =  case happyOut53 happy_x_1 of { happy_var_1 -> +	happyIn55+		 ((:[]) happy_var_1+	)}++happyReduce_87 = happySpecReduce_3  19# happyReduction_87+happyReduction_87 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut53 happy_x_1 of { happy_var_1 -> +	case happyOut55 happy_x_3 of { happy_var_3 -> +	happyIn55+		 ((:) happy_var_1 happy_var_3+	)}}++happyReduce_88 = happySpecReduce_1  20# happyReduction_88+happyReduction_88 happy_x_1+	 =  case happyOut52 happy_x_1 of { happy_var_1 -> +	happyIn56+		 ((:[]) happy_var_1+	)}++happyReduce_89 = happySpecReduce_2  20# happyReduction_89+happyReduction_89 happy_x_2+	happy_x_1+	 =  case happyOut52 happy_x_1 of { happy_var_1 -> +	case happyOut56 happy_x_2 of { happy_var_2 -> +	happyIn56+		 ((:) happy_var_1 happy_var_2+	)}}++happyReduce_90 = happySpecReduce_0  21# happyReduction_90+happyReduction_90  =  happyIn57+		 (SepNone+	)++happyReduce_91 = happySpecReduce_2  21# happyReduction_91+happyReduction_91 happy_x_2+	happy_x_1+	 =  case happyOut36 happy_x_2 of { happy_var_2 -> +	happyIn57+		 (SepTerm happy_var_2+	)}++happyReduce_92 = happySpecReduce_2  21# happyReduction_92+happyReduction_92 happy_x_2+	happy_x_1+	 =  case happyOut36 happy_x_2 of { happy_var_2 -> +	happyIn57+		 (SepSepar happy_var_2+	)}++happyReduce_93 = happySpecReduce_1  22# happyReduction_93+happyReduction_93 happy_x_1+	 =  case happyOut37 happy_x_1 of { happy_var_1 -> +	happyIn58+		 (Arg happy_var_1+	)}++happyReduce_94 = happySpecReduce_0  23# happyReduction_94+happyReduction_94  =  happyIn59+		 ([]+	)++happyReduce_95 = happySpecReduce_2  23# happyReduction_95+happyReduction_95 happy_x_2+	happy_x_1+	 =  case happyOut59 happy_x_1 of { happy_var_1 -> +	case happyOut58 happy_x_2 of { happy_var_2 -> +	happyIn59+		 (flip (:) happy_var_1 happy_var_2+	)}}++happyReduce_96 = happySpecReduce_3  24# happyReduction_96+happyReduction_96 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut61 happy_x_1 of { happy_var_1 -> +	case happyOut60 happy_x_3 of { happy_var_3 -> +	happyIn60+		 (Cons happy_var_1 happy_var_3+	)}}++happyReduce_97 = happySpecReduce_1  24# happyReduction_97+happyReduction_97 happy_x_1+	 =  case happyOut61 happy_x_1 of { happy_var_1 -> +	happyIn60+		 (happy_var_1+	)}++happyReduce_98 = happySpecReduce_2  25# happyReduction_98+happyReduction_98 happy_x_2+	happy_x_1+	 =  case happyOut37 happy_x_1 of { happy_var_1 -> +	case happyOut63 happy_x_2 of { happy_var_2 -> +	happyIn61+		 (App happy_var_1 happy_var_2+	)}}++happyReduce_99 = happySpecReduce_1  25# happyReduction_99+happyReduction_99 happy_x_1+	 =  case happyOut62 happy_x_1 of { happy_var_1 -> +	happyIn61+		 (happy_var_1+	)}++happyReduce_100 = happySpecReduce_1  26# happyReduction_100+happyReduction_100 happy_x_1+	 =  case happyOut37 happy_x_1 of { happy_var_1 -> +	happyIn62+		 (Var happy_var_1+	)}++happyReduce_101 = happySpecReduce_1  26# happyReduction_101+happyReduction_101 happy_x_1+	 =  case happyOut38 happy_x_1 of { happy_var_1 -> +	happyIn62+		 (LitInt happy_var_1+	)}++happyReduce_102 = happySpecReduce_1  26# happyReduction_102+happyReduction_102 happy_x_1+	 =  case happyOut39 happy_x_1 of { happy_var_1 -> +	happyIn62+		 (LitChar happy_var_1+	)}++happyReduce_103 = happySpecReduce_1  26# happyReduction_103+happyReduction_103 happy_x_1+	 =  case happyOut36 happy_x_1 of { happy_var_1 -> +	happyIn62+		 (LitString happy_var_1+	)}++happyReduce_104 = happySpecReduce_1  26# happyReduction_104+happyReduction_104 happy_x_1+	 =  case happyOut40 happy_x_1 of { happy_var_1 -> +	happyIn62+		 (LitDouble happy_var_1+	)}++happyReduce_105 = happySpecReduce_3  26# happyReduction_105+happyReduction_105 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut64 happy_x_2 of { happy_var_2 -> +	happyIn62+		 (List happy_var_2+	)}++happyReduce_106 = happySpecReduce_3  26# happyReduction_106+happyReduction_106 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut60 happy_x_2 of { happy_var_2 -> +	happyIn62+		 (happy_var_2+	)}++happyReduce_107 = happySpecReduce_1  27# happyReduction_107+happyReduction_107 happy_x_1+	 =  case happyOut62 happy_x_1 of { happy_var_1 -> +	happyIn63+		 ((:[]) happy_var_1+	)}++happyReduce_108 = happySpecReduce_2  27# happyReduction_108+happyReduction_108 happy_x_2+	happy_x_1+	 =  case happyOut62 happy_x_1 of { happy_var_1 -> +	case happyOut63 happy_x_2 of { happy_var_2 -> +	happyIn63+		 ((:) happy_var_1 happy_var_2+	)}}++happyReduce_109 = happySpecReduce_0  28# happyReduction_109+happyReduction_109  =  happyIn64+		 ([]+	)++happyReduce_110 = happySpecReduce_1  28# happyReduction_110+happyReduction_110 happy_x_1+	 =  case happyOut60 happy_x_1 of { happy_var_1 -> +	happyIn64+		 ((:[]) happy_var_1+	)}++happyReduce_111 = happySpecReduce_3  28# happyReduction_111+happyReduction_111 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut60 happy_x_1 of { happy_var_1 -> +	case happyOut64 happy_x_3 of { happy_var_3 -> +	happyIn64+		 ((:) happy_var_1 happy_var_3+	)}}++happyReduce_112 = happySpecReduce_1  29# happyReduction_112+happyReduction_112 happy_x_1+	 =  case happyOut36 happy_x_1 of { happy_var_1 -> +	happyIn65+		 ((:[]) happy_var_1+	)}++happyReduce_113 = happySpecReduce_3  29# happyReduction_113+happyReduction_113 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut36 happy_x_1 of { happy_var_1 -> +	case happyOut65 happy_x_3 of { happy_var_3 -> +	happyIn65+		 ((:) happy_var_1 happy_var_3+	)}}++happyReduce_114 = happySpecReduce_1  30# happyReduction_114+happyReduction_114 happy_x_1+	 =  case happyOut67 happy_x_1 of { happy_var_1 -> +	happyIn66+		 ((:[]) happy_var_1+	)}++happyReduce_115 = happySpecReduce_3  30# happyReduction_115+happyReduction_115 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut67 happy_x_1 of { happy_var_1 -> +	case happyOut66 happy_x_3 of { happy_var_3 -> +	happyIn66+		 ((:) happy_var_1 happy_var_3+	)}}++happyReduce_116 = happySpecReduce_1  31# happyReduction_116+happyReduction_116 happy_x_1+	 =  case happyOut46 happy_x_1 of { happy_var_1 -> +	happyIn67+		 (RHS (reverse happy_var_1)+	)}++happyReduce_117 = happySpecReduce_1  32# happyReduction_117+happyReduction_117 happy_x_1+	 =  happyIn68+		 (MNonempty+	)++happyReduce_118 = happySpecReduce_0  32# happyReduction_118+happyReduction_118  =  happyIn68+		 (MEmpty+	)++happyReduce_119 = happySpecReduce_2  33# happyReduction_119+happyReduction_119 happy_x_2+	happy_x_1+	 =  case happyOut69 happy_x_1 of { happy_var_1 -> +	case happyOut71 happy_x_2 of { happy_var_2 -> +	happyIn69+		 (RSeq happy_var_1 happy_var_2+	)}}++happyReduce_120 = happySpecReduce_1  33# happyReduction_120+happyReduction_120 happy_x_1+	 =  case happyOut71 happy_x_1 of { happy_var_1 -> +	happyIn69+		 (happy_var_1+	)}++happyReduce_121 = happySpecReduce_3  34# happyReduction_121+happyReduction_121 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut70 happy_x_1 of { happy_var_1 -> +	case happyOut69 happy_x_3 of { happy_var_3 -> +	happyIn70+		 (RAlt happy_var_1 happy_var_3+	)}}++happyReduce_122 = happySpecReduce_3  34# happyReduction_122+happyReduction_122 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut69 happy_x_1 of { happy_var_1 -> +	case happyOut69 happy_x_3 of { happy_var_3 -> +	happyIn70+		 (RMinus happy_var_1 happy_var_3+	)}}++happyReduce_123 = happySpecReduce_1  34# happyReduction_123+happyReduction_123 happy_x_1+	 =  case happyOut69 happy_x_1 of { happy_var_1 -> +	happyIn70+		 (happy_var_1+	)}++happyReduce_124 = happySpecReduce_2  35# happyReduction_124+happyReduction_124 happy_x_2+	happy_x_1+	 =  case happyOut71 happy_x_1 of { happy_var_1 -> +	happyIn71+		 (RStar happy_var_1+	)}++happyReduce_125 = happySpecReduce_2  35# happyReduction_125+happyReduction_125 happy_x_2+	happy_x_1+	 =  case happyOut71 happy_x_1 of { happy_var_1 -> +	happyIn71+		 (RPlus happy_var_1+	)}++happyReduce_126 = happySpecReduce_2  35# happyReduction_126+happyReduction_126 happy_x_2+	happy_x_1+	 =  case happyOut71 happy_x_1 of { happy_var_1 -> +	happyIn71+		 (ROpt happy_var_1+	)}++happyReduce_127 = happySpecReduce_1  35# happyReduction_127+happyReduction_127 happy_x_1+	 =  happyIn71+		 (REps+	)++happyReduce_128 = happySpecReduce_1  35# happyReduction_128+happyReduction_128 happy_x_1+	 =  case happyOut39 happy_x_1 of { happy_var_1 -> +	happyIn71+		 (RChar happy_var_1+	)}++happyReduce_129 = happySpecReduce_3  35# happyReduction_129+happyReduction_129 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut36 happy_x_2 of { happy_var_2 -> +	happyIn71+		 (RAlts happy_var_2+	)}++happyReduce_130 = happySpecReduce_3  35# happyReduction_130+happyReduction_130 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut36 happy_x_2 of { happy_var_2 -> +	happyIn71+		 (RSeqs happy_var_2+	)}++happyReduce_131 = happySpecReduce_1  35# happyReduction_131+happyReduction_131 happy_x_1+	 =  happyIn71+		 (RDigit+	)++happyReduce_132 = happySpecReduce_1  35# happyReduction_132+happyReduction_132 happy_x_1+	 =  happyIn71+		 (RLetter+	)++happyReduce_133 = happySpecReduce_1  35# happyReduction_133+happyReduction_133 happy_x_1+	 =  happyIn71+		 (RUpper+	)++happyReduce_134 = happySpecReduce_1  35# happyReduction_134+happyReduction_134 happy_x_1+	 =  happyIn71+		 (RLower+	)++happyReduce_135 = happySpecReduce_1  35# happyReduction_135+happyReduction_135 happy_x_1+	 =  happyIn71+		 (RAny+	)++happyReduce_136 = happySpecReduce_3  35# happyReduction_136+happyReduction_136 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut72 happy_x_2 of { happy_var_2 -> +	happyIn71+		 (happy_var_2+	)}++happyReduce_137 = happySpecReduce_1  36# happyReduction_137+happyReduction_137 happy_x_1+	 =  case happyOut70 happy_x_1 of { happy_var_1 -> +	happyIn72+		 (happy_var_1+	)}++happyReduce_138 = happySpecReduce_1  37# happyReduction_138+happyReduction_138 happy_x_1+	 =  case happyOut37 happy_x_1 of { happy_var_1 -> +	happyIn73+		 ((:[]) happy_var_1+	)}++happyReduce_139 = happySpecReduce_3  37# happyReduction_139+happyReduction_139 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut37 happy_x_1 of { happy_var_1 -> +	case happyOut73 happy_x_3 of { happy_var_3 -> +	happyIn73+		 ((:) happy_var_1 happy_var_3+	)}}++happyNewToken action sts stk [] =+	happyDoAction 46# notHappyAtAll action sts stk []++happyNewToken action sts stk (tk:tks) =+	let cont i = happyDoAction i tk action sts stk tks in+	case tk of {+	PT _ (TS _ 1) -> cont 1#;+	PT _ (TS _ 2) -> cont 2#;+	PT _ (TS _ 3) -> cont 3#;+	PT _ (TS _ 4) -> cont 4#;+	PT _ (TS _ 5) -> cont 5#;+	PT _ (TS _ 6) -> cont 6#;+	PT _ (TS _ 7) -> cont 7#;+	PT _ (TS _ 8) -> cont 8#;+	PT _ (TS _ 9) -> cont 9#;+	PT _ (TS _ 10) -> cont 10#;+	PT _ (TS _ 11) -> cont 11#;+	PT _ (TS _ 12) -> cont 12#;+	PT _ (TS _ 13) -> cont 13#;+	PT _ (TS _ 14) -> cont 14#;+	PT _ (TS _ 15) -> cont 15#;+	PT _ (TS _ 16) -> cont 16#;+	PT _ (TS _ 17) -> cont 17#;+	PT _ (TS _ 18) -> cont 18#;+	PT _ (TS _ 19) -> cont 19#;+	PT _ (TS _ 20) -> cont 20#;+	PT _ (TS _ 21) -> cont 21#;+	PT _ (TS _ 22) -> cont 22#;+	PT _ (TS _ 23) -> cont 23#;+	PT _ (TS _ 24) -> cont 24#;+	PT _ (TS _ 25) -> cont 25#;+	PT _ (TS _ 26) -> cont 26#;+	PT _ (TS _ 27) -> cont 27#;+	PT _ (TS _ 28) -> cont 28#;+	PT _ (TS _ 29) -> cont 29#;+	PT _ (TS _ 30) -> cont 30#;+	PT _ (TS _ 31) -> cont 31#;+	PT _ (TS _ 32) -> cont 32#;+	PT _ (TS _ 33) -> cont 33#;+	PT _ (TS _ 34) -> cont 34#;+	PT _ (TS _ 35) -> cont 35#;+	PT _ (TS _ 36) -> cont 36#;+	PT _ (TS _ 37) -> cont 37#;+	PT _ (TS _ 38) -> cont 38#;+	PT _ (TS _ 39) -> cont 39#;+	PT _ (TS _ 40) -> cont 40#;+	PT _ (TL happy_dollar_dollar) -> cont 41#;+	PT _ (TV happy_dollar_dollar) -> cont 42#;+	PT _ (TI happy_dollar_dollar) -> cont 43#;+	PT _ (TC happy_dollar_dollar) -> cont 44#;+	PT _ (TD happy_dollar_dollar) -> cont 45#;+	_ -> happyError' (tk:tks)+	}++happyError_ 46# tk tks = happyError' tks+happyError_ _ tk tks = happyError' (tk:tks)++happyThen :: () => Err a -> (a -> Err b) -> Err b+happyThen = (thenM)+happyReturn :: () => a -> Err a+happyReturn = (returnM)+happyThen1 m k tks = (thenM) m (\a -> k a tks)+happyReturn1 :: () => a -> b -> Err a+happyReturn1 = \a tks -> (returnM) a+happyError' :: () => [(Token)] -> Err a+happyError' = happyError++pLGrammar tks = happySomeParser where+  happySomeParser = happyThen (happyParse 0# tks) (\x -> happyReturn (happyOut41 x))++pLDef tks = happySomeParser where+  happySomeParser = happyThen (happyParse 1# tks) (\x -> happyReturn (happyOut42 x))++pListLDef tks = happySomeParser where+  happySomeParser = happyThen (happyParse 2# tks) (\x -> happyReturn (happyOut43 x))++pGrammar tks = happySomeParser where+  happySomeParser = happyThen (happyParse 3# tks) (\x -> happyReturn (happyOut44 x))++pListDef tks = happySomeParser where+  happySomeParser = happyThen (happyParse 4# tks) (\x -> happyReturn (happyOut45 x))++pListItem tks = happySomeParser where+  happySomeParser = happyThen (happyParse 5# tks) (\x -> happyReturn (happyOut46 x))++pDef tks = happySomeParser where+  happySomeParser = happyThen (happyParse 6# tks) (\x -> happyReturn (happyOut47 x))++pItem tks = happySomeParser where+  happySomeParser = happyThen (happyParse 7# tks) (\x -> happyReturn (happyOut48 x))++pCat tks = happySomeParser where+  happySomeParser = happyThen (happyParse 8# tks) (\x -> happyReturn (happyOut49 x))++pLabel tks = happySomeParser where+  happySomeParser = happyThen (happyParse 9# tks) (\x -> happyReturn (happyOut50 x))++pLabelId tks = happySomeParser where+  happySomeParser = happyThen (happyParse 10# tks) (\x -> happyReturn (happyOut51 x))++pProfItem tks = happySomeParser where+  happySomeParser = happyThen (happyParse 11# tks) (\x -> happyReturn (happyOut52 x))++pIntList tks = happySomeParser where+  happySomeParser = happyThen (happyParse 12# tks) (\x -> happyReturn (happyOut53 x))++pListInteger tks = happySomeParser where+  happySomeParser = happyThen (happyParse 13# tks) (\x -> happyReturn (happyOut54 x))++pListIntList tks = happySomeParser where+  happySomeParser = happyThen (happyParse 14# tks) (\x -> happyReturn (happyOut55 x))++pListProfItem tks = happySomeParser where+  happySomeParser = happyThen (happyParse 15# tks) (\x -> happyReturn (happyOut56 x))++pSeparation tks = happySomeParser where+  happySomeParser = happyThen (happyParse 16# tks) (\x -> happyReturn (happyOut57 x))++pArg tks = happySomeParser where+  happySomeParser = happyThen (happyParse 17# tks) (\x -> happyReturn (happyOut58 x))++pListArg tks = happySomeParser where+  happySomeParser = happyThen (happyParse 18# tks) (\x -> happyReturn (happyOut59 x))++pExp tks = happySomeParser where+  happySomeParser = happyThen (happyParse 19# tks) (\x -> happyReturn (happyOut60 x))++pExp1 tks = happySomeParser where+  happySomeParser = happyThen (happyParse 20# tks) (\x -> happyReturn (happyOut61 x))++pExp2 tks = happySomeParser where+  happySomeParser = happyThen (happyParse 21# tks) (\x -> happyReturn (happyOut62 x))++pListExp2 tks = happySomeParser where+  happySomeParser = happyThen (happyParse 22# tks) (\x -> happyReturn (happyOut63 x))++pListExp tks = happySomeParser where+  happySomeParser = happyThen (happyParse 23# tks) (\x -> happyReturn (happyOut64 x))++pListString tks = happySomeParser where+  happySomeParser = happyThen (happyParse 24# tks) (\x -> happyReturn (happyOut65 x))++pListRHS tks = happySomeParser where+  happySomeParser = happyThen (happyParse 25# tks) (\x -> happyReturn (happyOut66 x))++pRHS tks = happySomeParser where+  happySomeParser = happyThen (happyParse 26# tks) (\x -> happyReturn (happyOut67 x))++pMinimumSize tks = happySomeParser where+  happySomeParser = happyThen (happyParse 27# tks) (\x -> happyReturn (happyOut68 x))++pReg2 tks = happySomeParser where+  happySomeParser = happyThen (happyParse 28# tks) (\x -> happyReturn (happyOut69 x))++pReg1 tks = happySomeParser where+  happySomeParser = happyThen (happyParse 29# tks) (\x -> happyReturn (happyOut70 x))++pReg3 tks = happySomeParser where+  happySomeParser = happyThen (happyParse 30# tks) (\x -> happyReturn (happyOut71 x))++pReg tks = happySomeParser where+  happySomeParser = happyThen (happyParse 31# tks) (\x -> happyReturn (happyOut72 x))++pListIdent tks = happySomeParser where+  happySomeParser = happyThen (happyParse 32# tks) (\x -> happyReturn (happyOut73 x))++happySeq = happyDontSeq+++returnM :: a -> Err a+returnM = return++thenM :: Err a -> (a -> Err b) -> Err b+thenM = (>>=)++happyError :: [Token] -> Err a+happyError ts =+  Bad $ "syntax error at " ++ tokenPos ts ++ +  case ts of+    [] -> []+    [Err _] -> " due to lexer error"+    _ -> " before " ++ unwords (map (id . prToken) (take 4 ts))++myLexer = tokens+{-# LINE 1 "templates/GenericTemplate.hs" #-}+{-# LINE 1 "templates/GenericTemplate.hs" #-}+{-# LINE 1 "<built-in>" #-}+{-# LINE 1 "<command-line>" #-}+{-# LINE 8 "<command-line>" #-}+# 1 "/usr/include/stdc-predef.h" 1 3 4++# 17 "/usr/include/stdc-predef.h" 3 4++++++++++++++++++++++++{-# LINE 8 "<command-line>" #-}+{-# LINE 1 "templates/GenericTemplate.hs" #-}+-- Id: GenericTemplate.hs,v 1.26 2005/01/14 14:47:22 simonmar Exp ++{-# LINE 13 "templates/GenericTemplate.hs" #-}++++++-- Do not remove this comment. Required to fix CPP parsing when using GCC and a clang-compiled alex.+#if __GLASGOW_HASKELL__ > 706+#define LT(n,m) ((Happy_GHC_Exts.tagToEnum# (n Happy_GHC_Exts.<# m)) :: Bool)+#define GTE(n,m) ((Happy_GHC_Exts.tagToEnum# (n Happy_GHC_Exts.>=# m)) :: Bool)+#define EQ(n,m) ((Happy_GHC_Exts.tagToEnum# (n Happy_GHC_Exts.==# m)) :: Bool)+#else+#define LT(n,m) (n Happy_GHC_Exts.<# m)+#define GTE(n,m) (n Happy_GHC_Exts.>=# m)+#define EQ(n,m) (n Happy_GHC_Exts.==# m)+#endif+{-# LINE 46 "templates/GenericTemplate.hs" #-}+++data Happy_IntList = HappyCons Happy_GHC_Exts.Int# Happy_IntList++++++{-# LINE 67 "templates/GenericTemplate.hs" #-}++{-# LINE 77 "templates/GenericTemplate.hs" #-}++{-# LINE 86 "templates/GenericTemplate.hs" #-}++infixr 9 `HappyStk`+data HappyStk a = HappyStk a (HappyStk a)++-----------------------------------------------------------------------------+-- starting the parse++happyParse start_state = happyNewToken start_state notHappyAtAll notHappyAtAll++-----------------------------------------------------------------------------+-- Accepting the parse++-- If the current token is 0#, it means we've just accepted a partial+-- parse (a %partial parser).  We must ignore the saved token on the top of+-- the stack in this case.+happyAccept 0# tk st sts (_ `HappyStk` ans `HappyStk` _) =+        happyReturn1 ans+happyAccept j tk st sts (HappyStk ans _) = +        (happyTcHack j (happyTcHack st)) (happyReturn1 ans)++-----------------------------------------------------------------------------+-- Arrays only: do the next action++++happyDoAction i tk st+        = {- nothing -}+++          case action of+                0#           -> {- nothing -}+                                     happyFail i tk st+                -1#          -> {- nothing -}+                                     happyAccept i tk st+                n | LT(n,(0# :: Happy_GHC_Exts.Int#)) -> {- nothing -}++                                                   (happyReduceArr Happy_Data_Array.! rule) i tk st+                                                   where rule = (Happy_GHC_Exts.I# ((Happy_GHC_Exts.negateInt# ((n Happy_GHC_Exts.+# (1# :: Happy_GHC_Exts.Int#))))))+                n                 -> {- nothing -}+++                                     happyShift new_state i tk st+                                     where new_state = (n Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#))+   where off    = indexShortOffAddr happyActOffsets st+         off_i  = (off Happy_GHC_Exts.+# i)+         check  = if GTE(off_i,(0# :: Happy_GHC_Exts.Int#))+                  then EQ(indexShortOffAddr happyCheck off_i, i)+                  else False+         action+          | check     = indexShortOffAddr happyTable off_i+          | otherwise = indexShortOffAddr happyDefActions st+++indexShortOffAddr (HappyA# arr) off =+        Happy_GHC_Exts.narrow16Int# i+  where+        i = Happy_GHC_Exts.word2Int# (Happy_GHC_Exts.or# (Happy_GHC_Exts.uncheckedShiftL# high 8#) low)+        high = Happy_GHC_Exts.int2Word# (Happy_GHC_Exts.ord# (Happy_GHC_Exts.indexCharOffAddr# arr (off' Happy_GHC_Exts.+# 1#)))+        low  = Happy_GHC_Exts.int2Word# (Happy_GHC_Exts.ord# (Happy_GHC_Exts.indexCharOffAddr# arr off'))+        off' = off Happy_GHC_Exts.*# 2#++++++data HappyAddr = HappyA# Happy_GHC_Exts.Addr#+++++-----------------------------------------------------------------------------+-- HappyState data type (not arrays)++{-# LINE 170 "templates/GenericTemplate.hs" #-}++-----------------------------------------------------------------------------+-- Shifting a token++happyShift new_state 0# tk st sts stk@(x `HappyStk` _) =+     let i = (case Happy_GHC_Exts.unsafeCoerce# x of { (Happy_GHC_Exts.I# (i)) -> i }) in+--     trace "shifting the error token" $+     happyDoAction i tk new_state (HappyCons (st) (sts)) (stk)++happyShift new_state i tk st sts stk =+     happyNewToken new_state (HappyCons (st) (sts)) ((happyInTok (tk))`HappyStk`stk)++-- happyReduce is specialised for the common cases.++happySpecReduce_0 i fn 0# tk st sts stk+     = happyFail 0# tk st sts stk+happySpecReduce_0 nt fn j tk st@((action)) sts stk+     = happyGoto nt j tk st (HappyCons (st) (sts)) (fn `HappyStk` stk)++happySpecReduce_1 i fn 0# tk st sts stk+     = happyFail 0# tk st sts stk+happySpecReduce_1 nt fn j tk _ sts@((HappyCons (st@(action)) (_))) (v1`HappyStk`stk')+     = let r = fn v1 in+       happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk'))++happySpecReduce_2 i fn 0# tk st sts stk+     = happyFail 0# tk st sts stk+happySpecReduce_2 nt fn j tk _ (HappyCons (_) (sts@((HappyCons (st@(action)) (_))))) (v1`HappyStk`v2`HappyStk`stk')+     = let r = fn v1 v2 in+       happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk'))++happySpecReduce_3 i fn 0# tk st sts stk+     = happyFail 0# tk st sts stk+happySpecReduce_3 nt fn j tk _ (HappyCons (_) ((HappyCons (_) (sts@((HappyCons (st@(action)) (_))))))) (v1`HappyStk`v2`HappyStk`v3`HappyStk`stk')+     = let r = fn v1 v2 v3 in+       happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk'))++happyReduce k i fn 0# tk st sts stk+     = happyFail 0# tk st sts stk+happyReduce k nt fn j tk st sts stk+     = case happyDrop (k Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#)) sts of+         sts1@((HappyCons (st1@(action)) (_))) ->+                let r = fn stk in  -- it doesn't hurt to always seq here...+                happyDoSeq r (happyGoto nt j tk st1 sts1 r)++happyMonadReduce k nt fn 0# tk st sts stk+     = happyFail 0# tk st sts stk+happyMonadReduce k nt fn j tk st sts stk =+      case happyDrop k (HappyCons (st) (sts)) of+        sts1@((HappyCons (st1@(action)) (_))) ->+          let drop_stk = happyDropStk k stk in+          happyThen1 (fn stk tk) (\r -> happyGoto nt j tk st1 sts1 (r `HappyStk` drop_stk))++happyMonad2Reduce k nt fn 0# tk st sts stk+     = happyFail 0# tk st sts stk+happyMonad2Reduce k nt fn j tk st sts stk =+      case happyDrop k (HappyCons (st) (sts)) of+        sts1@((HappyCons (st1@(action)) (_))) ->+         let drop_stk = happyDropStk k stk++             off = indexShortOffAddr happyGotoOffsets st1+             off_i = (off Happy_GHC_Exts.+# nt)+             new_state = indexShortOffAddr happyTable off_i++++          in+          happyThen1 (fn stk tk) (\r -> happyNewToken new_state sts1 (r `HappyStk` drop_stk))++happyDrop 0# l = l+happyDrop n (HappyCons (_) (t)) = happyDrop (n Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#)) t++happyDropStk 0# l = l+happyDropStk n (x `HappyStk` xs) = happyDropStk (n Happy_GHC_Exts.-# (1#::Happy_GHC_Exts.Int#)) xs++-----------------------------------------------------------------------------+-- Moving to a new state after a reduction+++happyGoto nt j tk st = +   {- nothing -}+   happyDoAction j tk new_state+   where off = indexShortOffAddr happyGotoOffsets st+         off_i = (off Happy_GHC_Exts.+# nt)+         new_state = indexShortOffAddr happyTable off_i+++++-----------------------------------------------------------------------------+-- Error recovery (0# is the error token)++-- parse error if we are in recovery and we fail again+happyFail 0# tk old_st _ stk@(x `HappyStk` _) =+     let i = (case Happy_GHC_Exts.unsafeCoerce# x of { (Happy_GHC_Exts.I# (i)) -> i }) in+--      trace "failing" $ +        happyError_ i tk++{-  We don't need state discarding for our restricted implementation of+    "error".  In fact, it can cause some bogus parses, so I've disabled it+    for now --SDM++-- discard a state+happyFail  0# tk old_st (HappyCons ((action)) (sts)) +                                                (saved_tok `HappyStk` _ `HappyStk` stk) =+--      trace ("discarding state, depth " ++ show (length stk))  $+        happyDoAction 0# tk action sts ((saved_tok`HappyStk`stk))+-}++-- Enter error recovery: generate an error token,+--                       save the old token and carry on.+happyFail  i tk (action) sts stk =+--      trace "entering error recovery" $+        happyDoAction 0# tk action sts ( (Happy_GHC_Exts.unsafeCoerce# (Happy_GHC_Exts.I# (i))) `HappyStk` stk)++-- Internal happy errors:++notHappyAtAll :: a+notHappyAtAll = error "Internal Happy error\n"++-----------------------------------------------------------------------------+-- Hack to get the typechecker to accept our action functions+++happyTcHack :: Happy_GHC_Exts.Int# -> a -> a+happyTcHack x y = y+{-# INLINE happyTcHack #-}+++-----------------------------------------------------------------------------+-- Seq-ing.  If the --strict flag is given, then Happy emits +--      happySeq = happyDoSeq+-- otherwise it emits+--      happySeq = happyDontSeq++happyDoSeq, happyDontSeq :: a -> b -> b+happyDoSeq   a b = a `seq` b+happyDontSeq a b = b++-----------------------------------------------------------------------------+-- Don't inline any functions from the template.  GHC has a nasty habit+-- of deciding to inline happyGoto everywhere, which increases the size of+-- the generated parser quite a bit.+++{-# NOINLINE happyDoAction #-}+{-# NOINLINE happyTable #-}+{-# NOINLINE happyCheck #-}+{-# NOINLINE happyActOffsets #-}+{-# NOINLINE happyGotoOffsets #-}+{-# NOINLINE happyDefActions #-}++{-# NOINLINE happyShift #-}+{-# NOINLINE happySpecReduce_0 #-}+{-# NOINLINE happySpecReduce_1 #-}+{-# NOINLINE happySpecReduce_2 #-}+{-# NOINLINE happySpecReduce_3 #-}+{-# NOINLINE happyReduce #-}+{-# NOINLINE happyMonadReduce #-}+{-# NOINLINE happyGoto #-}+{-# NOINLINE happyFail #-}++-- end of Happy Template.
src/AbsBNF.hs view
@@ -1,106 +1,124 @@--- File generated by the BNF Converter (bnfc 2.9.5). -{-# LANGUAGE GeneralizedNewtypeDeriving #-} --- | The abstract syntax of language BNF.- module AbsBNF where -import Prelude (Char, Double, Integer, String)-import qualified Prelude as C (Eq, Ord, Show, Read)-import qualified Data.String+-- Haskell module generated by the BNF converter -data LGrammar = LGr [LDef]-  deriving (C.Eq, C.Ord, C.Show, C.Read) -data LDef = DefAll Def | DefSome [Ident] Def | LDefView [Ident]-  deriving (C.Eq, C.Ord, C.Show, C.Read) -data Grammar = Grammar [Def]-  deriving (C.Eq, C.Ord, C.Show, C.Read) -data Def-    = Rule Label Cat [Item]-    | Comment String-    | Comments String String-    | Internal Label Cat [Item]-    | Token Ident Reg-    | PosToken Ident Reg-    | Entryp [Ident]-    | Separator MinimumSize Cat String-    | Terminator MinimumSize Cat String-    | Delimiters Cat String String Separation MinimumSize-    | Coercions Ident Integer-    | Rules Ident [RHS]-    | Function Ident [Arg] Exp-    | Layout [String]-    | LayoutStop [String]-    | LayoutTop-  deriving (C.Eq, C.Ord, C.Show, C.Read)+newtype Ident = Ident String deriving (Eq,Ord,Show,Read)+data LGrammar =+   LGr [LDef]+  deriving (Eq,Ord,Show,Read) -data Item = Terminal String | NTerminal Cat-  deriving (C.Eq, C.Ord, C.Show, C.Read)+data LDef =+   DefAll Def+ | DefSome [Ident] Def+ | LDefView [Ident]+  deriving (Eq,Ord,Show,Read) -data Cat = ListCat Cat | IdCat Ident-  deriving (C.Eq, C.Ord, C.Show, C.Read)+data Grammar =+   Grammar [Def]+  deriving (Eq,Ord,Show,Read) -data Label-    = LabNoP LabelId-    | LabP LabelId [ProfItem]-    | LabPF LabelId LabelId [ProfItem]-    | LabF LabelId LabelId-  deriving (C.Eq, C.Ord, C.Show, C.Read)+data Def =+   Rule Label Cat [Item]+ | Comment String+ | Comments String String+ | Internal Label Cat [Item]+ | Token Ident Reg+ | PosToken Ident Reg+ | Entryp [Ident]+ | Separator MinimumSize Cat String+ | Terminator MinimumSize Cat String+ | Delimiters Cat String String Separation MinimumSize+ | Coercions Ident Integer+ | Rules Ident [RHS]+ | Function Ident [Arg] Exp+ | Layout [String]+ | LayoutStop [String]+ | LayoutTop+  deriving (Eq,Ord,Show,Read) -data LabelId = Id Ident | Wild | ListE | ListCons | ListOne-  deriving (C.Eq, C.Ord, C.Show, C.Read)+data Item =+   Terminal String+ | NTerminal Cat+  deriving (Eq,Ord,Show,Read) -data ProfItem = ProfIt [IntList] [Integer]-  deriving (C.Eq, C.Ord, C.Show, C.Read)+data Cat =+   ListCat Cat+ | IdCat Ident+  deriving (Eq,Ord,Show,Read) -data IntList = Ints [Integer]-  deriving (C.Eq, C.Ord, C.Show, C.Read)+data Label =+   LabNoP LabelId+ | LabP LabelId [ProfItem]+ | LabPF LabelId LabelId [ProfItem]+ | LabF LabelId LabelId+  deriving (Eq,Ord,Show,Read) -data Separation = SepNone | SepTerm String | SepSepar String-  deriving (C.Eq, C.Ord, C.Show, C.Read)+data LabelId =+   Id Ident+ | Wild+ | ListE+ | ListCons+ | ListOne+  deriving (Eq,Ord,Show,Read) -data Arg = Arg Ident-  deriving (C.Eq, C.Ord, C.Show, C.Read)+data ProfItem =+   ProfIt [IntList] [Integer]+  deriving (Eq,Ord,Show,Read) -data Exp-    = Cons Exp Exp-    | App Ident [Exp]-    | Var Ident-    | LitInt Integer-    | LitChar Char-    | LitString String-    | LitDouble Double-    | List [Exp]-  deriving (C.Eq, C.Ord, C.Show, C.Read)+data IntList =+   Ints [Integer]+  deriving (Eq,Ord,Show,Read) -data RHS = RHS [Item]-  deriving (C.Eq, C.Ord, C.Show, C.Read)+data Separation =+   SepNone+ | SepTerm String+ | SepSepar String+  deriving (Eq,Ord,Show,Read) -data MinimumSize = MNonempty | MEmpty-  deriving (C.Eq, C.Ord, C.Show, C.Read)+data Arg =+   Arg Ident+  deriving (Eq,Ord,Show,Read) -data Reg-    = RSeq Reg Reg-    | RAlt Reg Reg-    | RMinus Reg Reg-    | RStar Reg-    | RPlus Reg-    | ROpt Reg-    | REps-    | RChar Char-    | RAlts String-    | RSeqs String-    | RDigit-    | RLetter-    | RUpper-    | RLower-    | RAny-  deriving (C.Eq, C.Ord, C.Show, C.Read)+data Exp =+   Cons Exp Exp+ | App Ident [Exp]+ | Var Ident+ | LitInt Integer+ | LitChar Char+ | LitString String+ | LitDouble Double+ | List [Exp]+  deriving (Eq,Ord,Show,Read) -newtype Ident = Ident String-  deriving (C.Eq, C.Ord, C.Show, C.Read, Data.String.IsString)+data RHS =+   RHS [Item]+  deriving (Eq,Ord,Show,Read)++data MinimumSize =+   MNonempty+ | MEmpty+  deriving (Eq,Ord,Show,Read)++data Reg =+   RSeq Reg Reg+ | RAlt Reg Reg+ | RMinus Reg Reg+ | RStar Reg+ | RPlus Reg+ | ROpt Reg+ | REps+ | RChar Char+ | RAlts String+ | RSeqs String+ | RDigit+ | RLetter+ | RUpper+ | RLower+ | RAny+  deriving (Eq,Ord,Show,Read) 
src/BNFC/Backend/Base.hs view
@@ -9,16 +9,13 @@   , writeFiles   ) where -import BNFC.Options hiding (Backend)-import BNFC.CF (CF) import BNFC.Utils (writeFileRep) import Control.Monad.Writer-import Control.Monad.Trans import System.Directory (doesDirectoryExist, createDirectoryIfMissing) import System.FilePath (dropFileName)  -import Control.Monad (liftM, when, unless)+-- import Control.Monad (liftM, when,unless) -- import Control.Monad.State -- import Control.Monad.Trans (lift) -- import Data.Char
src/BNFC/Backend/C.hs view
@@ -19,8 +19,6 @@ module BNFC.Backend.C (makeC) where  import BNFC.Utils-import Control.Monad (unless,when)-import System.Console.GetOpt import BNFC.CF import BNFC.Options import BNFC.Backend.Base@@ -30,7 +28,6 @@ import BNFC.Backend.C.CFtoCSkel import BNFC.Backend.C.CFtoCPrinter import Data.Char-import System.Exit (exitFailure) import qualified BNFC.Backend.Common.Makefile as Makefile  makeC :: SharedOptions -> CF -> MkFiles ()
src/BNFC/Backend/C/CFtoBisonC.hs view
@@ -42,10 +42,10 @@ module BNFC.Backend.C.CFtoBisonC (cf2Bison) where  import BNFC.CF-import Data.List (intersperse, isPrefixOf)+import Data.List (intersperse) import BNFC.Backend.Common.NamedVariables hiding (varName) import Data.Char (toLower)-import BNFC.Utils ((+++), (++++))+import BNFC.Utils ((+++))  --This follows the basic structure of CFtoHappy. @@ -89,14 +89,14 @@           "}", 	  "",           -- M.F. 2004-09-17 changed allEntryPoints to allCatsIdNorm. Seems to fix the [Ty2] bug.-	  unlines $ map (parseMethod name) (allCatsNorm cf), -- (allEntryPoints cf),+	  unlines $ map parseMethod (allCatsNorm cf), -- (allEntryPoints cf), 	  concatMap reverseList (filter isList (allCats cf)), 	  "%}" 	  ]  --This generates a parser method for each entry point.-parseMethod :: String -> Cat -> String-parseMethod name cat =+parseMethod :: Cat -> String+parseMethod cat = --  if normCat cat /= cat      M.F. 2004-09-17 comment. No duplicates from allCatsIdNorm --  then "" --  else@@ -160,14 +160,14 @@    "  " ++ (identCat (normCat s)) +++ (varName (normCat s)) ++ ";\n"  mkPointer s | normCat s == s = --normal cat    "  " ++ (identCat (normCat s)) +++ (varName (normCat s)) ++ ";\n"- mkPointer s = ""+ mkPointer _ = ""  --declares non-terminal types. declarations :: CF -> String declarations cf = concatMap (typeNT cf) (allCats cf)  where --don't define internal rules    typeNT cf nt | rulesForCat cf nt /= [] = "%type <" ++ (varName (normCat nt)) ++ "> " ++ (identCat nt) ++ "\n"-   typeNT cf nt = ""+   typeNT _ _ = ""  --declares terminal types. tokens :: [UserDef] -> SymEnv -> String@@ -249,7 +249,7 @@  prRules :: Rules -> String prRules [] = []-prRules ((nt, []):rs) = prRules rs --internal rule+prRules ((_, []):rs) = prRules rs --internal rule prRules ((nt,((p,a):ls)):rs) =   (unwords [nt', ":" , p, "{ $$ =", a, "}", "\n" ++ pr ls]) ++ ";\n" ++ prRules rs  where
src/BNFC/Backend/C/CFtoCAbs.hs view
@@ -40,16 +40,19 @@  module BNFC.Backend.C.CFtoCAbs (cf2CAbs) where +import Text.PrettyPrint+ import BNFC.CF-import BNFC.Utils((+++),(++++))+import BNFC.Utils((+++), vsep) import BNFC.Backend.Common.NamedVariables+import Data.Function (on) import Data.List import Data.Char(toLower)   --The result is two files (.H file, .C file) cf2CAbs :: String -> CF -> (String, String)-cf2CAbs name cf = (mkHFile cf, mkCFile cf)+cf2CAbs _ cf = (mkHFile cf, mkCFile cf)   {- **** Header (.H) File Functions **** -}@@ -67,7 +70,7 @@   concatMap prForward classes,   "",   "/********************   Abstract Syntax Classes    ********************/\n",-  concatMap (prDataH user) (cf2dataLists cf),+  concatMap prDataH (cf2dataLists cf),   "",   "#endif"  ]@@ -81,10 +84,10 @@      "struct " ++ s ++ "_;",      "typedef struct " ++ s ++ "_ *" ++ s ++ ";"     ]-  prForward s = ""+  prForward _ = ""   getRules cf = (map testRule (rulesOfCF cf))   getClasses = map show . filter (\c -> identCat (normCat c) == show c)-  testRule (Rule f c r) =+  testRule (Rule f c _) =    if isList c    then if isConsFun f      then identCat (normCat c)@@ -92,15 +95,15 @@    else "_"  --Prints struct definitions for all categories.-prDataH :: [UserDef] -> Data -> String-prDataH user (cat, rules) =+prDataH :: Data -> String+prDataH (cat, rules) =    if isList cat       then unlines        [         "struct " ++ c' ++ "_",         "{",-        "  " ++ mem +++ (varName mem) ++ ";",-        "  " ++ c' +++ (varName c') ++ ";",+        "  " ++ mem +++ varName mem ++ ";",+        "  " ++ c' +++ varName c' ++ ";",         "};",         "",         c' ++ " make_" ++ c' ++ "(" ++ mem ++ " p1, " ++ c' ++ " p2);"@@ -108,28 +111,27 @@       else unlines        [         "struct " ++ show cat ++ "_",+         "{",-        "  enum { " ++ (concat (intersperse ", " (map prKind rules))) ++ " } kind;",+        "  enum { " ++ intercalate ", " (map prKind rules) ++ " } kind;",         "  union",         "  {",-        concatMap (prUnion user) rules ++ "  } u;",+        concatMap prUnion rules ++ "  } u;",         "};",         "",-        concatMap (prRuleH user cat) rules+        concatMap (prRuleH cat) rules        ]  where   c' = identCat (normCat cat)   mem = identCat (normCatOfList cat)-  prKind (fun, cats) = "is_" ++ normFun fun-  prMember user (fun, []) = ""-  prMember user (fun, cats) = "  " ++ (prInstVars user (getVars cats))-  prUnion user (fun, []) = ""-  prUnion user (fun, cats) = "    struct { " ++ (prInstVars user (getVars cats)) ++ " } " ++ (memName fun) ++ ";\n"+  prKind (fun, _) = "is_" ++ normFun fun+  prUnion (_, []) = ""+  prUnion (fun, cats) = "    struct { " ++ (render $ prInstVars (getVars cats)) ++ " } " ++ (memName fun) ++ ";\n"   --Interface definitions for rules vary on the type of rule.-prRuleH :: [UserDef] -> Cat -> (Fun, [Cat]) -> String-prRuleH user c (fun, cats) =+prRuleH :: Cat -> (Fun, [Cat]) -> String+prRuleH c (fun, cats) =     if isNilFun fun || isOneFun fun || isConsFun fun     then ""  --these are not represented in the AbSyn     else --a standard rule@@ -155,34 +157,20 @@  where   prUserDef s = "typedef char* " ++ show s ++ ";\n" ---A class's instance variables.-prInstVars :: [UserDef] -> [IVar] -> String-prInstVars _ [] = []-prInstVars user vars@((t,n):[]) =-  t +++ uniques- where-   (uniques, vs') = prUniques t vars-prInstVars user vars@((t,n):vs) =-  t +++ uniques ++-  (prInstVars user vs')- where-   (uniques, vs') = prUniques t vars----these functions group the types together nicely-prUniques :: String -> [IVar] -> (String, [IVar])-prUniques t vs = (prVars (findIndices (\x -> case x of (y,_) ->  y == t) vs) vs, remType t vs)- where-   remType :: String -> [IVar] -> [IVar]-   remType _ [] = []-   remType t ((t2,n):ts) = if t == t2-   				then (remType t ts)-				else (t2,n) : (remType t ts)-   prVars (x:[]) vs =  case vs !! x of-   			(t,n) -> (varName t) ++ (showNum n) ++ ";"-   prVars (x:xs) vs = case vs !! x of-   			(t,n) -> (varName t) ++ (showNum n) ++ ", " ++-				 (prVars xs vs)-+-- | A class's instance variables. Print the variables declaration by grouping+-- together the variables of the same type.+-- >>> prInstVars [("A", 1)]+-- A a_1;+-- >>> prInstVars [("A",1),("A",2),("B",1)]+-- A a_1, a_2; B b_1;+prInstVars :: [IVar] -> Doc+prInstVars =+    hsep . map prInstVarsOneType . groupBy ((==) `on` fst) . sort+  where+    prInstVarsOneType ivars = text (fst (head ivars))+                              <+> hsep (punctuate comma (map prIVar ivars))+                              <> semi+    prIVar (s, i) = text (varName s) <> text (showNum i)  {- **** Implementation (.C) File Functions **** -} @@ -191,10 +179,9 @@ mkCFile cf = unlines  [   header,-  concatMap (prDataC user) (cf2dataLists cf)+  concatMap (render . prDataC) (cf2dataLists cf)  ]  where-  user = fst (unzip (tokenPragmas cf))   header = unlines    [     "/* C Abstract Syntax Implementation generated by the BNF Converter. */",@@ -207,114 +194,143 @@  --This is not represented in the implementation. --This is not represented in the implementation.-prDataC :: [UserDef] -> Data -> String-prDataC user (cat, rules) = concatMap (prRuleC user cat) rules+prDataC :: Data -> Doc+prDataC (cat, rules) = vsep $ map (prRuleC cat) rules ---Classes for rules vary based on the type of rule.-prRuleC user c (fun, cats) =-    if isNilFun fun || isOneFun fun-    then ""  --these are not represented in the AbSyn-    else if isConsFun fun-    then --this is the linked list case.-    unlines-    [-     "/********************   " ++ c' ++ "    ********************/",-     prListFuncs user c',-     ""-    ]-    else --a standard rule-    unlines-    [-     "/********************   " ++ fun' ++ "    ********************/",-     prConstructorC user c fun' vs cats,-     ""-    ]+-- | Classes for rules vary based on the type of rule.+--+-- * Empty list constructor, these are not represented in the AbSyn+-- >>> prRuleC (ListCat (Cat "A")) ("[]", [Cat "A", Cat "B", Cat "B"])+-- <BLANKLINE>+--+-- * Linked list case. These are all built-in list functions.+-- Later we could include things like lookup,insert,delete,etc.+-- >>> prRuleC (ListCat (Cat "A")) ("(:)", [Cat "A", Cat "B", Cat "B"])+-- /********************   ListA    ********************/+-- ListA make_ListA(A p1, ListA p2)+-- {+--     ListA tmp = (ListA) malloc(sizeof(*tmp));+--     if (!tmp)+--     {+--         fprintf(stderr, "Error: out of memory when allocating ListA!\n");+--         exit(1);+--     }+--     tmp->a_ = p1;+--     tmp->lista_ = p2;+--     return tmp;+-- }+--+-- * Standard rule+-- >>> prRuleC (Cat "A") ("funa", [Cat "A", Cat "B", Cat "B"])+-- /********************   funa    ********************/+-- A make_funa(A p1, B p2, B p3)+-- {+--     A tmp = (A) malloc(sizeof(*tmp));+--     if (!tmp)+--     {+--         fprintf(stderr, "Error: out of memory when allocating funa!\n");+--         exit(1);+--     }+--     tmp->kind = is_funa;+--     tmp->u.funa_.a_ = p1;+--     tmp->u.funa_.b_1 = p2;+--     tmp->u.funa_.b_2 = p3;+--     return tmp;+-- }+prRuleC :: Cat -> (String, [Cat]) -> Doc+prRuleC _ (fun, _) | isNilFun fun || isOneFun fun = empty+prRuleC cat (fun, _) | isConsFun fun = vsep+    [ "/********************   " <> c <> "    ********************/"+    , c <+> "make_" <> c <> parens (text m <+> "p1" <> "," <+> c <+> "p2")+    , lbrace+    , nest 4 $ vsep+        [ c <+> "tmp = (" <> c <> ") malloc(sizeof(*tmp));"+        , "if (!tmp)"+        , lbrace+        , nest 4 $ vsep+            [ "fprintf(stderr, \"Error: out of memory when allocating " <> c <> "!\\n\");"+            , "exit(1);" ]+        , rbrace+        , text $ "tmp->" ++ m' ++ " = " ++ "p1;"+        , "tmp->" <> v <+> "=" <+> "p2;"+        , "return tmp;" ]+    , rbrace ]+  where+    icat = identCat (normCat cat)+    c = text icat+    v = text (map toLower icat ++ "_")+    ListCat c' = cat            -- We're making a list constructor, so we+                                -- expect a list category+    m = identCat (normCat c')+    m' = map toLower m ++ "_"+prRuleC c (fun, cats) = vsep+    [ text $ "/********************   " ++ fun' ++ "    ********************/"+    , prConstructorC c fun' vs cats ]    where      vs = getVars cats      fun' = normFun fun-     c' = identCat (normCat c) ---These are all built-in list functions.---Later we could include things like lookup,insert,delete,etc.-prListFuncs :: [UserDef] -> String -> String-prListFuncs user c = unlines- [-   c ++ " make_" ++ c ++"(" ++ m ++ " p1" ++ ", " ++ c ++ " p2)",-   "{",-   "  " ++ c ++ " tmp = (" ++ c ++ ") malloc(sizeof(*tmp));",-   "  if (!tmp)",-   "  {",-   "    fprintf(stderr, \"Error: out of memory when allocating " ++ c ++ "!\\n\");",-   "    exit(1);",-   "  }",-   "  tmp->" ++ m' ++ " = " ++ "p1;",-   "  tmp->" ++ v ++ " = " ++ "p2;",-   "  return tmp;",-   "}"- ]- where-   v = (map toLower c) ++ "_"-   m = drop 4 c-   m' = drop 4 v----The constructor just assigns the parameters to the corresponding instance variables.-prConstructorC :: [UserDef] -> Cat -> String -> [IVar] -> [Cat] -> String-prConstructorC user cat c vs cats =-  unlines-  [-   cat' ++ " make_" ++ c ++"(" ++ (interleave types params) ++ ")",-   "{",-   "  " ++ cat' ++ " tmp = (" ++ cat' ++ ") malloc(sizeof(*tmp));",-   "  if (!tmp)",-   "  {",-   "    fprintf(stderr, \"Error: out of memory when allocating " ++ c ++ "!\\n\");",-   "    exit(1);",-   "  }",-   "  tmp->kind = is_" ++ c ++ ";",-   prAssigns c vs params,-   "  return tmp;",-   "}"-  ]+-- | The constructor just assigns the parameters to the corresponding instance+-- variables.+-- >>> prConstructorC (Cat "A") "funa" [("A",1),("B",2)] [Cat "O", Cat "E"]+-- A make_funa(O p1, E p2)+-- {+--     A tmp = (A) malloc(sizeof(*tmp));+--     if (!tmp)+--     {+--         fprintf(stderr, "Error: out of memory when allocating funa!\n");+--         exit(1);+--     }+--     tmp->kind = is_funa;+--     tmp->u.funa_.a_ = p1;+--     tmp->u.funa_.b_2 = p2;+--     return tmp;+-- }+prConstructorC :: Cat -> String -> [IVar] -> [Cat] -> Doc+prConstructorC cat c vs cats = vsep+    [ text (cat' ++ " make_" ++ c) <> parens args+    , lbrace+    , nest 4 $ vsep+        [ text $ cat' ++ " tmp = (" ++ cat' ++ ") malloc(sizeof(*tmp));"+        , text "if (!tmp)"+        , lbrace+        , nest 4 $ vsep+            [ text ("fprintf(stderr, \"Error: out of memory when allocating " ++ c ++ "!\\n\");")+            , text "exit(1);" ]+        , rbrace+        , text $ "tmp->kind = is_" ++ c ++ ";"+        , prAssigns c vs params+        , text "return tmp;" ]+    , rbrace ]  where    cat' = identCat (normCat cat)-   (types, params) = unzip (prParams cats (length cats) ((length cats)+1))-   interleave _ [] = []-   interleave (x:[]) (y:[]) = x +++ y-   interleave (x:xs) (y:ys) = x +++ y ++ "," +++ (interleave xs ys)+   (types, params) = unzip (prParams cats)+   args = hsep $ punctuate comma $ zipWith (<+>) types params ---Prints the constructor's parameters.-prParams :: [Cat] -> Int -> Int -> [(String,String)]-prParams [] _ _ = []-prParams (c:cs) n m = (identCat c,"p" ++ (show (m-n)))-			: (prParams cs (n-1) m)+-- | Prints the constructor's parameters. Returns pairs of type * name+-- >>> prParams [Cat "O", Cat "E"]+-- [(O,p1),(E,p2)]+prParams :: [Cat] -> [(Doc, Doc)]+prParams = zipWith prParam [1..]+  where+    prParam n c = (text (identCat c), text ("p" ++ show n)) ---Prints the assignments of parameters to instance variables.---This algorithm peeks ahead in the list so we don't use map or fold-prAssigns :: String -> [IVar] -> [String] -> String-prAssigns _ [] _ = []-prAssigns _ _ [] = []-prAssigns c ((t,n):vs) (p:ps) =-  if n == 1 then-   case findIndices (\x -> case x of (l,r) -> l == t) vs of-    [] -> "  tmp->u." ++ c' ++ "_." ++ (varName t) ++ " = " ++ p ++ ";\n" ++ (prAssigns c vs ps)-    z -> "  tmp->u." ++ c' ++ "_." ++ ((varName t) ++ (showNum n)) ++ " = " ++ p ++ ";\n" ++ (prAssigns c vs ps)-  else "  tmp->u." ++ c' ++ "_." ++ ((varName t) ++ (showNum n)) ++ " = " ++ p ++ ";\n" ++ (prAssigns c vs ps)- where-  c' = map toLower c+-- | Prints the assignments of parameters to instance variables.+-- >>> prAssigns "A" [("A",1),("B",2)] [text "abc", text "def"]+-- tmp->u.a_.a_ = abc;+-- tmp->u.a_.b_2 = def;+prAssigns :: String -> [IVar] -> [Doc] -> Doc+prAssigns c vars params = vcat $ zipWith prAssign vars params+  where+    prAssign (t,n) p =+        text ("tmp->u." ++ c' ++ "_." ++ vname t n) <+> char '=' <+> p <> semi+    vname t n | n == 1 =+        case findIndices ((== t).fst) vars of+            [_] -> varName t+            _   -> varName t ++ showNum n+    vname t n = varName t ++ showNum n+    c' = map toLower c  {- **** Helper Functions **** -} ---Checks if something is a basic or user-defined type.-isBasic :: [UserDef] -> Cat -> Bool-isBasic user x =-  if elem x user-    then True-    else case x of-      Cat "Integer" -> True-      Cat "Char" -> True-      Cat "String" -> True-      Cat "Double" -> True-      Cat "Ident" -> True-      _ -> False--memName s = (map toLower s) ++ "_"+memName s = map toLower s ++ "_"
src/BNFC/Backend/C/CFtoCPrinter.hs view
@@ -42,11 +42,11 @@ module BNFC.Backend.C.CFtoCPrinter (cf2CPrinter) where  import BNFC.CF-import BNFC.Utils ((+++), (++++))+import BNFC.Utils ((+++)) import BNFC.Backend.Common.NamedVariables import BNFC.Backend.Common.StrUtils (renderCharOrString) import Data.List-import Data.Char(toLower, toUpper)+import Data.Char(toLower)  --Produces (.h file, .c file) cf2CPrinter :: CF -> (String, String)@@ -124,13 +124,13 @@  --Prints all the required method names and their parameters. prPrintDataH :: (Cat, [Rule]) -> String-prPrintDataH (cat, rules) = concat ["void pp", cl, "(", cl, " p, int i);\n"]+prPrintDataH (cat, _) = concat ["void pp", cl, "(", cl, " p, int i);\n"]   where    cl = identCat (normCat cat)  --Prints all the required method names and their parameters. prShowDataH :: (Cat, [Rule]) -> String-prShowDataH (cat, rules) = concat ["void sh", cl, "(", cl, " p);\n"]+prShowDataH (cat, _) = concat ["void sh", cl, "(", cl, " p);\n"]   where    cl = identCat (normCat cat) @@ -382,7 +382,7 @@  --Pretty Printer methods for a rule. prPrintRule :: [UserDef] -> Rule -> String-prPrintRule user r@(Rule fun c cats) | not (isCoercion fun) = unlines+prPrintRule user r@(Rule fun _ cats) | not (isCoercion fun) = unlines   [    "  case is_" ++ fun ++ ":",    lparen,@@ -396,7 +396,7 @@       ("    if (_i_ > " ++ (show p) ++ ") renderC(_L_PAREN);",        "    if (_i_ > " ++ (show p) ++ ") renderC(_R_PAREN);")     cats' = (concatMap (prPrintCat user fun) (zip3 (fixOnes (numVars [] cats)) cats (map getPrec cats)))-    getPrec (Right s) = 0 :: Integer+    getPrec (Right _) = 0 :: Integer     getPrec (Left c) = precCat c prPrintRule _ _ = "" @@ -482,7 +482,7 @@  --Pretty Printer methods for a rule. prShowRule :: [UserDef] -> Rule -> String-prShowRule user r@(Rule fun c cats) | not (isCoercion fun) = unlines+prShowRule user (Rule fun _ cats) | not (isCoercion fun) = unlines   [    "  case is_" ++ fun ++ ":",    lparen,@@ -505,14 +505,14 @@       then insertSpaces xs       else (x : ["  bufAppendC(' ');\n"]) ++ (insertSpaces xs)     allTerms [] = True-    allTerms ((Left z):zs) = False-    allTerms (z:zs) = allTerms zs+    allTerms (Left _:_) = False+    allTerms (_:zs) = allTerms zs prShowRule _ _ = ""  --This goes on to recurse to the instance variables. prShowCat :: [UserDef] -> Fun -> (Either String String, Either Cat String) -> String prShowCat user fnm (c,o) = case c of-  (Right t) -> ""+  (Right _) -> ""   (Left nt) -> if isBasic user nt        then "    sh" ++ (basicFunName nt) ++ "(_p_->u." ++ v ++ "_." ++ nt ++ ");\n"        else if nt == "#_" --Internal category@@ -558,10 +558,6 @@     else if "double_" `isPrefixOf` v then "Double"     else if "ident_" `isPrefixOf` v then "Ident"     else "Ident" --User-defined type----Just sets the coercion level for parentheses in the Pretty Printer.-setI :: Int -> String-setI n = "_i_ = " ++ (show n) ++ "; "  --An extremely simple renderCer for terminals. prRender :: String
src/BNFC/Backend/C/CFtoFlexC.hs view
@@ -39,9 +39,7 @@  import BNFC.CF import BNFC.Backend.CPP.NoSTL.RegToFlex--- import BNFC.Utils((+++), (++++)) import BNFC.Backend.Common.NamedVariables-import Data.List  --The environment must be returned for the parser to use. cf2flex :: String -> CF -> (String, SymEnv)@@ -176,10 +174,6 @@   "<COMMENT>.      \t /* BNFC multi-line comment */;",   "<COMMENT>[\\n]      \t /* BNFC multi-line comment */;"   ]--lexReserved :: String -> String-lexReserved s = "<YYINITIAL>\"" ++ s ++ "\" \t yylval.string_ = strdup(yytext); return TS;"-  --Helper function that escapes characters in strings escapeChars :: String -> String
src/BNFC/Backend/CPP/NoSTL.hs view
@@ -29,8 +29,6 @@ import BNFC.Backend.CPP.NoSTL.CFtoCVisitSkel import BNFC.Backend.CPP.NoSTL.CFtoCPPPrinter import Data.Char-import System.Exit (exitFailure)-import Control.Monad (when) import qualified BNFC.Backend.Common.Makefile as Makefile  makeCppNoStl :: SharedOptions -> CF -> MkFiles ()
src/BNFC/Backend/CPP/NoSTL/CFtoBison.hs view
@@ -61,10 +61,10 @@ module BNFC.Backend.CPP.NoSTL.CFtoBison (cf2Bison) where  import BNFC.CF-import Data.List (intersperse, isPrefixOf, nub)+import Data.List (intersperse) import BNFC.Backend.Common.NamedVariables hiding (varName) import Data.Char (toLower,isUpper)-import BNFC.Utils ((+++), (++++))+import BNFC.Utils ((+++)) import BNFC.TypeChecker import ErrM @@ -172,7 +172,7 @@  --This generates a parser method for each entry point. parseMethod :: String -> Cat -> String-parseMethod name cat =+parseMethod _ cat =   -- if normCat cat /= cat     M.F. 2004-09-17 comment. No duplicates from allCatsIdNorm   -- then ""   -- else@@ -236,14 +236,14 @@    "  " ++ identCat (normCat s) ++ "*" +++ varName s ++ ";\n"  mkPointer s | normCat s == s = --normal cat    "  " ++ identCat (normCat s) ++ "*" +++ varName s ++ ";\n"- mkPointer s = ""+ mkPointer _ = ""  --declares non-terminal types. declarations :: CF -> String declarations cf = concatMap (typeNT cf) (allCats cf)  where --don't define internal rules    typeNT cf nt | rulesForCat cf nt /= [] = "%type <" ++ varName nt ++ "> " ++ identCat nt ++ "\n"-   typeNT cf nt = ""+   typeNT _ _ = ""  --declares terminal types. tokens :: [UserDef] -> SymEnv -> String@@ -267,7 +267,7 @@ --The following functions are a (relatively) straightforward translation --of the ones in CFtoHappy.hs rulesForBison :: String -> CF -> SymEnv -> Rules-rulesForBison name cf env = map mkOne $ ruleGroups cf where+rulesForBison _ cf env = map mkOne $ ruleGroups cf where   mkOne (cat,rules) = constructRule cf env rules cat  -- For every non-terminal, we construct a set of rules.@@ -326,7 +326,7 @@  prRules :: Rules -> String prRules [] = []-prRules ((nt, []):rs) = prRules rs --internal rule+prRules ((_, []):rs) = prRules rs --internal rule prRules ((nt,((p,a):ls)):rs) =   (unwords [nt', ":" , p, "{ $$ =", a, "}", "\n" ++ pr ls]) ++ ";\n" ++ prRules rs  where
src/BNFC/Backend/CPP/NoSTL/CFtoCPPAbs.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE OverloadedStrings #-} {-     BNF Converter: C++ abstract syntax generator     Copyright (C) 2004  Author:  Michael Pellauer@@ -45,11 +46,12 @@ import BNFC.Backend.Common.NamedVariables import Data.List import Data.Char(toLower)+import Text.PrettyPrint   --The result is two files (.H file, .C file) cf2CPPAbs :: String -> CF -> (String, String)-cf2CPPAbs name cf = (mkHFile cf, mkCFile cf)+cf2CPPAbs _ cf = (mkHFile cf, mkCFile cf)   {- **** Header (.H) File Functions **** -}@@ -80,7 +82,7 @@   rules = getRules cf   classes = rules ++ (getClasses (map show $ allCats cf))   prForward s | isProperLabel s = "class " ++ (show$normCat$strToCat s) ++ ";\n"-  prForward s = ""+  prForward _ = ""   getRules cf = (map testRule (rulesOfCF cf))   getClasses [] = []   getClasses (c:cs) =@@ -90,7 +92,7 @@      then getClasses cs      else c : (getClasses cs) -  testRule (Rule f c r) =+  testRule (Rule f c _) =    if isList c    then if isConsFun f      then identCat c@@ -101,7 +103,7 @@ prDataH :: [UserDef] -> Data -> String prDataH  user (cat, rules) =   case lookup (show cat) rules of-    Just x -> concatMap (prRuleH user cat) rules+    Just _ -> concatMap (prRuleH user cat) rules     Nothing -> if isList cat       then concatMap (prRuleH user cat) rules       else unlines@@ -125,7 +127,7 @@      "class" +++ c' +++ ": public Visitable",      "{",      " public:",-     prInstVars user vs,+     render $ nest 2 $ prInstVars user vs,      "  " ++ c' ++ "(const" +++ c' +++ "&);",      "  " ++ c' ++ " &operator=(const" +++ c' +++ "&);",      "  " ++ c' ++ "(" ++ (prConstructorH 1 vs) ++ ");",@@ -144,7 +146,7 @@      "class" +++ fun' +++ ": public" +++ super,      "{",      " public:",-     prInstVars user vs,+     render $ nest 2 $ prInstVars user vs,      "  " ++ fun' ++ "(const" +++ fun' +++ "&);",      "  " ++ fun' ++ " &operator=(const" +++ fun' +++ "&);",      "  " ++ fun' ++ "(" ++ (prConstructorH 1 vs) ++ ");",@@ -223,28 +225,27 @@  where   prUserDef s = "typedef char* " ++ show s ++ ";\n" ---A class's instance variables.-prInstVars :: [UserDef] -> [IVar] -> String-prInstVars _ [] = []-prInstVars user vars@((t,n):vs) =-  "  " ++ t +++ uniques ++ ";" ++++-  (prInstVars user vs')+-- | A class's instance variables.+-- >>> prInstVars [Cat "MyTokn"] [("MyTokn",1), ("A",1), ("A",2)]+-- MyTokn mytokn_1;+-- A *a_1, *a_2;+prInstVars :: [UserDef] -> [IVar] -> Doc+prInstVars _ [] = empty+prInstVars user vars@((t,_):_) =+    text t <+> uniques <> ";" $$ prInstVars user vs'  where-   (uniques, vs') = prUniques t vars-   --these functions group the types together nicely-   prUniques :: String -> [IVar] -> (String, [IVar])-   prUniques t vs = (prVars (findIndices (\x -> case x of (y,_) ->  y == t) vs) vs, remType t vs)-   prVars (x:[]) vs =  case vs !! x of-   			(t,n) -> ((varLinkName t) ++ (showNum n))-   prVars (x:xs) vs = case vs !! x of-   			(t,n) -> ((varLinkName t) ++ (showNum n)) ++ "," +++-				 (prVars xs vs)-   varLinkName z = if isBasic user z-     then (map toLower z) ++ "_"-     else "*" ++ (map toLower z) ++ "_"-   remType :: String -> [IVar] -> [IVar]-   remType _ [] = []-   remType t ((t2,n):ts) = if t == t2+    (uniques, vs') = prUniques t+    --these functions group the types together nicely+    prUniques :: String -> (Doc, [IVar])+    prUniques t = (prVars (findIndices (\(y,_) ->  y == t) vars), remType t vars)+    prVars = hsep . punctuate comma . map prVar+    prVar x = let (t,n) = vars !! x in varLinkName t <> text (showNum n)+    varLinkName z = if isBasic user z+      then text (map toLower z) <> "_"+      else "*" <> text (map toLower z) <> "_"+    remType :: String -> [IVar] -> [IVar]+    remType _ [] = []+    remType t ((t2,n):ts) = if t == t2    				then (remType t ts) 				else (t2,n) : (remType t ts) @@ -280,7 +281,7 @@     unlines     [      "/********************   " ++ c' ++ "    ********************/",-     prConstructorC user c' vs cats,+     render $ prConstructorC user c' vs cats,      prCopyC user c' vs,      prDestructorC user c' vs,      prListFuncs user c',@@ -292,7 +293,7 @@     unlines     [      "/********************   " ++ fun' ++ "    ********************/",-     prConstructorC user fun' vs cats,+     render $ prConstructorC user fun' vs cats,      prCopyC user fun' vs,      prDestructorC user fun' vs,      prAcceptC fun,@@ -351,19 +352,20 @@ prAcceptC ty =   "\nvoid " ++ ty ++ "::accept(Visitor *v) { v->visit" ++ ty ++ "(this); }" ---The constructor just assigns the parameters to the corresponding instance variables.-prConstructorC :: [UserDef] -> String -> [IVar] -> [Cat] -> String+-- | The constructor just assigns the parameters to the corresponding instance+-- variables.+-- >>> prConstructorC [Cat "Integer"] "bla" [("A",1), ("Integer",1), ("A",2)] [Cat "A", Cat "Integer", Cat "A"]+-- bla::bla(A *p1, Integer p2, A *p3) { a_1 = p1; integer_ = p2; a_2 = p3; }+prConstructorC :: [UserDef] -> String -> [IVar] -> [Cat] -> Doc prConstructorC user c vs cats =-  c ++ "::" ++ c ++"(" ++ (interleave types params) ++ ")" +++ "{" +++-   prAssigns vs params ++ "}"+    text c <> "::" <> text c <> parens (args)+    <+> "{" <+> text (prAssigns vs params) <> "}"   where-   (types, params) = unzip (prParams cats (length cats) ((length cats)+1))-   interleave _ [] = []-   interleave (x:[]) (y:[]) = x +++ (optstar x) ++ y-   interleave (x:xs) (y:ys) = x +++ (optstar x) ++ y ++ "," +++ (interleave xs ys)-   optstar x = if isBasic user x-       then ""-       else "*"+    (types, params) = unzip (prParams cats (length cats) (length cats+1))+    args = hsep $ punctuate "," $ zipWith prArg types params+    prArg type_ name+      | isBasic user type_  = text type_ <+> text name+      | otherwise           = text type_ <+> "*" <> text name  --Print copy constructor and copy assignment prCopyC :: [UserDef] -> String -> [IVar] -> String@@ -391,7 +393,7 @@  --The cloner makes a new deep copy of the object prCloneC :: [UserDef] -> String -> [IVar] -> String-prCloneC user c vs =+prCloneC _ c _ =   c +++ "*" ++ c ++ "::clone() const {" ++++     "  return new" +++ c ++ "(*this);\n}" @@ -421,10 +423,10 @@ prAssigns _ [] = [] prAssigns ((t,n):vs) (p:ps) =  if n == 1 then-  case findIndices (\x -> case x of (l,r) -> l == t) vs of-    [] -> (varName t) +++ "=" +++ p ++ ";" +++ (prAssigns vs ps)-    z -> ((varName t) ++ (showNum n)) +++ "=" +++ p ++ ";" +++ (prAssigns vs ps)- else ((varName t) ++ (showNum n)) +++ "=" +++ p ++ ";" +++ (prAssigns vs ps)+  case findIndices (\(l,_) -> l == t) vs of+    [] -> varName t +++ "=" +++ p ++ ";" +++ prAssigns vs ps+    _ -> varName t ++ showNum n +++ "=" +++ p ++ ";" +++ prAssigns vs ps+ else varName t ++ showNum n +++ "=" +++ p ++ ";" +++ prAssigns vs ps   {- **** Helper Functions **** -}
src/BNFC/Backend/CPP/NoSTL/CFtoCPPPrinter.hs view
@@ -23,12 +23,11 @@ module BNFC.Backend.CPP.NoSTL.CFtoCPPPrinter (cf2CPPPrinter) where  import BNFC.CF-import BNFC.Utils ((+++), (++++))+import BNFC.Utils ((+++)) import BNFC.Backend.Common.NamedVariables import BNFC.Backend.Common.StrUtils (renderCharOrString) import Data.List-import Data.Char(toLower, toUpper)-import Text.PrettyPrint+import Data.Char(toLower)  --Produces (.H file, .C file) cf2CPPPrinter :: CF -> (String, String)@@ -40,7 +39,7 @@  --An extremely large function to make the Header File mkHFile :: CF -> [(Cat,[Rule])] -> String-mkHFile cf groups = unlines+mkHFile _ groups = unlines  [   printHeader,   concatMap prDataH groups,@@ -168,12 +167,12 @@  where    cl = identCat (normCat cat)    abstract = case lookupRule (show cat) rules of-    Just x -> ""+    Just _ -> ""     Nothing ->  "  void visit" ++ cl ++ "(" ++ cl ++ " *p); /* abstract class */\n"  --Prints all the methods to visit a rule. prRuleH :: Rule -> String-prRuleH (Rule fun c cats) | isProperLabel fun = concat+prRuleH (Rule fun _ _) | isProperLabel fun = concat   ["  void visit", fun, "(", fun, " *p);\n"] prRuleH _ = "" @@ -349,12 +348,12 @@    sep' = getCons rules    optsep = if hasOneFunc rules then "" else ("      render(" ++ sep ++ ");")    abstract = case lookupRule (show cat) rules of-    Just x -> ""+    Just _ -> ""     Nothing ->  "void PrintAbsyn::visit" ++ cl ++ "(" ++ cl ++ "*p) {} //abstract class\n\n"  --Pretty Printer methods for a rule. prPrintRule :: [UserDef] -> Rule -> String-prPrintRule user r@(Rule fun c cats) | isProperLabel fun = unlines+prPrintRule user r@(Rule fun _ cats) | isProperLabel fun = unlines   [    "void PrintAbsyn::visit" ++ fun ++ "(" ++ fun ++ "*" +++ fnm ++ ")",    "{",@@ -372,7 +371,7 @@        "  if (oldi > " ++ (show p) ++ ") render(_R_PAREN);\n")     cats' = (concatMap (prPrintCat user fnm) (zip (fixOnes (numVars [] cats)) (map getPrec cats)))     fnm = "p" --old names could cause conflicts-    getPrec (Right s) = 0+    getPrec (Right _) = 0     getPrec (Left c) = precCat c prPrintRule _ _ = "" @@ -430,12 +429,12 @@      then "      visit" ++ (funName member) ++ "(" ++ vname ++ "->" ++ member ++ ");"      else "      " ++ vname ++ "->" ++ member ++ "->accept(this);"    abstract = case lookupRule (show cat) rules of-    Just x -> ""+    Just _ -> ""     Nothing ->  "void ShowAbsyn::visit" ++ cl ++ "(" ++ cl ++ "* p) {} //abstract class\n\n"  --This prints all the methods for Abstract Syntax tree rules. prShowRule :: [UserDef] -> Rule -> String-prShowRule user (Rule fun c cats) | isProperLabel fun = concat+prShowRule user (Rule fun _ cats) | isProperLabel fun = concat   [    "void ShowAbsyn::visit" ++ fun ++ "(" ++ fun ++ "*" +++ fnm ++ ")\n",    "{\n",@@ -457,10 +456,10 @@     insertSpaces (x:[]) = [x]     insertSpaces (x:xs) = if x == ""       then insertSpaces xs-      else (x : ["  bufAppend(' ');\n"]) ++ (insertSpaces xs)+      else (x : ["  bufAppend(' ');\n"]) ++ insertSpaces xs     allTerms [] = True-    allTerms ((Left z):zs) = False-    allTerms (z:zs) = allTerms zs+    allTerms (Left _:_) = False+    allTerms (_:zs) = allTerms zs     fnm = "p" --other names could cause conflicts prShowRule _ _ = "" @@ -468,7 +467,7 @@ prShowCat :: [UserDef] -> String -> Either String String -> String prShowCat user fnm c =   case c of-    (Right t) -> ""+    (Right _) -> ""     (Left nt) ->       if isBasic user nt        then "  visit" ++ (funName nt) ++ "(" ++ fnm ++ "->" ++ nt ++ ");\n"
src/BNFC/Backend/CPP/NoSTL/CFtoCVisitSkel.hs view
@@ -40,7 +40,7 @@ module BNFC.Backend.CPP.NoSTL.CFtoCVisitSkel (cf2CVisitSkel) where  import BNFC.CF-import BNFC.Utils ((+++), (++++))+import BNFC.Utils ((+++)) import BNFC.Backend.Common.NamedVariables import Data.List import Data.Char(toLower, toUpper)@@ -95,19 +95,19 @@ --Prints out visit functions for a category prDataH :: (Cat, [Rule]) -> String prDataH (cat, rules) =- if "List" `isPrefixOf` (identCat cat)+ if "List" `isPrefixOf` identCat cat  then concat ["  void visit", cl, "(", cl, "* ", vname, ");"]- else abstract ++ (concatMap prRuleH rules)+ else abstract ++ concatMap prRuleH rules  where    cl = identCat (normCat cat)    vname = map toLower cl    abstract = case lookupRule (show cat) rules of-    Just x -> ""+    Just _ -> ""     Nothing ->  "  void visit" ++ cl ++ "(" ++ cl ++ "*" +++ vname ++ "); /* abstract class */\n"  --Visit functions for a rule. prRuleH :: Rule -> String-prRuleH (Rule fun c cats) | not (isCoercion fun) = concat+prRuleH (Rule fun _ _) | not (isCoercion fun) = concat   ["  void visit", fun, "(", fun, "* ", fnm, ");\n"]    where     fnm = map toLower fun@@ -198,12 +198,12 @@      then "    visit" ++ (funName member) ++ "(" ++ vname ++ "->" ++ member ++ ");"      else "    " ++ vname ++ "->" ++ member ++ "->accept(this);"    abstract = case lookupRule (show cat) rules of-    Just x -> ""+    Just _ -> ""     Nothing ->  "void Skeleton::visit" ++ cl ++ "(" ++ cl ++ "*" +++ vname ++ ") {} //abstract class\n\n"  --Visits all the instance variables of a category. prRule :: [UserDef] -> Rule -> String-prRule user (Rule fun c cats) | not (isCoercion fun) = unlines+prRule user (Rule fun _ cats) | not (isCoercion fun) = unlines   [    "void Skeleton::visit" ++ fun ++ "(" ++ fun ++ "*" +++ fnm ++ ")",    "{",@@ -216,15 +216,15 @@         then ""     	else (concatMap (prCat user fnm) (fixOnes (numVars [] cats)))     allTerms [] = True-    allTerms ((Left z):zs) = False-    allTerms (z:zs) = allTerms zs+    allTerms (Left _:_) = False+    allTerms (_:zs) = allTerms zs     fnm = map toLower fun-prRule user _ = ""+prRule _ _ = ""  --Prints the actual instance-variable visiting. prCat user fnm c =   case c of-    (Right t) -> ""+    (Right _) -> ""     (Left nt) -> if isBasic user nt        then "  visit" ++ (funName nt) ++ "(" ++ fnm ++ "->" ++ nt ++ ");\n"        else if "list" `isPrefixOf` nt
src/BNFC/Backend/CPP/NoSTL/CFtoFlex.hs view
@@ -39,9 +39,7 @@  import BNFC.CF import BNFC.Backend.CPP.NoSTL.RegToFlex-import BNFC.Utils((+++), (++++)) import BNFC.Backend.Common.NamedVariables-import Data.List import BNFC.Backend.CPP.STL.STLUtils  --The environment must be returned for the parser to use.@@ -60,7 +58,7 @@    makeSymEnv (s:symbs) n = (s, nsDefine inPackage "_SYMB_" ++ (show n)) : (makeSymEnv symbs (n+1))  prelude :: Maybe String -> String -> String-prelude inPackage name = unlines+prelude inPackage _ = unlines   [    maybe "" (\ns -> "%option prefix=\"" ++ ns ++ "yy\"") inPackage,    "/* This FLex file was machine-generated by the BNF converter */",
src/BNFC/Backend/CPP/NoSTL/RegToFlex.hs view
@@ -3,7 +3,6 @@ -- modified from pretty-printer generated by the BNF converter  import AbsBNF-import Data.Char  -- the top-level printing method printRegFlex :: Reg -> String@@ -22,7 +21,6 @@     t        :ts -> space t   $ rend i ts     _            -> ""   cons s t  = s ++ t-  new i s   = s   space t s = if null s then t else t ++ s  parenth :: [String] -> [String]
src/BNFC/Backend/CPP/STL.hs view
@@ -32,10 +32,7 @@ import BNFC.Backend.CPP.STL.STLUtils import BNFC.CF import BNFC.Utils-import Control.Monad (unless, when) import Data.Char-import System.Console.GetOpt-import System.Exit (exitFailure)  makeCppStl :: SharedOptions -> CF -> MkFiles () makeCppStl opts cf = do
src/BNFC/Backend/CPP/STL/CFtoBisonSTL.hs view
@@ -45,10 +45,10 @@ module BNFC.Backend.CPP.STL.CFtoBisonSTL (cf2Bison) where  import BNFC.CF-import Data.List (intersperse, isPrefixOf, nub)+import Data.List (intersperse) import BNFC.Backend.Common.NamedVariables hiding (varName)-import Data.Char (toLower,isUpper,isDigit)-import BNFC.Utils ((+++), (++++))+import Data.Char (toLower,isUpper)+import BNFC.Utils ((+++)) import BNFC.TypeChecker import ErrM import BNFC.Backend.CPP.STL.STLUtils@@ -168,7 +168,7 @@  --This generates a parser method for each entry point. parseMethod :: Maybe String -> String -> Cat -> String-parseMethod inPackage name cat =+parseMethod inPackage _ cat =   -- if normCat cat /= cat     M.F. 2004-09-17 comment. No duplicates from allCatsIdNorm   -- then ""   -- else@@ -231,7 +231,7 @@    "  " ++ scope ++ (identCat (normCat s)) ++ "*" +++ (varName s) ++ ";\n"  mkPointer s | normCat s == s = --normal cat    "  " ++ scope ++ (identCat (normCat s)) ++ "*" +++ (varName s) ++ ";\n"- mkPointer s = ""+ mkPointer _ = ""  scope = nsScope inPackage  --declares non-terminal types.@@ -239,7 +239,7 @@ declarations cf = concatMap (typeNT cf) (positionCats cf ++ allCats cf)  where --don't define internal rules    typeNT cf nt | (isPositionCat cf nt || rulesForCat cf nt /= []) = "%type <" ++ (varName nt) ++ "> " ++ (identCat nt) ++ "\n"-   typeNT cf nt = ""+   typeNT _ _ = ""  --declares terminal types. tokens :: [UserDef] -> SymEnv -> String@@ -263,7 +263,7 @@ --The following functions are a (relatively) straightforward translation --of the ones in CFtoHappy.hs rulesForBison :: Bool -> Maybe String -> String -> CF -> SymEnv -> Rules-rulesForBison ln inPackage name cf env = (map mkOne $ ruleGroups cf) ++ posRules where+rulesForBison ln inPackage _ cf env = (map mkOne $ ruleGroups cf) ++ posRules where   mkOne (cat,rules) = constructRule ln inPackage cf env rules cat   posRules = map mkPos $ positionCats cf   mkPos cat = (cat, [(maybe (show cat) id (lookup (show cat) env),@@ -321,7 +321,7 @@ -- Generate patterns and a set of metavariables indicating -- where in the pattern the non-terminal generatePatterns :: CF -> SymEnv -> Rule -> Bool -> (Pattern,[(MetaVar,Bool)])-generatePatterns cf env r revv = case rhsRule r of+generatePatterns cf env r _ = case rhsRule r of   []  -> ("/* empty */",[])   its -> (unwords (map mkIt its), metas its)  where@@ -345,7 +345,7 @@  prRules :: Rules -> String prRules [] = []-prRules ((nt, []):rs) = prRules rs --internal rule+prRules ((_, []):rs) = prRules rs --internal rule prRules ((nt,((p,a):ls)):rs) =   (unwords [nt', ":" , p, "{ ", a, "}", "\n" ++ pr ls]) ++ ";\n" ++ prRules rs  where
src/BNFC/Backend/CPP/STL/CFtoCVisitSkelSTL.hs view
@@ -40,10 +40,8 @@ module BNFC.Backend.CPP.STL.CFtoCVisitSkelSTL (cf2CVisitSkel) where  import BNFC.CF-import BNFC.Utils ((+++), (++++))-import BNFC.Backend.Common.NamedVariables-import Data.List-import Data.Char(toLower, toUpper)+import BNFC.Utils ((+++))+import Data.Char(toLower) import BNFC.Backend.Common.OOAbstract import BNFC.Backend.CPP.STL.STLUtils @@ -131,7 +129,7 @@  where    vname = map toLower cl -prCon fcs@(f,cs) = unlines [+prCon (f,cs) = unlines [   "void Skeleton::visit" ++ f ++ "(" ++ f ++ " *" ++ v ++ ")",   "{",   "  /* Code For " ++ f ++ " Goes Here */",
src/BNFC/Backend/CPP/STL/CFtoSTLAbs.hs view
@@ -42,16 +42,14 @@  import BNFC.Backend.Common.OOAbstract import BNFC.CF-import BNFC.Utils((+++),(++++))-import BNFC.Backend.Common.NamedVariables+import BNFC.Utils((+++)) import Data.List-import Data.Char(toLower) import BNFC.Backend.CPP.STL.STLUtils  --The result is two files (.H file, .C file)  cf2CPPAbs :: Bool -> Maybe String -> String -> CF -> (String, String)-cf2CPPAbs ln inPackage name cf = (mkHFile ln inPackage cab, mkCFile inPackage cab)+cf2CPPAbs ln inPackage _ cf = (mkHFile ln inPackage cab, mkCFile inPackage cab)   where     cab = cf2cabs cf @@ -189,7 +187,7 @@   ]  prConC :: CAbsRule -> String-prConC fcs@(f,cs) = unlines [+prConC fcs@(f,_) = unlines [   "/********************   " ++ f ++ "    ********************/",   prConstructorC fcs,   prCopyC fcs,@@ -237,8 +235,8 @@   ]  where    cvs = [c | (_,_,c) <- cs]-   pvs = ["p" ++ show i | ((x,st,_),i) <- zip cs [1..]]-   conargs = concat $ intersperse ", "+   pvs = ['p' : show i | ((_,_,_),i) <- zip cs [1..]]+   conargs = intercalate ", "      [x +++ pointerIf st v | ((x,st,_),v) <- zip cs pvs]  
src/BNFC/Backend/CPP/STL/CFtoSTLPrinter.hs view
@@ -23,11 +23,11 @@ module BNFC.Backend.CPP.STL.CFtoSTLPrinter (cf2CPPPrinter) where  import BNFC.CF-import BNFC.Utils ((+++), (++++))+import BNFC.Utils ((+++)) import BNFC.Backend.Common.NamedVariables import BNFC.Backend.Common.StrUtils (renderCharOrString) import Data.List-import Data.Char(toLower, toUpper)+import Data.Char(toLower) import BNFC.Backend.CPP.STL.STLUtils  --Produces (.H file, .C file)@@ -178,12 +178,12 @@  where    cl = identCat (normCat cat)    abstract = case lookupRule (show cat) rules of-    Just x -> ""+    Just _ -> ""     Nothing ->  "  void visit" ++ cl ++ "(" ++ cl ++ " *p); /* abstract class */\n"  --Prints all the methods to visit a rule. prRuleH :: Rule -> String-prRuleH (Rule fun c cats) | isProperLabel fun = concat+prRuleH (Rule fun _ _) | isProperLabel fun = concat   ["  void visit", fun, "(", fun, " *p);\n"] prRuleH _ = "" @@ -208,7 +208,7 @@    ]   where     user0 = fst (unzip (tokenPragmas cf))-    (userPos,user) = partition (isPositionCat cf) user0+    (_,user) = partition (isPositionCat cf) user0     header = unlines      [       "/*** BNFC-Generated Pretty Printer and Abstract Syntax Viewer ***/",@@ -385,12 +385,7 @@  else abstract ++ (concatMap (prPrintRule inPackage user) rules)  where    cl = identCat (normCat cat)-   ecl = identCat (normCatOfList cat)    vname = map toLower cl-   member = map toLower ecl ++ "_"-   visitMember = if isBasic user member-     then "      visit" ++ (funName member) ++ "(" ++ vname ++ "->" ++ member ++ ");"-     else "      " ++ vname ++ "->" ++ member ++ "->accept(this);"    sep = snd (renderCharOrString sep')    sep' = getCons rules    optsep =@@ -399,12 +394,12 @@        else "    "      )   ++ "render(" ++ sep ++ ");"    abstract = case lookupRule (show cat) rules of-    Just x -> ""+    Just _ -> ""     Nothing ->  "void PrintAbsyn::visit" ++ cl ++ "(" ++ cl ++ "*p) {} //abstract class\n\n"  --Pretty Printer methods for a rule. prPrintRule :: Maybe String -> [UserDef] -> Rule -> String-prPrintRule inPackage user r@(Rule fun c cats) | isProperLabel fun = unlines+prPrintRule inPackage user r@(Rule fun _ cats) | isProperLabel fun = unlines   [    "void PrintAbsyn::visit" ++ fun ++ "(" ++ fun ++ "*" +++ fnm ++ ")",    "{",@@ -422,7 +417,7 @@        "  if (oldi > " ++ (show p) ++ ") render(" ++ nsDefine inPackage "_R_PAREN" ++ ");\n")     cats' = (concatMap (prPrintCat user fnm) (zip (fixOnes (numVars [] cats)) (map getPrec cats)))     fnm = "p" --old names could cause conflicts-    getPrec (Right s) = 0+    getPrec (Right _) = 0     getPrec (Left c) = precCat c prPrintRule _ _ _ = "" @@ -466,19 +461,14 @@  else abstract ++ (concatMap (prShowRule user) rules)  where    cl = identCat (normCat cat)-   ecl = identCat (normCatOfList cat)    vname = map toLower cl-   member = map toLower ecl ++ "_"-   visitMember = if isBasic user member-     then "      visit" ++ (funName member) ++ "(" ++ vname ++ "->" ++ member ++ ");"-     else "      " ++ vname ++ "->" ++ member ++ "->accept(this);"    abstract = case lookupRule (show cat) rules of-    Just x -> ""+    Just _ -> ""     Nothing ->  "void ShowAbsyn::visit" ++ cl ++ "(" ++ cl ++ "* p) {} //abstract class\n\n"  --This prints all the methods for Abstract Syntax tree rules. prShowRule :: [UserDef] -> Rule -> String-prShowRule user (Rule fun c cats) | isProperLabel fun = concat+prShowRule user (Rule fun _ cats) | isProperLabel fun = concat   [    "void ShowAbsyn::visit" ++ fun ++ "(" ++ fun ++ "*" +++ fnm ++ ")\n",    "{\n",@@ -502,8 +492,8 @@       then insertSpaces xs       else (x : ["  bufAppend(' ');\n"]) ++ (insertSpaces xs)     allTerms [] = True-    allTerms ((Left z):zs) = False-    allTerms (z:zs) = allTerms zs+    allTerms (Left _:_) = False+    allTerms (_:zs) = allTerms zs     fnm = "p" --other names could cause conflicts prShowRule _ _ = "" @@ -511,7 +501,7 @@ prShowCat :: [UserDef] -> String -> Either String String -> String prShowCat user fnm c =   case c of-    (Right t) -> ""+    (Right _) -> ""     (Left nt) ->       if isBasic user nt        then "  visit" ++ (funName nt) ++ "(" ++ fnm ++ "->" ++ nt ++ ");\n"
src/BNFC/Backend/CPP/STL/STLUtils.hs view
@@ -20,18 +20,19 @@ module BNFC.Backend.CPP.STL.STLUtils where  import Data.Char+import Data.Maybe (fromMaybe)  nsDefine :: Maybe String -> String -> String nsDefine inPackage h = maybe h (\ns -> map toUpper ns ++ "_" ++ h) inPackage  nsStart :: Maybe String -> String-nsStart inPackage = maybe "" (\ns -> "namespace " ++ ns ++ "\n{") inPackage+nsStart = maybe "" (\ns -> "namespace " ++ ns ++ "\n{")  nsEnd :: Maybe String -> String-nsEnd inPackage = maybe "" (\ns -> "}") inPackage+nsEnd = maybe "" (const "}")  nsScope :: Maybe String -> String-nsScope inPackage = maybe "" (\ns -> ns ++ "::") inPackage+nsScope = maybe "" (++ "::")  nsString :: Maybe String -> String-nsString inPackage = maybe "" id inPackage+nsString = fromMaybe ""
src/BNFC/Backend/CSharp.hs view
@@ -37,7 +37,6 @@  module BNFC.Backend.CSharp (makeCSharp) where -import BNFC.Utils import BNFC.CF import BNFC.Options import BNFC.Backend.Common.OOAbstract@@ -50,19 +49,15 @@ import BNFC.Backend.CSharp.CAbstoCSharpAbstractVisitSkeleton import BNFC.Backend.CSharp.CFtoCSharpPrinter import BNFC.Backend.CSharp.CSharpUtils-import Data.Char-import System.Exit (exitFailure) import System.Environment (getEnv) import System.Directory import System.IO import System.IO.Error (catchIOError) import System.Process import Data.Maybe-import Data.Char-import Control.Monad.ST import Control.Monad (when) import qualified BNFC.Backend.Common.Makefile as Makefile-import System.FilePath ((<.>),takeFileName)+import System.FilePath ((<.>)) -- Control.Monad.State  makeCSharp :: SharedOptions -> CF -> MkFiles ()@@ -109,9 +104,7 @@                , "MONOCFLAGS = -optimize -reference:${PARSERREF}"                , "GPLEX = ${MONO} gplex.exe", "GPPG = ${MONO} gppg.exe"                , "PARSERREF = bin/ShiftReduceParser.dll"-               -- Apparently GPLEX outputs filenames in-               -- lowercase, so scanner.cs is supposed to be like that!-              , "CSFILES = Absyn.cs Parser.cs Printer.cs scanner.cs Test.cs VisitSkeleton.cs" ] ++)+               , "CSFILES = Absyn.cs Parser.cs Printer.cs Scanner.cs Test.cs VisitSkeleton.cs AbstractVisitSkeleton.cs" ] ++)       $ Makefile.mkRule "all" [ "test" ]         []       $ Makefile.mkRule "clean" []@@ -125,9 +118,9 @@         [ "@echo \"Compiling test...\""         , "${MONOC} ${MONOCFLAGS} -out:bin/test.exe ${CSFILES}" ]       $ Makefile.mkRule "Scanner.cs" [ namespace <.> "l" ]-        [ "${GPLEX} /out:Scanner.cs " ++ namespace <.> "l" ]+        [ "${GPLEX} /out:$@ " ++ namespace <.> "l" ]       $ Makefile.mkRule "Parser.cs" [ namespace <.> "y" ]-        [ "${GPPG} /gplex " ++ namespace <.> "y > Parser.cs" ]+        [ "${GPPG} /gplex " ++ namespace <.> "y > $@" ]       ""  writeVisualStudioFiles :: Namespace -> MkFiles ()@@ -313,9 +306,6 @@   where    def = show (head (allEntryPoints cf)) -filepathtonamespace :: FilePath -> Namespace-filepathtonamespace file = take (length file - 3) (takeFileName file)- projectguid :: MkFiles String projectguid = do   maybeFilePath <- findDirectory@@ -332,7 +322,7 @@     getGoodGUID :: FilePath -> MkFiles String     getGoodGUID filepath = liftIO $ do       let filepath' = "\"" ++ filepath ++ "\""-      (hIn, hOut, hErr, processHandle) <- runInteractiveCommand filepath'+      (_, hOut, _, _) <- runInteractiveCommand filepath'       guid <- hGetLine hOut       return ('{' : init guid ++ "}")     findDirectory :: MkFiles (Maybe FilePath)
src/BNFC/Backend/CSharp/CAbstoCSharpAbs.hs view
@@ -42,10 +42,8 @@  import BNFC.Backend.Common.OOAbstract import BNFC.CF-import BNFC.Utils((+++),(++++))-import BNFC.Backend.Common.NamedVariables+import BNFC.Utils((+++)) import Data.List-import Data.Char(toLower) import Data.Maybe import BNFC.Backend.CSharp.CSharpUtils @@ -228,7 +226,7 @@  -- Creates the GetHashCode() method. prHashCode :: Namespace -> Fun -> [String] -> String-prHashCode namespace c vars = unlinesInline [+prHashCode _ _ vars = unlinesInline [   "    ",   "    public override int GetHashCode()",   "    {",@@ -272,6 +270,6 @@   ]  where    cvs = [c | (_,_,c,_) <- cs]-   pvs = ["p" ++ show i | ((x,st,_,_),i) <- zip cs [1..]]+   pvs = ["p" ++ show i | ((_,_,_,_),i) <- zip cs [1..]]    conargs = concat $ intersperse ", "      [identifier namespace (typename x) +++ v | ((x,_,_,_),v) <- zip cs pvs]
src/BNFC/Backend/CSharp/CAbstoCSharpAbstractVisitSkeleton.hs view
@@ -49,12 +49,9 @@ module BNFC.Backend.CSharp.CAbstoCSharpAbstractVisitSkeleton (cabs2csharpAbstractVisitSkeleton) where  import BNFC.CF-import BNFC.Utils ((+++), (++++))-import BNFC.Backend.Common.NamedVariables-import Data.List+import BNFC.Utils ((+++)) import BNFC.Backend.Common.OOAbstract hiding (basetypes) import BNFC.Backend.CSharp.CSharpUtils-import BNFC.Backend.CSharp.CAbstoCSharpAbs  --Produces .cs file cabs2csharpAbstractVisitSkeleton :: Namespace -> CAbs -> String@@ -92,6 +89,6 @@   ]  prVisit :: Namespace -> (Fun, [(String, Bool, String)]) -> String-prVisit namespace (f,cs) = unlinesInline [+prVisit namespace (f,_) = unlinesInline [   "    public abstract R Visit(" ++ identifier namespace f +++ varname f ++ ", A arg);"   ]
src/BNFC/Backend/CSharp/CAbstoCSharpVisitSkeleton.hs view
@@ -38,13 +38,10 @@  module BNFC.Backend.CSharp.CAbstoCSharpVisitSkeleton (cabs2csharpvisitskeleton) where -import BNFC.CF-import BNFC.Utils ((+++), (++++))-import BNFC.Backend.Common.NamedVariables+import BNFC.Utils ((+++)) import Data.List import BNFC.Backend.Common.OOAbstract hiding (basetypes) import BNFC.Backend.CSharp.CSharpUtils-import BNFC.Backend.CSharp.CAbstoCSharpAbs  --Produces .cs file cabs2csharpvisitskeleton :: Namespace -> CAbs -> String@@ -100,7 +97,7 @@   ]  prVisitArg :: Namespace -> String -> (String, Bool, VariableName, PropertyName) -> String-prVisitArg namespace vname (cat, isPt, var, prop)+prVisitArg namespace vname (cat, _, var, prop)   | cat `elem` (map fst basetypes)            = "      // " ++ vname ++ "." ++ prop   -- var /= "list_" is a dummy fix to make sure that a category named "List" doesn't get interpreted as a List.   -- this isn't very good though, and should be fixed somehow.
src/BNFC/Backend/CSharp/CFtoCSharpPrinter.hs view
@@ -41,10 +41,10 @@ module BNFC.Backend.CSharp.CFtoCSharpPrinter (cf2csharpprinter) where  import BNFC.CF-import BNFC.Utils ((+++), (++++))+import BNFC.Utils ((+++)) import BNFC.Backend.Common.NamedVariables import Data.List-import Data.Char(toLower, toUpper, isSpace)+import Data.Char(toLower) import Data.Maybe import BNFC.Backend.CSharp.CSharpUtils @@ -358,7 +358,7 @@ prRule _nm _ _ = ""  prList :: [UserDef] -> Cat -> [Rule] -> String-prList user c rules = unlinesInline [+prList _ _ rules = unlinesInline [   "      for(int i=0; i < p.Count; i++)",   "      {",   "        PrintInternal(p[i], 0);",@@ -373,7 +373,6 @@   "      }"   ]   where-    et = typename (show$ normCatOfList c)     sep = getCons rules     optsep = if hasOneFunc rules then "" else escapeChars sep @@ -429,7 +428,7 @@ shRule _nm _ = ""  shList :: [UserDef] -> Cat -> [Rule] -> String-shList user c _rules = unlinesInline [+shList _ _ _rules = unlinesInline [   "      for(int i=0; i < p.Count; i++)",   "      {",   "        ShowInternal(p[i]);",@@ -437,8 +436,6 @@   "          Render(\",\");",   "      }"   ]-  where-    et = typename (show $ normCatOfList c)  shCat fnm c =   case c of
src/BNFC/Backend/CSharp/CFtoGPLEX.hs view
@@ -40,7 +40,6 @@  import BNFC.CF import BNFC.Backend.CSharp.RegToGPLEX-import BNFC.Utils((+++), (++++)) import BNFC.Backend.Common.NamedVariables import Data.List import BNFC.Backend.CSharp.CSharpUtils
src/BNFC/Backend/CSharp/CFtoGPPG.hs view
@@ -39,10 +39,10 @@ module BNFC.Backend.CSharp.CFtoGPPG (cf2gppg) where  import BNFC.CF-import Data.List (intersperse, isPrefixOf)+import Data.List (intersperse) import BNFC.Backend.Common.NamedVariables hiding (varName)-import Data.Char (toLower,isUpper,isDigit)-import BNFC.Utils ((+++), (++++))+import Data.Char (toLower)+import BNFC.Utils ((+++)) import BNFC.TypeChecker import ErrM import BNFC.Backend.Common.OOAbstract hiding (basetypes)@@ -86,7 +86,7 @@   ]  definedRules :: Namespace -> CF -> String-definedRules namespace cf = unlinesInline [+definedRules _ cf = unlinesInline [   if null [ rule f xs e | FunDef f xs e <- pragmasOfCF cf ]     then ""     else error "Defined rules are not yet available in C# mode!"@@ -102,7 +102,7 @@     rule f xs e =       case checkDefinition' list ctx f xs e of         Bad err	-> error $ "Panic! This should have been caught already:\n" ++ err-        Ok (args,(e',t)) -> unlinesInline [+        Ok (_,(_,_)) -> unlinesInline [           "Defined Rule goes here"           ] @@ -144,14 +144,14 @@   where --This is a little weird because people can make [Exp2] etc.     catline cat | (identCat cat /= show cat) || ((normCat cat) == cat) =       "  public " ++ identifier namespace (identCat (normCat cat)) +++ (varName (show$normCat cat)) ++ ";"-    catline cat = ""+    catline _ = ""  --declares non-terminal types. declarations :: CF -> String declarations cf = unlinesInline $ map (typeNT cf) (positionCats cf ++ allCats cf)  where --don't define internal rules    typeNT cf nt | (isPositionCat cf nt || rulesForCat cf nt /= []) = "%type <" ++ (varName (show$normCat nt)) ++ "> " ++ (show$normCat nt)-   typeNT cf nt = ""+   typeNT _ _ = ""  --declares terminal types. tokens :: [UserDef] -> SymEnv -> String@@ -224,7 +224,7 @@ -- Generate patterns and a set of metavariables indicating -- where in the pattern the non-terminal generatePatterns :: CF -> SymEnv -> Rule -> Bool -> (Pattern,[(MetaVar,Bool)])-generatePatterns cf env r revv = case rhsRule r of+generatePatterns cf env r _ = case rhsRule r of   []  -> ("/* empty */",[])   its -> (unwords (map mkIt its), metas its)   where@@ -249,8 +249,8 @@  prRules :: Rules -> String prRules [] = []-prRules ((nt, []):rs) = prRules rs --internal rule-prRules ((nt,((p,a):ls)):rs) =+prRules ((_, []):rs) = prRules rs --internal rule+prRules ((nt,(p,a):ls):rs) =   (unwords [nt', ":" , p, "{ ", a, "}", "\n" ++ pr ls]) ++ ";\n" ++ prRules rs   where     nt' = identCat nt
src/BNFC/Backend/CSharp/CSharpUtils.hs view
@@ -38,10 +38,7 @@ module BNFC.Backend.CSharp.CSharpUtils where  import BNFC.CF-import Control.Monad.ST--- Control.Monad.State import Data.Char (toLower)-import Data.Maybe import Data.List import BNFC.Backend.Common.OOAbstract hiding (basetypes) 
src/BNFC/Backend/CSharp/RegToGPLEX.hs view
@@ -3,7 +3,6 @@ -- modified from RegToFlex  import AbsBNF-import Data.Char  -- the top-level printing method printRegGPLEX :: Reg -> String@@ -22,7 +21,6 @@     t        :ts -> space t   $ rend i ts     _            -> ""   cons s t  = s ++ t-  new i s   = s   space t s = if null s then t else t ++ s  parenth :: [String] -> [String]
src/BNFC/Backend/Common/Makefile.hs view
@@ -1,8 +1,6 @@ module BNFC.Backend.Common.Makefile where  import Text.Printf-import Text.Show (ShowS) -- Efficient string concatenation-import System.FilePath (replaceExtension)  import BNFC.Options (SharedOptions(..)) import BNFC.Backend.Base (mkfile, Backend)
src/BNFC/Backend/Common/NamedVariables.hs view
@@ -135,7 +135,7 @@     else fixCoercion cat cats   fixAll :: [(Cat, [Rule])] -> [(Cat, [Rule])] -> [(Cat, [Rule])]   fixAll _ [] = []-  fixAll top ((cat,rules):cats) = if isCoercion (show cat) -- This is weird: isCoercion is supposed to be applied to functions!!!!+  fixAll top ((cat,_):cats) = if isCoercion (show cat) -- This is weird: isCoercion is supposed to be applied to functions!!!!     then fixAll top cats     else (normCat cat, fixCoercion cat top) : (fixAll top cats) 
src/BNFC/Backend/Common/OOAbstract.hs view
@@ -42,8 +42,6 @@ module BNFC.Backend.Common.OOAbstract where  import BNFC.CF-import BNFC.Utils((+++),(++++))-import BNFC.Backend.Common.NamedVariables import Data.List import Data.Char(toLower) @@ -87,7 +85,7 @@   (pos,base) = partition (isPositionCat cf) $ fst (unzip (tokenPragmas cf))   (lists,cats) = partition isList $ allCats cf   toks = map (show.normCat) base-  testRule (Rule f c r)+  testRule (Rule f c _)    | isList c  = Nothing    | f == "_"  = Nothing    | otherwise = Just f
src/BNFC/Backend/Common/StrUtils.hs view
@@ -13,16 +13,23 @@ -- >>> renderCharOrString "'" -- ('C',"'\\''") -- >>> renderCharOrString "\"\\'"--- ('S',"\"\\\"\\\\'\"")+-- ('S',"\"\\\"\\\\\\'\"") renderCharOrString :: String -> (Char, String) renderCharOrString [char] = ('C', show char)     -- using show shoud quote ' renderCharOrString s =('S', "\"" ++ escapeChars s ++ "\"") ---Helper function that escapes characters in strings+-- | Helper function that escapes characters in strings+-- >>> escapeChars "\\"+-- "\\\\"+-- >>> escapeChars "\""+-- "\\\""+-- >>> escapeChars "'"+-- "\\'" escapeChars :: String -> String escapeChars [] = []-escapeChars ('\\':xs) = '\\' : ('\\' : (escapeChars xs))-escapeChars ('\"':xs) = '\\' : ('\"' : (escapeChars xs))-escapeChars (x:xs) = x : (escapeChars xs)+escapeChars ('\\':xs) = '\\' : '\\' : escapeChars xs+escapeChars ('\"':xs) = '\\' : '\"' : escapeChars xs+escapeChars ('\'':xs) = '\\' : '\'' : escapeChars xs+escapeChars (x:xs) = x : escapeChars xs  
src/BNFC/Backend/Haskell.hs view
@@ -17,7 +17,7 @@     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA -} -module BNFC.Backend.Haskell (makeHaskell, AlexVersion(..), makefile) where+module BNFC.Backend.Haskell (makeHaskell, AlexVersion(..), makefile, testfile) where   @@ -39,15 +39,10 @@ import BNFC.Backend.Haskell.ToCNF as ToCNF import BNFC.Backend.Haskell.MkErrM import BNFC.Backend.Haskell.MkSharedString-import BNFC.Utils import qualified BNFC.Backend.Common.Makefile as Makefile -import Data.Char-import Data.Maybe (fromMaybe,maybe)-import System.Exit (exitFailure)-import System.FilePath (pathSeparator,(</>))+import System.FilePath (pathSeparator) import Control.Monad(when,unless)-import System.FilePath (takeFileName) import Text.Printf (printf)  -- naming conventions@@ -65,7 +60,6 @@       errMod = errFileM opts       shareMod = shareFileM opts   do-    let dir = codeDir opts     mkfile (absFile opts) $ cf2Abstract (byteStrings opts) (ghcExtensions opts) absMod cf     case alexMode opts of       Alex1 -> do@@ -108,7 +102,6 @@ makefile opts = makeA where   glr_params = if glr opts == GLR then "--glr --decode " else ""   dir = let d = codeDir opts in if null d then "" else d ++ [pathSeparator]-  cd c = if null dir then c else "(cd " ++ dir ++ "; " ++ c ++ ")"   makeA = Makefile.mkRule "all" []            ([ "happy -gca " ++ glr_params ++ happyFile opts | not (cnf opts) ] ++             [ "alex -g " ++ alexFile opts ] ++@@ -132,7 +125,7 @@                 , mkFile withLang "Test" "" opts                 , mkFile noLang   "ErrM" "*" opts                 , mkFile noLang   "SharedString" "*" opts-                , mkFile withLang "ComposOp" "*" opts+                , mkFile noLang "ComposOp" "*" opts                 , dir ++ lang opts ++ ".dtd"                 , mkFile withLang "XML" "*" opts                 , "Makefile*" ]
src/BNFC/Backend/Haskell/CFtoAlex.hs view
@@ -191,13 +191,9 @@    pTSpec ([],[]) = ""    pTSpec xp =     "<pTSpec>   ::= " ++ aux xp ++ "%{ pTSpec p = PT p . TS    %}"-   aux (xs,[]) = " %s "-   aux ([],ys) = " %r "-   aux (xs,ys) = " %s | %r "-   resWs =-     "[" ++ concat (intersperse "," [show s | s <- resws]) ++ "]"-     --- show s can be strange for isolatin1 characters-     --- precompile to search tree!+   aux (_,[]) = " %s "+   aux ([],_) = " %r "+   aux (_,_) = " %s | %r "     userDefTokenTypes = unlines $      ["<mk_" ++ show name ++ "> ::= " ++ printRegAlex exp ++@@ -215,14 +211,6 @@    resws = reservedWords cf  data BTree = N | B String BTree BTree deriving (Show)--isInTree :: String -> BTree -> Bool-isInTree x tree = case tree of- N -> False- B a left right-   | x < a  -> isInTree x left-   | x > a  -> isInTree x right-   | x == a -> True  sorted2tree :: [String] -> BTree sorted2tree [] = N
src/BNFC/Backend/Haskell/CFtoAlex2.hs view
@@ -49,7 +49,7 @@    ]  prelude :: String -> String -> String -> Bool -> Bool -> [String]-prelude name errMod shareMod shareStrings byteStrings = [+prelude name _ shareMod shareStrings byteStrings = [   "-- -*- haskell -*-",   "-- This Alex file was machine-generated by the BNF converter",   "{",@@ -92,7 +92,7 @@                                                 else '\\':show (ord c)  restOfAlex :: String -> Bool -> Bool -> CF -> [String]-restOfAlex shareMod shareStrings byteStrings cf = [+restOfAlex _ shareStrings byteStrings cf = [   ":-",   lexComments (comments cf),   "$white+ ;",@@ -295,7 +295,6 @@ 			_            -> ""  	  cons s t  = s ++ t-	  new i s   = s 	  space t s = if null s then t else t ++ " " ++ s  parenth :: [String] -> [String]
src/BNFC/Backend/Haskell/CFtoAlex3.hs view
@@ -38,7 +38,7 @@    ]  prelude :: String -> String -> String -> Bool -> Bool -> [String]-prelude name errMod shareMod shareStrings byteStrings = [+prelude name _ shareMod shareStrings byteStrings = [   "-- -*- haskell -*-",   "-- This Alex file was machine-generated by the BNF converter",   "{",@@ -84,7 +84,7 @@                                                 else '\\':show (ord c)  restOfAlex :: String -> Bool -> Bool -> CF -> [String]-restOfAlex shareMod shareStrings byteStrings cf = [+restOfAlex _ shareStrings byteStrings cf = [   ":-",   lexComments (comments cf),   "$white+ ;",@@ -101,6 +101,7 @@   "",   "{",   "",+  "tok :: (Posn -> String -> Token) -> (Posn -> String -> Token)",   "tok f p s = f p s",   "",   "share :: "++stringType++" -> "++stringType,@@ -116,21 +117,30 @@   userDefTokenConstrs,   " deriving (Eq,Show,Ord)",   "",-  "data Token = ",+  "data Token =",   "   PT  Posn Tok",   " | Err Posn",   "  deriving (Eq,Show,Ord)",   "",+  "tokenPos :: [Token] -> String",   "tokenPos (PT (Pn _ l _) _ :_) = \"line \" ++ show l",   "tokenPos (Err (Pn _ l _) :_) = \"line \" ++ show l",   "tokenPos _ = \"end of file\"",   "",+  "tokenPosn :: Token -> Posn",   "tokenPosn (PT p _) = p",   "tokenPosn (Err p) = p",+  "",+  "tokenLineCol :: Token -> (Int, Int)",   "tokenLineCol = posLineCol . tokenPosn",+  "",+  "posLineCol :: Posn -> (Int, Int)",   "posLineCol (Pn _ l c) = (l,c)",+  "",+  "mkPosToken :: Token -> ((Int, Int), String)",   "mkPosToken t@(PT p _) = (posLineCol p, prToken t)",   "",+  "prToken :: Token -> String",   "prToken t = case t of",   "  PT _ (TS s _) -> s",   "  PT _ (TL s)   -> s",@@ -150,6 +160,7 @@   "                              | s > a  = treeFind right",   "                              | s == a = t",   "",+  "resWords :: BTree",   "resWords = " ++ (show $ sorted2tree $ cfTokens $ cf),   "   where b s n = let bs = "++stringPack++" s",   "                  in B bs (TS bs n)",@@ -211,7 +222,7 @@   "alexInputPrevChar :: AlexInput -> Char",   "alexInputPrevChar (p, c, bs, s) = c",   "",-  "  -- | Encode a Haskell String to a list of Word8 values, in UTF8 format.",+  "-- | Encode a Haskell String to a list of Word8 values, in UTF8 format.",   "utf8Encode :: Char -> [Word8]",   "utf8Encode = map fromIntegral . go . ord",   " where",@@ -249,7 +260,7 @@ 					(r1:" \\"), 					(r2:"]])* (\""), 					(r1:"\")+ \""),-					(r2:"\" ; \n"),+					(r2:"\" ;\n"), 					lexComments (xs, []) 					]    lexComments ((_:xs),[]) = lexComments (xs,[])@@ -314,7 +325,6 @@ 			_            -> ""  	  cons s t  = s ++ t-	  new i s   = s 	  space t s = if null s then t else t ++ " " ++ s  parenth :: [String] -> [String]@@ -333,7 +343,7 @@   prt _ c = case c of              '\n' -> ["\\n"]              '\t' -> ["\\t"]-             c | isAlphaNum c -> [[c]] +             c | isAlphaNum c -> [[c]]              c | isPrint c    -> ['\\':[c]]              c | otherwise    -> ['\\':show (ord c)]   prtList s = map (concat . prt 0) s
src/BNFC/Backend/Haskell/CFtoHappy.hs view
@@ -17,15 +17,13 @@     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA -} -module BNFC.Backend.Haskell.CFtoHappy-       (-       cf2HappyS -- cf2HappyS :: CF -> CFCat -> String-       )-        where+module BNFC.Backend.Haskell.CFtoHappy where +import Text.PrettyPrint import BNFC.CF+import BNFC.Backend.Common.StrUtils (escapeChars) --import Lexer-import Data.List (intersperse, sort)+import Data.List (intersperse) import Data.Char import BNFC.Options (HappyMode(..)) -- Type declarations@@ -113,6 +111,7 @@                   "%monad { Err } { thenM } { returnM }",                   "%tokentype { " ++ tokenName ++ " }"]    where generateP []     = []+ 	 generateP (n:ns) = concat ["%name p",n'," ",n',"\n",generateP ns]                                where n' = identCat n @@ -122,21 +121,17 @@  -- Generate the list of tokens and their identifiers. tokens :: [(String,Int)] -> String-tokens toks = "%token \n" ++ prTokens toks+tokens toks = "%token\n" ++ prTokens toks  where prTokens []         = []-       prTokens ((t,k):tk) = " " ++ (convert t) +++       prTokens ((t,k):tk) = "  " ++ render (convert t) ++                              " { " ++ oneTok t k ++ " }\n" ++                              prTokens tk-       oneTok t k = "PT _ (TS _ " ++ show k ++ ")"+       oneTok _ k = "PT _ (TS _ " ++ show k ++ ")"  -- Happy doesn't allow characters such as åäö to occur in the happy file. This -- is however not a restriction, just a naming paradigm in the happy source file.-convert :: String -> String-convert "\\" = concat ['\'':"\\\\","\'"]-convert xs   = concat ['\'':(escape xs),"\'"]-  where escape [] = []-	escape ('\'':xs) = '\\':'\'':escape xs-	escape (x:xs) = x:escape xs+convert :: String -> Doc+convert = quotes . text . escapeChars  rulesForHappy :: CF -> Rules rulesForHappy cf = map mkOne $ ruleGroups cf where@@ -164,7 +159,7 @@ -- An action can for example be: Sum $1 $2, that is, construct an AST -- with the constructor Sum applied to the two metavariables $1 and $2. generateAction :: NonTerminal -> Fun -> [MetaVar] -> Action-generateAction nt f ms = unwords $ (if isCoercion f then [] else [f]) ++ ms+generateAction _ f ms = unwords $ (if isCoercion f then [] else [f]) ++ ms  -- Generate patterns and a set of metavariables indicating -- where in the pattern the non-terminal@@ -176,7 +171,7 @@  where    mkIt i = case i of      Left c -> identCat c-     Right s -> convert s+     Right s -> render (convert s)    metas its = [revIf c ('$': show i) | (i,Left c) <- zip [1 ::Int ..] its]    revIf c m = if (not (isConsFun (funRule r)) && elem c revs)                  then ("(reverse " ++ m ++ ")")@@ -189,7 +184,7 @@ prRules :: Rules -> String prRules = unlines . map prOne   where-    prOne (nt,[]) = [] -- nt has only internal use+    prOne (_,[]) = [] -- nt has only internal use     prOne (nt,((p,a):ls)) =       unwords [nt', "::", "{", show $ normCat nt, "}\n" ++                nt', ":" , p, "{", a, "}", "\n" ++ pr ls] ++ "\n"@@ -243,7 +238,6 @@ specialToks :: CF -> String specialToks cf = unlines $ 		 (map aux (literals cf))-		  ++ ["L_err    { _ }"]  where aux cat =         case show cat of           "Ident"  -> "L_ident  { PT _ (TV $$) }"
src/BNFC/Backend/Haskell/CFtoLayout.hs view
@@ -28,7 +28,7 @@ layoutSep   = ";"  cf2Layout :: Bool -> Bool -> String -> String -> CF -> String-cf2Layout alex1 inDir layName lexName cf =+cf2Layout alex1 _ layName lexName cf =  let    (top,lay,stop) = layoutPragmas cf  in unlines $ [@@ -43,12 +43,18 @@   "",   "-- local parameters",   "",+  "",+  "topLayout :: Bool",   "topLayout = " ++ show top,-  "layoutWords = " ++ show lay,+  "",+  "layoutWords, layoutStopWords :: [String]",+  "layoutWords     = " ++ show lay,   "layoutStopWords = " ++ show stop,   "",   "-- layout separators",   "",+  "",+  "layoutOpen, layoutClose, layoutSep :: String",   "layoutOpen  = " ++ show layoutOpen,   "layoutClose = " ++ show layoutClose,   "layoutSep   = " ++ show layoutSep,@@ -87,15 +93,15 @@   "                     -- insert an open brace after the layout word",   "                     b:ts' = addToken (nextPos t0) layoutOpen ts",   "                     -- save the start column",-  "                     st' = Implicit col:st ",+  "                     st' = Implicit col:st",   "                  in moveAlong st' [t0,b] ts'",   "",   "    -- If we encounter a closing brace, exit the first explicit layout block.",-  "    | isLayoutClose t0 = ",+  "    | isLayoutClose t0 =",   "          let st' = drop 1 (dropWhile isImplicit st)",-  "           in if null st' ",-  "                 then error $ \"Layout error: Found \" ++ layoutClose ++ \" at (\" ",-  "                              ++ show (line t0) ++ \",\" ++ show (column t0) ",+  "           in if null st'",+  "                 then error $ \"Layout error: Found \" ++ layoutClose ++ \" at (\"",+  "                              ++ show (line t0) ++ \",\" ++ show (column t0)",   "                              ++ \") without an explicit layout block.\"",   "                 else moveAlong st' [t0] ts",   "",@@ -103,8 +109,8 @@   "  res pt st@(Implicit n:ns) (t0:ts)",   "",   "      -- End of implicit block by a layout stop word",-  "    | isStop t0 = ",-  "           -- Exit the current block and all implicit blocks ",+  "    | isStop t0 =",+  "           -- Exit the current block and all implicit blocks",   "           -- more indented than the current token",   "       let (ebs,ns') = span (`moreIndent` column t0) ns",   "           moreIndent (Implicit x) y = x > y",@@ -117,18 +123,18 @@   "        in moveAlong ns' ts1 ts2",   "",   "    -- End of an implicit layout block",-  "    | newLine && column t0 < n  = ",+  "    | newLine && column t0 < n  =",   "           -- Insert a closing brace after the previous token.",   "       let b:t0':ts' = addToken (afterPrev pt) layoutClose (t0:ts)",   "           -- Repeat, with the current block removed from the stack",   "        in moveAlong ns [b] (t0':ts')",   "",   "    -- Encounted a new line in an implicit layout block.",-  "    | newLine && column t0 == n = ",+  "    | newLine && column t0 == n =",   "       -- Insert a semicolon after the previous token.",   "       -- unless we are the beginning of the file,",   "       -- or the previous token is a semicolon or open brace.",-  "       if isNothing pt || isTokenIn [layoutSep,layoutOpen] (fromJust pt) ",+  "       if isNothing pt || isTokenIn [layoutSep,layoutOpen] (fromJust pt)",   "          then moveAlong st [t0] ts",   "          else let b:t0':ts' = addToken (afterPrev pt) layoutSep (t0:ts)",   "                in moveAlong st [b,t0'] ts'",@@ -145,28 +151,28 @@   "",   "  -- If we are using top-level layout, insert a semicolon after",   "  -- the last token, if there isn't one already",-  "  res (Just t) [Implicit n] []",+  "  res (Just t) [Implicit _n] []",   "      | isTokenIn [layoutSep] t = []",   "      | otherwise = addToken (nextPos t) layoutSep []",   "",   "  -- At EOF in an implicit, non-top-level block: close the block",-  "  res (Just t) (Implicit n:bs) [] =",+  "  res (Just t) (Implicit _n:bs) [] =",   "     let c = addToken (nextPos t) layoutClose []",   "      in moveAlong bs c []",   "",   "  -- This should only happen if the input is empty.",-  "  res Nothing st [] = []",+  "  res Nothing _st [] = []",   "",   "  -- | Move on to the next token.",   "  moveAlong :: [Block] -- ^ The layout stack.",   "            -> [Token] -- ^ Any tokens just processed.",   "            -> [Token] -- ^ the rest of the tokens.",   "            -> [Token]",-  "  moveAlong st [] ts = error $ \"Layout error: moveAlong got [] as old tokens\"",+  "  moveAlong _  [] _  = error $ \"Layout error: moveAlong got [] as old tokens\"",   "  moveAlong st ot ts = ot ++ res (Just $ last ot) st ts",   "",   "data Block = Implicit Int -- ^ An implicit layout block with its start column.",-  "           | Explicit ",+  "           | Explicit",   "             deriving Show",   "",   "type Position = Posn",@@ -181,7 +187,7 @@   "          -> [String] -- ^ Token symbols.",   "          -> [Token]  -- ^ The rest of the tokens. These will have their",   "                      --   positions updated to make room for the new tokens .",-  "          -> [Token]                       ",+  "          -> [Token]",   "addTokens p ss ts = foldr (addToken p) ts ss",   "",   "-- | Insert a new symbol token at the begninning of a list of tokens.",@@ -197,8 +203,8 @@   "afterPrev = maybe (Pn 0 1 1) nextPos",   "",   "-- | Get the position immediately to the right of the given token.",-  "nextPos :: Token -> Position ",-  "nextPos t = Pn (g + s) l (c + s + 1) ",+  "nextPos :: Token -> Position",+  "nextPos t = Pn (g + s) l (c + s + 1)",   "  where Pn g l c = position t",   "        s = tokenLength t",   "",
src/BNFC/Backend/Haskell/CFtoPrinter.hs view
@@ -21,7 +21,6 @@  import BNFC.CF import BNFC.Utils-import BNFC.Backend.Haskell.CFtoTemplate import Data.List (intersperse) import Data.Char(toLower) 
src/BNFC/Backend/Haskell/CFtoTemplate.hs view
@@ -24,7 +24,6 @@  import BNFC.CF import Data.Char-import Data.List (delete)  type ModuleName = String type Constructor = String
src/BNFC/Backend/Haskell/MkErrM.hs view
@@ -40,7 +40,7 @@ 	    "  return      = Ok", 	    "  fail        = Bad", 	    "  Ok a  >>= f = f a",-	    "  Bad s >>= f = Bad s",+	    "  Bad s >>= _ = Bad s",       "",       "instance Applicative Err where",       "  pure = Ok",
src/BNFC/Backend/Haskell/RegToAlex.hs view
@@ -41,7 +41,6 @@     t        :ts -> space t   $ rend i ts     _            -> ""   cons s t  = s ++ t-  new i s   = s   space t s = if null s then t else t ++ " " ++ s  parenth :: [String] -> [String]
src/BNFC/Backend/Haskell/ToCNF.hs view
@@ -36,11 +36,6 @@ import Control.Monad.RWS import Control.Applicative hiding (Const) import qualified Data.Map as M-import Data.List (nub,intercalate,sortBy,sort)-import Data.Maybe (maybeToList)-import Data.Function (on)-import Data.Char (isAlphaNum,ord)-import Data.String import Data.Pair import Text.PrettyPrint.HughesPJ hiding (first,(<>)) @@ -149,6 +144,7 @@   where initial = (c, f `appMany` args)         others = [(c', f' `app'` (f `appMany` args)) | (f',c') <- lookupMulti (Left c) units]         args = map (unsafeCoerce' . Con) $ ["x"|isCat r1]++["y"|isCat r2]+alt _ _ = error "Only works with binary rules"   @@ -191,7 +187,7 @@ ------------------------ -- Test file generation -genTestFile opts cf = render $ vcat+genTestFile opts _ = render $ vcat     ["module Main where"     ,"import " <> text ( alexFileM     opts)     ,"import " <> text ( cnfTablesFileM opts)
src/BNFC/Backend/HaskellGADT.hs view
@@ -21,18 +21,15 @@ module BNFC.Backend.HaskellGADT (makeHaskellGadt) where  - -- import Utils import BNFC.Options import BNFC.Backend.Base hiding (Backend) import BNFC.Backend.Haskell.HsOpts import BNFC.CF-import BNFC.Backend.Base import BNFC.Backend.Haskell.CFtoHappy import BNFC.Backend.Haskell.CFtoAlex import BNFC.Backend.Haskell.CFtoAlex2 import BNFC.Backend.Haskell.CFtoAlex3-import BNFC.Backend.Haskell(AlexVersion(..)) import BNFC.Backend.HaskellGADT.CFtoAbstractGADT import BNFC.Backend.HaskellGADT.CFtoTemplateGADT import BNFC.Backend.HaskellGADT.CFtoPrinterGADT@@ -40,14 +37,9 @@ import BNFC.Backend.XML import BNFC.Backend.Haskell.MkErrM import BNFC.Backend.Haskell.MkSharedString-import BNFC.Utils import qualified BNFC.Backend.Common.Makefile as Makefile import qualified BNFC.Backend.Haskell as Haskell -import Data.Char-import Data.Maybe (fromMaybe,maybe)-import System.Exit (exitFailure)-import System.FilePath (pathSeparator) import Control.Monad(when)  @@ -62,7 +54,6 @@       errMod = errFileM opts       shareMod = shareFileM opts   do-    let dir = codeDir opts     mkfile (absFile opts) $ cf2Abstract (byteStrings opts) absMod cf composOpMod     mkfile (composOpFile opts) $ composOp composOpMod     case alexMode opts of@@ -81,157 +72,15 @@     mkfile (templateFile opts) $ cf2Template (templateFileM opts) absMod errMod cf     mkfile (printerFile opts)  $ cf2Printer prMod absMod cf     when (hasLayout cf) $ mkfile (layoutFile opts) $ cf2Layout (alexMode opts == Alex1) (inDir opts) layMod lexMod cf-    mkfile (tFile opts)        $ testfile opts cf+    mkfile (tFile opts)        $ Haskell.testfile opts cf     mkfile (errFile opts)      $ errM errMod cf     when (shareStrings opts) $ mkfile (shareFile opts)    $ sharedString shareMod (byteStrings opts) cf-    Makefile.mkMakefile opts $ makefile opts+    Makefile.mkMakefile opts $ Haskell.makefile opts     case xml opts of       2 -> makeXML opts True cf       1 -> makeXML opts False cf       _ -> return () -codeDir :: Options -> FilePath-codeDir opts = let pref = maybe "" pkgToDir (inPackage opts)-		   dir = if inDir opts then lang opts else ""-		   sep = if null pref || null dir then "" else [pathSeparator]-		 in pref ++ sep ++ dir--makefile :: Options -> String-makefile = Haskell.makefile--testfile :: Options -> CF -> String-testfile opts cf-        = let lay = hasLayout cf-	      use_xml = xml opts > 0-              xpr = if use_xml then "XPrint a, "     else ""-	      use_glr = glr opts == GLR-              if_glr s = if use_glr then s else ""-	      firstParser = if use_glr then "the_parser" else parserName-	      parserName = 'p' : topType-	      topType = show (firstEntry cf)-          in unlines-	        ["-- automatically generated by BNF Converter",-		 "module Main where\n",-	         "",-	         "import System.IO ( stdin, hGetContents )",-	         "import System.Environment ( getArgs, getProgName )",-		 "",-		 "import " ++ alexFileM     opts,-		 "import " ++ happyFileM    opts,-		 "import " ++ templateFileM opts,-	         "import " ++ printerFileM  opts,-	         "import " ++ absFileM      opts,-	         if lay then ("import " ++ layoutFileM opts) else "",-	         if use_xml then ("import " ++ xmlFileM opts) else "",-	         if_glr "import qualified Data.Map(Map, lookup, toList)",-	         if_glr "import Data.Maybe(fromJust)",-	         "import " ++ errFileM      opts,-		 "",-		 if use_glr-		   then "type ParseFun a = [[Token]] -> (GLRResult, GLR_Output (Err a))"-		   else "type ParseFun a = [Token] -> Err a",-	         "",-                 "myLLexer = " ++ if lay then "resolveLayout True . myLexer"-                                         else "myLexer",-                 "",-                 "type Verbosity = Int",-                 "",-                 "putStrV :: Verbosity -> String -> IO ()",-                 "putStrV v s = if v > 1 then putStrLn s else return ()",-                 "",-		 "runFile :: (" ++ xpr ++ if_glr "TreeDecode a, " ++ "Print a, Show a) => Verbosity -> ParseFun a -> FilePath -> IO ()",-		 "runFile v p f = putStrLn f >> readFile f >>= run v p",-		 "",-		 "run :: (" ++ xpr ++ if_glr "TreeDecode a, " ++ "Print a, Show a) => Verbosity -> ParseFun a -> String -> IO ()",-		 if use_glr then run_glr else run_std use_xml,-		 "",-		 "showTree :: (Show a, Print a) => Int -> a -> IO ()",-		 "showTree v tree",-		 " = do",-		 "      putStrV v $ \"\\n[Abstract Syntax]\\n\\n\" ++ show tree",-		 "      putStrV v $ \"\\n[Linearized tree]\\n\\n\" ++ printTree tree",-		 "",-		 "main :: IO ()",-		 "main = do args <- getArgs",-		 "          case args of",-		 "            [] -> hGetContents stdin >>= run 2 " ++ firstParser,-		 "            \"-s\":fs -> mapM_ (runFile 0 " ++ firstParser ++ ") fs",-		 "            fs -> mapM_ (runFile 2 " ++ firstParser ++ ") fs",-		 "",-		 if_glr $ "the_parser :: ParseFun " ++ topType,-		 if_glr $ "the_parser = lift_parser " ++ parserName,-		 if_glr $ "",-		 if_glr $ lift_parser-		 ]--run_std xml- = unlines-   [ "run v p s = let ts = myLLexer s in case p ts of"-   , "           Bad s    -> do putStrLn \"\\nParse              Failed...\\n\""-   , "                          putStrV v \"Tokens:\""-   , "                          putStrV v $ show ts"-   , "                          putStrLn s"-   , "           Ok  tree -> do putStrLn \"\\nParse Successful!\""-   , "                          showTree v tree"-   , if xml then-     "                          putStrV v $ \"\\n[XML]\\n\\n\" ++ printXML tree"-     else ""-   ]--run_glr- = unlines-   [ "run v p s"-   , " = let ts = map (:[]) $ myLLexer s"-   , "       (raw_output, simple_output) = p ts in"-   , "   case simple_output of"-   , "     GLR_Fail major minor -> do"-   , "                               putStrLn major"-   , "                               putStrV v minor"-   , "     GLR_Result df trees  -> do"-   , "                               putStrLn \"\\nParse Successful!\""-   , "                               case trees of"-   , "                                 []       -> error \"No results but parse succeeded?\""-   , "                                 [Ok x]   -> showTree v x"-   , "                                 xs@(_:_) -> showSeveralTrees v xs"-   , "   where"-   , "  showSeveralTrees :: (Print b, Show b) => Int -> [Err b] -> IO ()"-   , "  showSeveralTrees v trees"-   , "   = sequence_ "-   , "     [ do putStrV v (replicate 40 '-')"-   , "          putStrV v $ \"Parse number: \" ++ show n"-   , "          showTree v t"-   , "     | (Ok t,n) <- zip trees [1..]"-   , "     ]"-   ]---lift_parser- = unlines-   [ "type Forest = Data.Map.Map ForestId [Branch]      -- omitted in ParX export."-   , "data GLR_Output a"-   , " = GLR_Result { pruned_decode     :: (Forest -> Forest) -> [a]"-   , "              , semantic_result   :: [a]"-   , "              }"-   , " | GLR_Fail   { main_message :: String"-   , "              , extra_info   :: String"-   , "              }"-   , ""-   , "lift_parser"-   , " :: (TreeDecode a, Show a, Print a)"-   , " => ([[Token]] -> GLRResult) -> ParseFun a"-   , "lift_parser parser ts"-   , " = let result = parser ts in"-   , "   (\\o -> (result, o)) $"-   , "   case result of"-   , "     ParseError ts f -> GLR_Fail \"Parse failed, unexpected token(s)\\n\""-   , "                                 (\"Tokens: \" ++ show ts)"-   , "     ParseEOF   f    -> GLR_Fail \"Parse failed, unexpected EOF\\n\""-   , "                                 (\"Partial forest:\\n\""-   , "                                    ++ unlines (map show $ Data.Map.toList f))"-   , "     ParseOK r f     -> let find   f = fromJust . ((flip Data.Map.lookup) f)"-   , "                            dec_fn f = decode (find f) r"-   , "                        in GLR_Result (\\ff -> dec_fn $ ff f) (dec_fn f)"-   ]  composOp :: String -> String composOp composOpMod = unlines
src/BNFC/Backend/HaskellGADT/CFtoAbstractGADT.hs view
@@ -20,12 +20,10 @@ module BNFC.Backend.HaskellGADT.CFtoAbstractGADT (cf2Abstract) where
 
 import BNFC.CF
-import BNFC.Utils((+++),(++++))
+import BNFC.Utils((+++))
 import Data.List(intersperse,intercalate,nub)
 
 import BNFC.Backend.HaskellGADT.HaskellGADTCommon
-
-import Data.Maybe (catMaybes)
 
 -- to produce a Haskell module
 cf2Abstract :: Bool -> String -> CF -> String -> String
src/BNFC/Backend/HaskellGADT/CFtoPrinterGADT.hs view
@@ -21,9 +21,7 @@  import BNFC.CF import BNFC.Utils-import BNFC.Backend.Haskell.CFtoTemplate import Data.List (intersperse)-import Data.Char(toLower)  import BNFC.Backend.HaskellGADT.HaskellGADTCommon @@ -113,20 +111,10 @@ integerRule cf = showsPrintRule cf "Integer" doubleRule cf = showsPrintRule cf "Double" -showsPrintRule cf t = unlines $ [+showsPrintRule _ t = unlines $ [   "instance Print " ++ t ++ " where",   "  prt _ x = doc (shows x)",   ""]--ownPrintRule cf own = unlines $ [-  "instance Print " ++ show own ++ " where",-  "  prt _ (" ++ show own ++ posn ++ ") = doc (showString i)",-  ""] ++ ifList cf own- where-   posn = if isPositionCat cf own then " (_,i)" else " i"--ifList :: CF -> Cat -> [String]-ifList cf cat = prPrtList cf (ListCat cat) -- FIXME: hackish  prPrt :: CF -> [String] prPrt cf = ["instance Print (Tree c) where",
src/BNFC/Backend/HaskellGADT/CFtoTemplateGADT.hs view
@@ -24,7 +24,7 @@  import BNFC.CF import BNFC.Utils((+++))-import Data.List (delete,groupBy)+import Data.List (groupBy)  import BNFC.Backend.HaskellGADT.HaskellGADTCommon 
src/BNFC/Backend/HaskellGADT/HaskellGADTCommon.hs view
src/BNFC/Backend/HaskellProfile.hs view
@@ -28,9 +28,7 @@ import BNFC.Backend.Haskell.MkErrM import BNFC.Utils -import Data.Char import Data.Maybe (isJust)-import System.Exit(exitFailure) import Control.Monad(when)  -- naming conventions@@ -47,38 +45,23 @@        then lang ++ "/" ++ name ++ "." ++ ext        else name ++ lang ++ "." ++ ext -absFile, absFileM, alexFile, alexFileM, gfAbs, gfConc, happyFile, happyFileM,- errFile, errFileM, templateFile, templateFileM, printerFile, printerFileM,- layoutFile, layoutFileM, tFile, tFileM, mFile :: Bool -> String -> FilePath-absFile       = nameFile "Abs" "hs"+absFileM, alexFile, alexFileM, happyFile, happyFileM, errFile, errFileM, tFile,+  mFile :: Bool -> String -> FilePath absFileM      = nameMod  "Abs" alexFile      = nameFile "Lex" "x" alexFileM     = nameMod  "Lex" happyFile     = nameFile "Par" "y" happyFileM    = nameMod  "Par"-templateFile  = nameFile "Skel" "hs"-templateFileM = nameMod  "Skel"-printerFile   = nameFile "Print" "hs"-printerFileM  = nameMod  "Print"-gfAbs         = nameFile "" "Abs.gf"-gfConc        = nameFile "" "Conc.gf" tFile         = nameFile "Test" "hs"-tFileM        = nameMod  "Test" mFile inDir n = if inDir then n ++ "/" ++ "Makefile" else "Makefile" errFile b n   = if b then n ++ "/" ++ "ErrM.hs" else "ErrM.hs" errFileM b n  = if b then n ++ "." ++ "ErrM" else "ErrM"-layoutFileM   = nameMod  "Layout"-xmlFileM      = nameMod  "XML"-layoutFile    = nameFile "Layout" "hs"  makeHaskellProfile :: SharedOptions -> CFP -> IO () makeHaskellProfile opts cfp = do   let absMod = absFileM      (inDir opts) name       lexMod = alexFileM     (inDir opts) name       parMod = happyFileM    (inDir opts) name-      prMod  = printerFileM  (inDir opts) name-      layMod = layoutFileM   (inDir opts) name-      tplMod = templateFileM (inDir opts) name       errMod = errFileM      (inDir opts) name   let cf = cfp2cf cfp   do@@ -148,10 +131,9 @@   testfile :: Bool -> String -> Bool -> CF -> String-testfile inDir name xml cf = makeA where+testfile inDir name _ cf = makeA where   makeA = let lay = hasLayout cf-             xpr = if xml then "XPrint a, " else ""          in unlines 	        ["-- automatically generated by BNF Converter", 		 "module Main where\n",
src/BNFC/Backend/HaskellProfile/CFtoHappyProfile.hs view
@@ -26,7 +26,6 @@ import BNFC.CF --import Lexer import Data.List (intersperse)-import Data.Char  -- Type declarations @@ -37,7 +36,6 @@  -- default naming -moduleName  = "HappyParser" tokenName   = "Token"  -- The main function, that given a CF and a CFCat to parse according to,@@ -49,7 +47,7 @@ cf2Happy name absName lexName errName cf  = unlines     [header name absName lexName errName,-     declarations (allEntryPointsP cf),+     declarations (allEntryPoints cf),      tokens (symbols cf ++ reservedWords cf),      specialToks cf,      delimiter,@@ -59,7 +57,7 @@  -- construct the header. header :: String -> String -> String -> String -> String-header modName absName lexName errName = unlines+header modName _ lexName errName = unlines          ["-- This Happy file was machine-generated by the BNF converter", 	  "{",           "module " ++ modName ++ " where",@@ -121,7 +119,7 @@      let (p,m) = generatePatterns cf r])  where    ---- left rec optimization does not work yet-   revF b r = ---- if b then ("flip " ++ funRuleP r) else (funRuleP r)+   revF _ r = ---- if b then ("flip " ++ funRuleP r) else (funRuleP r)               funRule r    revs = reversibleCats cf @@ -129,7 +127,7 @@ -- An action can for example be: Sum $1 $2, that is, construct an AST -- with the constructor Sum applied to the two metavariables $1 and $2. generateAction :: NonTerminal -> FunP -> [MetaVar] -> Action-generateAction nt f@(_,(h,p)) ms = unwords $ (if isCoercion h then args else (fun ++ mss))+generateAction _ (_,(h,p)) ms = unwords (if isCoercion h then args else fun ++ mss)   where     fun = ["mkFunTree",show h,show p]     mss = ["["] ++ intersperse "," ms ++ ["]"]@@ -158,10 +156,10 @@ prRules :: Rules -> String prRules = unlines . map prOne   where-    prOne (nt,[]) = [] -- nt has only internal use-    prOne (nt,((p,a):ls)) =+    prOne (_,[]) = [] -- nt has only internal use+    prOne (nt,(p,a):ls) =       unwords [nt', "::", "{", "CFTree", "}\n" ++-               nt', ":" , p, "{", a, "}", "\n" ++ pr ls] ++ "\n"+               nt', ":" , p, "{", a, "}", '\n' : pr ls] ++ "\n"      where        nt' = identCat nt        pr [] = []@@ -171,7 +169,7 @@ -- Finally, some haskell code.  finalize :: CFP -> String-finalize cf = unlines+finalize _ = unlines    [      "{",      "\nreturnM :: a -> Err a",@@ -194,7 +192,6 @@ specialToks :: CFP -> String specialToks cf = unlines $ 		 (map aux (literals cf))-		  ++ ["L_err    { _ }"]  where aux cat =         case cat of           Cat "Ident"  -> "L_ident  { PT _ (TV $$) }"
src/BNFC/Backend/Java.hs view
@@ -38,9 +38,6 @@ ------------------------------------------------------------------- -- Dependencies. --------------------------------------------------------------------import System.Directory ( createDirectory )-import System.IO.Error ( isAlreadyExistsError )-import System.Exit ( exitFailure ) import System.FilePath (pathSeparator) import BNFC.Utils import BNFC.CF@@ -55,7 +52,6 @@ import BNFC.Backend.Java.CFtoAbstractVisitor import BNFC.Backend.Java.CFtoFoldVisitor import BNFC.Backend.Java.CFtoAllVisitor-import Data.Char import Data.List(intersperse) import qualified BNFC.Backend.Common.Makefile as Makefile -------------------------------------------------------------------@@ -75,7 +71,6 @@        let absynFiles = remDups $ cf2JavaAbs packageBase packageAbsyn cf 	   absynBaseNames = map fst absynFiles 	   absynFileNames = map (dirAbsyn ++) absynBaseNames-	   absynFuns = [ f | (_,ps) <- cf2data cf, (f,_) <- ps ]        let writeAbsyn (filename, contents) = 	       mkfile (dirAbsyn ++ filename ++ ".java") contents        mapM writeAbsyn absynFiles@@ -103,7 +98,6 @@        pkgToDir :: String -> FilePath       pkgToDir s = replace '.' pathSeparator s ++ [pathSeparator]-      make = Options.make options       inPackage = Options.inPackage options       name = Options.lang options 
src/BNFC/Backend/Java/CFtoAbstractVisitor.hs view
@@ -21,11 +21,8 @@ module BNFC.Backend.Java.CFtoAbstractVisitor (cf2AbstractVisitor) where  import BNFC.CF-import BNFC.Backend.Java.CFtoJavaAbs15 (typename)-import BNFC.Utils ((+++), (++++))+import BNFC.Utils ((+++)) import BNFC.Backend.Common.NamedVariables-import Data.List-import Data.Char(toLower, toUpper, isDigit)  cf2AbstractVisitor :: String -> String -> CF -> String cf2AbstractVisitor packageBase packageAbsyn cf =@@ -52,7 +49,7 @@  --traverses a standard rule. prRule :: String -> [UserDef] -> Cat -> Rule -> String-prRule packageAbsyn user cat (Rule fun _ cats)+prRule packageAbsyn _ _ (Rule fun _ _)     | not (isCoercion fun || isDefinedRule fun) =    "    public R visit(" ++ cls ++ " p, A arg) { return visitDefault(p, arg); }"    where cls = packageAbsyn ++ "." ++ fun
src/BNFC/Backend/Java/CFtoAllVisitor.hs view
@@ -21,11 +21,9 @@ module BNFC.Backend.Java.CFtoAllVisitor (cf2AllVisitor) where  import BNFC.CF-import BNFC.Backend.Java.CFtoJavaAbs15 (typename)-import BNFC.Utils ((+++), (++++))+import BNFC.Utils ((+++)) import BNFC.Backend.Common.NamedVariables import Data.List-import Data.Char(toLower, toUpper, isDigit)  cf2AllVisitor :: String -> String -> CF -> String cf2AllVisitor packageBase packageAbsyn cf =@@ -36,16 +34,13 @@            "",            "/** BNFC-Generated All Visitor */",            "public interface AllVisitor<R,A> extends",-             concat $ intersperse ",\n" $ map ("  "++) is,+           intercalate ",\n" $ map ("  "++) is,            "{}"]   where     groups = [ g | g@(c,_) <- fixCoercions (ruleGroupsInternals cf), not (isList c) ]     is = map (prInterface packageAbsyn) groups-    header = unlines [ -      ]- prInterface :: String -> (Cat, [Rule]) -> String-prInterface packageAbsyn (cat, rules) =+prInterface packageAbsyn (cat, _) =     q ++ ".Visitor<R,A>"   where q = packageAbsyn ++ "." ++ identCat cat
src/BNFC/Backend/Java/CFtoComposVisitor.hs view
@@ -22,10 +22,9 @@  import BNFC.CF import BNFC.Backend.Java.CFtoJavaAbs15 (typename)-import BNFC.Utils ((+++), (++++))+import BNFC.Utils ((+++)) import BNFC.Backend.Common.NamedVariables import Data.List-import Data.Char(toLower, toUpper, isDigit)  cf2ComposVisitor :: String -> String -> CF -> String cf2ComposVisitor packageBase packageAbsyn cf =@@ -50,7 +49,7 @@   prInterface :: String -> (Cat, [Rule]) -> String-prInterface packageAbsyn (cat, rules) =+prInterface packageAbsyn (cat, _) =     q ++ ".Visitor<" ++ q ++ ",A>"   where q = packageAbsyn ++ "." ++ identCat cat @@ -82,8 +81,8 @@ 	       (Left c, Left v) <- zip cats (fixOnes (numVars [] cats)), c /= InternalCat ]     cls = packageAbsyn ++ "." ++ fun     allTerms [] = True-    allTerms ((Left z):zs) = False-    allTerms (z:zs) = allTerms zs+    allTerms (Left _:_) = False+    allTerms (_:zs) = allTerms zs     children = map snd cats'     visitVars = concatMap (uncurry (prCat user)) cats' prRule  _ _ _ _ = ""@@ -100,7 +99,6 @@       where       var = "p." ++ nt       varType = typename (identCat (normCat cat)) user-      accept = var ++ ".accept(this, arg);"       et = typename (show$normCatOfList cat) user       decl v = varType +++ nt +++ "=" +++ v ++ ";"       listAccept = [decl ("new"+++varType++"()"),
src/BNFC/Backend/Java/CFtoCup15.hs view
@@ -40,7 +40,7 @@ module BNFC.Backend.Java.CFtoCup15 ( cf2Cup ) where  import BNFC.CF-import Data.List (intersperse, isPrefixOf)+import Data.List (intersperse) import BNFC.Backend.Common.NamedVariables import BNFC.Utils ( (+++) ) import BNFC.TypeChecker  -- We need to (re-)typecheck to figure out list instances in@@ -198,19 +198,19 @@ rulesForCup packageAbsyn cf env = map mkOne $ ruleGroups cf where   mkOne (cat,rules) = constructRule packageAbsyn cf env rules cat --- For every non-terminal, we construct a set of rules. A rule is a sequence of+-- | For every non-terminal, we construct a set of rules. A rule is a sequence of -- terminals and non-terminals, and an action to be performed. constructRule :: String -> CF -> SymEnv -> [Rule] -> NonTerminal -> (NonTerminal,[(Pattern,Action)]) constructRule packageAbsyn cf env rules nt =-    (nt, [(p,generateAction packageAbsyn nt (funRule r) (revM b m) b)-	  | r0 <- rules,-	    let (b,r) = if isConsFun (funRule r0) && elem (valCat r0) revs+    (nt, [ (p, generateAction packageAbsyn nt (funRule r) (revM b m) b)+          | r0 <- rules,+          let (b,r) = if isConsFun (funRule r0) && elem (valCat r0) revs                           then (True, revSepListRule r0)                           else (False, r0)-                (p,m) = generatePatterns cf env r])+              (p,m) = generatePatterns env r])  where-   revM False m = m-   revM True [h,t] = [t,h]+   revM False = id+   revM True = reverse    revs = reversibleCats cf  -- Generates a string containing the semantic action.@@ -236,36 +236,40 @@      p_2 = ms!!1      add = if rev then "addLast" else "addFirst" --- Generate patterns and a set of metavariables indicating+-- | Generate patterns and a set of metavariables indicating -- where in the pattern the non-terminal-generatePatterns :: CF -> SymEnv -> Rule -> (Pattern,[MetaVar])-generatePatterns cf env r = case rhsRule r of-  []  -> (" /* empty */ ",[])-  its -> (mkIt env 1 its, metas its)+-- >>> generatePatterns [] (Rule "myfun" (Cat "A") [])+-- (" /* empty */ ",[])+-- >>> generatePatterns [("def", "_SYMB_1")] (Rule "myfun" (Cat "A") [Right "def", Left (Cat "B")])+-- ("_SYMB_1 B:p_2 ",["p_2"])+generatePatterns :: SymEnv -> Rule -> (Pattern,[MetaVar])+generatePatterns env r = case rhsRule r of+    []  -> (" /* empty */ ",[])+    its -> (mkIt 1 its, metas its)  where-   mkIt _env _n [] = []-   mkIt env n (i:is) = case i of-     Left c -> c' ++ ":p_" ++ (show (n :: Int)) +++ (mkIt env (n+1) is)-                  where-		   c' = case c of-      			 Cat "Ident"   -> "_IDENT_"-      			 Cat "Integer" -> "_INTEGER_"-     			 Cat "Char"    -> "_CHAR_"-  			 Cat "Double"  -> "_DOUBLE_"-    			 Cat "String"  -> "_STRING_"-		         _         -> identCat c-     Right s -> case (lookup s env) of-     		(Just x) -> x +++ (mkIt env (n+1) is)-		(Nothing) -> (mkIt env n is)-   metas its = ["p_" ++ show i | (i,Left c) <- zip [1 :: Int ..] its]+    mkIt _ [] = []+    mkIt n (i:is) = case i of+        Left c -> c' ++ ":p_" ++ show (n :: Int) +++ mkIt (n+1) is+          where+              c' = case c of+                  Cat "Ident"   -> "_IDENT_"+                  Cat "Integer" -> "_INTEGER_"+                  Cat "Char"    -> "_CHAR_"+                  Cat "Double"  -> "_DOUBLE_"+                  Cat "String"  -> "_STRING_"+                  _         -> identCat c+        Right s -> case lookup s env of+            (Just x) -> x +++ mkIt (n+1) is+            (Nothing) -> mkIt n is+    metas its = ["p_" ++ show i | (i,Left _) <- zip [1 :: Int ..] its]  -- We have now constructed the patterns and actions, -- so the only thing left is to merge them into one string. prRules :: Rules -> String prRules [] = []-prRules ((nt, []):rs) = prRules rs --internal rule-prRules ((nt,((p,a):ls)):rs) =-  (unwords [nt', "::=", p, "{:", a, ":}", "\n" ++ pr ls]) ++ ";\n" ++ prRules rs+prRules ((_, []):rs) = prRules rs --internal rule+prRules ((nt,(p,a):ls):rs) =+  unwords [nt', "::=", p, "{:", a, ":}", "\n" ++ pr ls] ++ ";\n" ++ prRules rs  where   nt' = identCat nt   pr []           = []
src/BNFC/Backend/Java/CFtoFoldVisitor.hs view
@@ -22,10 +22,8 @@  import BNFC.CF import BNFC.Backend.Java.CFtoJavaAbs15 (typename)-import BNFC.Utils ((+++), (++++))+import BNFC.Utils ((+++)) import BNFC.Backend.Common.NamedVariables-import Data.List-import Data.Char(toLower, toUpper, isDigit)  cf2FoldVisitor :: String -> String -> CF -> String cf2FoldVisitor packageBase packageAbsyn cf =@@ -58,7 +56,7 @@  --traverses a standard rule. prRule :: String -> [UserDef] -> Cat -> Rule -> String-prRule packageAbsyn user cat (Rule fun _ cats)+prRule packageAbsyn user _ (Rule fun _ cats)     | not (isCoercion fun || isDefinedRule fun) = unlines $   ["    public R visit(" ++ cls ++ " p, A arg) {",    "      R r = leaf(arg);"]@@ -72,9 +70,8 @@ 	       (Left c, Left v) <- zip cats (fixOnes (numVars [] cats)), c /= InternalCat ]     cls = packageAbsyn ++ "." ++ fun     allTerms [] = True-    allTerms ((Left z):zs) = False-    allTerms (z:zs) = allTerms zs-    children = map snd cats'+    allTerms (Left _:_) = False+    allTerms (_:zs) = allTerms zs     visitVars = concatMap (uncurry (prCat user)) cats' prRule  _ _ _ _ = "" 
src/BNFC/Backend/Java/CFtoJLex15.hs view
@@ -43,7 +43,6 @@ import BNFC.Backend.Java.RegToJLex import BNFC.Utils		( (+++) ) import BNFC.Backend.Common.NamedVariables-import Data.List  --The environment must be returned for the parser to use. cf2jlex :: String -> String -> CF -> (String, SymEnv)@@ -60,7 +59,7 @@    makeSymEnv (s:symbs) n = (s, "_SYMB_" ++ (show n)) : (makeSymEnv symbs (n+1))  prelude :: String -> String -> [String]-prelude packageBase packageAbsyn =+prelude packageBase _ =     [      "// This JLex file was machine-generated by the BNF converter",      "package" +++ packageBase ++ ";",
src/BNFC/Backend/Java/CFtoJavaAbs15.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE OverloadedStrings #-} {-     BNF Converter: Java 1.5 Abstract Syntax     Copyright (C) 2004  Author:  Michael Pellauer, Bjorn Bringert@@ -48,9 +49,11 @@ import BNFC.CF import BNFC.Utils((+++),(++++)) import BNFC.Backend.Common.NamedVariables hiding (IVar, getVars, varName)+import Data.Function (on) import Data.List-import Data.Char(toLower, isDigit)-import Data.Maybe(catMaybes,fromMaybe)+import Data.Char(toLower)+import Data.Maybe(catMaybes)+import Text.PrettyPrint  --Produces abstract data types in Java. --These follow Appel's "non-object oriented" version.@@ -64,7 +67,7 @@ --The result is a list of files which must be written to disk. --The tuple is (FileName, FileContents) cf2JavaAbs :: String -> String -> CF -> [(FilePath, String)]-cf2JavaAbs packageBase packageAbsyn cf =+cf2JavaAbs _ packageAbsyn cf =     concatMap (prData header packageAbsyn user) rules  where   header = "package " ++ packageAbsyn ++ "; // Java Package generated by the BNF Converter.\n"@@ -121,8 +124,9 @@     [      h,      "public class" +++ fun ++ ext +++ "{",-     (prInstVars vs),-     prConstructor fun user vs cats,+     render $ nest 2 $ vcat+        [ prInstVars vs+        , prConstructor fun user vs cats],      prAccept packageAbsyn c fun,      prEquals packageAbsyn fun vs,      prHashCode packageAbsyn fun vs,@@ -160,11 +164,11 @@   fqn = pack++"."++fun   checkKids = concat $ intersperse " && " $ map checkKid vs   checkKid iv = "this." ++ v ++ ".equals(x." ++ v ++ ")"-      where v = iVarName iv+      where v = render (iVarName iv)  -- Creates the equals() method. prHashCode :: String -> String -> [IVar] -> String-prHashCode pack fun vs =+prHashCode _ _ vs =     unlines $ map ("  "++) ["public int hashCode() {",                             "  return " ++ hashKids vs ++ ";",                             "}"@@ -175,41 +179,52 @@   hashKids (v:vs) = hashKids_ (hashKid v) vs   hashKids_ r [] = r   hashKids_ r (v:vs) = hashKids_ (show aPrime ++ "*" ++ "(" ++ r ++ ")+" ++ hashKid v) vs-  hashKid iv = "this." ++ iVarName iv ++ ".hashCode()"+  hashKid iv = "this." ++ render (iVarName iv) ++ ".hashCode()"  ---A class's instance variables.-prInstVars :: [IVar] -> String-prInstVars [] = []-prInstVars vars@((t,n,nm):vs) =-  "  public" +++ "final" +++ t +++ uniques ++ ";" ++++-  (prInstVars vs')+-- | A class's instance variables.+-- >>> prInstVars [("A",1,""), ("B",1,""), ("A",2,"abc")]+-- public final A _1, abc_2;+-- public final B _1;+prInstVars :: [IVar] -> Doc+prInstVars [] = empty+prInstVars vars@((t,_,_):_) =+    "public" <+> "final" <+> text t <+> uniques <> ";" $$ prInstVars vs'  where    (uniques, vs') = prUniques t vars    --these functions group the types together nicely-   prUniques :: String -> [IVar] -> (String, [IVar])-   prUniques t vs = (prVars (findIndices (\x -> case x of (y,_,_) ->  y == t) vs) vs, remType t vs)-   prVars (x:[]) vs = iVarName (vs!!x)-   prVars (x:xs) vs = iVarName (vs!!x) ++ "," +++ prVars xs vs+   prUniques :: String -> [IVar] -> (Doc, [IVar])+   prUniques t vs = (prVars vs (findIndices (\(y,_,_) ->  y == t) vs), remType t vs)+   prVars vs = hsep . punctuate comma . map (iVarName . (vs!!))    remType :: String -> [IVar] -> [IVar]    remType _ [] = []-   remType t ((t2,n,nm):ts) = if t == t2-   				then (remType t ts)-				else (t2,n,nm) : (remType t ts)+   remType t ((t2,n,nm):ts)+    | t == t2 = remType t ts+    | otherwise = (t2,n,nm) : remType t ts -iVarName :: IVar -> String-iVarName (t,n,nm) = varName nm ++ showNum n+-- | Convert IVar to java name+-- >>> iVarName ("A",1,"abc")+-- abc_1+-- >>> iVarName ("C", 2, "")+-- _2+-- >>> iVarName ("Integer", 0, "integer")+-- integer_+iVarName :: IVar -> Doc+iVarName (_,n,nm) = text (varName nm) <> text (showNum n) ---The constructor just assigns the parameters to the corresponding instance variables.-prConstructor :: String -> [UserDef] -> [IVar] -> [Cat] -> String+-- | The constructor just assigns the parameters to the corresponding instance+-- variables.+-- >>> prConstructor "bla" [] [("A",1,"a"),("B",1,""),("A",2,"")] [Cat "A",Cat "B", Cat "C"]+-- public bla(A p1, B p2, C p3) { a_1 = p1; _ = p2; _2 = p3; }+-- >>> prConstructor "EInt" [] [("Integer",0,"integer")] [Cat "Integer"]+-- public EInt(Integer p1) { integer_ = p1; }+prConstructor :: String -> [UserDef] -> [IVar] -> [Cat] -> Doc prConstructor c u vs cats =-  "  public" +++ c ++"(" ++ (interleave types params) ++ ")" +++ "{" +++-   prAssigns vs params ++ "}"+    "public" <+> text c <> parens (interleave types params)+    <+> "{" <+> text (prAssigns vs params) <> "}"   where-   (types, params) = unzip (prParams cats u (length cats) ((length cats)+1))-   interleave _ [] = []-   interleave (x:[]) (y:[]) = x +++ y-   interleave (x:xs) (y:ys) = x +++ y ++ "," +++ (interleave xs ys)+   (types, params) = unzip (prParams cats u (length cats) (length cats+1))+   interleave xs ys = hsep $ punctuate "," $ zipWith ((<+>) `on` text) xs ys  --Prints the parameters to the constructors. prParams :: [Cat] -> [UserDef] -> Int -> Int -> [(String,String)]@@ -223,10 +238,10 @@ prAssigns _ [] = [] prAssigns ((t,n,nm):vs) (p:ps) =  if n == 1 then-  case findIndices (\x -> case x of (l,r,_) -> l == t) vs of-    [] -> (varName nm) +++ "=" +++ p ++ ";" +++ (prAssigns vs ps)-    z -> ((varName nm) ++ (showNum n)) +++ "=" +++ p ++ ";" +++ (prAssigns vs ps)- else ((varName nm) ++ (showNum n)) +++ "=" +++ p ++ ";" +++ (prAssigns vs ps)+  case findIndices (\x -> case x of (l,_,_) -> l == t) vs of+    [] -> varName nm +++ "=" +++ p ++ ";" +++ prAssigns vs ps+    _ -> varName nm ++ showNum n +++ "=" +++ p ++ ";" +++ prAssigns vs ps+ else varName nm ++ showNum n +++ "=" +++ p ++ ";" +++ prAssigns vs ps  -- Different than the standard BNFC.Backend.Common.NamedVariables version -- because of the user-defined types.@@ -235,11 +250,10 @@  where   addVar is c = (c', n, c):is     where c' = typename c user-          n = maximum (1:[n'+1 | (t,n',c'') <- is, c'' == c])+          n = maximum (1:[n'+1 | (_,n',c'') <- is, c'' == c])   singleToZero is = [(t,n',nm) | (t,n,nm) <- is,                      let n' = if length [n | (_,_,n) <- is, n == nm] == 1                                then 0 else n]-  hasType t (t',_,_) = t == t'  varName :: String -- ^ category name 	-> String -- ^ Variable name
src/BNFC/Backend/Java/CFtoVisitSkel15.hs view
@@ -42,10 +42,10 @@  import BNFC.CF import BNFC.Backend.Java.CFtoJavaAbs15 (typename)-import BNFC.Utils ((+++), (++++))+import BNFC.Utils ((+++)) import BNFC.Backend.Common.NamedVariables import Data.List-import Data.Char(toLower, toUpper, isDigit)+import Data.Char(toLower)  --Produces a Skeleton using the Visitor Design Pattern. --Thus the user can choose which Skeleton to use.@@ -89,7 +89,7 @@  --traverses a standard rule. prRule :: String -> [UserDef] -> Rule -> String-prRule packageAbsyn user (Rule fun c cats) | not (isCoercion fun || isDefinedRule fun) = unlines+prRule packageAbsyn user (Rule fun _ cats) | not (isCoercion fun || isDefinedRule fun) = unlines   [    "    public R visit(" ++ packageAbsyn ++ "." ++ fun ++ " p, A arg)",    "    {",@@ -105,9 +105,9 @@     	else [ (c,v) | 	       (Left c, Left v) <- zip cats (fixOnes (numVars [] cats)) ]     allTerms [] = True-    allTerms ((Left z):zs) = False-    allTerms (z:zs) = allTerms zs-prRule user nm _ = ""+    allTerms (Left _:_) = False+    allTerms (_:zs) = allTerms zs+prRule _ _ _ = ""  --Traverses a class's instance variables. prCat :: [UserDef]
src/BNFC/Backend/Java/RegToJLex.hs view
@@ -3,7 +3,6 @@ -- modified from pretty-printer generated by the BNF converter  import AbsBNF-import Data.Char  -- the top-level printing method printRegJLex :: Reg -> String@@ -22,7 +21,6 @@     t        :ts -> space t   $ rend i ts     _            -> ""   cons s t  = s ++ t-  new i s   = s   space t s = if null s then t else t ++ s  parenth :: [String] -> [String]@@ -67,7 +65,7 @@    RMinus RAny reg@(RChar _) ->  prPrec i 3 (concat [["[^"],prt 0 reg,["]"]])    RMinus RAny (RAlts str) ->  prPrec i 3 (concat [["[^"],prt 0 str,["]"]])    -- FIXME: maybe we could add cases for char - RDigit, RLetter etc.-   RMinus reg0 reg -> error $ "JLex does not support general set difference"+   RMinus _ _ -> error $ "JLex does not support general set difference"     RStar reg -> prPrec i 3 (concat [prt 3 reg , ["*"]])    RPlus reg -> prPrec i 3 (concat [prt 3 reg , ["+"]])
src/BNFC/Backend/Latex.hs view
@@ -23,13 +23,9 @@ import BNFC.Backend.Base import BNFC.Backend.Common.Makefile as Makefile import BNFC.CF-import BNFC.GetCF import BNFC.Utils-import Control.Monad (unless,when)-import Data.List (nub,intersperse)-import System.Console.GetOpt-import System.Exit (exitSuccess)-import System.FilePath ((<.>),replaceExtension, takeBaseName)+import Data.List (intersperse)+import System.FilePath ((<.>),replaceExtension) import Text.Printf  makeLatex :: SharedOptions -> CF -> Backend@@ -107,7 +103,7 @@   ]  prtLiterals :: String -> CF -> String-prtLiterals name cf =+prtLiterals _ cf =   unlines $ map stringLit $     filter (`notElem` [Cat "Ident"]) $       literals cf
src/BNFC/Backend/OCaml.hs view
@@ -22,6 +22,8 @@  module BNFC.Backend.OCaml (makeOCaml) where +import Text.PrettyPrint (render)+ import BNFC.CF import BNFC.Backend.Base hiding (Backend) import BNFC.Backend.Common.Makefile@@ -34,14 +36,9 @@ import BNFC.Backend.OCaml.CFtoOCamlTest import BNFC.Backend.XML import BNFC.Utils-import System.FilePath (takeFileName) import BNFC.Options -import Data.Char-import Data.Maybe (fromMaybe,maybe)-import System.Exit (exitFailure) import System.FilePath (pathSeparator, (</>))-import Control.Monad(when)  -- naming conventions @@ -64,12 +61,9 @@     where pref = maybe "" (\p->pkgToDir p </> "") (inPackage opts)           ext' = if null ext then "" else "." ++ ext -absFile, absFileM, ocamllexFile, ocamllexFileM,- ocamlyaccFile, ocamlyaccFileM,- utilFile, utilFileM,- templateFile, templateFileM,- printerFile, printerFileM,- tFile, tFileM :: SharedOptions -> String+absFile, absFileM, ocamllexFile, ocamllexFileM, ocamlyaccFile, ocamlyaccFileM,+  utilFile, templateFile, templateFileM, printerFile, printerFileM,+  tFile :: SharedOptions -> String absFile       = mkFile withLang "Abs" "ml" absFileM      = mkMod  withLang "Abs" ocamllexFile      = mkFile withLang "Lex" "mll"@@ -83,10 +77,7 @@ showFile      = mkFile  withLang "Show" "ml" showFileM     = mkMod  withLang "Show" tFile         = mkFile withLang "Test" "ml"-tFileM        = mkMod  withLang "Test" utilFile       = mkFile noLang   "BNFC_Util" "ml"-utilFileM      = mkMod  noLang   "BNFC_Util"-xmlFileM      = mkMod  withLang "XML"  makeOCaml :: SharedOptions -> CF -> MkFiles () makeOCaml opts cf = do@@ -95,10 +86,7 @@       parMod = ocamlyaccFileM opts       prMod  = printerFileM opts       showMod = showFileM opts---      layMod = layoutFileM opts-      utilMod = utilFileM opts   do-    let dir = codeDir opts     mkfile (absFile opts) $ cf2Abstract absMod cf     mkfile (ocamllexFile opts) $ cf2ocamllex lexMod parMod cf     mkfile (ocamlyaccFile opts) $@@ -106,7 +94,7 @@     mkfile (templateFile opts) $ cf2Template (templateFileM opts) absMod cf     mkfile (printerFile opts)  $ cf2Printer prMod absMod cf     mkfile (showFile opts)  $ cf2show showMod absMod cf-    mkfile (tFile opts)        $ ocamlTestfile absMod lexMod parMod prMod showMod cf+    mkfile (tFile opts) $ render $ ocamlTestfile absMod lexMod parMod prMod showMod cf     mkfile (utilFile opts)      $ utilM     mkMakefile opts $ makefile opts     case xml opts of
src/BNFC/Backend/OCaml/CFtoOCamlAbs.hs view
@@ -21,14 +21,16 @@  module BNFC.Backend.OCaml.CFtoOCamlAbs (cf2Abstract) where +import Text.PrettyPrint+ import BNFC.CF-import BNFC.Utils((+++),(++++))+import BNFC.Utils((+++)) import Data.List(intersperse) import BNFC.Backend.OCaml.OCamlUtil  -- to produce an OCaml module cf2Abstract :: String -> CF -> String-cf2Abstract name cf = unlines $+cf2Abstract _ cf = unlines $   "(* OCaml module generated by the BNF converter *)\n\n" :   mutualRecDefs (map (prSpecialData cf) (specialCats cf) ++ map prData (cf2data cf)) @@ -49,10 +51,16 @@   "\n"  prRule (fun,[])   = fun-prRule (fun,cats) = fun +++ "of" +++ mkTupleType cats+prRule (fun,cats) = fun +++ "of" +++ render (mkTupleType cats) -mkTupleType [c] = fixType c-mkTupleType (c:cs) = fixType c +++ "*" +++ mkTupleType cs+-- | Creates an OCaml type tuple by intercalating * between type names+-- >>> mkTupleType [Cat "A"]+-- a+--+-- >>> mkTupleType [Cat "A", Cat "Abc", Cat "S"]+-- a * abc * s+mkTupleType :: [Cat] -> Doc+mkTupleType = hsep . intersperse (char '*') . map (text . fixType)  prSpecialData :: CF -> Cat -> String prSpecialData cf cat = fixType cat +++ "=" +++ show cat +++ "of" +++ contentSpec cf cat
src/BNFC/Backend/OCaml/CFtoOCamlLex.hs view
@@ -22,8 +22,11 @@  module BNFC.Backend.OCaml.CFtoOCamlLex (cf2ocamllex) where +import Control.Arrow ((&&&)) import Data.List import Data.Char+import Text.PrettyPrint hiding (render)+import qualified Text.PrettyPrint as PP  import BNFC.CF import AbsBNF@@ -31,13 +34,11 @@ import BNFC.Utils ((+++))  cf2ocamllex :: String -> String -> CF -> String-cf2ocamllex name parserMod cf =-  unlines $ concat $ intersperse [""] [+cf2ocamllex _ parserMod cf =+  unlines $ intercalate [""] [     header parserMod cf,     definitions cf,-    let r = rules cf in case r of-                [] -> []-                x:xs -> ("rule" +++ x) : map ("and" +++) xs+    [PP.render (rules cf)]    ]  header :: String -> CF -> [String]@@ -83,7 +84,7 @@ hashtables :: CF -> String hashtables cf = ht "symbol_table" (symbols cf )  ++ "\n" ++                 ht "resword_table" (reservedWords cf)-    where ht table syms | length syms == 0 = ""+    where ht _ syms | null syms = ""           ht table syms = unlines [                 "let" +++ table +++ "= Hashtbl.create " ++ show (length syms),                 "let _ = List.iter (fun (kwd, tok) -> Hashtbl.add" +++ table@@ -136,45 +137,92 @@   [(regName name, printRegOCaml reg, show name) | (name, reg) <- tokenPragmas cf]        -rules :: CF -> [String]-rules cf = oneRule $ concat [-        lexComments (comments cf),-        ["l i* " ++ case reservedWords cf of-            [] -> "{let id = lexeme lexbuf in TOK_Ident id}"-            _ -> "{let id = lexeme lexbuf in try Hashtbl.find resword_table id with Not_found -> TOK_Ident id}"-        ],-        if null (symbols cf) then []-            else ["rsyms {let id = lexeme lexbuf in try Hashtbl.find symbol_table id with Not_found -> failwith (\"internal lexer error: reserved symbol \" ^ id ^ \" not found in hashtable\")}"],-        ["d+ {let i = lexeme lexbuf in TOK_Integer (int_of_string i)}"],-        ["d+ '.' d+ ('e' ('-')? d+)? {let f = lexeme lexbuf in TOK_Double (float_of_string f)}"],-        ["'\\\"' ((u # ['\\\"' '\\\\' '\\n']) | ('\\\\' ('\\\"' | '\\\\' | '\\\'' | 'n' | 't')))* '\\\"' {let s = lexeme lexbuf in TOK_String (unescapeInitTail s)}"],-        ["'\\'' ((u # ['\\\'' '\\\\']) | ('\\\\' ('\\\\' | '\\\'' | 'n' | 't'))) '\\\'' {let s = lexeme lexbuf in TOK_Char s.[1]}"],-        userTokenRules,-        ["[' ' '\\t'] {token lexbuf}"],-        ["'\\n' {incr_lineno lexbuf; token lexbuf}"],-        ["eof { TOK_EOF }"]-    ]-    where-        oneRule xs = ["token = \n    parse " ++ concat (intersperse "\n        | " xs)]-        lexComments ([],[]) = []-        lexComments (xs,s1:ys) = ('\"' : s1 ++ "\"" ++-            " (_ # '\\n')*  { token lexbuf } (* Toss single line comments *)") :-            lexComments (xs, ys)-        lexComments (([l1,l2],[r1,r2]):xs,[]) = (concat $-            [-            ('\"':l1:l2:"\" ((u # ['"), -- FIXME quotes or escape?-            (l2:"']) | '"),-            (r1:"' (u # ['"),-            (r2:"']))* ('"),-            (r1:"')+ '"),-            (r2:"' { token lexbuf } \n")-            ]) :-            lexComments (xs, [])-        lexComments ((_:xs),[]) = lexComments (xs,[])-        userTokenRules = [ name ++ " as x { TOK_" ++ token ++ " x }" | (name, _, token) <- userTokens cf]-             +-- | Make OCamlLex rule+-- >>> mkRule "token" [("REGEX1","ACTION1"),("REGEX2","ACTION2"),("...","...")]+-- rule token =+--   parse REGEX1 {ACTION1}+--       | REGEX2 {ACTION2}+--       | ... {...}+--+-- If no regex are given, we dont create a lexer rule:+-- >>> mkRule "empty" []+-- <BLANKLINE>+mkRule :: Doc -> [(Doc,Doc)] -> Doc+mkRule _ [] = empty+mkRule entrypoint (r1:rn) = vcat+    [ "rule" <+> entrypoint <+> "="+    , nest 2 $ hang "parse" 4 $ vcat+        (nest 2 (mkOne r1):map (("|" <+>) . mkOne) rn) ]+  where+    mkOne (regex, action) = regex <+> braces action +-- | Create regex for single line comments+-- >>> mkRegexSingleLineComment "--"+-- "--" (_ # '\n')*+mkRegexSingleLineComment :: String -> Doc+mkRegexSingleLineComment s =+    doubleQuotes (text s) <+> "(_ # '\\n')*"++-- | Create regex for multiline comments+-- >>> mkRegexMultilineComment "<!--" "-->"+-- "<!--" ((u # ['-']) | '-' (u # ['-']) | "--" (u # ['>']))* '-'* "-->"+mkRegexMultilineComment :: String -> String -> Doc+mkRegexMultilineComment b e =+  lit b+  <+> parens ( hsep $ intersperse "|" subregexs ) <> "*"+  <+> lit [head e] <> "*"+  <+> lit e+  where+    lit :: String -> Doc+    lit "" = empty+    lit [c] = quotes (char c)+    lit s = doubleQuotes (text s)+    prefix = map (init &&& last) (drop 1 (inits e))+    subregexs = [ lit ss <+> parens ("u #" <+> brackets (lit [s])) | (ss,s) <- prefix]++-- | Uses the function from above to make a lexer rule from the CF grammar+rules :: CF -> Doc+rules cf = mkRule "token" $+    -- comments+    [ (mkRegexSingleLineComment s, "token lexbuf") | s <- singleLineC ]+    +++    [ (mkRegexMultilineComment b e, "token lexbuf") | (b,e) <- multilineC]+    +++    -- user tokens+    [ (text n , tokenAction (text t)) | (n,_,t) <- userTokens cf]+    +++    -- predefined tokens+    [ ( "l i*", tokenAction "Ident" ) ]+    +++    [ ( "rsyms"+      , "let id = lexeme lexbuf in try Hashtbl.find symbol_table id with Not_found -> failwith (\"internal lexer error: reserved symbol \" ^ id ^ \" not found in hashtable\")" )+      | not (null (symbols cf))]+    +++    -- integers+    [ ( "d+", "let i = lexeme lexbuf in TOK_Integer (int_of_string i)" )+    -- doubles+    , ( "d+ '.' d+ ('e' ('-')? d+)?"+      , "let f = lexeme lexbuf in TOK_Double (float_of_string f)" )+    -- strings+    , ( "'\\\"' ((u # ['\\\"' '\\\\' '\\n']) | ('\\\\' ('\\\"' | '\\\\' | '\\\'' | 'n' | 't')))* '\\\"'"+      , "let s = lexeme lexbuf in TOK_String (unescapeInitTail s)" )+    -- chars+    , ( "'\\'' ((u # ['\\\'' '\\\\']) | ('\\\\' ('\\\\' | '\\\'' | 'n' | 't'))) '\\\''"+      , "let s = lexeme lexbuf in TOK_Char s.[1]")+    -- spaces+    , ( "[' ' '\\t']", "token lexbuf")+    -- new lines+    , ( "'\\n'", "incr_lineno lexbuf; token lexbuf" )+    -- end of file+    , ( "eof", "TOK_EOF" )+    ]+  where+    (multilineC, singleLineC) = comments cf+    tokenAction t = case reservedWords cf of+        [] -> "let l = lexeme lexbuf in TOK_" <> t <>" l"+        _  -> "let l = lexeme lexbuf in try Hashtbl.find resword_table l with Not_found -> TOK_" <> t <+> "l"+ ------------------------------------------------------------------- -- Modified from the inlined version of @RegToAlex@. -------------------------------------------------------------------@@ -200,7 +248,6 @@                         _            -> ""            cons s t  = s ++ t-          new i s   = s           space t s = if null s then t else t ++ " " ++ s  parenth :: [String] -> [String]
src/BNFC/Backend/OCaml/CFtoOCamlPrinter.hs view
@@ -23,9 +23,8 @@  import BNFC.CF import BNFC.Utils-import BNFC.Backend.Haskell.CFtoTemplate import Data.List (intersperse)-import Data.Char(toLower,isDigit)+import Data.Char(toLower) import BNFC.Backend.OCaml.OCamlUtil  -- derive pretty-printer from a BNF grammar. AR 15/2/2002@@ -43,7 +42,7 @@   prologue :: String -> String -> String-prologue name absMod = unlines [+prologue _ absMod = unlines [   "(* pretty-printer generated by the BNF converter *)\n",   "open " ++ absMod,   "open Printf",
src/BNFC/Backend/OCaml/CFtoOCamlShow.hs view
@@ -25,9 +25,8 @@  import BNFC.CF import BNFC.Utils-import BNFC.Backend.Haskell.CFtoTemplate import Data.List (intersperse)-import Data.Char(toLower,isDigit)+import Data.Char(toLower) import BNFC.Backend.OCaml.OCamlUtil  cf2show :: String -> String -> CF -> String@@ -42,7 +41,7 @@   prologue :: String -> String -> String-prologue name absMod = unlines [+prologue _ absMod = unlines [   "(* show functions generated by the BNF converter *)\n",   "open " ++ absMod,   "",@@ -80,9 +79,9 @@   ""   ] -integerRule cf = "let showInt (i:int) : showable = s2s (string_of_int i)"+integerRule _ = "let showInt (i:int) : showable = s2s (string_of_int i)" -doubleRule cf = "let showFloat (f:float) : showable = s2s (string_of_float f)"+doubleRule _ = "let showFloat (f:float) : showable = s2s (string_of_float f)"   identRule cf = ownPrintRule cf (Cat "Ident")@@ -138,9 +137,8 @@  where   mk args (Left InternalCat : items)      = mk args items   mk (arg:args) (Left c : items)  = (showsFun c +++ arg)        : mk args items-  mk args       (Right s : items) = mk args items+  mk args       (Right _ : items) = mk args items   mk _ _ = []-  prt c = showsFun c +++ show (precCat c)  showsFun :: Cat -> String showsFun c = case c of
src/BNFC/Backend/OCaml/CFtoOCamlTemplate.hs view
@@ -26,8 +26,6 @@  import BNFC.CF import Data.Char-import Data.List (delete)-import BNFC.Utils((+++)) import BNFC.Backend.OCaml.OCamlUtil  
src/BNFC/Backend/OCaml/CFtoOCamlTest.hs view
@@ -19,52 +19,75 @@  module BNFC.Backend.OCaml.CFtoOCamlTest where +import Text.PrettyPrint+ import BNFC.CF-import BNFC.Utils import BNFC.Backend.OCaml.OCamlUtil -ocamlTestfile :: String -> String -> String -> String -> String -> CF -> String+-- | OCaml comment+-- >>> comment "I'm a comment"+-- (* I'm a comment *)+comment :: Doc -> Doc+comment d = "(*" <+> d <+> "*)"++-- | OCaml String concatenation+-- >>> "print a" <^> doubleQuotes "abc"+-- print a ^ "abc"+a <^> b = a <+> "^" <+> b++-- | Generate a test program in OCaml+ocamlTestfile :: String -> String -> String -> String -> String -> CF -> Doc ocamlTestfile absM lexM parM printM showM cf =     let-        lexerName = lexM ++ ".token"-        parserName = parM ++ ".p" ++ topTypeC-        printerName = printM ++ ".printTree " ++ printM ++ ".prt" ++ topTypeC-        showFun = "(fun x -> " ++ showM ++ ".show (" ++ showM ++ ".show" ++-                  topTypeC ++ " x))"-        topTypeC = fixTypeUpper (firstEntry cf)-        topType = absM ++ "." ++ fixType (firstEntry cf)-    in unlines [-        "(* automatically generated by the BNF Converter *)",-        "",-        "open Lexing",-        "",-        "let parse (c : in_channel) : " ++ topType ++ " = ",-        "    " ++ parserName +++ lexerName +++ "(Lexing.from_channel c)",-        ";;",-        "",-        "let showTree (t : " ++ topType ++ ") : string = ",-        "    \"[Abstract syntax]\\n\\n\" ^ " ++ showFun +++ "t" ++ " ^ \"\\n\\n\" ^",-        "    \"[Linearized tree]\\n\\n\" ^ " ++ printerName +++ "t" ++ " ^ \"\\n\"",-        ";;",-        "",-        "let main () =",-        "    let channel =",-        "      if Array.length Sys.argv > 1 then",-        "        open_in Sys.argv.(1)",-        "      else",-        "        stdin",-        "    in",-        "    try",-        "        print_string (showTree (parse channel));",-        "        flush stdout",-        "    with BNFC_Util.Parse_error (start_pos, end_pos) ->", -- " ++ parM ++ ".-        "        Printf.printf \"Parse error at %d.%d-%d.%d\\n\"",-        "            start_pos.pos_lnum (start_pos.pos_cnum - start_pos.pos_bol)",-        "            end_pos.pos_lnum (end_pos.pos_cnum - end_pos.pos_bol);",-        ";;",-        "",-        "main ();;",-        ""-        ]+        lexerName = text lexM <> ".token"+        parserName = text parM <> ".p" <> topTypeC+        printerName =+            text printM <> ".printTree " <> text printM <> ".prt" <> topTypeC+        showFun =+            parens ("fun x ->" <+> text showM <> ".show"+                    <+> parens (text showM <> ".show" <> topTypeC <+> "x"))+        topTypeC = text $ fixTypeUpper (firstEntry cf)+        topType = text absM <> "." <> text (fixType (firstEntry cf))+    in vcat+        [ comment "automatically generated by the BNF Converter"+        , ""+        , "open Lexing"+        , ""+        , "let parse (c : in_channel) :" <+> topType <+> "="+        , nest 4 (parserName <+> lexerName <+> "(Lexing.from_channel c)")+        , ";;"+        , ""+        , "let showTree (t : " <> topType <> ") : string ="+        , nest 4 (fsep ( punctuate "^" +            [ doubleQuotes "[Abstract syntax]\\n\\n"+            , showFun <+> "t"+            , doubleQuotes "\\n\\n"+            , doubleQuotes "[Linearized tree]\\n\\n"+            , printerName <+> "t"+            , doubleQuotes "\\n" ] ) )+        , ";;"+        , ""+        , "let main () ="+        , nest 4 $ vcat+            [ "let channel ="+            , nest 4 $ vcat+                [ "if Array.length Sys.argv > 1 then open_in Sys.argv.(1)"+                , "else stdin" ]+            , "in"+            , "try"+            , nest 4 $ vcat+                [ "print_string (showTree (parse channel));"+                , "flush stdout;"+                , "exit 0"]+            , "with BNFC_Util.Parse_error (start_pos, end_pos) ->"+            , nest 4 $ vcat+                [ "Printf.printf \"Parse error at %d.%d-%d.%d\\n\""+                , nest 4 $ vcat+                    [ "start_pos.pos_lnum (start_pos.pos_cnum - start_pos.pos_bol)"+                    , "end_pos.pos_lnum (end_pos.pos_cnum - end_pos.pos_bol);" ]+                , "exit 1" ]]+        , ";;"+        , ""+        , "main ();;" ]  
src/BNFC/Backend/OCaml/CFtoOCamlYacc.hs view
@@ -35,18 +35,10 @@  -- Type declarations -type Rules       = [(NonTerminal,[(Pattern,Action)])] type Pattern     = String type Action      = String type MetaVar     = String --- default naming---tokenName   = "Token"--- -- The main function, that given a CF -- generates a ocamlyacc module. cf2ocamlyacc :: String -> String -> String -> CF -> String@@ -60,7 +52,7 @@   header :: String -> String -> String -> String-header modName absName lexName = unlines+header _ absName _ = unlines          ["/* This ocamlyacc file was machine-generated by the BNF converter */",           "%{",           "open " ++ absName,@@ -104,12 +96,12 @@ specialTokens :: CF -> String specialTokens cf = unlines ("%token TOK_EOF" : map aux (nub $ ["Ident","String","Integer","Double","Char"] ++ map show (literals cf)))     where aux cat = "%token" +++ (case cat of-            "Ident"  -> "<string>"-            "String" -> "<string>"+            "Ident"   -> "<string>"+            "String"  -> "<string>"             "Integer" -> "<int>"-            "Double" -> "<float>"-            "Char"   -> "<char>"-            own -> "<string>"      )+            "Double"  -> "<float>"+            "Char"    -> "<char>"+            _         -> "<string>"      )            +++ "TOK_" ++ cat  @@ -153,7 +145,7 @@     ]     where         mkOne (cat,rules) = constructRule cf rules cat-        prOne (nt,[]) = [] -- nt has only internal use+        prOne (_,[]) = [] -- nt has only internal use         prOne (nt,((p,a):ls)) =           unwords [nt', ":" , p, "{", a, "}", "\n" ++ pr ls] ++ ";\n"          where@@ -188,7 +180,7 @@ -- An action can for example be: Sum $1 $2, that is, construct an AST -- with the constructor Sum applied to the two metavariables $1 and $2. generateAction :: NonTerminal -> Fun -> [MetaVar] -> Action-generateAction nt f ms = (if isCoercion f then "" else f') +++ mkTuple ms+generateAction _ f ms = (if isCoercion f then "" else f') +++ mkTuple ms     where f' = case f of -- ocaml cons is somehow not a standard infix oper, right?                     "(:[])" -> "(fun x -> [x])"                     "(:)" -> "(fun (x,xs) -> x::xs)"
src/BNFC/Backend/Txt2Tag.hs view
@@ -22,7 +22,7 @@ import BNFC.CF import AbsBNF (Reg (..)) import BNFC.Utils-import Data.List (nub,intersperse)+import Data.List (intersperse)  cfToTxt :: String -> CF -> String cfToTxt name cf = unlines [@@ -72,7 +72,7 @@   ]  prtLiterals :: String -> CF -> String-prtLiterals name cf =+prtLiterals _ cf =   unlines $ map stringLit $     filter (`notElem` [Cat "Ident"]) $       literals cf@@ -188,12 +188,6 @@ prt :: String -> String prt s = s -reserved :: String -> String-reserved s = "{\\reserved{" ++ s ++ "}}"--literal :: String -> String-literal s = "{\\literal{" ++ s ++ "}}"- empty :: String empty = "**eps**" @@ -201,7 +195,7 @@ symbol s = s  tabular :: Int -> [[String]] -> String-tabular n xs = unlines [unwords (intersperse "|" (" " : x)) | x <- xs]+tabular _ xs = unlines [unwords (intersperse "|" (" " : x)) | x <- xs]  terminal :: String -> String terminal s = "``" ++ s ++ "``"
src/BNFC/Backend/XML.hs view
@@ -26,7 +26,7 @@ import BNFC.Options hiding (Backend) import BNFC.Backend.Haskell.CFtoTemplate () import BNFC.Backend.Haskell.HsOpts (xmlFile, xmlFileM, absFileM)-import Data.List (intersperse, nub, intercalate)+import Data.List (intersperse, intercalate) import Data.Char(toLower)  type Coding = Bool ---- change to at least three values@@ -41,7 +41,7 @@ -- derive a DTD from a BNF grammar. AR 21/8/2004 cf2DTD :: Coding -> String -> CF -> String cf2DTD typ name cf = unlines [-  tag ("?xml version=\"1.0\" standalone=\"yes\"?"),+  tag "?xml version=\"1.0\" standalone=\"yes\"?",   "<!DOCTYPE " ++ name ++ " [",   elemEmp "Integer",   elemEmp "Double",@@ -103,7 +103,7 @@ -- constructors as tags, no types. -- clumsy DTD, but nice trees. Validation guarantees type correctness -- flag -xml-elemDataNotyp cf (cat,fcs) = unlines [element f [rhsCatNot cf cs] | (f,cs) <- fcs]+elemDataNotyp cf (_,fcs) = unlines [element f [rhsCatNot cf cs] | (f,cs) <- fcs] efunDefNotyp = "elemFun i t x = [replicate (i+i) ' ' ++ tag x]" endtagDefNotyp = "endtag f c = tag (\"/\" ++ f)" @@ -147,7 +147,7 @@   prologue :: Bool -> SharedOptions -> String -> String-prologue b opts absMod = unlines [+prologue b opts _ = unlines [   "module " ++ xmlFileM opts +++ "where\n",   "-- pretty-printer generated by the BNF converter\n",   "import " ++ absFileM opts,@@ -181,7 +181,7 @@ doubleRule cf = showsPrintRule cf "Double" stringRule cf = showsPrintRule cf "Char" ++++ "  prtList i xs = elemTok i \"String\" xs" -showsPrintRule cf t = unlines $ [+showsPrintRule _ t = unlines $ [   "instance XPrint " ++ t ++ " where",   "  prt i x = elemTokS i" +++ "\"" ++ t ++ "\"" +++ "x"   ]@@ -223,7 +223,7 @@ case_fun cat xs = unlines [   "instance XPrint" +++ show cat +++ "where",   "  prt i" +++ "e = case e of",-  unlines $ map (\ ((c,xx),r) ->+  unlines $ map (\ ((c,xx),_) ->     "   " ++ c +++ unwords xx +++ "-> concat $ " +++     "elemFun i \"" ++ show cat ++ "\" \"" ++ c ++ "\"" +++     unwords [": prt (i+1)" +++ x | x <- xx] +++ ":" +++
src/BNFC/CF.hs view
@@ -106,7 +106,7 @@            ) where  import BNFC.Utils (prParenth,(+++))-import Data.List (nub, intersperse, partition, sort, group, intercalate, find)+import Data.List (nub, intersperse, sort, group, intercalate, find) import Data.Char import AbsBNF (Reg()) import ParBNF (pCat)@@ -191,7 +191,7 @@ 	    listView (App "[]" []) = Right [] 	    listView (App "(:)" [e1,e2]) 		| Right es <- listView e2   = Right $ e1:es-	    listView e	= Left e+	    listView x = Left x  -- | Pragmas data Pragma = CommentS  String -- ^ for single line comments@@ -207,7 +207,7 @@  -- | User-defined regular expression tokens tokenPragmas :: CFG f -> [(Cat,Reg)]-tokenPragmas cf = [(Cat name,exp) | TokenReg name _ exp <- pragmasOfCF cf]+tokenPragmas cf = [(Cat name,e) | TokenReg name _ e <- pragmasOfCF cf]  -- | The names of all user-defined tokens tokenNames :: CFG f -> [String]@@ -271,11 +271,11 @@ strToCat s =     case pCat (tokens s) of         Ok c -> cat2cat c-        Bad e -> Cat s -- error $ "Error parsing cat " ++ s ++ " (" ++ e ++ ")"+        Bad _ -> Cat s -- error $ "Error parsing cat " ++ s ++ " (" ++ e ++ ")"                        -- Might be one of the "Internal cat" which are not                        -- really parsable...-  where cat2cat (AbsBNF.IdCat (AbsBNF.Ident s)) =-            case span isDigit (reverse s) of+  where cat2cat (AbsBNF.IdCat (AbsBNF.Ident i)) =+            case span isDigit (reverse i) of                 ([],c') -> Cat (reverse c') 	        (d,c') ->  CoercCat (reverse c') (read (reverse d))         cat2cat (AbsBNF.ListCat c) = ListCat (cat2cat c)@@ -326,21 +326,6 @@   names = reserved ++ allCatsIdNorm cf ++ allFuns cf   allFuns g = [ f | f <- map funRule (rulesOfCF g), not (isNilCons f || isCoercion f)] -{-# DEPRECATED notUniqueFuns "obsolete" #-}-notUniqueFuns :: CF -> [Fun]-notUniqueFuns cf = let xss = group $ sort [ f | f <- map funRule (rulesOfCF cf),-		                                 not (isNilCons f || isCoercion f)]-		    in [ head xs | xs <- xss, length xs > 1]--badInheritence :: CF -> [Cat]-badInheritence cf = concatMap checkGroup (ruleGroups cf)- where-  checkGroup (cat, rs) = if length rs <= 1-                           then []-                           else case lookupRule (show cat) rs of-                             Nothing -> []-                             Just x -> [cat]- -- extract the comment pragmas. commentPragmas :: [Pragma] -> [Pragma] commentPragmas = filter isComment@@ -350,7 +335,7 @@  lookupRule :: Eq f => f -> [Rul f] -> Maybe (Cat, [Either Cat String]) lookupRule f = lookup f . map unRule-  where unRule (Rule f c rhs) = (f,(c,rhs))+  where unRule (Rule f' c rhs) = (f',(c,rhs))  -- | Returns all normal rules that constructs the given Cat. rulesForCat :: CF -> Cat -> [Rule]@@ -578,14 +563,16 @@                                   ++ intercalate ", " (map (show . funRule) rs)   where     seper [] = []-    seper (Right x:xs) = x-    seper (Left x:xs) = seper xs+    seper (Right x:_) = x+    seper (Left _:xs) = seper xs   isEmptyListCat :: CF -> Cat -> Bool isEmptyListCat cf c = elem "[]" $ map funRule $ rulesForCat' cf c -isNonterm = either (const True) (const False)+isNonterm :: Either Cat String -> Bool+isNonterm (Left _) = True+isNonterm (Right _) = False  -- used in Happy to parse lists of form 'C t [C]' in reverse order -- applies only if the [] rule has no terminals@@ -601,10 +588,11 @@                              then tryRev r2 r1                            else isConsFun (funRule r1) && tryRev r1 r2      _ -> False-  tryRev (Rule f _ ts@(x:_:xs)) r = isEmptyNilRule r &&+  tryRev (Rule f _ ts@(x:_:_)) r = isEmptyNilRule r &&                                         isConsFun f && isNonterm x && isNonterm (last ts)   tryRev _ _ = False +isEmptyNilRule :: Rul Fun -> Bool isEmptyNilRule (Rule f _ ts) = isNilFun f && null ts  -- | Returns the precedence of a category symbol.
src/BNFC/GetCF.hs view
@@ -20,23 +20,22 @@  module BNFC.GetCF(parseCF, parseCFP) where -import Control.Monad		( when )-+import qualified AbsBNF as Abs+import ParBNF import BNFC.CF+import BNFC.Options+import BNFC.TypeChecker import BNFC.Utils-import ParBNF++import Control.Monad (liftM)+import Data.Char+import Data.Either (partitionEithers) import Data.List(nub,partition)-import qualified AbsBNF as Abs import Data.Maybe (catMaybes)-import Data.Either (partitionEithers) import ErrM-import Data.Char-import BNFC.TypeChecker-import BNFC.Options-import Data.List (isPrefixOf)  parseCF :: SharedOptions -> Target -> String -> IO CF-parseCF opts t s = parseCFP opts t s >>= return . cfp2cf+parseCF opts t s = liftM cfp2cf (parseCFP opts t s)  parseCFP :: SharedOptions -> Target -> String -> IO CFP parseCFP opts target content = do@@ -47,7 +46,6 @@         Ok ()   -> []       msgs3 = checkTokens cf       msg = msgs1++msgs2 -- ++ msgs3 -- in a future version-      ret = cfp    let reserved = [lang opts | target == TargetJava ] @@ -127,23 +125,24 @@                    foldr (.) id [map (inlineDelim' d) | d <- ds])   where     (ds,ys) = partition isDelim xs-    isDelim (Abs.Delimiters _ _ _ _ _) = True+    isDelim (Abs.Delimiters{}) = True     isDelim _ = False          inlineDelim :: Abs.Def -> Either Cat String ->  [Either Cat String]-    inlineDelim (Abs.Delimiters cat open close separ sz) (Left c)+    inlineDelim (Abs.Delimiters cat open close _ _) (Left c)       | c == ListCat (transCat cat) = [Right open, Left c, Right close]     inlineDelim _ x = [x]          inlineDelim' :: Abs.Def -> RuleP -> RuleP-    inlineDelim' d@(Abs.Delimiters cat _ _ _ _) r@(Rule f c rhs) +    inlineDelim' d@(Abs.Delimiters cat _ _ _ _) r@(Rule f c rhs)       | c == ListCat (transCat cat) = r       | otherwise = Rule f c (concatMap (inlineDelim d) rhs)+    inlineDelim' _ _ = error "Not a delimiters pragma"  -    delimToSep (Abs.Delimiters cat open close (Abs.SepTerm  s) sz) = Abs.Terminator sz cat s-    delimToSep (Abs.Delimiters cat open close (Abs.SepSepar s) sz) = Abs.Separator  sz cat s-    delimToSep (Abs.Delimiters cat open close (Abs.SepNone   ) sz) = Abs.Terminator sz cat ""+    delimToSep (Abs.Delimiters cat _ _ (Abs.SepTerm  s) sz) = Abs.Terminator sz cat s+    delimToSep (Abs.Delimiters cat _ _ (Abs.SepSepar s) sz) = Abs.Separator  sz cat s+    delimToSep (Abs.Delimiters cat _ _ (Abs.SepNone   ) sz) = Abs.Terminator sz cat ""     delimToSep x = x      transDef :: Abs.Def -> [Either Pragma RuleP]@@ -193,19 +192,16 @@   Rule "[]"     as  [Right l,Right r] | optEmpty]  where a = transCat a0        as = ListCat a-       a' = '@':'@':(show a)-       c  = '@':'{':(show a)-       d  = '@':'}':(show a)+       a' = '@':'@':show a+       c  = '@':'{':show a+       d  = '@':'}':show a        -- optionally separated concat. of x and y categories.-       x // y = (Left x :-                 [Right t | Abs.SepSepar t <- [sep]] ++-                 [Left y ])        termin = case sep of                   Abs.SepSepar t -> [Right t]                   Abs.SepTerm  t -> [Right t]                   _ -> []        optFinal = case (sep,size) of-         (Abs.SepSepar t,_) -> True+         (Abs.SepSepar _,_) -> True          (Abs.SepTerm _,Abs.MNonempty) -> True          (Abs.SepNone,Abs.MNonempty) -> True          _ -> False@@ -214,12 +210,6 @@          _ -> False  -separationRules :: Abs.Cat -> Abs.Separation -> Abs.MinimumSize -> [Rule]-separationRules c Abs.SepNone size = terminatorRules size c ""-separationRules c (Abs.SepTerm t) size = terminatorRules size c t-separationRules c (Abs.SepSepar t) size = separatorRules size c t-- separatorRules :: Abs.MinimumSize -> Abs.Cat -> String -> [Rule] separatorRules size c s = if null s then terminatorRules size c s else ifEmpty [   Rule "(:[])" cs [Left c'],@@ -253,10 +243,10 @@  ebnfRules :: Abs.Ident -> [Abs.RHS] -> [Rule] ebnfRules (Abs.Ident c) rhss =-  [Rule (mkFun k c its) (strToCat c) (map transItem its)+  [Rule (mkFun k its) (strToCat c) (map transItem its)      | (k, Abs.RHS its) <- zip [1 :: Int ..] rhss]  where-   mkFun k c i = case i of+   mkFun k i = case i of      [Abs.Terminal s]  -> c' ++ "_" ++ mkName k s      [Abs.NTerminal n] -> c' ++ identCat (transCat n)      _ -> c' ++ "_" ++ show k@@ -350,7 +340,7 @@ -- (2) no other digits are used  checkRule :: CF -> RuleP -> Maybe String-checkRule cf (Rule _ (Cat ('@':_)) rhs) = Nothing -- Generated by a pragma; it's a trusted category+checkRule _ (Rule _ (Cat ('@':_)) _) = Nothing -- Generated by a pragma; it's a trusted category checkRule cf (Rule (f,_) cat rhs)   | badCoercion    = Just $ "Bad coercion in rule" +++ s   | badNil         = Just $ "Bad empty list rule" +++ s
src/BNFC/Options.hs view
@@ -1,19 +1,11 @@ module BNFC.Options where  import BNFC.CF (CF)-import BNFC.WarningM-import Control.Monad (liftM, when,unless)-import Control.Monad.State-import Control.Monad.Trans (lift)-import Data.Char-import Data.List (elemIndex, foldl', sort, intercalate)-import Data.Maybe (catMaybes, listToMaybe, isJust, fromMaybe)+import Data.Maybe (fromMaybe) import Data.Version ( showVersion )-import ErrM import Paths_BNFC ( version ) import System.Console.GetOpt-import System.FilePath (takeBaseName, takeFileName)-import System.IO (stderr, hPutStrLn,hPutStr)+import System.FilePath (takeBaseName) import Text.Printf (printf)  -- ~~~ Option data structures ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -92,6 +84,7 @@             -> CF             -- ^ Grammar             -> IO () +defaultOptions :: SharedOptions defaultOptions = Options   { cnf = False   , target = TargetHaskell@@ -193,14 +186,18 @@     , [TargetHaskell, TargetHaskellGadt, TargetProfile] )   ] ++makefileOption :: [OptDescr (SharedOptions -> SharedOptions)] makefileOption =   [ Option "m" ["makefile"] (OptArg (setMakefile . fromMaybe "Makefile") "MAKEFILE")       "generate Makefile" ]   where setMakefile = \mf -> \o -> o { make = Just mf } +allOptions :: [OptDescr (SharedOptions -> SharedOptions)] allOptions = targetOptions ++ makefileOption ++ map fst specificOptions  -- ~~~ Help strings ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+title :: String title = unlines [   "The BNF Converter, "++showVersion version,   "(c) Jonas Almström Duregård, Krasimir Angelov, Jean-Philippe Bernardy, Björn Bringert, Johan Broberg, Paul Callaghan, ",@@ -220,8 +217,8 @@     :usageInfo "Global options"   globalOptions     :usageInfo "Make option"      makefileOption     :usageInfo "Target languages" targetOptions-    :map targetUsage targets-  where targets = [TargetHaskell, TargetJava, TargetCpp, TargetCSharp ]+    :map targetUsage helpTargets+  where helpTargets = [TargetHaskell, TargetJava, TargetCpp, TargetCSharp ]         targetUsage t = usageInfo                         (printf "Special options for the %s backend" (show t))                         (map fst $ filter(elem t . snd)specificOptions)
src/BNFC/ToCNFCore.hs view
@@ -33,16 +33,12 @@ -}  import BNFC.CF hiding (App,Exp)-import BNFC.Backend.Haskell.HsOpts-import Control.Monad import Control.Monad.RWS import Control.Applicative hiding (Const) import qualified Data.Map as M-import Data.List (nub,intercalate,sortBy,sort)-import Data.Maybe (maybeToList)+import Data.List (nub,sortBy,sort) import Data.Function (on) import Data.Char (isAlphaNum,ord)-import Data.String import Data.Pair import Text.PrettyPrint.HughesPJ hiding (first,(<>)) @@ -120,9 +116,6 @@          : r'   where l = last rhs         p = init rhs-        fun' = case l of-          Left _ -> Con "($)" -- in this case we have to apply the final argument to the partial result-          Right _ -> Con "const" -- in this case the 2nd argument must be ignored (it is not present in the result). toBinRul r = return [r]  prettyRHS = hcat . punctuate " " . map (either (text . show) (quotes . text))@@ -143,7 +136,7 @@   where step curSet = M.unionsWith (∪) (map (f curSet) (rulesOfCF cf))  fixn :: Eq a => Int -> (a -> a) -> a -> Either a a-fixn 0 f x = Left x+fixn 0 _ x = Left x fixn n f x = if x' == x then Right x else fixn (n-1) f x'   where x' = f x @@ -157,13 +150,10 @@ cross (x:xs) = [y:ys | y <- x,  ys <- cross xs]  nullRule :: Nullable -> Rul Exp -> (Cat,[Exp])-nullRule nullset (Rule f c rhs) = (c, map (\xs -> (appMany f xs)) (cross (map nulls rhs)))-    where nulls (Right tok) = []+nullRule nullset (Rule f c rhs) = (c, map (appMany f) (cross (map nulls rhs)))+    where nulls (Right _) = []           nulls (Left cat) = lookupMulti cat nullset -nullable :: Nullable -> Rul Exp -> Bool-nullable s = not . null . snd . nullRule s- nullSet :: CFG Exp -> Nullable nullSet = fixpointOnGrammar "nullable" (\s r -> uncurry M.singleton (nullRule s r)) @@ -175,7 +165,7 @@   [r1,r2] -> [r] ++ [Rule (app'  f x) cat [r2] | x <- lk' r1]                  ++ [Rule (app2 (isCat r1) f x) cat [r1] | x <- lk' r2]   _ -> error $ "Panic:" ++ show r ++ "should have at most two elements."-  where lk' (Right tok) = []+  where lk' (Right _) = []         lk' (Left cat) = lookupMulti cat nullset  @@ -198,7 +188,7 @@                  Right _ -> app' unitRule _ _ = M.empty -isUnitRule (Rule f c [r]) = True+isUnitRule (Rule _ _ [_]) = True isUnitRule _ = False  @@ -207,10 +197,10 @@ type RHSEl = Either Cat String  isOnLeft, isOnRight :: RHSEl -> Rul f -> Bool-isOnLeft c (Rule f _ [c',_]) = c == c'+isOnLeft c (Rule _ _ [c',_]) = c == c' isOnLeft _ _ = False -isOnRight c (Rule f _ [_,c']) = c == c'+isOnRight c (Rule _ _ [_,c']) = c == c' isOnRight _ _ = False  isEntryPoint cf el = either (`elem` allEntryPoints cf) (const False) el@@ -242,10 +232,10 @@ -- Error reporting  -- leftOf C = ⋃ { {X} ∪ leftOf X | C ::= X B ∈ Grammar or C ::= X ∈ Grammar }-leftRight pos s (Rule f c rhs) = M.singleton (show c) (lkCat x s)+leftRight pos s (Rule _ c rhs) = M.singleton (show c) (lkCat x s)   where x = pos rhs -lkCat (Right t) s = [Right t]+lkCat (Right t) _ = [Right t] lkCat (Left c) s = Left c:lookupMulti (show c) s  -- neighbors A B = ∃ A' B'. P ::= A' B' ∧  A ∈ rightOf A'  ∧  B ∈ leftOf B
src/BNFC/TypeChecker.hs view
@@ -92,8 +92,7 @@  checkDefinition :: Context -> String -> [String] -> Exp -> Err () checkDefinition ctx f xs e =-    do	checkDefinition' dummyConstructors ctx f xs e-	return ()+    void $ checkDefinition' dummyConstructors ctx f xs e  data ListConstructors = LC 	{ nil	:: Base -> String@@ -119,8 +118,8 @@ 	plural _ = "s"  checkExp :: ListConstructors -> Context -> Exp -> Base -> Err Exp-checkExp list ctx (App "[]" []) (ListT t) = return (App (nil list t) [])-checkExp _ _	  (App "[]" _) _	  = fail $ "[] is applied to too many arguments."+checkExp list _   (App "[]" []) (ListT t) = return (App (nil list t) [])+checkExp _ _      (App "[]" _) _  = fail $ "[] is applied to too many arguments." checkExp list ctx (App "(:)" [e,es]) (ListT t) =     do	e'  <- checkExp list ctx e t 	es' <- checkExp list ctx es (ListT t)@@ -128,11 +127,11 @@ checkExp _ _ (App "(:)" es) _	= fail $ "(:) takes 2 arguments, but has been given " ++ show (length es) ++ "." checkExp list ctx e@(App x es) t =     do	FunT ts t' <- lookupCtx x ctx-	es' <- matchArgs ctx es ts+	es' <- matchArgs ts 	unless (t == t') $ fail $ show e ++ " has type " ++ show t' ++ ", but something of type " ++ show t ++ " was expected." 	return $ App x es'     where-	matchArgs ctx es ts+	matchArgs ts 	    | expect /= given	= fail $ "'" ++ x ++ "' takes " ++ show expect ++ " arguments, but has been given " ++ show given ++ "." 	    | otherwise		= zipWithM (checkExp list ctx) es ts 	    where
src/BNFC/Utils.hs view
@@ -21,12 +21,14 @@  import Control.DeepSeq (rnf) import Control.Monad (unless)+import Data.Function (on)+import Data.List (groupBy, sort) import System.IO (IOMode(ReadMode),hClose,hGetContents,openFile) import System.IO.Error (tryIOError) import System.Directory (createDirectory, doesDirectoryExist, renameFile,                          removeFile, doesFileExist)- import System.FilePath (pathSeparator)+import Text.PrettyPrint  infixr 5 +++ infixr 5 ++++@@ -34,10 +36,12 @@  -- printing operations +(+++), (++++), (+++++) :: String -> String -> String a +++ b   = a ++ " "    ++ b a ++++ b  = a ++ "\n"   ++ b a +++++ b = a ++ "\n\n" ++ b +prParenth :: String -> String prParenth s = if s == "" then "" else "(" ++ s ++ ")"  -- * List utilities@@ -101,6 +105,7 @@ -- peteg: FIXME this is racey. -- want to be a bit smarter about whether we actually generate the file -- or save it... e.g. ErrM.hs need not be regenerated if it exists.+writeFileRep1 :: FilePath -> String -> IO () writeFileRep1 f s =     do exists <- doesFileExist f        backedUp <- if exists@@ -141,8 +146,23 @@     -- denied (The process cannot access the file because it is being used     -- by another process.)"     readFile' :: FilePath -> IO String-    readFile' path =-        do inFile <- openFile path ReadMode+    readFile' path' =+        do inFile <- openFile path' ReadMode            contents <- hGetContents inFile            rnf contents `seq` hClose inFile 	   return contents++-- | Partition a list of pairs+-- >>> partitionByKey [("a",1), ("b",2), ("a",3), ("b", 4)]+-- [("a",[1,3]),("b",[2,4])]+partitionByKey :: (Ord a, Eq a, Ord b) => [(a,b)] -> [(a,[b])]+partitionByKey = map foo . groupBy ((==) `on` fst) . sort+  where foo l = (fst (head l), map snd l)+++-- | List version of prettyPrint $+$+-- >>> vsep [text "abc", nest 4 (text "def")]+-- abc+--     def+vsep :: [Doc] -> Doc+vsep = foldl ($+$) empty
src/ErrM.hs view
@@ -1,73 +1,20 @@--- File generated by the BNF Converter (bnfc 2.9.5).--{-# LANGUAGE CPP #-}--#if __GLASGOW_HASKELL__ >= 708------------------------------------------------------------------------------- Pattern synonyms exist since ghc 7.8.---- | BNF Converter: Error Monad.------ Module for backwards compatibility.------ The generated parser now uses @'Either' String@ as error monad.--- This module defines a type synonym 'Err' and pattern synonyms--- 'Bad' and 'Ok' for 'Left' and 'Right'.--{-# LANGUAGE PatternSynonyms #-}-{-# LANGUAGE FlexibleInstances #-}--module ErrM where--import Prelude             (id, const, Either(..), String)--import Control.Monad       (MonadPlus(..))-import Control.Applicative (Alternative(..))-#if __GLASGOW_HASKELL__ >= 808-import Control.Monad       (MonadFail(..))-#endif---- | Error monad with 'String' error messages.-type Err = Either String--pattern Bad msg = Left msg-pattern Ok  a   = Right a--#if __GLASGOW_HASKELL__ >= 808-instance MonadFail Err where-  fail = Bad-#endif--instance Alternative Err where-  empty           = Left "Err.empty"-  (<|>) Left{}    = id-  (<|>) x@Right{} = const x--instance MonadPlus Err where-  mzero = empty-  mplus = (<|>)--#else------------------------------------------------------------------------------- ghc 7.6 and before: use old definition as data type.---- | BNF Converter: Error Monad-+-- BNF Converter: Error Monad -- Copyright (C) 2004  Author:  Aarne Ranta--- This file comes with NO WARRANTY and may be used FOR ANY PURPOSE. +-- This file comes with NO WARRANTY and may be used FOR ANY PURPOSE. module ErrM where  -- the Error monad: like Maybe type with error msgs +import Control.Monad (MonadPlus(..), liftM) import Control.Applicative (Applicative(..), Alternative(..))-import Control.Monad       (MonadPlus(..), liftM)  data Err a = Ok a | Bad String   deriving (Read, Show, Eq, Ord)  instance Monad Err where   return      = Ok+  fail        = Bad   Ok a  >>= f = f a   Bad s >>= _ = Bad s @@ -76,6 +23,7 @@   (Bad s) <*> _ = Bad s   (Ok f) <*> o  = liftM f o + instance Functor Err where   fmap = liftM @@ -87,5 +35,3 @@ instance Alternative Err where   empty = mzero   (<|>) = mplus--#endif
src/LexBNF.x view
@@ -1,209 +1,115 @@--- -*- haskell -*- File generated by the BNF Converter (bnfc 2.9.5).---- Lexer definition for use with Alex 3+-- -*- haskell -*-+-- This Alex file was machine-generated by the BNF converter { {-# OPTIONS -fno-warn-incomplete-patterns #-} {-# OPTIONS_GHC -w #-}--{-# LANGUAGE PatternSynonyms #-}- module LexBNF where -import Prelude + import qualified Data.Bits-import Data.Char     (ord)-import Data.Function (on)-import Data.Word     (Word8)+import Data.Word (Word8) } --- Predefined character classes -$c = [A-Z\192-\221] # [\215]  -- capital isolatin1 letter (215 = \times) FIXME-$s = [a-z\222-\255] # [\247]  -- small   isolatin1 letter (247 = \div  ) FIXME-$l = [$c $s]         -- letter-$d = [0-9]           -- digit-$i = [$l $d _ ']     -- identifier character-$u = [. \n]          -- universal: any character---- Symbols and non-identifier-like reserved words+$l = [a-zA-Z\192 - \255] # [\215 \247]    -- isolatin1 letter FIXME+$c = [A-Z\192-\221] # [\215]    -- capital isolatin1 letter FIXME+$s = [a-z\222-\255] # [\247]    -- small isolatin1 letter FIXME+$d = [0-9]                -- digit+$i = [$l $d _ ']          -- identifier character+$u = [\0-\255]          -- universal: any character -@rsyms = \: | \; | \. | \: \: \= | \[ | \] | \_ | \( | \) | \, | \= | \| | \- | \* | \+ | \? | \{ | \}+@rsyms =    -- symbols and non-identifier-like reserved words+   \: | \; | \. | \: \: \= | \[ | \] | \_ | \( | \) | \, | \= | \| | \- | \* | \+ | \? | \{ | \}  :----- Line comment "--"-"--" [.]* ;---- Block comment "{-" "-}"-\{ \- [$u # \-]* \- ([$u # [\- \}]] [$u # \-]* \- | \-)* \} ;+"--" [.]* ; -- Toss single line comments+"{-" ([$u # \-] | \-+ [$u # [\- \}]])* ("-")+ "}" ; --- Whitespace (skipped) $white+ ;---- Symbols-@rsyms-    { tok (eitherResIdent TV) }---- Keywords and Ident-$l $i*-    { tok (eitherResIdent TV) }---- String-\" ([$u # [\" \\ \n]] | (\\ (\" | \\ | \' | n | t | r | f)))* \"-    { tok (TL . unescapeInitTail) }---- Char-\' ($u # [\' \\] | \\ [\\ \' n t r f]) \'-    { tok TC }---- Integer-$d+-    { tok TI }+@rsyms { tok (\p s -> PT p (eitherResIdent (TV . share) s)) } --- Double-$d+ \. $d+ (e (\-)? $d+)?-    { tok TD }+$l $i*   { tok (\p s -> PT p (eitherResIdent (TV . share) s)) }+\" ([$u # [\" \\ \n]] | (\\ (\" | \\ | \' | n | t)))* \"{ tok (\p s -> PT p (TL $ share $ unescapeInitTail s)) }+\' ($u # [\' \\] | \\ [\\ \' n t]) \'  { tok (\p s -> PT p (TC $ share s))  }+$d+      { tok (\p s -> PT p (TI $ share s))    }+$d+ \. $d+ (e (\-)? $d+)? { tok (\p s -> PT p (TD $ share s)) }  {--- | Create a token with position.-tok :: (String -> Tok) -> (Posn -> String -> Token)-tok f p = PT p . f --- | Token without position.-data Tok-  = TK {-# UNPACK #-} !TokSymbol  -- ^ Reserved word or symbol.-  | TL !String                    -- ^ String literal.-  | TI !String                    -- ^ Integer literal.-  | TV !String                    -- ^ Identifier.-  | TD !String                    -- ^ Float literal.-  | TC !String                    -- ^ Character literal.-  deriving (Eq, Show, Ord)---- | Smart constructor for 'Tok' for the sake of backwards compatibility.-pattern TS :: String -> Int -> Tok-pattern TS t i = TK (TokSymbol t i)---- | Keyword or symbol tokens have a unique ID.-data TokSymbol = TokSymbol-  { tsText :: String-      -- ^ Keyword or symbol text.-  , tsID   :: !Int-      -- ^ Unique ID.-  } deriving (Show)+tok :: (Posn -> String -> Token) -> (Posn -> String -> Token)+tok f p s = f p s --- | Keyword/symbol equality is determined by the unique ID.-instance Eq  TokSymbol where (==)    = (==)    `on` tsID+share :: String -> String+share = id --- | Keyword/symbol ordering is determined by the unique ID.-instance Ord TokSymbol where compare = compare `on` tsID+data Tok =+   TS !String !Int    -- reserved words and symbols+ | TL !String         -- string literals+ | TI !String         -- integer literals+ | TV !String         -- identifiers+ | TD !String         -- double precision float literals+ | TC !String         -- character literals --- | Token with position.-data Token-  = PT  Posn Tok-  | Err Posn-  deriving (Eq, Show, Ord)+ deriving (Eq,Show,Ord) --- | Pretty print a position.-printPosn :: Posn -> String-printPosn (Pn _ l c) = "line " ++ show l ++ ", column " ++ show c+data Token =+   PT  Posn Tok+ | Err Posn+  deriving (Eq,Show,Ord) --- | Pretty print the position of the first token in the list. tokenPos :: [Token] -> String-tokenPos (t:_) = printPosn (tokenPosn t)-tokenPos []    = "end of file"+tokenPos (PT (Pn _ l _) _ :_) = "line " ++ show l+tokenPos (Err (Pn _ l _) :_) = "line " ++ show l+tokenPos _ = "end of file" --- | Get the position of a token. tokenPosn :: Token -> Posn tokenPosn (PT p _) = p-tokenPosn (Err p)  = p+tokenPosn (Err p) = p --- | Get line and column of a token. tokenLineCol :: Token -> (Int, Int) tokenLineCol = posLineCol . tokenPosn --- | Get line and column of a position. posLineCol :: Posn -> (Int, Int) posLineCol (Pn _ l c) = (l,c) --- | Convert a token into "position token" form. mkPosToken :: Token -> ((Int, Int), String)-mkPosToken t = (tokenLineCol t, tokenText t)+mkPosToken t@(PT p _) = (posLineCol p, prToken t) --- | Convert a token to its text.-tokenText :: Token -> String-tokenText t = case t of+prToken :: Token -> String+prToken t = case t of   PT _ (TS s _) -> s-  PT _ (TL s)   -> show s+  PT _ (TL s)   -> s   PT _ (TI s)   -> s   PT _ (TV s)   -> s   PT _ (TD s)   -> s   PT _ (TC s)   -> s-  Err _         -> "#error" --- | Convert a token to a string.-prToken :: Token -> String-prToken t = tokenText t --- | Finite map from text to token organized as binary search tree.-data BTree-  = N -- ^ Nil (leaf).-  | B String Tok BTree BTree-      -- ^ Binary node.-  deriving (Show)+data BTree = N | B String Tok BTree BTree deriving (Show) --- | Convert potential keyword into token or use fallback conversion. eitherResIdent :: (String -> Tok) -> String -> Tok eitherResIdent tv s = treeFind resWords   where   treeFind N = tv s-  treeFind (B a t left right) =-    case compare s a of-      LT -> treeFind left-      GT -> treeFind right-      EQ -> t+  treeFind (B a t left right) | s < a  = treeFind left+                              | s > a  = treeFind right+                              | s == a = t --- | The keywords and symbols of the language organized as binary search tree. resWords :: BTree-resWords =-  b "digit" 21-    (b "=" 11-       (b "-" 6-          (b "*" 3 (b ")" 2 (b "(" 1 N N) N) (b "," 5 (b "+" 4 N N) N))-          (b "::=" 9 (b ":" 8 (b "." 7 N N) N) (b ";" 10 N N)))-       (b "char" 16-          (b "]" 14 (b "[" 13 (b "?" 12 N N) N) (b "_" 15 N N))-          (b "define" 19-             (b "comment" 18 (b "coercions" 17 N N) N)-             (b "delimiters" 20 N N))))-    (b "separator" 31-       (b "letter" 26-          (b "internal" 24-             (b "eps" 23 (b "entrypoints" 22 N N) N) (b "layout" 25 N N))-          (b "position" 29-             (b "nonempty" 28 (b "lower" 27 N N) N) (b "rules" 30 N N)))-       (b "upper" 36-          (b "token" 34-             (b "terminator" 33 (b "stop" 32 N N) N) (b "toplevel" 35 N N))-          (b "|" 39 (b "{" 38 (b "views" 37 N N) N) (b "}" 40 N N))))-  where-  b s n = B bs (TS bs n)-    where-    bs = s+resWords = b "digit" 21 (b "=" 11 (b "-" 6 (b "*" 3 (b ")" 2 (b "(" 1 N N) N) (b "," 5 (b "+" 4 N N) N)) (b "::=" 9 (b ":" 8 (b "." 7 N N) N) (b ";" 10 N N))) (b "char" 16 (b "]" 14 (b "[" 13 (b "?" 12 N N) N) (b "_" 15 N N)) (b "define" 19 (b "comment" 18 (b "coercions" 17 N N) N) (b "delimiters" 20 N N)))) (b "separator" 31 (b "letter" 26 (b "internal" 24 (b "eps" 23 (b "entrypoints" 22 N N) N) (b "layout" 25 N N)) (b "position" 29 (b "nonempty" 28 (b "lower" 27 N N) N) (b "rules" 30 N N))) (b "upper" 36 (b "token" 34 (b "terminator" 33 (b "stop" 32 N N) N) (b "toplevel" 35 N N)) (b "|" 39 (b "{" 38 (b "views" 37 N N) N) (b "}" 40 N N))))+   where b s n = let bs = id s+                  in B bs (TS bs n) --- | Unquote string literal. unescapeInitTail :: String -> String-unescapeInitTail = id . unesc . tail . id-  where+unescapeInitTail = id . unesc . tail . id where   unesc s = case s of     '\\':c:cs | elem c ['\"', '\\', '\''] -> c : unesc cs     '\\':'n':cs  -> '\n' : unesc cs     '\\':'t':cs  -> '\t' : unesc cs-    '\\':'r':cs  -> '\r' : unesc cs-    '\\':'f':cs  -> '\f' : unesc cs-    '"':[]       -> []-    c:cs         -> c : unesc cs-    _            -> []+    '"':[]    -> []+    c:cs      -> c : unesc cs+    _         -> []  ------------------------------------------------------------------- -- Alex wrapper code.@@ -211,7 +117,7 @@ -------------------------------------------------------------------  data Posn = Pn !Int !Int !Int-  deriving (Eq, Show, Ord)+      deriving (Eq, Show,Ord)  alexStartPos :: Posn alexStartPos = Pn 0 1 1@@ -242,7 +148,7 @@ alexGetByte :: AlexInput -> Maybe (Byte,AlexInput) alexGetByte (p, c, (b:bs), s) = Just (b, (p, c, bs, s)) alexGetByte (p, _, [], s) =-  case s of+  case  s of     []  -> Nothing     (c:s) ->              let p'     = alexMove p c@@ -255,7 +161,7 @@ -- | Encode a Haskell String to a list of Word8 values, in UTF8 format. utf8Encode :: Char -> [Word8] utf8Encode = map fromIntegral . go . ord-  where+ where   go oc    | oc <= 0x7f       = [oc] 
src/Main.hs view
@@ -28,38 +28,26 @@  module Main where --- import Utils-import BNFC.CF (cfp2cf) import BNFC.Backend.Base hiding (Backend)-import BNFC.Backend.Latex+import BNFC.Backend.C+import BNFC.Backend.CPP.NoSTL+import BNFC.Backend.CPP.STL+import BNFC.Backend.CSharp import BNFC.Backend.Haskell import BNFC.Backend.HaskellGADT import BNFC.Backend.HaskellProfile import BNFC.Backend.Java-import BNFC.Backend.CPP.NoSTL-import BNFC.Backend.CSharp-import BNFC.Backend.CPP.STL-import BNFC.Backend.C+import BNFC.Backend.Latex import BNFC.Backend.OCaml-import BNFC.Backend.XML-import BNFC.Utils import BNFC.GetCF--import BNFC.MultiView (preprocessMCF, mkTestMulti, mkMakefileMulti)+import BNFC.Options hiding (make) -import System.Environment (getEnv,getArgs     )-import System.Exit (exitFailure,exitSuccess)-import System.Cmd (system)-import Data.Char-import Data.List (elemIndex, foldl')-import Control.Monad (when,unless) import Paths_BNFC ( version )-import Data.Version ( showVersion ) -import System.FilePath-import System.IO (stderr, hPutStrLn,hPutStr)-import BNFC.Options hiding (make)-import System.Console.GetOpt+import Data.Version ( showVersion )+import System.Environment (getArgs)+import System.Exit (exitFailure,exitSuccess)+import System.IO (stderr, hPutStrLn)  -- Print an error message and a (short) usage help and exit printUsageErrors :: [String] -> IO ()@@ -88,4 +76,4 @@         make TargetLatex        opts cf = writeFiles "." $ makeLatex opts cf         make TargetJava         opts cf = writeFiles "." $ makeJava opts cf         make TargetOCaml        opts cf = writeFiles "." $ makeOCaml opts cf-        make TargetProfile      opts cf = undefined+        make TargetProfile      opts cf = fail "" opts cf
src/ParBNF.y view
@@ -1,52 +1,10 @@--- -*- haskell -*- File generated by the BNF Converter (bnfc 2.9.5).---- Parser definition for use with Happy+-- This Happy file was machine-generated by the BNF converter { {-# OPTIONS_GHC -fno-warn-incomplete-patterns -fno-warn-overlapping-patterns #-}-{-# LANGUAGE PatternSynonyms #-}--module ParBNF-  ( happyError-  , myLexer-  , pLGrammar-  , pLDef-  , pListLDef-  , pGrammar-  , pListDef-  , pListItem-  , pDef-  , pItem-  , pCat-  , pLabel-  , pLabelId-  , pProfItem-  , pIntList-  , pListInteger-  , pListIntList-  , pListProfItem-  , pSeparation-  , pArg-  , pListArg-  , pExp-  , pExp1-  , pExp2-  , pListExp2-  , pListExp-  , pListString-  , pListRHS-  , pRHS-  , pMinimumSize-  , pReg2-  , pReg1-  , pReg3-  , pReg-  , pListIdent-  ) where--import Prelude--import qualified AbsBNF+module ParBNF where+import AbsBNF import LexBNF+import ErrM  } @@ -83,259 +41,286 @@ %name pReg3 Reg3 %name pReg Reg %name pListIdent ListIdent+ -- no lexer declaration-%monad { Err } { (>>=) } { return }-%tokentype {Token}+%monad { Err } { thenM } { returnM }+%tokentype { Token }+ %token-  '('           { PT _ (TS _ 1)  }-  ')'           { PT _ (TS _ 2)  }-  '*'           { PT _ (TS _ 3)  }-  '+'           { PT _ (TS _ 4)  }-  ','           { PT _ (TS _ 5)  }-  '-'           { PT _ (TS _ 6)  }-  '.'           { PT _ (TS _ 7)  }-  ':'           { PT _ (TS _ 8)  }-  '::='         { PT _ (TS _ 9)  }-  ';'           { PT _ (TS _ 10) }-  '='           { PT _ (TS _ 11) }-  '?'           { PT _ (TS _ 12) }-  '['           { PT _ (TS _ 13) }-  ']'           { PT _ (TS _ 14) }-  '_'           { PT _ (TS _ 15) }-  'char'        { PT _ (TS _ 16) }-  'coercions'   { PT _ (TS _ 17) }-  'comment'     { PT _ (TS _ 18) }-  'define'      { PT _ (TS _ 19) }-  'delimiters'  { PT _ (TS _ 20) }-  'digit'       { PT _ (TS _ 21) }+  '(' { PT _ (TS _ 1) }+  ')' { PT _ (TS _ 2) }+  '*' { PT _ (TS _ 3) }+  '+' { PT _ (TS _ 4) }+  ',' { PT _ (TS _ 5) }+  '-' { PT _ (TS _ 6) }+  '.' { PT _ (TS _ 7) }+  ':' { PT _ (TS _ 8) }+  '::=' { PT _ (TS _ 9) }+  ';' { PT _ (TS _ 10) }+  '=' { PT _ (TS _ 11) }+  '?' { PT _ (TS _ 12) }+  '[' { PT _ (TS _ 13) }+  ']' { PT _ (TS _ 14) }+  '_' { PT _ (TS _ 15) }+  'char' { PT _ (TS _ 16) }+  'coercions' { PT _ (TS _ 17) }+  'comment' { PT _ (TS _ 18) }+  'define' { PT _ (TS _ 19) }+  'delimiters' { PT _ (TS _ 20) }+  'digit' { PT _ (TS _ 21) }   'entrypoints' { PT _ (TS _ 22) }-  'eps'         { PT _ (TS _ 23) }-  'internal'    { PT _ (TS _ 24) }-  'layout'      { PT _ (TS _ 25) }-  'letter'      { PT _ (TS _ 26) }-  'lower'       { PT _ (TS _ 27) }-  'nonempty'    { PT _ (TS _ 28) }-  'position'    { PT _ (TS _ 29) }-  'rules'       { PT _ (TS _ 30) }-  'separator'   { PT _ (TS _ 31) }-  'stop'        { PT _ (TS _ 32) }-  'terminator'  { PT _ (TS _ 33) }-  'token'       { PT _ (TS _ 34) }-  'toplevel'    { PT _ (TS _ 35) }-  'upper'       { PT _ (TS _ 36) }-  'views'       { PT _ (TS _ 37) }-  '{'           { PT _ (TS _ 38) }-  '|'           { PT _ (TS _ 39) }-  '}'           { PT _ (TS _ 40) }-  L_Ident       { PT _ (TV $$)   }-  L_charac      { PT _ (TC $$)   }-  L_doubl       { PT _ (TD $$)   }-  L_integ       { PT _ (TI $$)   }-  L_quoted      { PT _ (TL $$)   }+  'eps' { PT _ (TS _ 23) }+  'internal' { PT _ (TS _ 24) }+  'layout' { PT _ (TS _ 25) }+  'letter' { PT _ (TS _ 26) }+  'lower' { PT _ (TS _ 27) }+  'nonempty' { PT _ (TS _ 28) }+  'position' { PT _ (TS _ 29) }+  'rules' { PT _ (TS _ 30) }+  'separator' { PT _ (TS _ 31) }+  'stop' { PT _ (TS _ 32) }+  'terminator' { PT _ (TS _ 33) }+  'token' { PT _ (TS _ 34) }+  'toplevel' { PT _ (TS _ 35) }+  'upper' { PT _ (TS _ 36) }+  'views' { PT _ (TS _ 37) }+  '{' { PT _ (TS _ 38) }+  '|' { PT _ (TS _ 39) }+  '}' { PT _ (TS _ 40) } -%%+L_quoted { PT _ (TL $$) }+L_ident  { PT _ (TV $$) }+L_integ  { PT _ (TI $$) }+L_charac { PT _ (TC $$) }+L_doubl  { PT _ (TD $$) } -Ident :: { AbsBNF.Ident }-Ident  : L_Ident { AbsBNF.Ident $1 } -Char    :: { Char }-Char     : L_charac { (read $1) :: Char }+%% -Double  :: { Double }-Double   : L_doubl  { (read $1) :: Double }+String  :: { String }  : L_quoted {  $1 }+Ident   :: { Ident }   : L_ident  { Ident $1 }+Integer :: { Integer } : L_integ  { (read ( $1)) :: Integer }+Char    :: { Char }    : L_charac { (read ( $1)) :: Char }+Double  :: { Double }  : L_doubl  { (read ( $1)) :: Double } -Integer :: { Integer }-Integer  : L_integ  { (read $1) :: Integer }+LGrammar :: { LGrammar }+LGrammar : ListLDef { LGr $1 }  -String  :: { String }-String   : L_quoted { $1 } -LGrammar :: { AbsBNF.LGrammar }-LGrammar : ListLDef { AbsBNF.LGr $1 }+LDef :: { LDef }+LDef : Def { DefAll $1 } +  | ListIdent ':' Def { DefSome $1 $3 }+  | 'views' ListIdent { LDefView $2 } -LDef :: { AbsBNF.LDef }-LDef-  : Def { AbsBNF.DefAll $1 }-  | ListIdent ':' Def { AbsBNF.DefSome $1 $3 }-  | 'views' ListIdent { AbsBNF.LDefView $2 } -ListLDef :: { [AbsBNF.LDef] }-ListLDef-  : {- empty -} { [] }+ListLDef :: { [LDef] }+ListLDef : {- empty -} { [] }    | LDef { (:[]) $1 }   | LDef ';' ListLDef { (:) $1 $3 } -Grammar :: { AbsBNF.Grammar }-Grammar : ListDef { AbsBNF.Grammar $1 } -ListDef :: { [AbsBNF.Def] }-ListDef-  : {- empty -} { [] }+Grammar :: { Grammar }+Grammar : ListDef { Grammar $1 } +++ListDef :: { [Def] }+ListDef : {- empty -} { [] }    | Def { (:[]) $1 }   | Def ';' ListDef { (:) $1 $3 } -ListItem :: { [AbsBNF.Item] }-ListItem : {- empty -} { [] } | Item ListItem { (:) $1 $2 } -Def :: { AbsBNF.Def }-Def-  : Label '.' Cat '::=' ListItem { AbsBNF.Rule $1 $3 $5 }-  | 'comment' String { AbsBNF.Comment $2 }-  | 'comment' String String { AbsBNF.Comments $2 $3 }-  | 'internal' Label '.' Cat '::=' ListItem { AbsBNF.Internal $2 $4 $6 }-  | 'token' Ident Reg { AbsBNF.Token $2 $3 }-  | 'position' 'token' Ident Reg { AbsBNF.PosToken $3 $4 }-  | 'entrypoints' ListIdent { AbsBNF.Entryp $2 }-  | 'separator' MinimumSize Cat String { AbsBNF.Separator $2 $3 $4 }-  | 'terminator' MinimumSize Cat String { AbsBNF.Terminator $2 $3 $4 }-  | 'delimiters' Cat String String Separation MinimumSize { AbsBNF.Delimiters $2 $3 $4 $5 $6 }-  | 'coercions' Ident Integer { AbsBNF.Coercions $2 $3 }-  | 'rules' Ident '::=' ListRHS { AbsBNF.Rules $2 $4 }-  | 'define' Ident ListArg '=' Exp { AbsBNF.Function $2 $3 $5 }-  | 'layout' ListString { AbsBNF.Layout $2 }-  | 'layout' 'stop' ListString { AbsBNF.LayoutStop $3 }-  | 'layout' 'toplevel' { AbsBNF.LayoutTop }+ListItem :: { [Item] }+ListItem : {- empty -} { [] } +  | ListItem Item { flip (:) $1 $2 } -Item :: { AbsBNF.Item }-Item : String { AbsBNF.Terminal $1 } | Cat { AbsBNF.NTerminal $1 } -Cat :: { AbsBNF.Cat }-Cat : '[' Cat ']' { AbsBNF.ListCat $2 } | Ident { AbsBNF.IdCat $1 }+Def :: { Def }+Def : Label '.' Cat '::=' ListItem { Rule $1 $3 (reverse $5) } +  | 'comment' String { Comment $2 }+  | 'comment' String String { Comments $2 $3 }+  | 'internal' Label '.' Cat '::=' ListItem { Internal $2 $4 (reverse $6) }+  | 'token' Ident Reg { Token $2 $3 }+  | 'position' 'token' Ident Reg { PosToken $3 $4 }+  | 'entrypoints' ListIdent { Entryp $2 }+  | 'separator' MinimumSize Cat String { Separator $2 $3 $4 }+  | 'terminator' MinimumSize Cat String { Terminator $2 $3 $4 }+  | 'delimiters' Cat String String Separation MinimumSize { Delimiters $2 $3 $4 $5 $6 }+  | 'coercions' Ident Integer { Coercions $2 $3 }+  | 'rules' Ident '::=' ListRHS { Rules $2 $4 }+  | 'define' Ident ListArg '=' Exp { Function $2 (reverse $3) $5 }+  | 'layout' ListString { Layout $2 }+  | 'layout' 'stop' ListString { LayoutStop $3 }+  | 'layout' 'toplevel' { LayoutTop } -Label :: { AbsBNF.Label }-Label-  : LabelId { AbsBNF.LabNoP $1 }-  | LabelId ListProfItem { AbsBNF.LabP $1 $2 }-  | LabelId LabelId ListProfItem { AbsBNF.LabPF $1 $2 $3 }-  | LabelId LabelId { AbsBNF.LabF $1 $2 } -LabelId :: { AbsBNF.LabelId }-LabelId-  : Ident { AbsBNF.Id $1 }-  | '_' { AbsBNF.Wild }-  | '[' ']' { AbsBNF.ListE }-  | '(' ':' ')' { AbsBNF.ListCons }-  | '(' ':' '[' ']' ')' { AbsBNF.ListOne }+Item :: { Item }+Item : String { Terminal $1 } +  | Cat { NTerminal $1 } -ProfItem :: { AbsBNF.ProfItem }-ProfItem-  : '(' '[' ListIntList ']' ',' '[' ListInteger ']' ')' { AbsBNF.ProfIt $3 $7 } -IntList :: { AbsBNF.IntList }-IntList : '[' ListInteger ']' { AbsBNF.Ints $2 }+Cat :: { Cat }+Cat : '[' Cat ']' { ListCat $2 } +  | Ident { IdCat $1 } ++Label :: { Label }+Label : LabelId { LabNoP $1 } +  | LabelId ListProfItem { LabP $1 $2 }+  | LabelId LabelId ListProfItem { LabPF $1 $2 $3 }+  | LabelId LabelId { LabF $1 $2 }+++LabelId :: { LabelId }+LabelId : Ident { Id $1 } +  | '_' { Wild }+  | '[' ']' { ListE }+  | '(' ':' ')' { ListCons }+  | '(' ':' '[' ']' ')' { ListOne }+++ProfItem :: { ProfItem }+ProfItem : '(' '[' ListIntList ']' ',' '[' ListInteger ']' ')' { ProfIt $3 $7 } +++IntList :: { IntList }+IntList : '[' ListInteger ']' { Ints $2 } ++ ListInteger :: { [Integer] }-ListInteger-  : {- empty -} { [] }+ListInteger : {- empty -} { [] }    | Integer { (:[]) $1 }   | Integer ',' ListInteger { (:) $1 $3 } -ListIntList :: { [AbsBNF.IntList] }-ListIntList-  : {- empty -} { [] }++ListIntList :: { [IntList] }+ListIntList : {- empty -} { [] }    | IntList { (:[]) $1 }   | IntList ',' ListIntList { (:) $1 $3 } -ListProfItem :: { [AbsBNF.ProfItem] }-ListProfItem-  : ProfItem { (:[]) $1 } | ProfItem ListProfItem { (:) $1 $2 } -Separation :: { AbsBNF.Separation }-Separation-  : {- empty -} { AbsBNF.SepNone }-  | 'terminator' String { AbsBNF.SepTerm $2 }-  | 'separator' String { AbsBNF.SepSepar $2 }+ListProfItem :: { [ProfItem] }+ListProfItem : ProfItem { (:[]) $1 } +  | ProfItem ListProfItem { (:) $1 $2 } -Arg :: { AbsBNF.Arg }-Arg : Ident { AbsBNF.Arg $1 } -ListArg :: { [AbsBNF.Arg] }-ListArg : {- empty -} { [] } | Arg ListArg { (:) $1 $2 }+Separation :: { Separation }+Separation : {- empty -} { SepNone } +  | 'terminator' String { SepTerm $2 }+  | 'separator' String { SepSepar $2 } -Exp :: { AbsBNF.Exp }-Exp : Exp1 ':' Exp { AbsBNF.Cons $1 $3 } | Exp1 { $1 } -Exp1 :: { AbsBNF.Exp }-Exp1 : Ident ListExp2 { AbsBNF.App $1 $2 } | Exp2 { $1 }+Arg :: { Arg }+Arg : Ident { Arg $1 }  -Exp2 :: { AbsBNF.Exp }-Exp2-  : Ident { AbsBNF.Var $1 }-  | Integer { AbsBNF.LitInt $1 }-  | Char { AbsBNF.LitChar $1 }-  | String { AbsBNF.LitString $1 }-  | Double { AbsBNF.LitDouble $1 }-  | '[' ListExp ']' { AbsBNF.List $2 }++ListArg :: { [Arg] }+ListArg : {- empty -} { [] } +  | ListArg Arg { flip (:) $1 $2 }+++Exp :: { Exp }+Exp : Exp1 ':' Exp { Cons $1 $3 } +  | Exp1 { $1 }+++Exp1 :: { Exp }+Exp1 : Ident ListExp2 { App $1 $2 } +  | Exp2 { $1 }+++Exp2 :: { Exp }+Exp2 : Ident { Var $1 } +  | Integer { LitInt $1 }+  | Char { LitChar $1 }+  | String { LitString $1 }+  | Double { LitDouble $1 }+  | '[' ListExp ']' { List $2 }   | '(' Exp ')' { $2 } -ListExp2 :: { [AbsBNF.Exp] }-ListExp2 : Exp2 { (:[]) $1 } | Exp2 ListExp2 { (:) $1 $2 } -ListExp :: { [AbsBNF.Exp] }-ListExp-  : {- empty -} { [] }+ListExp2 :: { [Exp] }+ListExp2 : Exp2 { (:[]) $1 } +  | Exp2 ListExp2 { (:) $1 $2 }+++ListExp :: { [Exp] }+ListExp : {- empty -} { [] }    | Exp { (:[]) $1 }   | Exp ',' ListExp { (:) $1 $3 } + ListString :: { [String] }-ListString-  : String { (:[]) $1 } | String ',' ListString { (:) $1 $3 }+ListString : String { (:[]) $1 } +  | String ',' ListString { (:) $1 $3 } -ListRHS :: { [AbsBNF.RHS] }-ListRHS : RHS { (:[]) $1 } | RHS '|' ListRHS { (:) $1 $3 } -RHS :: { AbsBNF.RHS }-RHS : ListItem { AbsBNF.RHS $1 }+ListRHS :: { [RHS] }+ListRHS : RHS { (:[]) $1 } +  | RHS '|' ListRHS { (:) $1 $3 } -MinimumSize :: { AbsBNF.MinimumSize }-MinimumSize-  : 'nonempty' { AbsBNF.MNonempty } | {- empty -} { AbsBNF.MEmpty } -Reg2 :: { AbsBNF.Reg }-Reg2 : Reg2 Reg3 { AbsBNF.RSeq $1 $2 } | Reg3 { $1 }+RHS :: { RHS }+RHS : ListItem { RHS (reverse $1) }  -Reg1 :: { AbsBNF.Reg }-Reg1-  : Reg1 '|' Reg2 { AbsBNF.RAlt $1 $3 }-  | Reg2 '-' Reg2 { AbsBNF.RMinus $1 $3 }++MinimumSize :: { MinimumSize }+MinimumSize : 'nonempty' { MNonempty } +  | {- empty -} { MEmpty }+++Reg2 :: { Reg }+Reg2 : Reg2 Reg3 { RSeq $1 $2 } +  | Reg3 { $1 }+++Reg1 :: { Reg }+Reg1 : Reg1 '|' Reg2 { RAlt $1 $3 } +  | Reg2 '-' Reg2 { RMinus $1 $3 }   | Reg2 { $1 } -Reg3 :: { AbsBNF.Reg }-Reg3-  : Reg3 '*' { AbsBNF.RStar $1 }-  | Reg3 '+' { AbsBNF.RPlus $1 }-  | Reg3 '?' { AbsBNF.ROpt $1 }-  | 'eps' { AbsBNF.REps }-  | Char { AbsBNF.RChar $1 }-  | '[' String ']' { AbsBNF.RAlts $2 }-  | '{' String '}' { AbsBNF.RSeqs $2 }-  | 'digit' { AbsBNF.RDigit }-  | 'letter' { AbsBNF.RLetter }-  | 'upper' { AbsBNF.RUpper }-  | 'lower' { AbsBNF.RLower }-  | 'char' { AbsBNF.RAny }++Reg3 :: { Reg }+Reg3 : Reg3 '*' { RStar $1 } +  | Reg3 '+' { RPlus $1 }+  | Reg3 '?' { ROpt $1 }+  | 'eps' { REps }+  | Char { RChar $1 }+  | '[' String ']' { RAlts $2 }+  | '{' String '}' { RSeqs $2 }+  | 'digit' { RDigit }+  | 'letter' { RLetter }+  | 'upper' { RUpper }+  | 'lower' { RLower }+  | 'char' { RAny }   | '(' Reg ')' { $2 } -Reg :: { AbsBNF.Reg }-Reg : Reg1 { $1 } -ListIdent :: { [AbsBNF.Ident] }-ListIdent : Ident { (:[]) $1 } | Ident ',' ListIdent { (:) $1 $3 }+Reg :: { Reg }+Reg : Reg1 { $1 }  ++ListIdent :: { [Ident] }+ListIdent : Ident { (:[]) $1 } +  | Ident ',' ListIdent { (:) $1 $3 }+++ { -type Err = Either String+returnM :: a -> Err a+returnM = return +thenM :: Err a -> (a -> Err b) -> Err b+thenM = (>>=)+ happyError :: [Token] -> Err a-happyError ts = Left $-  "syntax error at " ++ tokenPos ts +++happyError ts =+  Bad $ "syntax error at " ++ tokenPos ts ++    case ts of-    []      -> []+    [] -> []     [Err _] -> " due to lexer error"-    t:_     -> " before `" ++ (prToken t) ++ "'"+    _ -> " before " ++ unwords (map (id . prToken) (take 4 ts)) -myLexer :: String -> [Token] myLexer = tokens- } 
src/PrintBNF.hs view
@@ -1,29 +1,13 @@--- File generated by the BNF Converter (bnfc 2.9.5).--{-# LANGUAGE CPP #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE LambdaCase #-}-#if __GLASGOW_HASKELL__ <= 708-{-# LANGUAGE OverlappingInstances #-}-#endif---- | Pretty-printer for PrintBNF.-+{-# OPTIONS_GHC -fno-warn-incomplete-patterns #-} module PrintBNF where -import Prelude-  ( ($), (.)-  , Bool(..), (==), (<)-  , Int, Integer, Double, (+), (-), (*)-  , String, (++)-  , ShowS, showChar, showString-  , all, elem, foldr, id, map, null, replicate, shows, span-  )-import Data.Char ( Char, isSpace )-import qualified AbsBNF+-- pretty-printer generated by the BNF converter --- | The top-level printing method.+import AbsBNF+import Data.Char ++-- the top-level printing method printTree :: Print a => a -> String printTree = render . prt 0 @@ -33,63 +17,21 @@ doc = (:)  render :: Doc -> String-render d = rend 0 False (map ($ "") $ d []) ""-  where-  rend-    :: Int        -- ^ Indentation level.-    -> Bool       -- ^ Pending indentation to be output before next character?-    -> [String]-    -> ShowS-  rend i p = \case-      "["      :ts -> char '[' . rend i False ts-      "("      :ts -> char '(' . rend i False ts-      "{"      :ts -> onNewLine i     p . showChar   '{'  . new (i+1) ts-      "}" : ";":ts -> onNewLine (i-1) p . showString "};" . new (i-1) ts-      "}"      :ts -> onNewLine (i-1) p . showChar   '}'  . new (i-1) ts-      [";"]        -> char ';'-      ";"      :ts -> char ';' . new i ts-      t  : ts@(s:_) | closingOrPunctuation s-                   -> pending . showString t . rend i False ts-      t        :ts -> pending . space t      . rend i False ts-      []           -> id-    where-    -- Output character after pending indentation.-    char :: Char -> ShowS-    char c = pending . showChar c--    -- Output pending indentation.-    pending :: ShowS-    pending = if p then indent i else id--  -- Indentation (spaces) for given indentation level.-  indent :: Int -> ShowS-  indent i = replicateS (2*i) (showChar ' ')--  -- Continue rendering in new line with new indentation.-  new :: Int -> [String] -> ShowS-  new j ts = showChar '\n' . rend j True ts--  -- Make sure we are on a fresh line.-  onNewLine :: Int -> Bool -> ShowS-  onNewLine i p = (if p then id else showChar '\n') . indent i--  -- Separate given string from following text by a space (if needed).-  space :: String -> ShowS-  space t s =-    case (all isSpace t, null spc, null rest) of-      (True , _   , True ) -> []             -- remove trailing space-      (False, _   , True ) -> t              -- remove trailing space-      (False, True, False) -> t ++ ' ' : s   -- add space if none-      _                    -> t ++ s-    where-      (spc, rest) = span isSpace s--  closingOrPunctuation :: String -> Bool-  closingOrPunctuation [c] = c `elem` closerOrPunct-  closingOrPunctuation _   = False--  closerOrPunct :: String-  closerOrPunct = ")],;"+render d = rend 0 (map ($ "") $ d []) "" where+  rend i ss = case ss of+    "["      :ts -> showChar '[' . rend i ts+    "("      :ts -> showChar '(' . rend i ts+    "{"      :ts -> showChar '{' . new (i+1) . rend (i+1) ts+    "}" : ";":ts -> new (i-1) . space "}" . showChar ';' . new (i-1) . rend (i-1) ts+    "}"      :ts -> new (i-1) . showChar '}' . new (i-1) . rend (i-1) ts+    ";"      :ts -> showChar ';' . new i . rend i ts+    t  : "," :ts -> showString t . space "," . rend i ts+    t  : ")" :ts -> showString t . showChar ')' . rend i ts+    t  : "]" :ts -> showString t . showChar ']' . rend i ts+    t        :ts -> space t . rend i ts+    _            -> id+  new i   = showChar '\n' . replicateS (2*i) (showChar ' ') . dropWhile isSpace+  space t = showString t . (\s -> if null s then "" else (' ':s))  parenth :: Doc -> Doc parenth ss = doc (showChar '(') . ss . doc (showChar ')')@@ -103,207 +45,209 @@ replicateS :: Int -> ShowS -> ShowS replicateS n f = concatS (replicate n f) --- | The printer class does the job.-+-- the printer class does the job class Print a where   prt :: Int -> a -> Doc+  prtList :: [a] -> Doc+  prtList = concatD . map (prt 0) -instance {-# OVERLAPPABLE #-} Print a => Print [a] where-  prt i = concatD . map (prt i)+instance Print a => Print [a] where+  prt _ = prtList  instance Print Char where-  prt _ c = doc (showChar '\'' . mkEsc '\'' c . showChar '\'')--instance Print String where-  prt _ = printString--printString :: String -> Doc-printString s = doc (showChar '"' . concatS (map (mkEsc '"') s) . showChar '"')+  prt _ s = doc (showChar '\'' . mkEsc '\'' s . showChar '\'')+  prtList s = doc (showChar '"' . concatS (map (mkEsc '"') s) . showChar '"')  mkEsc :: Char -> Char -> ShowS-mkEsc q = \case-  s | s == q -> showChar '\\' . showChar s-  '\\' -> showString "\\\\"+mkEsc q s = case s of+  _ | s == q -> showChar '\\' . showChar s+  '\\'-> showString "\\\\"   '\n' -> showString "\\n"   '\t' -> showString "\\t"-  s -> showChar s+  _ -> showChar s  prPrec :: Int -> Int -> Doc -> Doc-prPrec i j = if j < i then parenth else id+prPrec i j = if j<i then parenth else id + instance Print Integer where   prt _ x = doc (shows x)+  prtList es = case es of+   [] -> (concatD [])+   [x] -> (concatD [prt 0 x])+   x:xs -> (concatD [prt 0 x , doc (showString ",") , prt 0 xs]) + instance Print Double where   prt _ x = doc (shows x) -instance Print AbsBNF.Ident where-  prt _ (AbsBNF.Ident i) = doc $ showString i-instance Print AbsBNF.LGrammar where-  prt i = \case-    AbsBNF.LGr ldefs -> prPrec i 0 (concatD [prt 0 ldefs]) -instance Print AbsBNF.LDef where-  prt i = \case-    AbsBNF.DefAll def -> prPrec i 0 (concatD [prt 0 def])-    AbsBNF.DefSome ids def -> prPrec i 0 (concatD [prt 0 ids, doc (showString ":"), prt 0 def])-    AbsBNF.LDefView ids -> prPrec i 0 (concatD [doc (showString "views"), prt 0 ids])+instance Print Ident where+  prt _ (Ident i) = doc (showString ( i))+  prtList es = case es of+   [x] -> (concatD [prt 0 x])+   x:xs -> (concatD [prt 0 x , doc (showString ",") , prt 0 xs]) -instance Print [AbsBNF.LDef] where-  prt _ [] = concatD []-  prt _ [x] = concatD [prt 0 x]-  prt _ (x:xs) = concatD [prt 0 x, doc (showString ";"), prt 0 xs] -instance Print AbsBNF.Grammar where-  prt i = \case-    AbsBNF.Grammar defs -> prPrec i 0 (concatD [prt 0 defs]) -instance Print [AbsBNF.Def] where-  prt _ [] = concatD []-  prt _ [x] = concatD [prt 0 x]-  prt _ (x:xs) = concatD [prt 0 x, doc (showString ";"), prt 0 xs]+instance Print LGrammar where+  prt i e = case e of+   LGr ldefs -> prPrec i 0 (concatD [prt 0 ldefs]) -instance Print [AbsBNF.Item] where-  prt _ [] = concatD []-  prt _ (x:xs) = concatD [prt 0 x, prt 0 xs] -instance Print AbsBNF.Def where-  prt i = \case-    AbsBNF.Rule label cat items -> prPrec i 0 (concatD [prt 0 label, doc (showString "."), prt 0 cat, doc (showString "::="), prt 0 items])-    AbsBNF.Comment str -> prPrec i 0 (concatD [doc (showString "comment"), printString str])-    AbsBNF.Comments str1 str2 -> prPrec i 0 (concatD [doc (showString "comment"), printString str1, printString str2])-    AbsBNF.Internal label cat items -> prPrec i 0 (concatD [doc (showString "internal"), prt 0 label, doc (showString "."), prt 0 cat, doc (showString "::="), prt 0 items])-    AbsBNF.Token id_ reg -> prPrec i 0 (concatD [doc (showString "token"), prt 0 id_, prt 0 reg])-    AbsBNF.PosToken id_ reg -> prPrec i 0 (concatD [doc (showString "position"), doc (showString "token"), prt 0 id_, prt 0 reg])-    AbsBNF.Entryp ids -> prPrec i 0 (concatD [doc (showString "entrypoints"), prt 0 ids])-    AbsBNF.Separator minimumsize cat str -> prPrec i 0 (concatD [doc (showString "separator"), prt 0 minimumsize, prt 0 cat, printString str])-    AbsBNF.Terminator minimumsize cat str -> prPrec i 0 (concatD [doc (showString "terminator"), prt 0 minimumsize, prt 0 cat, printString str])-    AbsBNF.Delimiters cat str1 str2 separation minimumsize -> prPrec i 0 (concatD [doc (showString "delimiters"), prt 0 cat, printString str1, printString str2, prt 0 separation, prt 0 minimumsize])-    AbsBNF.Coercions id_ n -> prPrec i 0 (concatD [doc (showString "coercions"), prt 0 id_, prt 0 n])-    AbsBNF.Rules id_ rhss -> prPrec i 0 (concatD [doc (showString "rules"), prt 0 id_, doc (showString "::="), prt 0 rhss])-    AbsBNF.Function id_ args exp -> prPrec i 0 (concatD [doc (showString "define"), prt 0 id_, prt 0 args, doc (showString "="), prt 0 exp])-    AbsBNF.Layout strs -> prPrec i 0 (concatD [doc (showString "layout"), prt 0 strs])-    AbsBNF.LayoutStop strs -> prPrec i 0 (concatD [doc (showString "layout"), doc (showString "stop"), prt 0 strs])-    AbsBNF.LayoutTop -> prPrec i 0 (concatD [doc (showString "layout"), doc (showString "toplevel")])+instance Print LDef where+  prt i e = case e of+   DefAll def -> prPrec i 0 (concatD [prt 0 def])+   DefSome ids def -> prPrec i 0 (concatD [prt 0 ids , doc (showString ":") , prt 0 def])+   LDefView ids -> prPrec i 0 (concatD [doc (showString "views") , prt 0 ids]) -instance Print AbsBNF.Item where-  prt i = \case-    AbsBNF.Terminal str -> prPrec i 0 (concatD [printString str])-    AbsBNF.NTerminal cat -> prPrec i 0 (concatD [prt 0 cat])+  prtList es = case es of+   [] -> (concatD [])+   [x] -> (concatD [prt 0 x])+   x:xs -> (concatD [prt 0 x , doc (showString ";") , prt 0 xs]) -instance Print AbsBNF.Cat where-  prt i = \case-    AbsBNF.ListCat cat -> prPrec i 0 (concatD [doc (showString "["), prt 0 cat, doc (showString "]")])-    AbsBNF.IdCat id_ -> prPrec i 0 (concatD [prt 0 id_])+instance Print Grammar where+  prt i e = case e of+   Grammar defs -> prPrec i 0 (concatD [prt 0 defs]) -instance Print AbsBNF.Label where-  prt i = \case-    AbsBNF.LabNoP labelid -> prPrec i 0 (concatD [prt 0 labelid])-    AbsBNF.LabP labelid profitems -> prPrec i 0 (concatD [prt 0 labelid, prt 0 profitems])-    AbsBNF.LabPF labelid1 labelid2 profitems -> prPrec i 0 (concatD [prt 0 labelid1, prt 0 labelid2, prt 0 profitems])-    AbsBNF.LabF labelid1 labelid2 -> prPrec i 0 (concatD [prt 0 labelid1, prt 0 labelid2]) -instance Print AbsBNF.LabelId where-  prt i = \case-    AbsBNF.Id id_ -> prPrec i 0 (concatD [prt 0 id_])-    AbsBNF.Wild -> prPrec i 0 (concatD [doc (showString "_")])-    AbsBNF.ListE -> prPrec i 0 (concatD [doc (showString "["), doc (showString "]")])-    AbsBNF.ListCons -> prPrec i 0 (concatD [doc (showString "("), doc (showString ":"), doc (showString ")")])-    AbsBNF.ListOne -> prPrec i 0 (concatD [doc (showString "("), doc (showString ":"), doc (showString "["), doc (showString "]"), doc (showString ")")])+instance Print Def where+  prt i e = case e of+   Rule label cat items -> prPrec i 0 (concatD [prt 0 label , doc (showString ".") , prt 0 cat , doc (showString "::=") , prt 0 items])+   Comment str -> prPrec i 0 (concatD [doc (showString "comment") , prt 0 str])+   Comments str0 str -> prPrec i 0 (concatD [doc (showString "comment") , prt 0 str0 , prt 0 str])+   Internal label cat items -> prPrec i 0 (concatD [doc (showString "internal") , prt 0 label , doc (showString ".") , prt 0 cat , doc (showString "::=") , prt 0 items])+   Token id reg -> prPrec i 0 (concatD [doc (showString "token") , prt 0 id , prt 0 reg])+   PosToken id reg -> prPrec i 0 (concatD [doc (showString "position") , doc (showString "token") , prt 0 id , prt 0 reg])+   Entryp ids -> prPrec i 0 (concatD [doc (showString "entrypoints") , prt 0 ids])+   Separator minimumsize cat str -> prPrec i 0 (concatD [doc (showString "separator") , prt 0 minimumsize , prt 0 cat , prt 0 str])+   Terminator minimumsize cat str -> prPrec i 0 (concatD [doc (showString "terminator") , prt 0 minimumsize , prt 0 cat , prt 0 str])+   Delimiters cat str0 str separation minimumsize -> prPrec i 0 (concatD [doc (showString "delimiters") , prt 0 cat , prt 0 str0 , prt 0 str , prt 0 separation , prt 0 minimumsize])+   Coercions id n -> prPrec i 0 (concatD [doc (showString "coercions") , prt 0 id , prt 0 n])+   Rules id rhss -> prPrec i 0 (concatD [doc (showString "rules") , prt 0 id , doc (showString "::=") , prt 0 rhss])+   Function id args exp -> prPrec i 0 (concatD [doc (showString "define") , prt 0 id , prt 0 args , doc (showString "=") , prt 0 exp])+   Layout strs -> prPrec i 0 (concatD [doc (showString "layout") , prt 0 strs])+   LayoutStop strs -> prPrec i 0 (concatD [doc (showString "layout") , doc (showString "stop") , prt 0 strs])+   LayoutTop  -> prPrec i 0 (concatD [doc (showString "layout") , doc (showString "toplevel")]) -instance Print AbsBNF.ProfItem where-  prt i = \case-    AbsBNF.ProfIt intlists ns -> prPrec i 0 (concatD [doc (showString "("), doc (showString "["), prt 0 intlists, doc (showString "]"), doc (showString ","), doc (showString "["), prt 0 ns, doc (showString "]"), doc (showString ")")])+  prtList es = case es of+   [] -> (concatD [])+   [x] -> (concatD [prt 0 x])+   x:xs -> (concatD [prt 0 x , doc (showString ";") , prt 0 xs]) -instance Print AbsBNF.IntList where-  prt i = \case-    AbsBNF.Ints ns -> prPrec i 0 (concatD [doc (showString "["), prt 0 ns, doc (showString "]")])+instance Print Item where+  prt i e = case e of+   Terminal str -> prPrec i 0 (concatD [prt 0 str])+   NTerminal cat -> prPrec i 0 (concatD [prt 0 cat]) -instance Print [Integer] where-  prt _ [] = concatD []-  prt _ [x] = concatD [prt 0 x]-  prt _ (x:xs) = concatD [prt 0 x, doc (showString ","), prt 0 xs]+  prtList es = case es of+   [] -> (concatD [])+   x:xs -> (concatD [prt 0 x , prt 0 xs]) -instance Print [AbsBNF.IntList] where-  prt _ [] = concatD []-  prt _ [x] = concatD [prt 0 x]-  prt _ (x:xs) = concatD [prt 0 x, doc (showString ","), prt 0 xs]+instance Print Cat where+  prt i e = case e of+   ListCat cat -> prPrec i 0 (concatD [doc (showString "[") , prt 0 cat , doc (showString "]")])+   IdCat id -> prPrec i 0 (concatD [prt 0 id]) -instance Print [AbsBNF.ProfItem] where-  prt _ [] = concatD []-  prt _ [x] = concatD [prt 0 x]-  prt _ (x:xs) = concatD [prt 0 x, prt 0 xs] -instance Print AbsBNF.Separation where-  prt i = \case-    AbsBNF.SepNone -> prPrec i 0 (concatD [])-    AbsBNF.SepTerm str -> prPrec i 0 (concatD [doc (showString "terminator"), printString str])-    AbsBNF.SepSepar str -> prPrec i 0 (concatD [doc (showString "separator"), printString str])+instance Print Label where+  prt i e = case e of+   LabNoP labelid -> prPrec i 0 (concatD [prt 0 labelid])+   LabP labelid profitems -> prPrec i 0 (concatD [prt 0 labelid , prt 0 profitems])+   LabPF labelid0 labelid profitems -> prPrec i 0 (concatD [prt 0 labelid0 , prt 0 labelid , prt 0 profitems])+   LabF labelid0 labelid -> prPrec i 0 (concatD [prt 0 labelid0 , prt 0 labelid]) -instance Print AbsBNF.Arg where-  prt i = \case-    AbsBNF.Arg id_ -> prPrec i 0 (concatD [prt 0 id_]) -instance Print [AbsBNF.Arg] where-  prt _ [] = concatD []-  prt _ (x:xs) = concatD [prt 0 x, prt 0 xs]+instance Print LabelId where+  prt i e = case e of+   Id id -> prPrec i 0 (concatD [prt 0 id])+   Wild  -> prPrec i 0 (concatD [doc (showString "_")])+   ListE  -> prPrec i 0 (concatD [doc (showString "[") , doc (showString "]")])+   ListCons  -> prPrec i 0 (concatD [doc (showString "(") , doc (showString ":") , doc (showString ")")])+   ListOne  -> prPrec i 0 (concatD [doc (showString "(") , doc (showString ":") , doc (showString "[") , doc (showString "]") , doc (showString ")")]) -instance Print AbsBNF.Exp where-  prt i = \case-    AbsBNF.Cons exp1 exp2 -> prPrec i 0 (concatD [prt 1 exp1, doc (showString ":"), prt 0 exp2])-    AbsBNF.App id_ exps -> prPrec i 1 (concatD [prt 0 id_, prt 2 exps])-    AbsBNF.Var id_ -> prPrec i 2 (concatD [prt 0 id_])-    AbsBNF.LitInt n -> prPrec i 2 (concatD [prt 0 n])-    AbsBNF.LitChar c -> prPrec i 2 (concatD [prt 0 c])-    AbsBNF.LitString str -> prPrec i 2 (concatD [printString str])-    AbsBNF.LitDouble d -> prPrec i 2 (concatD [prt 0 d])-    AbsBNF.List exps -> prPrec i 2 (concatD [doc (showString "["), prt 0 exps, doc (showString "]")]) -instance Print [AbsBNF.Exp] where-  prt 2 [x] = concatD [prt 2 x]-  prt 2 (x:xs) = concatD [prt 2 x, prt 2 xs]-  prt _ [] = concatD []-  prt _ [x] = concatD [prt 0 x]-  prt _ (x:xs) = concatD [prt 0 x, doc (showString ","), prt 0 xs]+instance Print ProfItem where+  prt i e = case e of+   ProfIt intlists ns -> prPrec i 0 (concatD [doc (showString "(") , doc (showString "[") , prt 0 intlists , doc (showString "]") , doc (showString ",") , doc (showString "[") , prt 0 ns , doc (showString "]") , doc (showString ")")]) -instance Print [String] where-  prt _ [] = concatD []-  prt _ [x] = concatD [printString x]-  prt _ (x:xs) = concatD [printString x, doc (showString ","), prt 0 xs]+  prtList es = case es of+   [x] -> (concatD [prt 0 x])+   x:xs -> (concatD [prt 0 x , prt 0 xs]) -instance Print [AbsBNF.RHS] where-  prt _ [] = concatD []-  prt _ [x] = concatD [prt 0 x]-  prt _ (x:xs) = concatD [prt 0 x, doc (showString "|"), prt 0 xs]+instance Print IntList where+  prt i e = case e of+   Ints ns -> prPrec i 0 (concatD [doc (showString "[") , prt 0 ns , doc (showString "]")]) -instance Print AbsBNF.RHS where-  prt i = \case-    AbsBNF.RHS items -> prPrec i 0 (concatD [prt 0 items])+  prtList es = case es of+   [] -> (concatD [])+   [x] -> (concatD [prt 0 x])+   x:xs -> (concatD [prt 0 x , doc (showString ",") , prt 0 xs]) -instance Print AbsBNF.MinimumSize where-  prt i = \case-    AbsBNF.MNonempty -> prPrec i 0 (concatD [doc (showString "nonempty")])-    AbsBNF.MEmpty -> prPrec i 0 (concatD [])+instance Print Separation where+  prt i e = case e of+   SepNone  -> prPrec i 0 (concatD [])+   SepTerm str -> prPrec i 0 (concatD [doc (showString "terminator") , prt 0 str])+   SepSepar str -> prPrec i 0 (concatD [doc (showString "separator") , prt 0 str]) -instance Print AbsBNF.Reg where-  prt i = \case-    AbsBNF.RSeq reg1 reg2 -> prPrec i 2 (concatD [prt 2 reg1, prt 3 reg2])-    AbsBNF.RAlt reg1 reg2 -> prPrec i 1 (concatD [prt 1 reg1, doc (showString "|"), prt 2 reg2])-    AbsBNF.RMinus reg1 reg2 -> prPrec i 1 (concatD [prt 2 reg1, doc (showString "-"), prt 2 reg2])-    AbsBNF.RStar reg -> prPrec i 3 (concatD [prt 3 reg, doc (showString "*")])-    AbsBNF.RPlus reg -> prPrec i 3 (concatD [prt 3 reg, doc (showString "+")])-    AbsBNF.ROpt reg -> prPrec i 3 (concatD [prt 3 reg, doc (showString "?")])-    AbsBNF.REps -> prPrec i 3 (concatD [doc (showString "eps")])-    AbsBNF.RChar c -> prPrec i 3 (concatD [prt 0 c])-    AbsBNF.RAlts str -> prPrec i 3 (concatD [doc (showString "["), printString str, doc (showString "]")])-    AbsBNF.RSeqs str -> prPrec i 3 (concatD [doc (showString "{"), printString str, doc (showString "}")])-    AbsBNF.RDigit -> prPrec i 3 (concatD [doc (showString "digit")])-    AbsBNF.RLetter -> prPrec i 3 (concatD [doc (showString "letter")])-    AbsBNF.RUpper -> prPrec i 3 (concatD [doc (showString "upper")])-    AbsBNF.RLower -> prPrec i 3 (concatD [doc (showString "lower")])-    AbsBNF.RAny -> prPrec i 3 (concatD [doc (showString "char")]) -instance Print [AbsBNF.Ident] where-  prt _ [] = concatD []-  prt _ [x] = concatD [prt 0 x]-  prt _ (x:xs) = concatD [prt 0 x, doc (showString ","), prt 0 xs]+instance Print Arg where+  prt i e = case e of+   Arg id -> prPrec i 0 (concatD [prt 0 id])++  prtList es = case es of+   [] -> (concatD [])+   x:xs -> (concatD [prt 0 x , prt 0 xs])++instance Print Exp where+  prt i e = case e of+   Cons exp0 exp -> prPrec i 0 (concatD [prt 1 exp0 , doc (showString ":") , prt 0 exp])+   App id exps -> prPrec i 1 (concatD [prt 0 id , prt 0 exps])+   Var id -> prPrec i 2 (concatD [prt 0 id])+   LitInt n -> prPrec i 2 (concatD [prt 0 n])+   LitChar c -> prPrec i 2 (concatD [prt 0 c])+   LitString str -> prPrec i 2 (concatD [prt 0 str])+   LitDouble d -> prPrec i 2 (concatD [prt 0 d])+   List exps -> prPrec i 2 (concatD [doc (showString "[") , prt 0 exps , doc (showString "]")])++  prtList es = case es of+   [] -> (concatD [])+   [x] -> (concatD [prt 2 x])+   [x] -> (concatD [prt 0 x])+   x:xs -> (concatD [prt 2 x , prt 0 xs])+   x:xs -> (concatD [prt 0 x , doc (showString ",") , prt 0 xs])++instance Print RHS where+  prt i e = case e of+   RHS items -> prPrec i 0 (concatD [prt 0 items])++  prtList es = case es of+   [x] -> (concatD [prt 0 x])+   x:xs -> (concatD [prt 0 x , doc (showString "|") , prt 0 xs])++instance Print MinimumSize where+  prt i e = case e of+   MNonempty  -> prPrec i 0 (concatD [doc (showString "nonempty")])+   MEmpty  -> prPrec i 0 (concatD [])+++instance Print Reg where+  prt i e = case e of+   RSeq reg0 reg -> prPrec i 2 (concatD [prt 2 reg0 , prt 3 reg])+   RAlt reg0 reg -> prPrec i 1 (concatD [prt 1 reg0 , doc (showString "|") , prt 2 reg])+   RMinus reg0 reg -> prPrec i 1 (concatD [prt 2 reg0 , doc (showString "-") , prt 2 reg])+   RStar reg -> prPrec i 3 (concatD [prt 3 reg , doc (showString "*")])+   RPlus reg -> prPrec i 3 (concatD [prt 3 reg , doc (showString "+")])+   ROpt reg -> prPrec i 3 (concatD [prt 3 reg , doc (showString "?")])+   REps  -> prPrec i 3 (concatD [doc (showString "eps")])+   RChar c -> prPrec i 3 (concatD [prt 0 c])+   RAlts str -> prPrec i 3 (concatD [doc (showString "[") , prt 0 str , doc (showString "]")])+   RSeqs str -> prPrec i 3 (concatD [doc (showString "{") , prt 0 str , doc (showString "}")])+   RDigit  -> prPrec i 3 (concatD [doc (showString "digit")])+   RLetter  -> prPrec i 3 (concatD [doc (showString "letter")])+   RUpper  -> prPrec i 3 (concatD [doc (showString "upper")])+   RLower  -> prPrec i 3 (concatD [doc (showString "lower")])+   RAny  -> prPrec i 3 (concatD [doc (showString "char")])+++
+ test/doctests.hs view
@@ -0,0 +1,7 @@+import Test.DocTest+main = doctest+    [ "-isrc"+    , "-idist/build/autogen/"+    , "-idist/build/bnfc/bnfc-tmp"+    , "-XOverloadedStrings"+    , "src/Main.hs" ]