{-# OPTIONS_GHC -w #-}
{-# OPTIONS -XMagicHash -XBangPatterns -XTypeSynonymInstances -XFlexibleInstances -cpp #-}
#if __GLASGOW_HASKELL__ >= 710
{-# OPTIONS_GHC -XPartialTypeSignatures #-}
#endif
module Camfort.Specification.Stencils.Parser
( specParser
, SpecParseError
) where
import Control.Monad.Except (throwError)
import Data.Char (isLetter, isNumber, isAlphaNum, toLower, isAlpha, isSpace)
import Data.List (intercalate, isInfixOf)
import Camfort.Specification.Parser
(SpecParser, mkParser)
import Camfort.Specification.Stencils.Model
(Approximation(..), Multiplicity(..))
import Camfort.Specification.Stencils.Parser.Types
import qualified Camfort.Specification.Stencils.Syntax as Syn
import qualified Data.Array as Happy_Data_Array
import qualified Data.Bits as Bits
import qualified GHC.Exts as Happy_GHC_Exts
import Control.Applicative(Applicative(..))
import Control.Monad (ap)
newtype HappyAbsSyn = HappyAbsSyn HappyAny
#if __GLASGOW_HASKELL__ >= 607
type HappyAny = Happy_GHC_Exts.Any
#else
type HappyAny = forall a . a
#endif
newtype HappyWrap4 = HappyWrap4 (Specification)
happyIn4 :: (Specification) -> (HappyAbsSyn )
happyIn4 :: Specification -> HappyAbsSyn
happyIn4 Specification
x = HappyWrap4 -> HappyAbsSyn
Happy_GHC_Exts.unsafeCoerce# (Specification -> HappyWrap4
HappyWrap4 Specification
x)
{-# INLINE happyIn4 #-}
happyOut4 :: (HappyAbsSyn ) -> HappyWrap4
happyOut4 :: HappyAbsSyn -> HappyWrap4
happyOut4 HappyAbsSyn
x = HappyAbsSyn -> HappyWrap4
Happy_GHC_Exts.unsafeCoerce# HappyAbsSyn
x
{-# INLINE happyOut4 #-}
newtype HappyWrap5 = HappyWrap5 ((String, Region))
happyIn5 :: ((String, Region)) -> (HappyAbsSyn )
happyIn5 :: (String, Region) -> HappyAbsSyn
happyIn5 (String, Region)
x = HappyWrap5 -> HappyAbsSyn
Happy_GHC_Exts.unsafeCoerce# ((String, Region) -> HappyWrap5
HappyWrap5 (String, Region)
x)
{-# INLINE happyIn5 #-}
happyOut5 :: (HappyAbsSyn ) -> HappyWrap5
happyOut5 :: HappyAbsSyn -> HappyWrap5
happyOut5 HappyAbsSyn
x = HappyAbsSyn -> HappyWrap5
Happy_GHC_Exts.unsafeCoerce# HappyAbsSyn
x
{-# INLINE happyOut5 #-}
newtype HappyWrap6 = HappyWrap6 (Region)
happyIn6 :: (Region) -> (HappyAbsSyn )
happyIn6 :: Region -> HappyAbsSyn
happyIn6 Region
x = HappyWrap6 -> HappyAbsSyn
Happy_GHC_Exts.unsafeCoerce# (Region -> HappyWrap6
HappyWrap6 Region
x)
{-# INLINE happyIn6 #-}
happyOut6 :: (HappyAbsSyn ) -> HappyWrap6
happyOut6 :: HappyAbsSyn -> HappyWrap6
happyOut6 HappyAbsSyn
x = HappyAbsSyn -> HappyWrap6
Happy_GHC_Exts.unsafeCoerce# HappyAbsSyn
x
{-# INLINE happyOut6 #-}
newtype HappyWrap7 = HappyWrap7 (Syn.Region)
happyIn7 :: (Syn.Region) -> (HappyAbsSyn )
happyIn7 :: Region -> HappyAbsSyn
happyIn7 Region
x = HappyWrap7 -> HappyAbsSyn
Happy_GHC_Exts.unsafeCoerce# (Region -> HappyWrap7
HappyWrap7 Region
x)
{-# INLINE happyIn7 #-}
happyOut7 :: (HappyAbsSyn ) -> HappyWrap7
happyOut7 :: HappyAbsSyn -> HappyWrap7
happyOut7 HappyAbsSyn
x = HappyAbsSyn -> HappyWrap7
Happy_GHC_Exts.unsafeCoerce# HappyAbsSyn
x
{-# INLINE happyOut7 #-}
newtype HappyWrap8 = HappyWrap8 ((Depth Int, Dim Int, Bool))
happyIn8 :: ((Depth Int, Dim Int, Bool)) -> (HappyAbsSyn )
happyIn8 :: (Depth Int, Dim Int, Bool) -> HappyAbsSyn
happyIn8 (Depth Int, Dim Int, Bool)
x = HappyWrap8 -> HappyAbsSyn
Happy_GHC_Exts.unsafeCoerce# ((Depth Int, Dim Int, Bool) -> HappyWrap8
HappyWrap8 (Depth Int, Dim Int, Bool)
x)
{-# INLINE happyIn8 #-}
happyOut8 :: (HappyAbsSyn ) -> HappyWrap8
happyOut8 :: HappyAbsSyn -> HappyWrap8
happyOut8 HappyAbsSyn
x = HappyAbsSyn -> HappyWrap8
Happy_GHC_Exts.unsafeCoerce# HappyAbsSyn
x
{-# INLINE happyOut8 #-}
newtype HappyWrap9 = HappyWrap9 ((Dim Int, Bool))
happyIn9 :: ((Dim Int, Bool)) -> (HappyAbsSyn )
happyIn9 :: (Dim Int, Bool) -> HappyAbsSyn
happyIn9 (Dim Int, Bool)
x = HappyWrap9 -> HappyAbsSyn
Happy_GHC_Exts.unsafeCoerce# ((Dim Int, Bool) -> HappyWrap9
HappyWrap9 (Dim Int, Bool)
x)
{-# INLINE happyIn9 #-}
happyOut9 :: (HappyAbsSyn ) -> HappyWrap9
happyOut9 :: HappyAbsSyn -> HappyWrap9
happyOut9 HappyAbsSyn
x = HappyAbsSyn -> HappyWrap9
Happy_GHC_Exts.unsafeCoerce# HappyAbsSyn
x
{-# INLINE happyOut9 #-}
newtype HappyWrap10 = HappyWrap10 ((Depth Int, Bool))
happyIn10 :: ((Depth Int, Bool)) -> (HappyAbsSyn )
happyIn10 :: (Depth Int, Bool) -> HappyAbsSyn
happyIn10 (Depth Int, Bool)
x = HappyWrap10 -> HappyAbsSyn
Happy_GHC_Exts.unsafeCoerce# ((Depth Int, Bool) -> HappyWrap10
HappyWrap10 (Depth Int, Bool)
x)
{-# INLINE happyIn10 #-}
happyOut10 :: (HappyAbsSyn ) -> HappyWrap10
happyOut10 :: HappyAbsSyn -> HappyWrap10
happyOut10 HappyAbsSyn
x = HappyAbsSyn -> HappyWrap10
Happy_GHC_Exts.unsafeCoerce# HappyAbsSyn
x
{-# INLINE happyOut10 #-}
newtype HappyWrap11 = HappyWrap11 (Depth Int)
happyIn11 :: (Depth Int) -> (HappyAbsSyn )
happyIn11 :: Depth Int -> HappyAbsSyn
happyIn11 Depth Int
x = HappyWrap11 -> HappyAbsSyn
Happy_GHC_Exts.unsafeCoerce# (Depth Int -> HappyWrap11
HappyWrap11 Depth Int
x)
{-# INLINE happyIn11 #-}
happyOut11 :: (HappyAbsSyn ) -> HappyWrap11
happyOut11 :: HappyAbsSyn -> HappyWrap11
happyOut11 HappyAbsSyn
x = HappyAbsSyn -> HappyWrap11
Happy_GHC_Exts.unsafeCoerce# HappyAbsSyn
x
{-# INLINE happyOut11 #-}
newtype HappyWrap12 = HappyWrap12 (Dim Int)
happyIn12 :: (Dim Int) -> (HappyAbsSyn )
happyIn12 :: Dim Int -> HappyAbsSyn
happyIn12 Dim Int
x = HappyWrap12 -> HappyAbsSyn
Happy_GHC_Exts.unsafeCoerce# (Dim Int -> HappyWrap12
HappyWrap12 Dim Int
x)
{-# INLINE happyIn12 #-}
happyOut12 :: (HappyAbsSyn ) -> HappyWrap12
happyOut12 :: HappyAbsSyn -> HappyWrap12
happyOut12 HappyAbsSyn
x = HappyAbsSyn -> HappyWrap12
Happy_GHC_Exts.unsafeCoerce# HappyAbsSyn
x
{-# INLINE happyOut12 #-}
newtype HappyWrap13 = HappyWrap13 (Bool)
happyIn13 :: (Bool) -> (HappyAbsSyn )
happyIn13 :: Bool -> HappyAbsSyn
happyIn13 Bool
x = HappyWrap13 -> HappyAbsSyn
Happy_GHC_Exts.unsafeCoerce# (Bool -> HappyWrap13
HappyWrap13 Bool
x)
{-# INLINE happyIn13 #-}
happyOut13 :: (HappyAbsSyn ) -> HappyWrap13
happyOut13 :: HappyAbsSyn -> HappyWrap13
happyOut13 HappyAbsSyn
x = HappyAbsSyn -> HappyWrap13
Happy_GHC_Exts.unsafeCoerce# HappyAbsSyn
x
{-# INLINE happyOut13 #-}
newtype HappyWrap14 = HappyWrap14 (Syn.IsStencil -> SpecInner)
happyIn14 :: (Syn.IsStencil -> SpecInner) -> (HappyAbsSyn )
happyIn14 :: (Bool -> SpecInner) -> HappyAbsSyn
happyIn14 Bool -> SpecInner
x = HappyWrap14 -> HappyAbsSyn
Happy_GHC_Exts.unsafeCoerce# ((Bool -> SpecInner) -> HappyWrap14
HappyWrap14 Bool -> SpecInner
x)
{-# INLINE happyIn14 #-}
happyOut14 :: (HappyAbsSyn ) -> HappyWrap14
happyOut14 :: HappyAbsSyn -> HappyWrap14
happyOut14 HappyAbsSyn
x = HappyAbsSyn -> HappyWrap14
Happy_GHC_Exts.unsafeCoerce# HappyAbsSyn
x
{-# INLINE happyOut14 #-}
newtype HappyWrap15 = HappyWrap15 (Multiplicity (Approximation Region))
happyIn15 :: (Multiplicity (Approximation Region)) -> (HappyAbsSyn )
happyIn15 :: Multiplicity (Approximation Region) -> HappyAbsSyn
happyIn15 Multiplicity (Approximation Region)
x = HappyWrap15 -> HappyAbsSyn
Happy_GHC_Exts.unsafeCoerce# (Multiplicity (Approximation Region) -> HappyWrap15
HappyWrap15 Multiplicity (Approximation Region)
x)
{-# INLINE happyIn15 #-}
happyOut15 :: (HappyAbsSyn ) -> HappyWrap15
happyOut15 :: HappyAbsSyn -> HappyWrap15
happyOut15 HappyAbsSyn
x = HappyAbsSyn -> HappyWrap15
Happy_GHC_Exts.unsafeCoerce# HappyAbsSyn
x
{-# INLINE happyOut15 #-}
newtype HappyWrap16 = HappyWrap16 (Approximation Region)
happyIn16 :: (Approximation Region) -> (HappyAbsSyn )
happyIn16 :: Approximation Region -> HappyAbsSyn
happyIn16 Approximation Region
x = HappyWrap16 -> HappyAbsSyn
Happy_GHC_Exts.unsafeCoerce# (Approximation Region -> HappyWrap16
HappyWrap16 Approximation Region
x)
{-# INLINE happyIn16 #-}
happyOut16 :: (HappyAbsSyn ) -> HappyWrap16
happyOut16 :: HappyAbsSyn -> HappyWrap16
happyOut16 HappyAbsSyn
x = HappyAbsSyn -> HappyWrap16
Happy_GHC_Exts.unsafeCoerce# HappyAbsSyn
x
{-# INLINE happyOut16 #-}
newtype HappyWrap17 = HappyWrap17 ([String])
happyIn17 :: ([String]) -> (HappyAbsSyn )
happyIn17 :: [String] -> HappyAbsSyn
happyIn17 [String]
x = HappyWrap17 -> HappyAbsSyn
Happy_GHC_Exts.unsafeCoerce# ([String] -> HappyWrap17
HappyWrap17 [String]
x)
{-# INLINE happyIn17 #-}
happyOut17 :: (HappyAbsSyn ) -> HappyWrap17
happyOut17 :: HappyAbsSyn -> HappyWrap17
happyOut17 HappyAbsSyn
x = HappyAbsSyn -> HappyWrap17
Happy_GHC_Exts.unsafeCoerce# HappyAbsSyn
x
{-# INLINE happyOut17 #-}
happyInTok :: (Token) -> (HappyAbsSyn )
happyInTok :: Token -> HappyAbsSyn
happyInTok Token
x = Token -> HappyAbsSyn
Happy_GHC_Exts.unsafeCoerce# Token
x
{-# INLINE happyInTok #-}
happyOutTok :: (HappyAbsSyn ) -> (Token)
happyOutTok :: HappyAbsSyn -> Token
happyOutTok HappyAbsSyn
x = HappyAbsSyn -> Token
Happy_GHC_Exts.unsafeCoerce# HappyAbsSyn
x
{-# INLINE happyOutTok #-}
happyExpList :: HappyAddr
happyExpList :: HappyAddr
happyExpList = Addr# -> HappyAddr
HappyA# Addr#
"\x00\x00\x0e\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x80\xcd\x83\x00\x00\xc0\xe6\x41\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9a\x07\x01\x00\x00\x00\x80\x00\x00\x80\xe0\x41\x00\x00\x40\xf0\x20\x00\x00\x00\x00\x10\x00\x00\x00\x00\x08\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x82\x07\x01\x00\x00\x00\x20\x00\x00\x00\x00\x01\x00\x00\x00\x00\x10\x00\x00\x00\x40\x00\x00\x00\x00\x80\x11\x00\x00\x90\x01\x00\x00\x00\xc8\x00\x00\x00\x00\x64\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x0c\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x08\x1e\x04\x00\x00\x04\x0f\x02\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x10\x00\x00\x90\x00\x00\x00\x00\x88\x00\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x10\x00\x00\x00\x00\x20\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x82\x07\x01\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x40\x00\x00\x00\x80\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#
{-# NOINLINE happyExpListPerState #-}
happyExpListPerState :: Int -> [String]
happyExpListPerState Int
st =
[String]
token_strs_expected
where token_strs :: [String]
token_strs = [String
"error",String
"%dummy",String
"%start_parseSpecification",String
"SPEC",String
"REGIONDEC",String
"REGION",String
"REGIONCONST",String
"REGION_ATTRS",String
"DIM_REFL",String
"DEPTH_REFL",String
"DEPTH",String
"DIM",String
"REFL",String
"SPECDEC",String
"MULTIPLICITY",String
"APPROXIMATION",String
"VARS",String
"stencil",String
"access",String
"region",String
"readOnce",String
"pointed",String
"nonpointed",String
"atMost",String
"atLeast",String
"dim",String
"depth",String
"forward",String
"backward",String
"centered",String
"id",String
"num",String
"'+'",String
"'*'",String
"'::'",String
"'='",String
"'('",String
"')'",String
"%eof"]
bit_start :: Int
bit_start = Int
st Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
39
bit_end :: Int
bit_end = (Int
st Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
1) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
39
read_bit :: Int -> Bool
read_bit = HappyAddr -> Int -> Bool
readArrayBit HappyAddr
happyExpList
bits :: [Bool]
bits = (Int -> Bool) -> [Int] -> [Bool]
forall a b. (a -> b) -> [a] -> [b]
map Int -> Bool
read_bit [Int
bit_start..Int
bit_end Int -> Int -> Int
forall a. Num a => a -> a -> a
- Int
1]
bits_indexed :: [(Bool, Int)]
bits_indexed = [Bool] -> [Int] -> [(Bool, Int)]
forall a b. [a] -> [b] -> [(a, b)]
zip [Bool]
bits [Int
0..Int
38]
token_strs_expected :: [String]
token_strs_expected = ((Bool, Int) -> [String]) -> [(Bool, Int)] -> [String]
forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b]
concatMap (Bool, Int) -> [String]
f [(Bool, Int)]
bits_indexed
f :: (Bool, Int) -> [String]
f (Bool
False, Int
_) = []
f (Bool
True, Int
nr) = [[String]
token_strs [String] -> Int -> String
forall a. [a] -> Int -> a
!! Int
nr]
happyActOffsets :: HappyAddr
happyActOffsets :: HappyAddr
happyActOffsets = Addr# -> HappyAddr
HappyA# Addr#
"\x48\x00\x0a\x00\x00\x00\x15\x00\x17\x00\xfd\xff\xfd\xff\x22\x00\x00\x00\x35\x00\x00\x00\x00\x00\x07\x00\x4b\x00\x0b\x00\x0b\x00\x4c\x00\x4d\x00\x50\x00\x00\x00\x0b\x00\x3e\x00\x58\x00\x52\x00\x59\x00\x28\x00\x38\x00\x38\x00\x38\x00\x22\x00\x22\x00\x5a\x00\x00\x00\x5c\x00\x0b\x00\x0b\x00\x00\x00\x5d\x00\x00\x00\x5e\x00\x56\x00\x5f\x00\x3f\x00\x14\x00\x36\x00\x00\x00\x60\x00\x62\x00\x61\x00\x63\x00\x00\x00\x00\x00\x0b\x00\x3c\x00\x00\x00\x00\x00\x68\x00\x6a\x00\x64\x00\x65\x00\x00\x00\x6b\x00\x66\x00\x00\x00\x6c\x00\x71\x00\x00\x00\x6d\x00\x00\x00\x69\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#
happyGotoOffsets :: HappyAddr
happyGotoOffsets :: HappyAddr
happyGotoOffsets = Addr# -> HappyAddr
HappyA# Addr#
"\x4e\x00\x67\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x4f\x00\x51\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x00\x00\x00\x00\x00\x00\x6e\x00\x00\x00\x27\x00\x2d\x00\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x70\x00\x55\x00\x57\x00\x00\x00\x00\x00\x00\x00\x72\x00\x00\x00\x00\x00\xfe\xff\x3d\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x78\x00\x7a\x00\x00\x00\x79\x00\x7c\x00\x00\x00\x7b\x00\x7d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#
happyAdjustOffset :: Happy_GHC_Exts.Int# -> Happy_GHC_Exts.Int#
happyAdjustOffset :: Int# -> Int#
happyAdjustOffset Int#
off = Int#
off
happyDefActions :: HappyAddr
happyDefActions :: HappyAddr
happyDefActions = Addr# -> HappyAddr
HappyA# Addr#
"\x00\x00\x00\x00\xfe\xff\x00\x00\x00\x00\x00\x00\x00\x00\xdf\xff\xfa\xff\x00\x00\xe4\xff\xe2\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf6\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe1\xff\xe0\xff\x00\x00\xe3\xff\x00\x00\x00\x00\x00\x00\xf8\xff\xf9\xff\xfc\xff\xdd\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe5\xff\x00\x00\x00\x00\x00\x00\x00\x00\xf7\xff\xfd\xff\x00\x00\xfb\xff\xf3\xff\xf4\xff\x00\x00\x00\x00\x00\x00\x00\x00\xf0\xff\xe8\xff\x00\x00\xf1\xff\xeb\xff\x00\x00\xf5\xff\x00\x00\xde\xff\x00\x00\xed\xff\xec\xff\xe9\xff\xea\xff\xee\xff\xef\xff\xe6\xff\xe7\xff\xf2\xff"#
happyCheck :: HappyAddr
happyCheck :: HappyAddr
happyCheck = Addr# -> HappyAddr
HappyA# Addr#
"\xff\xff\x04\x00\x05\x00\x05\x00\x07\x00\x08\x00\x08\x00\x09\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x05\x00\x03\x00\x07\x00\x08\x00\x05\x00\x14\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x06\x00\x14\x00\x02\x00\x03\x00\x0a\x00\x14\x00\x02\x00\x03\x00\x02\x00\x03\x00\x0a\x00\x0b\x00\x0c\x00\x12\x00\x0a\x00\x0b\x00\x0c\x00\x04\x00\x0c\x00\x16\x00\x07\x00\x08\x00\x09\x00\x04\x00\x10\x00\x11\x00\x07\x00\x08\x00\x09\x00\x04\x00\x10\x00\x11\x00\x07\x00\x08\x00\x09\x00\x15\x00\x06\x00\x09\x00\x0a\x00\x09\x00\x0a\x00\x06\x00\x07\x00\x06\x00\x09\x00\x12\x00\x09\x00\x01\x00\x02\x00\x03\x00\x10\x00\x11\x00\x00\x00\x01\x00\x12\x00\x02\x00\x03\x00\x02\x00\x03\x00\x02\x00\x03\x00\x02\x00\x03\x00\x02\x00\x03\x00\x07\x00\x08\x00\x02\x00\x03\x00\x14\x00\x14\x00\x14\x00\xff\xff\x09\x00\x14\x00\x13\x00\x0e\x00\x0e\x00\x01\x00\x13\x00\x0e\x00\xff\xff\x0e\x00\x09\x00\x11\x00\x0a\x00\x0a\x00\x06\x00\x06\x00\x13\x00\x15\x00\x13\x00\x15\x00\x0f\x00\x15\x00\x0f\x00\x09\x00\x0d\x00\x0f\x00\x0d\x00\x15\x00\x0d\x00\x08\x00\x07\x00\x09\x00\x07\x00\x09\x00\x08\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"#
happyTable :: HappyAddr
happyTable :: HappyAddr
happyTable = Addr# -> HappyAddr
HappyA# Addr#
"\x00\x00\x0d\x00\x0e\x00\x3f\x00\x0f\x00\x10\x00\x40\x00\x41\x00\x11\x00\x12\x00\x13\x00\x14\x00\x0e\x00\x04\x00\x0f\x00\x10\x00\x0e\x00\x15\x00\x11\x00\x12\x00\x13\x00\x14\x00\x11\x00\x12\x00\x13\x00\x14\x00\x2e\x00\x15\x00\x07\x00\x08\x00\x30\x00\x15\x00\x07\x00\x08\x00\x07\x00\x08\x00\x15\x00\x0a\x00\x0b\x00\x17\x00\x09\x00\x0a\x00\x0b\x00\x31\x00\x20\x00\xff\xff\x2a\x00\x2b\x00\x2c\x00\x30\x00\x23\x00\x24\x00\x2a\x00\x2b\x00\x2c\x00\x29\x00\x23\x00\x24\x00\x2a\x00\x2b\x00\x2c\x00\x33\x00\x2e\x00\x2f\x00\x30\x00\x2f\x00\x30\x00\x3c\x00\x3d\x00\x2e\x00\x3e\x00\x22\x00\x2f\x00\x06\x00\x07\x00\x04\x00\x23\x00\x24\x00\x04\x00\x02\x00\x19\x00\x1e\x00\x08\x00\x1d\x00\x08\x00\x19\x00\x08\x00\x25\x00\x08\x00\x24\x00\x08\x00\x3a\x00\x3b\x00\x35\x00\x08\x00\x20\x00\x1d\x00\x1c\x00\x00\x00\x29\x00\x1b\x00\x35\x00\x18\x00\x28\x00\x02\x00\x44\x00\x28\x00\x00\x00\x28\x00\x2f\x00\x24\x00\x30\x00\x30\x00\x2e\x00\x2e\x00\x3a\x00\x43\x00\x39\x00\x38\x00\x4e\x00\x37\x00\x4d\x00\x2f\x00\x33\x00\x46\x00\x26\x00\x4f\x00\x44\x00\x4b\x00\x4a\x00\x49\x00\x48\x00\x47\x00\x46\x00\x00\x00\x00\x00\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 :: Array
Int
(Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn)
happyReduceArr = (Int, Int)
-> [(Int,
Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn)]
-> Array
Int
(Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn)
forall i e. Ix i => (i, i) -> [(i, e)] -> Array i e
Happy_Data_Array.array (Int
1, Int
34) [
(Int
1 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_1),
(Int
2 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_2),
(Int
3 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_3),
(Int
4 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_4),
(Int
5 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_5),
(Int
6 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_6),
(Int
7 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_7),
(Int
8 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_8),
(Int
9 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_9),
(Int
10 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_10),
(Int
11 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_11),
(Int
12 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_12),
(Int
13 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_13),
(Int
14 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_14),
(Int
15 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_15),
(Int
16 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_16),
(Int
17 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_17),
(Int
18 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_18),
(Int
19 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_19),
(Int
20 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_20),
(Int
21 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_21),
(Int
22 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_22),
(Int
23 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_23),
(Int
24 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_24),
(Int
25 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_25),
(Int
26 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_26),
(Int
27 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_27),
(Int
28 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_28),
(Int
29 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_29),
(Int
30 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_30),
(Int
31 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_31),
(Int
32 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_32),
(Int
33 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_33),
(Int
34 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_34)
]
happy_n_terms :: Int
happy_n_terms = Int
23 :: Int
happy_n_nonterms :: Int
happy_n_nonterms = Int
14 :: Int
happyReduce_1 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_1 = Int#
-> (HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happySpecReduce_1 Int#
0# HappyAbsSyn -> HappyAbsSyn
happyReduction_1
happyReduction_1 :: HappyAbsSyn -> HappyAbsSyn
happyReduction_1 HappyAbsSyn
happy_x_1
= case HappyAbsSyn -> HappyWrap5
happyOut5 HappyAbsSyn
happy_x_1 of { (HappyWrap5 (String, Region)
happy_var_1) ->
Specification -> HappyAbsSyn
happyIn4
(String -> Region -> Specification
RegionDec ((String, Region) -> String
forall a b. (a, b) -> a
fst (String, Region)
happy_var_1) ((String, Region) -> Region
forall a b. (a, b) -> b
snd (String, Region)
happy_var_1)
)}
happyReduce_2 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_2 = Int#
-> Int#
-> (HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce Int#
4# Int#
0# HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn
happyReduction_2
happyReduction_2 :: HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn
happyReduction_2 (HappyAbsSyn
happy_x_4 `HappyStk`
HappyAbsSyn
happy_x_3 `HappyStk`
HappyAbsSyn
happy_x_2 `HappyStk`
HappyAbsSyn
happy_x_1 `HappyStk`
HappyStk HappyAbsSyn
happyRest)
= case HappyAbsSyn -> HappyWrap14
happyOut14 HappyAbsSyn
happy_x_2 of { (HappyWrap14 Bool -> SpecInner
happy_var_2) ->
case HappyAbsSyn -> HappyWrap17
happyOut17 HappyAbsSyn
happy_x_4 of { (HappyWrap17 [String]
happy_var_4) ->
Specification -> HappyAbsSyn
happyIn4
(SpecInner -> [String] -> Specification
SpecDec (Bool -> SpecInner
happy_var_2 Bool
True) [String]
happy_var_4
) HappyAbsSyn -> HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn
forall a. a -> HappyStk a -> HappyStk a
`HappyStk` HappyStk HappyAbsSyn
happyRest}}
happyReduce_3 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_3 = Int#
-> Int#
-> (HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce Int#
4# Int#
0# HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn
happyReduction_3
happyReduction_3 :: HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn
happyReduction_3 (HappyAbsSyn
happy_x_4 `HappyStk`
HappyAbsSyn
happy_x_3 `HappyStk`
HappyAbsSyn
happy_x_2 `HappyStk`
HappyAbsSyn
happy_x_1 `HappyStk`
HappyStk HappyAbsSyn
happyRest)
= case HappyAbsSyn -> HappyWrap14
happyOut14 HappyAbsSyn
happy_x_2 of { (HappyWrap14 Bool -> SpecInner
happy_var_2) ->
case HappyAbsSyn -> HappyWrap17
happyOut17 HappyAbsSyn
happy_x_4 of { (HappyWrap17 [String]
happy_var_4) ->
Specification -> HappyAbsSyn
happyIn4
(SpecInner -> [String] -> Specification
SpecDec (Bool -> SpecInner
happy_var_2 Bool
False) [String]
happy_var_4
) HappyAbsSyn -> HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn
forall a. a -> HappyStk a -> HappyStk a
`HappyStk` HappyStk HappyAbsSyn
happyRest}}
happyReduce_4 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_4 = Int#
-> Int#
-> (HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce Int#
5# Int#
1# HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn
happyReduction_4
happyReduction_4 :: HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn
happyReduction_4 (HappyAbsSyn
happy_x_5 `HappyStk`
HappyAbsSyn
happy_x_4 `HappyStk`
HappyAbsSyn
happy_x_3 `HappyStk`
HappyAbsSyn
happy_x_2 `HappyStk`
HappyAbsSyn
happy_x_1 `HappyStk`
HappyStk HappyAbsSyn
happyRest)
= case HappyAbsSyn -> Token
happyOutTok HappyAbsSyn
happy_x_3 of { (TId String
_ String
happy_var_3) ->
case HappyAbsSyn -> HappyWrap6
happyOut6 HappyAbsSyn
happy_x_5 of { (HappyWrap6 Region
happy_var_5) ->
(String, Region) -> HappyAbsSyn
happyIn5
((String
happy_var_3, Region
happy_var_5)
) HappyAbsSyn -> HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn
forall a. a -> HappyStk a -> HappyStk a
`HappyStk` HappyStk HappyAbsSyn
happyRest}}
happyReduce_5 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_5 = Int#
-> (HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happySpecReduce_1 Int#
2# HappyAbsSyn -> HappyAbsSyn
happyReduction_5
happyReduction_5 :: HappyAbsSyn -> HappyAbsSyn
happyReduction_5 HappyAbsSyn
happy_x_1
= case HappyAbsSyn -> HappyWrap7
happyOut7 HappyAbsSyn
happy_x_1 of { (HappyWrap7 Region
happy_var_1) ->
Region -> HappyAbsSyn
happyIn6
(Region -> Region
RegionConst Region
happy_var_1
)}
happyReduce_6 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_6 = Int#
-> (HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happySpecReduce_3 Int#
2# HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
forall p. HappyAbsSyn -> p -> HappyAbsSyn -> HappyAbsSyn
happyReduction_6
happyReduction_6 :: HappyAbsSyn -> p -> HappyAbsSyn -> HappyAbsSyn
happyReduction_6 HappyAbsSyn
happy_x_3
p
happy_x_2
HappyAbsSyn
happy_x_1
= case HappyAbsSyn -> HappyWrap6
happyOut6 HappyAbsSyn
happy_x_1 of { (HappyWrap6 Region
happy_var_1) ->
case HappyAbsSyn -> HappyWrap6
happyOut6 HappyAbsSyn
happy_x_3 of { (HappyWrap6 Region
happy_var_3) ->
Region -> HappyAbsSyn
happyIn6
(Region -> Region -> Region
Or Region
happy_var_1 Region
happy_var_3
)}}
happyReduce_7 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_7 = Int#
-> (HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happySpecReduce_3 Int#
2# HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
forall p. HappyAbsSyn -> p -> HappyAbsSyn -> HappyAbsSyn
happyReduction_7
happyReduction_7 :: HappyAbsSyn -> p -> HappyAbsSyn -> HappyAbsSyn
happyReduction_7 HappyAbsSyn
happy_x_3
p
happy_x_2
HappyAbsSyn
happy_x_1
= case HappyAbsSyn -> HappyWrap6
happyOut6 HappyAbsSyn
happy_x_1 of { (HappyWrap6 Region
happy_var_1) ->
case HappyAbsSyn -> HappyWrap6
happyOut6 HappyAbsSyn
happy_x_3 of { (HappyWrap6 Region
happy_var_3) ->
Region -> HappyAbsSyn
happyIn6
(Region -> Region -> Region
And Region
happy_var_1 Region
happy_var_3
)}}
happyReduce_8 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_8 = Int#
-> (HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happySpecReduce_3 Int#
2# HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
forall p p. p -> HappyAbsSyn -> p -> HappyAbsSyn
happyReduction_8
happyReduction_8 :: p -> HappyAbsSyn -> p -> HappyAbsSyn
happyReduction_8 p
happy_x_3
HappyAbsSyn
happy_x_2
p
happy_x_1
= case HappyAbsSyn -> HappyWrap6
happyOut6 HappyAbsSyn
happy_x_2 of { (HappyWrap6 Region
happy_var_2) ->
Region -> HappyAbsSyn
happyIn6
(Region
happy_var_2
)}
happyReduce_9 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_9 = Int#
-> (HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happySpecReduce_1 Int#
2# HappyAbsSyn -> HappyAbsSyn
happyReduction_9
happyReduction_9 :: HappyAbsSyn -> HappyAbsSyn
happyReduction_9 HappyAbsSyn
happy_x_1
= case HappyAbsSyn -> Token
happyOutTok HappyAbsSyn
happy_x_1 of { (TId String
_ String
happy_var_1) ->
Region -> HappyAbsSyn
happyIn6
(String -> Region
Var String
happy_var_1
)}
happyReduce_10 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_10 = Int#
-> Int#
-> (HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce Int#
4# Int#
3# HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn
happyReduction_10
happyReduction_10 :: HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn
happyReduction_10 (HappyAbsSyn
happy_x_4 `HappyStk`
HappyAbsSyn
happy_x_3 `HappyStk`
HappyAbsSyn
happy_x_2 `HappyStk`
HappyAbsSyn
happy_x_1 `HappyStk`
HappyStk HappyAbsSyn
happyRest)
= case HappyAbsSyn -> HappyWrap8
happyOut8 HappyAbsSyn
happy_x_3 of { (HappyWrap8 (Depth Int, Dim Int, Bool)
happy_var_3) ->
Region -> HappyAbsSyn
happyIn7
((Int -> Int -> Bool -> Region)
-> (Depth Int, Dim Int, Bool) -> Region
applyAttr Int -> Int -> Bool -> Region
Syn.Forward (Depth Int, Dim Int, Bool)
happy_var_3
) HappyAbsSyn -> HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn
forall a. a -> HappyStk a -> HappyStk a
`HappyStk` HappyStk HappyAbsSyn
happyRest}
happyReduce_11 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_11 = Int#
-> Int#
-> (HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce Int#
4# Int#
3# HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn
happyReduction_11
happyReduction_11 :: HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn
happyReduction_11 (HappyAbsSyn
happy_x_4 `HappyStk`
HappyAbsSyn
happy_x_3 `HappyStk`
HappyAbsSyn
happy_x_2 `HappyStk`
HappyAbsSyn
happy_x_1 `HappyStk`
HappyStk HappyAbsSyn
happyRest)
= case HappyAbsSyn -> HappyWrap8
happyOut8 HappyAbsSyn
happy_x_3 of { (HappyWrap8 (Depth Int, Dim Int, Bool)
happy_var_3) ->
Region -> HappyAbsSyn
happyIn7
((Int -> Int -> Bool -> Region)
-> (Depth Int, Dim Int, Bool) -> Region
applyAttr Int -> Int -> Bool -> Region
Syn.Backward (Depth Int, Dim Int, Bool)
happy_var_3
) HappyAbsSyn -> HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn
forall a. a -> HappyStk a -> HappyStk a
`HappyStk` HappyStk HappyAbsSyn
happyRest}
happyReduce_12 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_12 = Int#
-> Int#
-> (HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce Int#
4# Int#
3# HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn
happyReduction_12
happyReduction_12 :: HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn
happyReduction_12 (HappyAbsSyn
happy_x_4 `HappyStk`
HappyAbsSyn
happy_x_3 `HappyStk`
HappyAbsSyn
happy_x_2 `HappyStk`
HappyAbsSyn
happy_x_1 `HappyStk`
HappyStk HappyAbsSyn
happyRest)
= case HappyAbsSyn -> HappyWrap8
happyOut8 HappyAbsSyn
happy_x_3 of { (HappyWrap8 (Depth Int, Dim Int, Bool)
happy_var_3) ->
Region -> HappyAbsSyn
happyIn7
((Int -> Int -> Bool -> Region)
-> (Depth Int, Dim Int, Bool) -> Region
applyAttr Int -> Int -> Bool -> Region
Syn.Centered (Depth Int, Dim Int, Bool)
happy_var_3
) HappyAbsSyn -> HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn
forall a. a -> HappyStk a -> HappyStk a
`HappyStk` HappyStk HappyAbsSyn
happyRest}
happyReduce_13 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_13 = Int#
-> Int#
-> (HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce Int#
6# Int#
3# HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn
happyReduction_13
happyReduction_13 :: HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn
happyReduction_13 (HappyAbsSyn
happy_x_6 `HappyStk`
HappyAbsSyn
happy_x_5 `HappyStk`
HappyAbsSyn
happy_x_4 `HappyStk`
HappyAbsSyn
happy_x_3 `HappyStk`
HappyAbsSyn
happy_x_2 `HappyStk`
HappyAbsSyn
happy_x_1 `HappyStk`
HappyStk HappyAbsSyn
happyRest)
= case HappyAbsSyn -> Token
happyOutTok HappyAbsSyn
happy_x_5 of { (TNum String
happy_var_5) ->
Region -> HappyAbsSyn
happyIn7
(Int -> Int -> Bool -> Region
Syn.Centered Int
0 (String -> Int
forall a. Read a => String -> a
read String
happy_var_5) Bool
True
) HappyAbsSyn -> HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn
forall a. a -> HappyStk a -> HappyStk a
`HappyStk` HappyStk HappyAbsSyn
happyRest}
happyReduce_14 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_14 = Int#
-> (HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happySpecReduce_2 Int#
4# HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
happyReduction_14
happyReduction_14 :: HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
happyReduction_14 HappyAbsSyn
happy_x_2
HappyAbsSyn
happy_x_1
= case HappyAbsSyn -> HappyWrap11
happyOut11 HappyAbsSyn
happy_x_1 of { (HappyWrap11 Depth Int
happy_var_1) ->
case HappyAbsSyn -> HappyWrap9
happyOut9 HappyAbsSyn
happy_x_2 of { (HappyWrap9 (Dim Int, Bool)
happy_var_2) ->
(Depth Int, Dim Int, Bool) -> HappyAbsSyn
happyIn8
((Depth Int
happy_var_1, (Dim Int, Bool) -> Dim Int
forall a b. (a, b) -> a
fst (Dim Int, Bool)
happy_var_2, (Dim Int, Bool) -> Bool
forall a b. (a, b) -> b
snd (Dim Int, Bool)
happy_var_2)
)}}
happyReduce_15 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_15 = Int#
-> (HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happySpecReduce_2 Int#
4# HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
happyReduction_15
happyReduction_15 :: HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
happyReduction_15 HappyAbsSyn
happy_x_2
HappyAbsSyn
happy_x_1
= case HappyAbsSyn -> HappyWrap12
happyOut12 HappyAbsSyn
happy_x_1 of { (HappyWrap12 Dim Int
happy_var_1) ->
case HappyAbsSyn -> HappyWrap10
happyOut10 HappyAbsSyn
happy_x_2 of { (HappyWrap10 (Depth Int, Bool)
happy_var_2) ->
(Depth Int, Dim Int, Bool) -> HappyAbsSyn
happyIn8
(((Depth Int, Bool) -> Depth Int
forall a b. (a, b) -> a
fst (Depth Int, Bool)
happy_var_2, Dim Int
happy_var_1, (Depth Int, Bool) -> Bool
forall a b. (a, b) -> b
snd (Depth Int, Bool)
happy_var_2)
)}}
happyReduce_16 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_16 = Int#
-> (HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happySpecReduce_3 Int#
4# HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
happyReduction_16
happyReduction_16 :: HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
happyReduction_16 HappyAbsSyn
happy_x_3
HappyAbsSyn
happy_x_2
HappyAbsSyn
happy_x_1
= case HappyAbsSyn -> HappyWrap13
happyOut13 HappyAbsSyn
happy_x_1 of { (HappyWrap13 Bool
happy_var_1) ->
case HappyAbsSyn -> HappyWrap11
happyOut11 HappyAbsSyn
happy_x_2 of { (HappyWrap11 Depth Int
happy_var_2) ->
case HappyAbsSyn -> HappyWrap12
happyOut12 HappyAbsSyn
happy_x_3 of { (HappyWrap12 Dim Int
happy_var_3) ->
(Depth Int, Dim Int, Bool) -> HappyAbsSyn
happyIn8
((Depth Int
happy_var_2, Dim Int
happy_var_3, Bool
happy_var_1)
)}}}
happyReduce_17 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_17 = Int#
-> (HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happySpecReduce_3 Int#
4# HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
happyReduction_17
happyReduction_17 :: HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
happyReduction_17 HappyAbsSyn
happy_x_3
HappyAbsSyn
happy_x_2
HappyAbsSyn
happy_x_1
= case HappyAbsSyn -> HappyWrap13
happyOut13 HappyAbsSyn
happy_x_1 of { (HappyWrap13 Bool
happy_var_1) ->
case HappyAbsSyn -> HappyWrap12
happyOut12 HappyAbsSyn
happy_x_2 of { (HappyWrap12 Dim Int
happy_var_2) ->
case HappyAbsSyn -> HappyWrap11
happyOut11 HappyAbsSyn
happy_x_3 of { (HappyWrap11 Depth Int
happy_var_3) ->
(Depth Int, Dim Int, Bool) -> HappyAbsSyn
happyIn8
((Depth Int
happy_var_3, Dim Int
happy_var_2, Bool
happy_var_1)
)}}}
happyReduce_18 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_18 = Int#
-> (HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happySpecReduce_2 Int#
5# HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
happyReduction_18
happyReduction_18 :: HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
happyReduction_18 HappyAbsSyn
happy_x_2
HappyAbsSyn
happy_x_1
= case HappyAbsSyn -> HappyWrap13
happyOut13 HappyAbsSyn
happy_x_1 of { (HappyWrap13 Bool
happy_var_1) ->
case HappyAbsSyn -> HappyWrap12
happyOut12 HappyAbsSyn
happy_x_2 of { (HappyWrap12 Dim Int
happy_var_2) ->
(Dim Int, Bool) -> HappyAbsSyn
happyIn9
((Dim Int
happy_var_2, Bool
happy_var_1)
)}}
happyReduce_19 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_19 = Int#
-> (HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happySpecReduce_2 Int#
5# HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
happyReduction_19
happyReduction_19 :: HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
happyReduction_19 HappyAbsSyn
happy_x_2
HappyAbsSyn
happy_x_1
= case HappyAbsSyn -> HappyWrap12
happyOut12 HappyAbsSyn
happy_x_1 of { (HappyWrap12 Dim Int
happy_var_1) ->
case HappyAbsSyn -> HappyWrap13
happyOut13 HappyAbsSyn
happy_x_2 of { (HappyWrap13 Bool
happy_var_2) ->
(Dim Int, Bool) -> HappyAbsSyn
happyIn9
((Dim Int
happy_var_1, Bool
happy_var_2)
)}}
happyReduce_20 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_20 = Int#
-> (HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happySpecReduce_1 Int#
5# HappyAbsSyn -> HappyAbsSyn
happyReduction_20
happyReduction_20 :: HappyAbsSyn -> HappyAbsSyn
happyReduction_20 HappyAbsSyn
happy_x_1
= case HappyAbsSyn -> HappyWrap12
happyOut12 HappyAbsSyn
happy_x_1 of { (HappyWrap12 Dim Int
happy_var_1) ->
(Dim Int, Bool) -> HappyAbsSyn
happyIn9
((Dim Int
happy_var_1, Bool
True)
)}
happyReduce_21 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_21 = Int#
-> (HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happySpecReduce_2 Int#
6# HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
happyReduction_21
happyReduction_21 :: HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
happyReduction_21 HappyAbsSyn
happy_x_2
HappyAbsSyn
happy_x_1
= case HappyAbsSyn -> HappyWrap11
happyOut11 HappyAbsSyn
happy_x_1 of { (HappyWrap11 Depth Int
happy_var_1) ->
case HappyAbsSyn -> HappyWrap13
happyOut13 HappyAbsSyn
happy_x_2 of { (HappyWrap13 Bool
happy_var_2) ->
(Depth Int, Bool) -> HappyAbsSyn
happyIn10
((Depth Int
happy_var_1, Bool
happy_var_2)
)}}
happyReduce_22 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_22 = Int#
-> (HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happySpecReduce_2 Int#
6# HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
happyReduction_22
happyReduction_22 :: HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
happyReduction_22 HappyAbsSyn
happy_x_2
HappyAbsSyn
happy_x_1
= case HappyAbsSyn -> HappyWrap13
happyOut13 HappyAbsSyn
happy_x_1 of { (HappyWrap13 Bool
happy_var_1) ->
case HappyAbsSyn -> HappyWrap11
happyOut11 HappyAbsSyn
happy_x_2 of { (HappyWrap11 Depth Int
happy_var_2) ->
(Depth Int, Bool) -> HappyAbsSyn
happyIn10
((Depth Int
happy_var_2, Bool
happy_var_1)
)}}
happyReduce_23 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_23 = Int#
-> (HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happySpecReduce_1 Int#
6# HappyAbsSyn -> HappyAbsSyn
happyReduction_23
happyReduction_23 :: HappyAbsSyn -> HappyAbsSyn
happyReduction_23 HappyAbsSyn
happy_x_1
= case HappyAbsSyn -> HappyWrap11
happyOut11 HappyAbsSyn
happy_x_1 of { (HappyWrap11 Depth Int
happy_var_1) ->
(Depth Int, Bool) -> HappyAbsSyn
happyIn10
((Depth Int
happy_var_1, Bool
True)
)}
happyReduce_24 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_24 = Int#
-> (HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happySpecReduce_3 Int#
7# HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
forall p p. HappyAbsSyn -> p -> p -> HappyAbsSyn
happyReduction_24
happyReduction_24 :: HappyAbsSyn -> p -> p -> HappyAbsSyn
happyReduction_24 HappyAbsSyn
happy_x_3
p
happy_x_2
p
happy_x_1
= case HappyAbsSyn -> Token
happyOutTok HappyAbsSyn
happy_x_3 of { (TNum String
happy_var_3) ->
Depth Int -> HappyAbsSyn
happyIn11
(Int -> Depth Int
forall a. a -> Depth a
Depth (Int -> Depth Int) -> Int -> Depth Int
forall a b. (a -> b) -> a -> b
$ String -> Int
forall a. Read a => String -> a
read String
happy_var_3
)}
happyReduce_25 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_25 = Int#
-> (HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happySpecReduce_3 Int#
8# HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
forall p p. HappyAbsSyn -> p -> p -> HappyAbsSyn
happyReduction_25
happyReduction_25 :: HappyAbsSyn -> p -> p -> HappyAbsSyn
happyReduction_25 HappyAbsSyn
happy_x_3
p
happy_x_2
p
happy_x_1
= case HappyAbsSyn -> Token
happyOutTok HappyAbsSyn
happy_x_3 of { (TNum String
happy_var_3) ->
Dim Int -> HappyAbsSyn
happyIn12
(Int -> Dim Int
forall a. a -> Dim a
Dim (Int -> Dim Int) -> Int -> Dim Int
forall a b. (a -> b) -> a -> b
$ String -> Int
forall a. Read a => String -> a
read String
happy_var_3
)}
happyReduce_26 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_26 = Int#
-> (HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happySpecReduce_1 Int#
9# HappyAbsSyn -> HappyAbsSyn
forall p. p -> HappyAbsSyn
happyReduction_26
happyReduction_26 :: p -> HappyAbsSyn
happyReduction_26 p
happy_x_1
= Bool -> HappyAbsSyn
happyIn13
(Bool
False
)
happyReduce_27 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_27 = Int#
-> (HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happySpecReduce_1 Int#
10# HappyAbsSyn -> HappyAbsSyn
happyReduction_27
happyReduction_27 :: HappyAbsSyn -> HappyAbsSyn
happyReduction_27 HappyAbsSyn
happy_x_1
= case HappyAbsSyn -> HappyWrap15
happyOut15 HappyAbsSyn
happy_x_1 of { (HappyWrap15 Multiplicity (Approximation Region)
happy_var_1) ->
(Bool -> SpecInner) -> HappyAbsSyn
happyIn14
(Multiplicity (Approximation Region) -> Bool -> SpecInner
SpecInner Multiplicity (Approximation Region)
happy_var_1
)}
happyReduce_28 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_28 = Int#
-> (HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happySpecReduce_2 Int#
11# HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
forall p. HappyAbsSyn -> p -> HappyAbsSyn
happyReduction_28
happyReduction_28 :: HappyAbsSyn -> p -> HappyAbsSyn
happyReduction_28 HappyAbsSyn
happy_x_2
p
happy_x_1
= case HappyAbsSyn -> HappyWrap16
happyOut16 HappyAbsSyn
happy_x_2 of { (HappyWrap16 Approximation Region
happy_var_2) ->
Multiplicity (Approximation Region) -> HappyAbsSyn
happyIn15
(Approximation Region -> Multiplicity (Approximation Region)
forall a. a -> Multiplicity a
Once Approximation Region
happy_var_2
)}
happyReduce_29 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_29 = Int#
-> (HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happySpecReduce_1 Int#
11# HappyAbsSyn -> HappyAbsSyn
happyReduction_29
happyReduction_29 :: HappyAbsSyn -> HappyAbsSyn
happyReduction_29 HappyAbsSyn
happy_x_1
= case HappyAbsSyn -> HappyWrap16
happyOut16 HappyAbsSyn
happy_x_1 of { (HappyWrap16 Approximation Region
happy_var_1) ->
Multiplicity (Approximation Region) -> HappyAbsSyn
happyIn15
(Approximation Region -> Multiplicity (Approximation Region)
forall a. a -> Multiplicity a
Mult Approximation Region
happy_var_1
)}
happyReduce_30 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_30 = Int#
-> (HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happySpecReduce_2 Int#
12# HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
forall p. HappyAbsSyn -> p -> HappyAbsSyn
happyReduction_30
happyReduction_30 :: HappyAbsSyn -> p -> HappyAbsSyn
happyReduction_30 HappyAbsSyn
happy_x_2
p
happy_x_1
= case HappyAbsSyn -> HappyWrap6
happyOut6 HappyAbsSyn
happy_x_2 of { (HappyWrap6 Region
happy_var_2) ->
Approximation Region -> HappyAbsSyn
happyIn16
(Maybe Region -> Maybe Region -> Approximation Region
forall a. Maybe a -> Maybe a -> Approximation a
Bound (Region -> Maybe Region
forall k1. k1 -> Maybe k1
Just Region
happy_var_2) Maybe Region
forall k1. Maybe k1
Nothing
)}
happyReduce_31 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_31 = Int#
-> (HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happySpecReduce_2 Int#
12# HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
forall p. HappyAbsSyn -> p -> HappyAbsSyn
happyReduction_31
happyReduction_31 :: HappyAbsSyn -> p -> HappyAbsSyn
happyReduction_31 HappyAbsSyn
happy_x_2
p
happy_x_1
= case HappyAbsSyn -> HappyWrap6
happyOut6 HappyAbsSyn
happy_x_2 of { (HappyWrap6 Region
happy_var_2) ->
Approximation Region -> HappyAbsSyn
happyIn16
(Maybe Region -> Maybe Region -> Approximation Region
forall a. Maybe a -> Maybe a -> Approximation a
Bound Maybe Region
forall k1. Maybe k1
Nothing (Region -> Maybe Region
forall k1. k1 -> Maybe k1
Just Region
happy_var_2)
)}
happyReduce_32 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_32 = Int#
-> (HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happySpecReduce_1 Int#
12# HappyAbsSyn -> HappyAbsSyn
happyReduction_32
happyReduction_32 :: HappyAbsSyn -> HappyAbsSyn
happyReduction_32 HappyAbsSyn
happy_x_1
= case HappyAbsSyn -> HappyWrap6
happyOut6 HappyAbsSyn
happy_x_1 of { (HappyWrap6 Region
happy_var_1) ->
Approximation Region -> HappyAbsSyn
happyIn16
(Region -> Approximation Region
forall a. a -> Approximation a
Exact Region
happy_var_1
)}
happyReduce_33 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_33 = Int#
-> (HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happySpecReduce_2 Int#
13# HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
happyReduction_33
happyReduction_33 :: HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
happyReduction_33 HappyAbsSyn
happy_x_2
HappyAbsSyn
happy_x_1
= case HappyAbsSyn -> Token
happyOutTok HappyAbsSyn
happy_x_1 of { (TId String
_ String
happy_var_1) ->
case HappyAbsSyn -> HappyWrap17
happyOut17 HappyAbsSyn
happy_x_2 of { (HappyWrap17 [String]
happy_var_2) ->
[String] -> HappyAbsSyn
happyIn17
(String
happy_var_1 String -> [String] -> [String]
forall k1. k1 -> [k1] -> [k1]
: [String]
happy_var_2
)}}
happyReduce_34 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyReduce_34 = Int#
-> (HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happySpecReduce_1 Int#
13# HappyAbsSyn -> HappyAbsSyn
happyReduction_34
happyReduction_34 :: HappyAbsSyn -> HappyAbsSyn
happyReduction_34 HappyAbsSyn
happy_x_1
= case HappyAbsSyn -> Token
happyOutTok HappyAbsSyn
happy_x_1 of { (TId String
_ String
happy_var_1) ->
[String] -> HappyAbsSyn
happyIn17
([String
happy_var_1]
)}
happyNewToken :: Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyNewToken Int#
action Happy_IntList
sts HappyStk HappyAbsSyn
stk [] =
Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyDoAction Int#
22# Token
forall a. a
notHappyAtAll Int#
action Happy_IntList
sts HappyStk HappyAbsSyn
stk []
happyNewToken Int#
action Happy_IntList
sts HappyStk HappyAbsSyn
stk (Token
tk:[Token]
tks) =
let cont :: Int# -> StencilSpecParser HappyAbsSyn
cont Int#
i = Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> StencilSpecParser HappyAbsSyn
happyDoAction Int#
i Token
tk Int#
action Happy_IntList
sts HappyStk HappyAbsSyn
stk [Token]
tks in
case Token
tk of {
TId String
_ String
"stencil" -> Int# -> StencilSpecParser HappyAbsSyn
cont Int#
1#;
TId String
_ String
"access" -> Int# -> StencilSpecParser HappyAbsSyn
cont Int#
2#;
TId String
_ String
"region" -> Int# -> StencilSpecParser HappyAbsSyn
cont Int#
3#;
TId String
_ String
"readonce" -> Int# -> StencilSpecParser HappyAbsSyn
cont Int#
4#;
TId String
_ String
"pointed" -> Int# -> StencilSpecParser HappyAbsSyn
cont Int#
5#;
TId String
_ String
"nonpointed" -> Int# -> StencilSpecParser HappyAbsSyn
cont Int#
6#;
TId String
_ String
"atmost" -> Int# -> StencilSpecParser HappyAbsSyn
cont Int#
7#;
TId String
_ String
"atleast" -> Int# -> StencilSpecParser HappyAbsSyn
cont Int#
8#;
TId String
_ String
"dim" -> Int# -> StencilSpecParser HappyAbsSyn
cont Int#
9#;
TId String
_ String
"depth" -> Int# -> StencilSpecParser HappyAbsSyn
cont Int#
10#;
TId String
_ String
"forward" -> Int# -> StencilSpecParser HappyAbsSyn
cont Int#
11#;
TId String
_ String
"backward" -> Int# -> StencilSpecParser HappyAbsSyn
cont Int#
12#;
TId String
_ String
"centered" -> Int# -> StencilSpecParser HappyAbsSyn
cont Int#
13#;
TId String
_ String
happy_dollar_dollar -> Int# -> StencilSpecParser HappyAbsSyn
cont Int#
14#;
TNum String
happy_dollar_dollar -> Int# -> StencilSpecParser HappyAbsSyn
cont Int#
15#;
Token
TPlus -> Int# -> StencilSpecParser HappyAbsSyn
cont Int#
16#;
Token
TStar -> Int# -> StencilSpecParser HappyAbsSyn
cont Int#
17#;
Token
TDoubleColon -> Int# -> StencilSpecParser HappyAbsSyn
cont Int#
18#;
Token
TEqual -> Int# -> StencilSpecParser HappyAbsSyn
cont Int#
19#;
Token
TLParen -> Int# -> StencilSpecParser HappyAbsSyn
cont Int#
20#;
Token
TRParen -> Int# -> StencilSpecParser HappyAbsSyn
cont Int#
21#;
Token
_ -> ([Token], [String]) -> StencilSpecParser HappyAbsSyn
forall a. ([Token], [String]) -> StencilSpecParser a
happyError' ((Token
tkToken -> [Token] -> [Token]
forall k1. k1 -> [k1] -> [k1]
:[Token]
tks), [])
}
happyError_ :: [String] -> Int# -> Token -> [Token] -> StencilSpecParser a
happyError_ [String]
explist Int#
22# Token
tk [Token]
tks = ([Token], [String]) -> StencilSpecParser a
forall a. ([Token], [String]) -> StencilSpecParser a
happyError' ([Token]
tks, [String]
explist)
happyError_ [String]
explist Int#
_ Token
tk [Token]
tks = ([Token], [String]) -> StencilSpecParser a
forall a. ([Token], [String]) -> StencilSpecParser a
happyError' ((Token
tkToken -> [Token] -> [Token]
forall k1. k1 -> [k1] -> [k1]
:[Token]
tks), [String]
explist)
happyThen :: () => StencilSpecParser a -> (a -> StencilSpecParser b) -> StencilSpecParser b
happyThen :: StencilSpecParser a
-> (a -> StencilSpecParser b) -> StencilSpecParser b
happyThen = StencilSpecParser a
-> (a -> StencilSpecParser b) -> StencilSpecParser b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
(>>=)
happyReturn :: () => a -> StencilSpecParser a
happyReturn :: a -> StencilSpecParser a
happyReturn = (a -> StencilSpecParser a
forall (m :: * -> *) a. Monad m => a -> m a
return)
happyThen1 :: m t -> (t -> t -> m b) -> t -> m b
happyThen1 m t
m t -> t -> m b
k t
tks = m t -> (t -> m b) -> m b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
(>>=) m t
m (\t
a -> t -> t -> m b
k t
a t
tks)
happyReturn1 :: () => a -> b -> StencilSpecParser a
happyReturn1 :: a -> b -> StencilSpecParser a
happyReturn1 = \a
a b
tks -> (a -> StencilSpecParser a
forall (m :: * -> *) a. Monad m => a -> m a
return) a
a
happyError' :: () => ([(Token)], [String]) -> StencilSpecParser a
happyError' :: ([Token], [String]) -> StencilSpecParser a
happyError' = (\([Token]
tokens, [String]
_) -> [Token] -> StencilSpecParser a
forall a. [Token] -> StencilSpecParser a
happyError [Token]
tokens)
parseSpecification :: [Token] -> StencilSpecParser Specification
parseSpecification [Token]
tks = StencilSpecParser Specification
happySomeParser where
happySomeParser :: StencilSpecParser Specification
happySomeParser = StencilSpecParser HappyAbsSyn
-> (HappyAbsSyn -> StencilSpecParser Specification)
-> StencilSpecParser Specification
forall a b.
StencilSpecParser a
-> (a -> StencilSpecParser b) -> StencilSpecParser b
happyThen (Int# -> [Token] -> StencilSpecParser HappyAbsSyn
happyParse Int#
0# [Token]
tks) (\HappyAbsSyn
x -> Specification -> StencilSpecParser Specification
forall a. a -> StencilSpecParser a
happyReturn (let {(HappyWrap4 Specification
x') = HappyAbsSyn -> HappyWrap4
happyOut4 HappyAbsSyn
x} in Specification
x'))
happySeq :: a -> b -> b
happySeq = a -> b -> b
forall a b. a -> b -> b
happyDontSeq
data SpecParseError
= NotAnIdentifier Char
| CouldNotParseSpecification [Token]
deriving (SpecParseError -> SpecParseError -> Bool
(SpecParseError -> SpecParseError -> Bool)
-> (SpecParseError -> SpecParseError -> Bool) -> Eq SpecParseError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SpecParseError -> SpecParseError -> Bool
$c/= :: SpecParseError -> SpecParseError -> Bool
== :: SpecParseError -> SpecParseError -> Bool
$c== :: SpecParseError -> SpecParseError -> Bool
Eq)
instance Show SpecParseError where
show :: SpecParseError -> String
show (CouldNotParseSpecification [Token]
ts) =
String
"Could not parse specification at: \"" String -> ShowS
forall a. [a] -> [a] -> [a]
++ [Token] -> String
prettyTokens [Token]
ts String -> ShowS
forall a. [a] -> [a] -> [a]
++ String
"\"\n"
show (NotAnIdentifier Char
c) = String
"Invalid character in identifier: " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Char -> String
forall a. Show a => a -> String
show Char
c
notAnIdentifier :: Char -> SpecParseError
notAnIdentifier :: Char -> SpecParseError
notAnIdentifier = Char -> SpecParseError
NotAnIdentifier
couldNotParseSpecification :: [Token] -> SpecParseError
couldNotParseSpecification :: [Token] -> SpecParseError
couldNotParseSpecification = [Token] -> SpecParseError
CouldNotParseSpecification
type StencilSpecParser a = Either SpecParseError a
newtype Depth a = Depth a
newtype Dim a = Dim a
applyAttr :: (Int -> Int -> Bool -> Syn.Region)
-> (Depth Int, Dim Int, Bool)
-> Syn.Region
applyAttr :: (Int -> Int -> Bool -> Region)
-> (Depth Int, Dim Int, Bool) -> Region
applyAttr Int -> Int -> Bool -> Region
constr (Depth Int
d, Dim Int
dim, Bool
irrefl) = Int -> Int -> Bool -> Region
constr Int
d Int
dim Bool
irrefl
data Token
= TDoubleColon
| TStar
| TPlus
| TEqual
| TComma
| TLParen
| TRParen
| TId String String
| TNum String
deriving (Int -> Token -> ShowS
[Token] -> ShowS
Token -> String
(Int -> Token -> ShowS)
-> (Token -> String) -> ([Token] -> ShowS) -> Show Token
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Token] -> ShowS
$cshowList :: [Token] -> ShowS
show :: Token -> String
$cshow :: Token -> String
showsPrec :: Int -> Token -> ShowS
$cshowsPrec :: Int -> Token -> ShowS
Show, Token -> Token -> Bool
(Token -> Token -> Bool) -> (Token -> Token -> Bool) -> Eq Token
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Token -> Token -> Bool
$c/= :: Token -> Token -> Bool
== :: Token -> Token -> Bool
$c== :: Token -> Token -> Bool
Eq)
addToTokens :: Token -> String -> StencilSpecParser [ Token ]
addToTokens :: Token -> String -> StencilSpecParser [Token]
addToTokens Token
tok String
rest = do
[Token]
tokens <- String -> StencilSpecParser [Token]
lexer String
rest
[Token] -> StencilSpecParser [Token]
forall (m :: * -> *) a. Monad m => a -> m a
return ([Token] -> StencilSpecParser [Token])
-> [Token] -> StencilSpecParser [Token]
forall a b. (a -> b) -> a -> b
$ Token
tok Token -> [Token] -> [Token]
forall k1. k1 -> [k1] -> [k1]
: [Token]
tokens
lexer :: String -> StencilSpecParser [ Token ]
lexer :: String -> StencilSpecParser [Token]
lexer [] = [Token] -> StencilSpecParser [Token]
forall (m :: * -> *) a. Monad m => a -> m a
return []
lexer (Char
' ':String
xs) = String -> StencilSpecParser [Token]
lexer String
xs
lexer (Char
'\t':String
xs) = String -> StencilSpecParser [Token]
lexer String
xs
lexer (Char
':':Char
':':String
xs) = Token -> String -> StencilSpecParser [Token]
addToTokens Token
TDoubleColon String
xs
lexer (Char
'*':String
xs) = Token -> String -> StencilSpecParser [Token]
addToTokens Token
TStar String
xs
lexer (Char
'+':String
xs) = Token -> String -> StencilSpecParser [Token]
addToTokens Token
TPlus String
xs
lexer (Char
'=':String
xs) = Token -> String -> StencilSpecParser [Token]
addToTokens Token
TEqual String
xs
lexer (Char
',':String
xs)
| Char
x':String
xs' <- (Char -> Bool) -> ShowS
forall a. (a -> Bool) -> [a] -> [a]
dropWhile Char -> Bool
isSpace String
xs, Bool -> Bool
not (Char -> Bool
isNumber Char
x') = String -> StencilSpecParser [Token]
lexer (Char
x'Char -> ShowS
forall k1. k1 -> [k1] -> [k1]
:String
xs')
| Bool
otherwise = Token -> String -> StencilSpecParser [Token]
addToTokens Token
TComma String
xs
lexer (Char
'(':String
xs) = Token -> String -> StencilSpecParser [Token]
addToTokens Token
TLParen String
xs
lexer (Char
')':String
xs) = Token -> String -> StencilSpecParser [Token]
addToTokens Token
TRParen String
xs
lexer (Char
x:String
xs)
| Char -> Bool
isLetter Char
x =
(String -> Token) -> (Char -> Bool) -> StencilSpecParser [Token]
aux (\String
x -> String -> String -> Token
TId String
x (String -> Token) -> String -> Token
forall a b. (a -> b) -> a -> b
$ (Char -> Char) -> ShowS
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Char -> Char
toLower String
x) ((Char -> Bool) -> StencilSpecParser [Token])
-> (Char -> Bool) -> StencilSpecParser [Token]
forall a b. (a -> b) -> a -> b
$ \ Char
c -> Char -> Bool
isAlphaNum Char
c Bool -> Bool -> Bool
|| Char
c Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== Char
'_'
| Char -> Bool
isPositiveNumber Char
x = (String -> Token) -> (Char -> Bool) -> StencilSpecParser [Token]
aux String -> Token
TNum Char -> Bool
isNumber
| Bool
otherwise
= SpecParseError -> StencilSpecParser [Token]
forall e (m :: * -> *) a. MonadError e m => e -> m a
throwError (SpecParseError -> StencilSpecParser [Token])
-> SpecParseError -> StencilSpecParser [Token]
forall a b. (a -> b) -> a -> b
$ Char -> SpecParseError
notAnIdentifier Char
x
where
isPositiveNumber :: Char -> Bool
isPositiveNumber Char
x = Char -> Bool
isNumber Char
x Bool -> Bool -> Bool
&& Char
x Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
/= Char
'0'
aux :: (String -> Token) -> (Char -> Bool) -> StencilSpecParser [Token]
aux String -> Token
f Char -> Bool
p = (String -> Token
f String
target Token -> [Token] -> [Token]
forall k1. k1 -> [k1] -> [k1]
:) ([Token] -> [Token])
-> StencilSpecParser [Token] -> StencilSpecParser [Token]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> String -> StencilSpecParser [Token]
lexer String
rest
where (String
target, String
rest) = (Char -> Bool) -> String -> (String, String)
forall a. (a -> Bool) -> [a] -> ([a], [a])
span Char -> Bool
p (Char
xChar -> ShowS
forall k1. k1 -> [k1] -> [k1]
:String
xs)
specParser :: SpecParser SpecParseError Specification
specParser :: SpecParser SpecParseError Specification
specParser = (String -> StencilSpecParser Specification)
-> [String] -> SpecParser SpecParseError Specification
forall e r. (String -> Either e r) -> [String] -> SpecParser e r
mkParser (\String
src -> do
[Token]
tokens <- String -> StencilSpecParser [Token]
lexer String
src
[Token] -> StencilSpecParser Specification
parseSpecification [Token]
tokens)
[String
"stencil", String
"region", String
"access"]
happyError :: [ Token ] -> StencilSpecParser a
happyError :: [Token] -> StencilSpecParser a
happyError = SpecParseError -> StencilSpecParser a
forall e (m :: * -> *) a. MonadError e m => e -> m a
throwError (SpecParseError -> StencilSpecParser a)
-> ([Token] -> SpecParseError) -> [Token] -> StencilSpecParser a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [Token] -> SpecParseError
couldNotParseSpecification
prettyTokens :: [ Token ] -> String
prettyTokens :: [Token] -> String
prettyTokens =
(String -> ShowS
forall a. [a] -> [a] -> [a]
++ String
"... ") ShowS -> ([Token] -> String) -> [Token] -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> [String] -> String
forall a. [a] -> [[a]] -> [a]
intercalate String
" " ([String] -> String) -> ([Token] -> [String]) -> [Token] -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Token -> String) -> [Token] -> [String]
forall a b. (a -> b) -> [a] -> [b]
map Token -> String
prettyToken ([Token] -> [String])
-> ([Token] -> [Token]) -> [Token] -> [String]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> [Token] -> [Token]
forall a. Eq a => Int -> [a] -> [a]
takeUniquePrefix Int
1
where
takeUniquePrefix :: Int -> [a] -> [a]
takeUniquePrefix Int
_ [] = []
takeUniquePrefix Int
n [a]
ts =
if ((Int -> [a] -> [a]
forall a. Int -> [a] -> [a]
take Int
n [a]
ts) [a] -> [a] -> Bool
forall a. Eq a => [a] -> [a] -> Bool
`isInfixOf` (Int -> [a] -> [a]
forall a. Int -> [a] -> [a]
drop Int
n [a]
ts))
then Int -> [a] -> [a]
takeUniquePrefix (Int
nInt -> Int -> Int
forall a. Num a => a -> a -> a
+Int
1) [a]
ts
else Int -> [a] -> [a]
forall a. Int -> [a] -> [a]
take Int
n [a]
ts
prettyToken :: Token -> String
prettyToken Token
TDoubleColon = String
"::"
prettyToken Token
TStar = String
"*"
prettyToken Token
TPlus = String
"+"
prettyToken Token
TEqual = String
"="
prettyToken Token
TComma = String
","
prettyToken Token
TLParen = String
"("
prettyToken Token
TRParen = String
")"
prettyToken (TId String
s String
_) = String
s
prettyToken (TNum String
n) = String
n
{-# LINE 1 "templates/GenericTemplate.hs" #-}
#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
data Happy_IntList = HappyCons Happy_GHC_Exts.Int# Happy_IntList
infixr 9 `HappyStk`
data HappyStk a = HappyStk a (HappyStk a)
happyParse start_state = happyNewToken start_state notHappyAtAll notHappyAtAll
happyAccept 0# tk st sts (_ `HappyStk` ans `HappyStk` _) =
happyReturn1 ans
happyAccept j tk st sts (HappyStk ans _) =
(happyTcHack j (happyTcHack st)) (happyReturn1 ans)
happyDoAction i tk st
=
case action of
0# ->
happyFail (happyExpListPerState ((Happy_GHC_Exts.I# (st)) :: Int)) i tk st
-1# ->
happyAccept i tk st
n | LT(n,(0# :: Happy_GHC_Exts.Int#)) ->
(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 ->
happyShift new_state i tk st
where new_state = (n Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#))
where off = happyAdjustOffset (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#
{-# INLINE happyLt #-}
happyLt x y = LT(x,y)
readArrayBit arr bit =
Bits.testBit (Happy_GHC_Exts.I# (indexShortOffAddr arr ((unbox_int bit) `Happy_GHC_Exts.iShiftRA#` 4#))) (bit `mod` 16)
where unbox_int (Happy_GHC_Exts.I# x) = x
data HappyAddr = HappyA# Happy_GHC_Exts.Addr#
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
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)
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
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 = happyAdjustOffset (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
happyGoto nt j tk st =
happyDoAction j tk new_state
where off = happyAdjustOffset (indexShortOffAddr happyGotoOffsets st)
off_i = (off Happy_GHC_Exts.+# nt)
new_state = indexShortOffAddr happyTable off_i
happyFail explist 0# tk old_st _ stk@(x `HappyStk` _) =
let i = (case Happy_GHC_Exts.unsafeCoerce# x of { (Happy_GHC_Exts.I# (i)) -> i }) in
happyError_ explist i tk
happyFail explist i tk (action) sts stk =
happyDoAction 0# tk action sts ((Happy_GHC_Exts.unsafeCoerce# (Happy_GHC_Exts.I# (i))) `HappyStk` stk)
notHappyAtAll :: a
notHappyAtAll = error "Internal Happy error\n"
happyTcHack :: Happy_GHC_Exts.Int# -> a -> a
happyTcHack x y = y
{-# INLINE happyTcHack #-}
happyDoSeq, happyDontSeq :: a -> b -> b
happyDoSeq a b = a `seq` b
happyDontSeq a b = b
{-# 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 #-}