{-# OPTIONS_GHC -w #-}
{-# OPTIONS -XMagicHash -XBangPatterns -XTypeSynonymInstances -XFlexibleInstances -cpp #-}
#if __GLASGOW_HASKELL__ >= 710
{-# OPTIONS_GHC -XPartialTypeSignatures #-}
#endif
module Camfort.Specification.Hoare.Parser (hoareParser) where
import Control.Monad.Except
import qualified Language.Fortran.AST as F
import Language.Verification
import Language.Expression.Prop
import qualified Camfort.Specification.Parser as Parser
import Camfort.Specification.Hoare.Syntax
import Camfort.Specification.Hoare.Lexer
import Camfort.Specification.Hoare.Parser.Types
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 (SpecOrDecl ())
happyIn4 :: (SpecOrDecl ()) -> (HappyAbsSyn )
happyIn4 :: SpecOrDecl () -> HappyAbsSyn
happyIn4 SpecOrDecl ()
x = HappyWrap4 -> HappyAbsSyn
Happy_GHC_Exts.unsafeCoerce# (SpecOrDecl () -> HappyWrap4
HappyWrap4 SpecOrDecl ()
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 (AuxDecl ())
happyIn5 :: (AuxDecl ()) -> (HappyAbsSyn )
happyIn5 :: AuxDecl () -> HappyAbsSyn
happyIn5 AuxDecl ()
x = HappyWrap5 -> HappyAbsSyn
Happy_GHC_Exts.unsafeCoerce# (AuxDecl () -> HappyWrap5
HappyWrap5 AuxDecl ()
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 (F.TypeSpec ())
happyIn6 :: (F.TypeSpec ()) -> (HappyAbsSyn )
happyIn6 :: TypeSpec () -> HappyAbsSyn
happyIn6 TypeSpec ()
x = HappyWrap6 -> HappyAbsSyn
Happy_GHC_Exts.unsafeCoerce# (TypeSpec () -> HappyWrap6
HappyWrap6 TypeSpec ()
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 (PrimSpec ())
happyIn7 :: (PrimSpec ()) -> (HappyAbsSyn )
happyIn7 :: PrimSpec () -> HappyAbsSyn
happyIn7 PrimSpec ()
x = HappyWrap7 -> HappyAbsSyn
Happy_GHC_Exts.unsafeCoerce# (PrimSpec () -> HappyWrap7
HappyWrap7 PrimSpec ()
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 (PrimSpec ())
happyIn8 :: (PrimSpec ()) -> (HappyAbsSyn )
happyIn8 :: PrimSpec () -> HappyAbsSyn
happyIn8 PrimSpec ()
x = HappyWrap8 -> HappyAbsSyn
Happy_GHC_Exts.unsafeCoerce# (PrimSpec () -> HappyWrap8
HappyWrap8 PrimSpec ()
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 (SpecKind)
happyIn9 :: (SpecKind) -> (HappyAbsSyn )
happyIn9 :: SpecKind -> HappyAbsSyn
happyIn9 SpecKind
x = HappyWrap9 -> HappyAbsSyn
Happy_GHC_Exts.unsafeCoerce# (SpecKind -> HappyWrap9
HappyWrap9 SpecKind
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 (PrimFormula ())
happyIn10 :: (PrimFormula ()) -> (HappyAbsSyn )
happyIn10 :: PrimFormula () -> HappyAbsSyn
happyIn10 PrimFormula ()
x = HappyWrap10 -> HappyAbsSyn
Happy_GHC_Exts.unsafeCoerce# (PrimFormula () -> HappyWrap10
HappyWrap10 PrimFormula ()
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 (F.Expression ())
happyIn11 :: (F.Expression ()) -> (HappyAbsSyn )
happyIn11 :: Expression () -> HappyAbsSyn
happyIn11 Expression ()
x = HappyWrap11 -> HappyAbsSyn
Happy_GHC_Exts.unsafeCoerce# (Expression () -> HappyWrap11
HappyWrap11 Expression ()
x)
{-# INLINE happyIn11 #-}
happyOut11 :: (HappyAbsSyn ) -> HappyWrap11
happyOut11 :: HappyAbsSyn -> HappyWrap11
happyOut11 HappyAbsSyn
x = HappyAbsSyn -> HappyWrap11
Happy_GHC_Exts.unsafeCoerce# HappyAbsSyn
x
{-# INLINE happyOut11 #-}
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\x08\x00\x04\x00\x02\x00\x00\x00\x00\x00\x00\xc0\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x2c\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x04\x00\xc0\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x2c\x00\x00\x0c\x0b\x00\x00\x00\x00\x00\x00\x4f\x00\x00\x00\x00\x00\x00\x0c\x0b\x00\x00\xc3\x02\x00\xc0\xb0\x00\x00\x30\x2c\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x40\x01\x00\x00\x50\x00\x00\x00\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#
{-# NOINLINE happyExpListPerState #-}
happyExpListPerState :: Int -> [[Char]]
happyExpListPerState Int
st =
[[Char]]
token_strs_expected
where token_strs :: [[Char]]
token_strs = [[Char]
"error",[Char]
"%dummy",[Char]
"%start_parseHoare",[Char]
"START",[Char]
"DECL",[Char]
"TYPESPEC",[Char]
"HOARE",[Char]
"SPEC",[Char]
"KIND",[Char]
"FORMULA",[Char]
"EXPR",[Char]
"static_assert",[Char]
"invariant",[Char]
"post",[Char]
"pre",[Char]
"seq",[Char]
"true",[Char]
"false",[Char]
"'&'",[Char]
"'|'",[Char]
"'->'",[Char]
"'<->'",[Char]
"'!'",[Char]
"'('",[Char]
"')'",[Char]
"tquoted",[Char]
"decl_aux",[Char]
"'::'",[Char]
"tname",[Char]
"%eof"]
bit_start :: Int
bit_start = Int
st Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
30
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
30
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
29]
token_strs_expected :: [[Char]]
token_strs_expected = ((Bool, Int) -> [[Char]]) -> [(Bool, Int)] -> [[Char]]
forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b]
concatMap (Bool, Int) -> [[Char]]
f [(Bool, Int)]
bits_indexed
f :: (Bool, Int) -> [[Char]]
f (Bool
False, Int
_) = []
f (Bool
True, Int
nr) = [[[Char]]
token_strs [[Char]] -> Int -> [Char]
forall a. [a] -> Int -> a
!! Int
nr]
happyActOffsets :: HappyAddr
happyActOffsets :: HappyAddr
happyActOffsets = Addr# -> HappyAddr
HappyA# Addr#
"\x01\x00\x0a\x00\x00\x00\x03\x00\xee\xff\x00\x00\x0b\x00\x0f\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfd\xff\x17\x00\x00\x00\x26\x00\x05\x00\x00\x00\x00\x00\x00\x00\xfd\xff\xfd\xff\x00\x00\x0c\x00\x00\x00\xfd\xff\xfd\xff\xfd\xff\xfd\xff\x00\x00\x04\x00\x00\x00\x11\x00\x1b\x00\x15\x00\x00\x00\x00\x00\x00\x00"#
happyGotoOffsets :: HappyAddr
happyGotoOffsets :: HappyAddr
happyGotoOffsets = Addr# -> HappyAddr
HappyA# Addr#
"\x21\x00\x36\x00\x00\x00\x22\x00\x00\x00\x00\x00\x00\x00\x38\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x27\x00\x00\x00\x00\x00\x00\x00\x29\x00\x2b\x00\x2d\x00\x2f\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\xfd\xff\x00\x00\x00\x00\xfa\xff\x00\x00\xf5\xff\xf7\xff\xf8\xff\xf6\xff\x00\x00\x00\x00\xfb\xff\x00\x00\x00\x00\xec\xff\xf4\xff\xf3\xff\x00\x00\x00\x00\xeb\xff\x00\x00\xee\xff\x00\x00\x00\x00\x00\x00\x00\x00\xf9\xff\x00\x00\xfc\xff\xef\xff\xf0\xff\xf1\xff\xf2\xff\xed\xff"#
happyCheck :: HappyAddr
happyCheck :: HappyAddr
happyCheck = Addr# -> HappyAddr
HappyA# Addr#
"\xff\xff\x13\x00\x01\x00\x06\x00\x07\x00\x02\x00\x03\x00\x04\x00\x05\x00\x0c\x00\x0d\x00\x01\x00\x0f\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x10\x00\x0e\x00\x0e\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0d\x00\x08\x00\x0e\x00\x0a\x00\x0b\x00\x08\x00\x0f\x00\x0a\x00\x0b\x00\x00\x00\x01\x00\x08\x00\x03\x00\x0a\x00\x04\x00\x05\x00\x11\x00\x06\x00\x07\x00\x06\x00\x07\x00\x06\x00\x07\x00\x06\x00\x07\x00\x06\x00\x07\x00\x06\x00\x07\x00\x06\x00\x07\x00\x0d\x00\x12\x00\x03\x00\x02\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"#
happyTable :: HappyAddr
happyTable :: HappyAddr
happyTable = Addr# -> HappyAddr
HappyA# Addr#
"\x00\x00\xff\xff\x04\x00\x15\x00\x16\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x17\x00\x18\x00\x04\x00\x19\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x07\x00\x22\x00\x20\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x08\x00\x1c\x00\x27\x00\x1e\x00\x00\x00\x1c\x00\x11\x00\x1e\x00\x1f\x00\x04\x00\x05\x00\x1c\x00\x02\x00\x1e\x00\x08\x00\x09\x00\x12\x00\x12\x00\x13\x00\x1a\x00\x13\x00\x19\x00\x13\x00\x25\x00\x13\x00\x24\x00\x13\x00\x23\x00\x13\x00\x22\x00\x13\x00\x0f\x00\x21\x00\x02\x00\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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]
-> HoareSpecParser HappyAbsSyn)
happyReduceArr = (Int, Int)
-> [(Int,
Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn)]
-> Array
Int
(Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn)
forall i e. Ix i => (i, i) -> [(i, e)] -> Array i e
Happy_Data_Array.array (Int
1, Int
20) [
(Int
1 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_1),
(Int
2 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_2),
(Int
3 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_3),
(Int
4 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_4),
(Int
5 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_5),
(Int
6 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_6),
(Int
7 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_7),
(Int
8 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_8),
(Int
9 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_9),
(Int
10 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_10),
(Int
11 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_11),
(Int
12 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_12),
(Int
13 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_13),
(Int
14 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_14),
(Int
15 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_15),
(Int
16 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_16),
(Int
17 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_17),
(Int
18 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_18),
(Int
19 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_19),
(Int
20 , Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_20)
]
happy_n_terms :: Int
happy_n_terms = Int
20 :: Int
happy_n_nonterms :: Int
happy_n_nonterms = Int
8 :: Int
happyReduce_1 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_1 = Int#
-> (HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happySpecReduce_1 Int#
0# HappyAbsSyn -> HappyAbsSyn
happyReduction_1
happyReduction_1 :: HappyAbsSyn -> HappyAbsSyn
happyReduction_1 HappyAbsSyn
happy_x_1
= case HappyAbsSyn -> HappyWrap7
happyOut7 HappyAbsSyn
happy_x_1 of { (HappyWrap7 PrimSpec ()
happy_var_1) ->
SpecOrDecl () -> HappyAbsSyn
happyIn4
(PrimSpec () -> SpecOrDecl ()
forall ann. PrimSpec ann -> SpecOrDecl ann
SodSpec PrimSpec ()
happy_var_1
)}
happyReduce_2 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_2 = Int#
-> (HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happySpecReduce_1 Int#
0# HappyAbsSyn -> HappyAbsSyn
happyReduction_2
happyReduction_2 :: HappyAbsSyn -> HappyAbsSyn
happyReduction_2 HappyAbsSyn
happy_x_1
= case HappyAbsSyn -> HappyWrap5
happyOut5 HappyAbsSyn
happy_x_1 of { (HappyWrap5 AuxDecl ()
happy_var_1) ->
SpecOrDecl () -> HappyAbsSyn
happyIn4
(AuxDecl () -> SpecOrDecl ()
forall ann. AuxDecl ann -> SpecOrDecl ann
SodDecl AuxDecl ()
happy_var_1
)}
happyReduce_3 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_3 = Int#
-> Int#
-> (HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce Int#
6# Int#
1# HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn
happyReduction_3
happyReduction_3 :: HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn
happyReduction_3 (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 -> HappyWrap6
happyOut6 HappyAbsSyn
happy_x_3 of { (HappyWrap6 TypeSpec ()
happy_var_3) ->
case HappyAbsSyn -> Token
happyOutTok HappyAbsSyn
happy_x_5 of { (TName [Char]
happy_var_5) ->
AuxDecl () -> HappyAbsSyn
happyIn5
([Char] -> TypeSpec () -> AuxDecl ()
forall ann. [Char] -> TypeSpec ann -> AuxDecl ann
AuxDecl [Char]
happy_var_5 TypeSpec ()
happy_var_3
) 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]
-> HoareSpecParser HappyAbsSyn
happyReduce_4 = Int#
-> Int#
-> (HappyStk HappyAbsSyn -> Token -> HoareSpecParser HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyMonadReduce Int#
1# Int#
2# HappyStk HappyAbsSyn -> Token -> HoareSpecParser HappyAbsSyn
forall p. HappyStk HappyAbsSyn -> p -> HoareSpecParser HappyAbsSyn
happyReduction_4
happyReduction_4 :: HappyStk HappyAbsSyn -> p -> HoareSpecParser HappyAbsSyn
happyReduction_4 (HappyAbsSyn
happy_x_1 `HappyStk`
HappyStk HappyAbsSyn
happyRest) p
tk
= HoareSpecParser (TypeSpec ())
-> (TypeSpec () -> HoareSpecParser HappyAbsSyn)
-> HoareSpecParser HappyAbsSyn
forall a b.
HoareSpecParser a -> (a -> HoareSpecParser b) -> HoareSpecParser b
happyThen ((case HappyAbsSyn -> Token
happyOutTok HappyAbsSyn
happy_x_1 of { (TQuoted [Char]
happy_var_1) ->
( [Char] -> HoareSpecParser (TypeSpec ())
parseTypeSpec [Char]
happy_var_1)})
) (\TypeSpec ()
r -> HappyAbsSyn -> HoareSpecParser HappyAbsSyn
forall a. a -> HoareSpecParser a
happyReturn (TypeSpec () -> HappyAbsSyn
happyIn6 TypeSpec ()
r))
happyReduce_5 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_5 = Int#
-> (HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happySpecReduce_2 Int#
3# HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
forall p. HappyAbsSyn -> p -> HappyAbsSyn
happyReduction_5
happyReduction_5 :: HappyAbsSyn -> p -> HappyAbsSyn
happyReduction_5 HappyAbsSyn
happy_x_2
p
happy_x_1
= case HappyAbsSyn -> HappyWrap8
happyOut8 HappyAbsSyn
happy_x_2 of { (HappyWrap8 PrimSpec ()
happy_var_2) ->
PrimSpec () -> HappyAbsSyn
happyIn7
(PrimSpec ()
happy_var_2
)}
happyReduce_6 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_6 = Int#
-> Int#
-> (HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce Int#
4# Int#
4# HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn
happyReduction_6
happyReduction_6 :: HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn
happyReduction_6 (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 -> HappyWrap9
happyOut9 HappyAbsSyn
happy_x_1 of { (HappyWrap9 SpecKind
happy_var_1) ->
case HappyAbsSyn -> HappyWrap10
happyOut10 HappyAbsSyn
happy_x_3 of { (HappyWrap10 PrimFormula ()
happy_var_3) ->
PrimSpec () -> HappyAbsSyn
happyIn8
(SpecKind -> PrimFormula () -> PrimSpec ()
forall a. SpecKind -> a -> Specification a
Specification SpecKind
happy_var_1 PrimFormula ()
happy_var_3
) HappyAbsSyn -> HappyStk HappyAbsSyn -> HappyStk HappyAbsSyn
forall a. a -> HappyStk a -> HappyStk a
`HappyStk` HappyStk HappyAbsSyn
happyRest}}
happyReduce_7 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_7 = Int#
-> (HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happySpecReduce_1 Int#
5# HappyAbsSyn -> HappyAbsSyn
forall p. p -> HappyAbsSyn
happyReduction_7
happyReduction_7 :: p -> HappyAbsSyn
happyReduction_7 p
happy_x_1
= SpecKind -> HappyAbsSyn
happyIn9
(SpecKind
SpecPre
)
happyReduce_8 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_8 = Int#
-> (HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happySpecReduce_1 Int#
5# HappyAbsSyn -> HappyAbsSyn
forall p. p -> HappyAbsSyn
happyReduction_8
happyReduction_8 :: p -> HappyAbsSyn
happyReduction_8 p
happy_x_1
= SpecKind -> HappyAbsSyn
happyIn9
(SpecKind
SpecPost
)
happyReduce_9 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_9 = Int#
-> (HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happySpecReduce_1 Int#
5# HappyAbsSyn -> HappyAbsSyn
forall p. p -> HappyAbsSyn
happyReduction_9
happyReduction_9 :: p -> HappyAbsSyn
happyReduction_9 p
happy_x_1
= SpecKind -> HappyAbsSyn
happyIn9
(SpecKind
SpecSeq
)
happyReduce_10 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_10 = Int#
-> (HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happySpecReduce_1 Int#
5# HappyAbsSyn -> HappyAbsSyn
forall p. p -> HappyAbsSyn
happyReduction_10
happyReduction_10 :: p -> HappyAbsSyn
happyReduction_10 p
happy_x_1
= SpecKind -> HappyAbsSyn
happyIn9
(SpecKind
SpecInvariant
)
happyReduce_11 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_11 = Int#
-> (HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happySpecReduce_1 Int#
6# HappyAbsSyn -> HappyAbsSyn
forall p. p -> HappyAbsSyn
happyReduction_11
happyReduction_11 :: p -> HappyAbsSyn
happyReduction_11 p
happy_x_1
= PrimFormula () -> HappyAbsSyn
happyIn10
(PrimLogic (PrimFormula ()) -> PrimFormula ()
forall ann. PrimLogic (PrimFormula ann) -> PrimFormula ann
PFLogical (Bool -> PrimLogic (PrimFormula ())
forall a. Bool -> PrimLogic a
PLLit Bool
True)
)
happyReduce_12 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_12 = Int#
-> (HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happySpecReduce_1 Int#
6# HappyAbsSyn -> HappyAbsSyn
forall p. p -> HappyAbsSyn
happyReduction_12
happyReduction_12 :: p -> HappyAbsSyn
happyReduction_12 p
happy_x_1
= PrimFormula () -> HappyAbsSyn
happyIn10
(PrimLogic (PrimFormula ()) -> PrimFormula ()
forall ann. PrimLogic (PrimFormula ann) -> PrimFormula ann
PFLogical (Bool -> PrimLogic (PrimFormula ())
forall a. Bool -> PrimLogic a
PLLit Bool
False)
)
happyReduce_13 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_13 = Int#
-> (HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happySpecReduce_3 Int#
6# HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
forall p. HappyAbsSyn -> p -> HappyAbsSyn -> HappyAbsSyn
happyReduction_13
happyReduction_13 :: HappyAbsSyn -> p -> HappyAbsSyn -> HappyAbsSyn
happyReduction_13 HappyAbsSyn
happy_x_3
p
happy_x_2
HappyAbsSyn
happy_x_1
= case HappyAbsSyn -> HappyWrap10
happyOut10 HappyAbsSyn
happy_x_1 of { (HappyWrap10 PrimFormula ()
happy_var_1) ->
case HappyAbsSyn -> HappyWrap10
happyOut10 HappyAbsSyn
happy_x_3 of { (HappyWrap10 PrimFormula ()
happy_var_3) ->
PrimFormula () -> HappyAbsSyn
happyIn10
(PrimLogic (PrimFormula ()) -> PrimFormula ()
forall ann. PrimLogic (PrimFormula ann) -> PrimFormula ann
PFLogical (PrimFormula () -> PrimFormula () -> PrimLogic (PrimFormula ())
forall a. a -> a -> PrimLogic a
PLAnd PrimFormula ()
happy_var_1 PrimFormula ()
happy_var_3)
)}}
happyReduce_14 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_14 = Int#
-> (HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happySpecReduce_3 Int#
6# HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
forall p. HappyAbsSyn -> p -> HappyAbsSyn -> HappyAbsSyn
happyReduction_14
happyReduction_14 :: HappyAbsSyn -> p -> HappyAbsSyn -> HappyAbsSyn
happyReduction_14 HappyAbsSyn
happy_x_3
p
happy_x_2
HappyAbsSyn
happy_x_1
= case HappyAbsSyn -> HappyWrap10
happyOut10 HappyAbsSyn
happy_x_1 of { (HappyWrap10 PrimFormula ()
happy_var_1) ->
case HappyAbsSyn -> HappyWrap10
happyOut10 HappyAbsSyn
happy_x_3 of { (HappyWrap10 PrimFormula ()
happy_var_3) ->
PrimFormula () -> HappyAbsSyn
happyIn10
(PrimLogic (PrimFormula ()) -> PrimFormula ()
forall ann. PrimLogic (PrimFormula ann) -> PrimFormula ann
PFLogical (PrimFormula () -> PrimFormula () -> PrimLogic (PrimFormula ())
forall a. a -> a -> PrimLogic a
PLOr PrimFormula ()
happy_var_1 PrimFormula ()
happy_var_3)
)}}
happyReduce_15 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_15 = Int#
-> (HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happySpecReduce_3 Int#
6# HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
forall p. HappyAbsSyn -> p -> HappyAbsSyn -> HappyAbsSyn
happyReduction_15
happyReduction_15 :: HappyAbsSyn -> p -> HappyAbsSyn -> HappyAbsSyn
happyReduction_15 HappyAbsSyn
happy_x_3
p
happy_x_2
HappyAbsSyn
happy_x_1
= case HappyAbsSyn -> HappyWrap10
happyOut10 HappyAbsSyn
happy_x_1 of { (HappyWrap10 PrimFormula ()
happy_var_1) ->
case HappyAbsSyn -> HappyWrap10
happyOut10 HappyAbsSyn
happy_x_3 of { (HappyWrap10 PrimFormula ()
happy_var_3) ->
PrimFormula () -> HappyAbsSyn
happyIn10
(PrimLogic (PrimFormula ()) -> PrimFormula ()
forall ann. PrimLogic (PrimFormula ann) -> PrimFormula ann
PFLogical (PrimFormula () -> PrimFormula () -> PrimLogic (PrimFormula ())
forall a. a -> a -> PrimLogic a
PLImpl PrimFormula ()
happy_var_1 PrimFormula ()
happy_var_3)
)}}
happyReduce_16 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_16 = Int#
-> (HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happySpecReduce_3 Int#
6# HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
forall p. HappyAbsSyn -> p -> HappyAbsSyn -> HappyAbsSyn
happyReduction_16
happyReduction_16 :: HappyAbsSyn -> p -> HappyAbsSyn -> HappyAbsSyn
happyReduction_16 HappyAbsSyn
happy_x_3
p
happy_x_2
HappyAbsSyn
happy_x_1
= case HappyAbsSyn -> HappyWrap10
happyOut10 HappyAbsSyn
happy_x_1 of { (HappyWrap10 PrimFormula ()
happy_var_1) ->
case HappyAbsSyn -> HappyWrap10
happyOut10 HappyAbsSyn
happy_x_3 of { (HappyWrap10 PrimFormula ()
happy_var_3) ->
PrimFormula () -> HappyAbsSyn
happyIn10
(PrimLogic (PrimFormula ()) -> PrimFormula ()
forall ann. PrimLogic (PrimFormula ann) -> PrimFormula ann
PFLogical (PrimFormula () -> PrimFormula () -> PrimLogic (PrimFormula ())
forall a. a -> a -> PrimLogic a
PLEquiv PrimFormula ()
happy_var_1 PrimFormula ()
happy_var_3)
)}}
happyReduce_17 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_17 = Int#
-> (HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happySpecReduce_2 Int#
6# HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
forall p. HappyAbsSyn -> p -> HappyAbsSyn
happyReduction_17
happyReduction_17 :: HappyAbsSyn -> p -> HappyAbsSyn
happyReduction_17 HappyAbsSyn
happy_x_2
p
happy_x_1
= case HappyAbsSyn -> HappyWrap10
happyOut10 HappyAbsSyn
happy_x_2 of { (HappyWrap10 PrimFormula ()
happy_var_2) ->
PrimFormula () -> HappyAbsSyn
happyIn10
(PrimLogic (PrimFormula ()) -> PrimFormula ()
forall ann. PrimLogic (PrimFormula ann) -> PrimFormula ann
PFLogical (PrimFormula () -> PrimLogic (PrimFormula ())
forall a. a -> PrimLogic a
PLNot PrimFormula ()
happy_var_2)
)}
happyReduce_18 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_18 = Int#
-> (HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happySpecReduce_3 Int#
6# HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn -> HappyAbsSyn
forall p p. p -> HappyAbsSyn -> p -> HappyAbsSyn
happyReduction_18
happyReduction_18 :: p -> HappyAbsSyn -> p -> HappyAbsSyn
happyReduction_18 p
happy_x_3
HappyAbsSyn
happy_x_2
p
happy_x_1
= case HappyAbsSyn -> HappyWrap10
happyOut10 HappyAbsSyn
happy_x_2 of { (HappyWrap10 PrimFormula ()
happy_var_2) ->
PrimFormula () -> HappyAbsSyn
happyIn10
(PrimFormula ()
happy_var_2
)}
happyReduce_19 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_19 = Int#
-> (HappyAbsSyn -> HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happySpecReduce_1 Int#
6# HappyAbsSyn -> HappyAbsSyn
happyReduction_19
happyReduction_19 :: HappyAbsSyn -> HappyAbsSyn
happyReduction_19 HappyAbsSyn
happy_x_1
= case HappyAbsSyn -> HappyWrap11
happyOut11 HappyAbsSyn
happy_x_1 of { (HappyWrap11 Expression ()
happy_var_1) ->
PrimFormula () -> HappyAbsSyn
happyIn10
(Expression () -> PrimFormula ()
forall ann. Expression ann -> PrimFormula ann
PFExpr Expression ()
happy_var_1
)}
happyReduce_20 :: Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyReduce_20 = Int#
-> Int#
-> (HappyStk HappyAbsSyn -> Token -> HoareSpecParser HappyAbsSyn)
-> Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyMonadReduce Int#
1# Int#
7# HappyStk HappyAbsSyn -> Token -> HoareSpecParser HappyAbsSyn
forall p. HappyStk HappyAbsSyn -> p -> HoareSpecParser HappyAbsSyn
happyReduction_20
happyReduction_20 :: HappyStk HappyAbsSyn -> p -> HoareSpecParser HappyAbsSyn
happyReduction_20 (HappyAbsSyn
happy_x_1 `HappyStk`
HappyStk HappyAbsSyn
happyRest) p
tk
= HoareSpecParser (Expression ())
-> (Expression () -> HoareSpecParser HappyAbsSyn)
-> HoareSpecParser HappyAbsSyn
forall a b.
HoareSpecParser a -> (a -> HoareSpecParser b) -> HoareSpecParser b
happyThen ((case HappyAbsSyn -> Token
happyOutTok HappyAbsSyn
happy_x_1 of { (TQuoted [Char]
happy_var_1) ->
( [Char] -> HoareSpecParser (Expression ())
parseExpression [Char]
happy_var_1)})
) (\Expression ()
r -> HappyAbsSyn -> HoareSpecParser HappyAbsSyn
forall a. a -> HoareSpecParser a
happyReturn (Expression () -> HappyAbsSyn
happyIn11 Expression ()
r))
happyNewToken :: Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyNewToken Int#
action Happy_IntList
sts HappyStk HappyAbsSyn
stk [] =
Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyDoAction Int#
19# 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# -> HoareSpecParser HappyAbsSyn
cont Int#
i = Int#
-> Token
-> Int#
-> Happy_IntList
-> HappyStk HappyAbsSyn
-> [Token]
-> HoareSpecParser HappyAbsSyn
happyDoAction Int#
i Token
tk Int#
action Happy_IntList
sts HappyStk HappyAbsSyn
stk [Token]
tks in
case Token
tk of {
Token
TStaticAssert -> Int# -> HoareSpecParser HappyAbsSyn
cont Int#
1#;
Token
TInvariant -> Int# -> HoareSpecParser HappyAbsSyn
cont Int#
2#;
Token
TPost -> Int# -> HoareSpecParser HappyAbsSyn
cont Int#
3#;
Token
TPre -> Int# -> HoareSpecParser HappyAbsSyn
cont Int#
4#;
Token
TSeq -> Int# -> HoareSpecParser HappyAbsSyn
cont Int#
5#;
Token
TTrue -> Int# -> HoareSpecParser HappyAbsSyn
cont Int#
6#;
Token
TFalse -> Int# -> HoareSpecParser HappyAbsSyn
cont Int#
7#;
Token
TAnd -> Int# -> HoareSpecParser HappyAbsSyn
cont Int#
8#;
Token
TOr -> Int# -> HoareSpecParser HappyAbsSyn
cont Int#
9#;
Token
TImpl -> Int# -> HoareSpecParser HappyAbsSyn
cont Int#
10#;
Token
TEquiv -> Int# -> HoareSpecParser HappyAbsSyn
cont Int#
11#;
Token
TNot -> Int# -> HoareSpecParser HappyAbsSyn
cont Int#
12#;
Token
TLParen -> Int# -> HoareSpecParser HappyAbsSyn
cont Int#
13#;
Token
TRParen -> Int# -> HoareSpecParser HappyAbsSyn
cont Int#
14#;
TQuoted [Char]
happy_dollar_dollar -> Int# -> HoareSpecParser HappyAbsSyn
cont Int#
15#;
Token
TDeclAux -> Int# -> HoareSpecParser HappyAbsSyn
cont Int#
16#;
Token
TDColon -> Int# -> HoareSpecParser HappyAbsSyn
cont Int#
17#;
TName [Char]
happy_dollar_dollar -> Int# -> HoareSpecParser HappyAbsSyn
cont Int#
18#;
Token
_ -> ([Token], [[Char]]) -> HoareSpecParser HappyAbsSyn
forall a. ([Token], [[Char]]) -> HoareSpecParser a
happyError' ((Token
tkToken -> [Token] -> [Token]
forall k1. k1 -> [k1] -> [k1]
:[Token]
tks), [])
}
happyError_ :: [[Char]] -> Int# -> Token -> [Token] -> HoareSpecParser a
happyError_ [[Char]]
explist Int#
19# Token
tk [Token]
tks = ([Token], [[Char]]) -> HoareSpecParser a
forall a. ([Token], [[Char]]) -> HoareSpecParser a
happyError' ([Token]
tks, [[Char]]
explist)
happyError_ [[Char]]
explist Int#
_ Token
tk [Token]
tks = ([Token], [[Char]]) -> HoareSpecParser a
forall a. ([Token], [[Char]]) -> HoareSpecParser a
happyError' ((Token
tkToken -> [Token] -> [Token]
forall k1. k1 -> [k1] -> [k1]
:[Token]
tks), [[Char]]
explist)
happyThen :: () => HoareSpecParser a -> (a -> HoareSpecParser b) -> HoareSpecParser b
happyThen :: HoareSpecParser a -> (a -> HoareSpecParser b) -> HoareSpecParser b
happyThen = HoareSpecParser a -> (a -> HoareSpecParser b) -> HoareSpecParser b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
(>>=)
happyReturn :: () => a -> HoareSpecParser a
happyReturn :: a -> HoareSpecParser a
happyReturn = (a -> HoareSpecParser 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 -> HoareSpecParser a
happyReturn1 :: a -> b -> HoareSpecParser a
happyReturn1 = \a
a b
tks -> (a -> HoareSpecParser a
forall (m :: * -> *) a. Monad m => a -> m a
return) a
a
happyError' :: () => ([(Token)], [String]) -> HoareSpecParser a
happyError' :: ([Token], [[Char]]) -> HoareSpecParser a
happyError' = (\([Token]
tokens, [[Char]]
_) -> [Token] -> HoareSpecParser a
forall a. [Token] -> HoareSpecParser a
parseError [Token]
tokens)
parseHoare :: [Token] -> HoareSpecParser (SpecOrDecl ())
parseHoare [Token]
tks = HoareSpecParser (SpecOrDecl ())
happySomeParser where
happySomeParser :: HoareSpecParser (SpecOrDecl ())
happySomeParser = HoareSpecParser HappyAbsSyn
-> (HappyAbsSyn -> HoareSpecParser (SpecOrDecl ()))
-> HoareSpecParser (SpecOrDecl ())
forall a b.
HoareSpecParser a -> (a -> HoareSpecParser b) -> HoareSpecParser b
happyThen (Int# -> [Token] -> HoareSpecParser HappyAbsSyn
happyParse Int#
0# [Token]
tks) (\HappyAbsSyn
x -> SpecOrDecl () -> HoareSpecParser (SpecOrDecl ())
forall a. a -> HoareSpecParser a
happyReturn (let {(HappyWrap4 SpecOrDecl ()
x') = HappyAbsSyn -> HappyWrap4
happyOut4 HappyAbsSyn
x} in SpecOrDecl ()
x'))
happySeq :: a -> b -> b
happySeq = a -> b -> b
forall a b. a -> b -> b
happyDontSeq
parseError :: [Token] -> HoareSpecParser a
parseError :: [Token] -> HoareSpecParser a
parseError = HoareParseError -> HoareSpecParser a
forall e (m :: * -> *) a. MonadError e m => e -> m a
throwError (HoareParseError -> HoareSpecParser a)
-> ([Token] -> HoareParseError) -> [Token] -> HoareSpecParser a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [Token] -> HoareParseError
ParseError
hoareParser :: Parser.SpecParser HoareParseError (SpecOrDecl ())
hoareParser :: SpecParser HoareParseError (SpecOrDecl ())
hoareParser = ([Char] -> HoareSpecParser (SpecOrDecl ()))
-> [[Char]] -> SpecParser HoareParseError (SpecOrDecl ())
forall e r. ([Char] -> Either e r) -> [[Char]] -> SpecParser e r
Parser.mkParser (\[Char]
src -> do
[Token]
tokens <- [Char] -> HoareSpecParser [Token]
lexer [Char]
src
[Token] -> HoareSpecParser (SpecOrDecl ())
parseHoare [Token]
tokens)
[[Char]
"static_assert", [Char]
"invariant", [Char]
"post", [Char]
"pre", [Char]
"seq", [Char]
"decl_aux"]
{-# 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 #-}