@@ -0,0 +1,755 @@
2+{-# OPTIONS -fglasgow-exts -cpp #-}
3+{-# OPTIONS -fno-warn-incomplete-patterns -fno-warn-overlapping-patterns #-}
4+module Hackage4Nix.Nix.Par where
5+import Hackage4Nix.Nix.Abs
6+import Hackage4Nix.Nix.Lex
7+import Hackage4Nix.Nix.ErrM
8+import qualified Data.Array as Happy_Data_Array
9+import qualified GHC.Exts as Happy_GHC_Exts
11+-- parser produced by Happy Version 1.18.6
13+newtype HappyAbsSyn = HappyAbsSyn HappyAny
14+#if __GLASGOW_HASKELL__ >= 607
15+type HappyAny = Happy_GHC_Exts.Any
17+type HappyAny = forall a . a
19+happyIn14 :: (Ident) -> (HappyAbsSyn )
20+happyIn14 x = Happy_GHC_Exts.unsafeCoerce# x
21+{-# INLINE happyIn14 #-}
22+happyOut14 :: (HappyAbsSyn ) -> (Ident)
23+happyOut14 x = Happy_GHC_Exts.unsafeCoerce# x
24+{-# INLINE happyOut14 #-}
25+happyIn15 :: (String) -> (HappyAbsSyn )
26+happyIn15 x = Happy_GHC_Exts.unsafeCoerce# x
27+{-# INLINE happyIn15 #-}
28+happyOut15 :: (HappyAbsSyn ) -> (String)
29+happyOut15 x = Happy_GHC_Exts.unsafeCoerce# x
30+{-# INLINE happyOut15 #-}
31+happyIn16 :: (QString) -> (HappyAbsSyn )
32+happyIn16 x = Happy_GHC_Exts.unsafeCoerce# x
33+{-# INLINE happyIn16 #-}
34+happyOut16 :: (HappyAbsSyn ) -> (QString)
35+happyOut16 x = Happy_GHC_Exts.unsafeCoerce# x
36+{-# INLINE happyOut16 #-}
37+happyIn17 :: (URL) -> (HappyAbsSyn )
38+happyIn17 x = Happy_GHC_Exts.unsafeCoerce# x
39+{-# INLINE happyIn17 #-}
40+happyOut17 :: (HappyAbsSyn ) -> (URL)
41+happyOut17 x = Happy_GHC_Exts.unsafeCoerce# x
42+{-# INLINE happyOut17 #-}
43+happyIn18 :: (Path) -> (HappyAbsSyn )
44+happyIn18 x = Happy_GHC_Exts.unsafeCoerce# x
45+{-# INLINE happyIn18 #-}
46+happyOut18 :: (HappyAbsSyn ) -> (Path)
47+happyOut18 x = Happy_GHC_Exts.unsafeCoerce# x
48+{-# INLINE happyOut18 #-}
49+happyIn19 :: (Expr) -> (HappyAbsSyn )
50+happyIn19 x = Happy_GHC_Exts.unsafeCoerce# x
51+{-# INLINE happyIn19 #-}
52+happyOut19 :: (HappyAbsSyn ) -> (Expr)
53+happyOut19 x = Happy_GHC_Exts.unsafeCoerce# x
54+{-# INLINE happyOut19 #-}
55+happyIn20 :: (Argument) -> (HappyAbsSyn )
56+happyIn20 x = Happy_GHC_Exts.unsafeCoerce# x
57+{-# INLINE happyIn20 #-}
58+happyOut20 :: (HappyAbsSyn ) -> (Argument)
59+happyOut20 x = Happy_GHC_Exts.unsafeCoerce# x
60+{-# INLINE happyOut20 #-}
61+happyIn21 :: ([Argument]) -> (HappyAbsSyn )
62+happyIn21 x = Happy_GHC_Exts.unsafeCoerce# x
63+{-# INLINE happyIn21 #-}
64+happyOut21 :: (HappyAbsSyn ) -> ([Argument])
65+happyOut21 x = Happy_GHC_Exts.unsafeCoerce# x
66+{-# INLINE happyOut21 #-}
67+happyIn22 :: (Dictionary) -> (HappyAbsSyn )
68+happyIn22 x = Happy_GHC_Exts.unsafeCoerce# x
69+{-# INLINE happyIn22 #-}
70+happyOut22 :: (HappyAbsSyn ) -> (Dictionary)
71+happyOut22 x = Happy_GHC_Exts.unsafeCoerce# x
72+{-# INLINE happyOut22 #-}
73+happyIn23 :: (Attribute) -> (HappyAbsSyn )
74+happyIn23 x = Happy_GHC_Exts.unsafeCoerce# x
75+{-# INLINE happyIn23 #-}
76+happyOut23 :: (HappyAbsSyn ) -> (Attribute)
77+happyOut23 x = Happy_GHC_Exts.unsafeCoerce# x
78+{-# INLINE happyOut23 #-}
79+happyIn24 :: ([Attribute]) -> (HappyAbsSyn )
80+happyIn24 x = Happy_GHC_Exts.unsafeCoerce# x
81+{-# INLINE happyIn24 #-}
82+happyOut24 :: (HappyAbsSyn ) -> ([Attribute])
83+happyOut24 x = Happy_GHC_Exts.unsafeCoerce# x
84+{-# INLINE happyOut24 #-}
85+happyIn25 :: (Reference) -> (HappyAbsSyn )
86+happyIn25 x = Happy_GHC_Exts.unsafeCoerce# x
87+{-# INLINE happyIn25 #-}
88+happyOut25 :: (HappyAbsSyn ) -> (Reference)
89+happyOut25 x = Happy_GHC_Exts.unsafeCoerce# x
90+{-# INLINE happyOut25 #-}
91+happyIn26 :: ([Ident]) -> (HappyAbsSyn )
92+happyIn26 x = Happy_GHC_Exts.unsafeCoerce# x
93+{-# INLINE happyIn26 #-}
94+happyOut26 :: (HappyAbsSyn ) -> ([Ident])
95+happyOut26 x = Happy_GHC_Exts.unsafeCoerce# x
96+{-# INLINE happyOut26 #-}
97+happyIn27 :: (Value) -> (HappyAbsSyn )
98+happyIn27 x = Happy_GHC_Exts.unsafeCoerce# x
99+{-# INLINE happyIn27 #-}
100+happyOut27 :: (HappyAbsSyn ) -> (Value)
101+happyOut27 x = Happy_GHC_Exts.unsafeCoerce# x
102+{-# INLINE happyOut27 #-}
103+happyIn28 :: ([Value]) -> (HappyAbsSyn )
104+happyIn28 x = Happy_GHC_Exts.unsafeCoerce# x
105+{-# INLINE happyIn28 #-}
106+happyOut28 :: (HappyAbsSyn ) -> ([Value])
107+happyOut28 x = Happy_GHC_Exts.unsafeCoerce# x
108+{-# INLINE happyOut28 #-}
109+happyIn29 :: (Boolean) -> (HappyAbsSyn )
110+happyIn29 x = Happy_GHC_Exts.unsafeCoerce# x
111+{-# INLINE happyIn29 #-}
112+happyOut29 :: (HappyAbsSyn ) -> (Boolean)
113+happyOut29 x = Happy_GHC_Exts.unsafeCoerce# x
114+{-# INLINE happyOut29 #-}
115+happyInTok :: (Token) -> (HappyAbsSyn )
116+happyInTok x = Happy_GHC_Exts.unsafeCoerce# x
117+{-# INLINE happyInTok #-}
118+happyOutTok :: (HappyAbsSyn ) -> (Token)
119+happyOutTok x = Happy_GHC_Exts.unsafeCoerce# x
120+{-# INLINE happyOutTok #-}
123+happyActOffsets :: HappyAddr
124+happyActOffsets = HappyA# "\x80\x00\x7d\x00\x7d\x00\x7e\x00\x7a\x00\x00\x00\x7a\x00\x7a\x00\x52\x00\x00\x00\x1b\x00\x7a\x00\x00\x00\x79\x00\x00\x00\x00\x00\x37\x00\x7b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x77\x00\x00\x00\x75\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x75\x00\x75\x00\x5e\x00\x75\x00\x76\x00\x72\x00\x00\x00\x78\x00\x70\x00\x70\x00\x70\x00\x6f\x00\x6e\x00\x6b\x00\x52\x00\x73\x00\xf8\xff\x46\x00\x00\x00\x69\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x71\x00\x6d\x00\x74\x00\x65\x00\x66\x00\x5c\x00\x5a\x00\x00\x00\x00\x00"#
126+happyGotoOffsets :: HappyAddr
127+happyGotoOffsets = HappyA# "\x56\x00\x6c\x00\x6a\x00\x48\x00\x1f\x00\x4a\x00\x0b\x00\x41\x00\x31\x00\x29\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x21\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x00\x00\x00\x00\x00\x00\x00\x28\x00\xfe\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x68\x00\x00\x00\x60\x00\x11\x00\x00\x00\x0f\x00\x01\x00\x00\x00\x2f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x45\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00"#
129+happyDefActions :: HappyAddr
130+happyDefActions = HappyA# "\x00\x00\x00\x00\xed\xff\x00\x00\x00\x00\xe8\xff\x00\x00\x00\x00\x00\x00\xda\xff\x00\x00\x00\x00\xf4\xff\x00\x00\xd7\xff\xd8\xff\x00\x00\xe5\xff\xe3\xff\xe2\xff\xe1\xff\xe0\xff\xdc\xff\xde\xff\xe6\xff\x00\x00\xdf\xff\xda\xff\xe8\xff\xf3\xff\xf2\xff\xf1\xff\xf0\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xee\xff\xec\xff\x00\x00\x00\x00\x00\x00\xed\xff\x00\x00\xed\xff\x00\x00\x00\x00\x00\x00\x00\x00\xdb\xff\x00\x00\xd9\xff\xe4\xff\xdd\xff\xea\xff\xe7\xff\xe9\xff\xeb\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xef\xff"#
132+happyCheck :: HappyAddr
133+happyCheck = HappyA# "\xff\xff\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x0e\x00\x0f\x00\x0a\x00\x08\x00\x08\x00\x00\x00\x0b\x00\x0c\x00\x0d\x00\x00\x00\x0f\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x0b\x00\x0c\x00\x09\x00\x08\x00\x0b\x00\x0c\x00\x0b\x00\x0c\x00\x0d\x00\x00\x00\x0f\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x0b\x00\x0c\x00\x09\x00\x08\x00\x0b\x00\x0c\x00\x0b\x00\x0c\x00\x0d\x00\x00\x00\x0f\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x0e\x00\x0e\x00\x08\x00\x08\x00\x0f\x00\x0c\x00\x0b\x00\x0c\x00\x0d\x00\x08\x00\x0f\x00\x00\x00\x0b\x00\x0c\x00\x0d\x00\x00\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x06\x00\x15\x00\x0c\x00\x08\x00\x09\x00\x08\x00\x0b\x00\x0c\x00\x0d\x00\x0a\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x08\x00\x05\x00\x02\x00\x0b\x00\x0c\x00\x0d\x00\x00\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x06\x00\x07\x00\x00\x00\x0d\x00\x00\x00\x05\x00\x00\x00\x0f\x00\x06\x00\x07\x00\x06\x00\x07\x00\x06\x00\x15\x00\x0f\x00\x01\x00\x05\x00\x0a\x00\x0f\x00\x06\x00\x0f\x00\x03\x00\x0e\x00\x07\x00\x0f\x00\x04\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0d\x00\x15\x00\xff\xff\x15\x00\xff\xff\x0f\x00\x15\x00\x0d\x00\x0f\x00\x0d\x00\x15\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"#
135+happyTable :: HappyAddr
136+happyTable = HappyA# "\x00\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x39\x00\x0d\x00\x31\x00\x16\x00\x42\x00\x11\x00\x17\x00\x18\x00\x35\x00\x11\x00\x1a\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x22\x00\x18\x00\x30\x00\x16\x00\x25\x00\x18\x00\x17\x00\x18\x00\x3a\x00\x11\x00\x1a\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x0f\x00\x10\x00\x24\x00\x16\x00\x25\x00\x18\x00\x17\x00\x18\x00\x35\x00\x11\x00\x1a\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x32\x00\x10\x00\x33\x00\x16\x00\x0d\x00\x36\x00\x17\x00\x18\x00\x19\x00\x1c\x00\x1a\x00\x11\x00\x0f\x00\x10\x00\x1d\x00\x27\x00\x0d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x40\x00\xff\xff\x21\x00\x1c\x00\x38\x00\x26\x00\x0f\x00\x10\x00\x1d\x00\x23\x00\x0d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x1c\x00\x2b\x00\x44\x00\x0f\x00\x10\x00\x1d\x00\x27\x00\x0d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x28\x00\x3b\x00\x27\x00\x1d\x00\x27\x00\x42\x00\x27\x00\x0d\x00\x28\x00\x2d\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x0d\x00\x40\x00\x3e\x00\x3f\x00\x0d\x00\x3a\x00\x0d\x00\x2f\x00\x3d\x00\x30\x00\x0d\x00\x35\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1d\x00\xff\xff\x00\x00\xff\xff\x00\x00\x0d\x00\xff\xff\x1d\x00\x0d\x00\x2d\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#
138+happyReduceArr = Happy_Data_Array.array (11, 40) [
139+ (11 , happyReduce_11),
140+ (12 , happyReduce_12),
141+ (13 , happyReduce_13),
142+ (14 , happyReduce_14),
143+ (15 , happyReduce_15),
144+ (16 , happyReduce_16),
145+ (17 , happyReduce_17),
146+ (18 , happyReduce_18),
147+ (19 , happyReduce_19),
148+ (20 , happyReduce_20),
149+ (21 , happyReduce_21),
150+ (22 , happyReduce_22),
151+ (23 , happyReduce_23),
152+ (24 , happyReduce_24),
153+ (25 , happyReduce_25),
154+ (26 , happyReduce_26),
155+ (27 , happyReduce_27),
156+ (28 , happyReduce_28),
157+ (29 , happyReduce_29),
158+ (30 , happyReduce_30),
159+ (31 , happyReduce_31),
160+ (32 , happyReduce_32),
161+ (33 , happyReduce_33),
162+ (34 , happyReduce_34),
163+ (35 , happyReduce_35),
164+ (36 , happyReduce_36),
165+ (37 , happyReduce_37),
166+ (38 , happyReduce_38),
167+ (39 , happyReduce_39),
168+ (40 , happyReduce_40)
171+happy_n_terms = 22 :: Int
172+happy_n_nonterms = 16 :: Int
174+happyReduce_11 = happySpecReduce_1 0# happyReduction_11
175+happyReduction_11 happy_x_1
176+ = case happyOutTok happy_x_1 of { (PT _ (TV happy_var_1)) ->
181+happyReduce_12 = happySpecReduce_1 1# happyReduction_12
182+happyReduction_12 happy_x_1
183+ = case happyOutTok happy_x_1 of { (PT _ (TL happy_var_1)) ->
188+happyReduce_13 = happySpecReduce_1 2# happyReduction_13
189+happyReduction_13 happy_x_1
190+ = case happyOutTok happy_x_1 of { (PT _ (T_QString happy_var_1)) ->
192+ (QString (happy_var_1)
195+happyReduce_14 = happySpecReduce_1 3# happyReduction_14
196+happyReduction_14 happy_x_1
197+ = case happyOutTok happy_x_1 of { (PT _ (T_URL happy_var_1)) ->
202+happyReduce_15 = happySpecReduce_1 4# happyReduction_15
203+happyReduction_15 happy_x_1
204+ = case happyOutTok happy_x_1 of { (PT _ (T_Path happy_var_1)) ->
209+happyReduce_16 = happyReduce 10# 5# happyReduction_16
210+happyReduction_16 (happy_x_10 `HappyStk`
211+ happy_x_9 `HappyStk`
212+ happy_x_8 `HappyStk`
213+ happy_x_7 `HappyStk`
214+ happy_x_6 `HappyStk`
215+ happy_x_5 `HappyStk`
216+ happy_x_4 `HappyStk`
217+ happy_x_3 `HappyStk`
218+ happy_x_2 `HappyStk`
219+ happy_x_1 `HappyStk`
221+ = case happyOut21 happy_x_2 of { happy_var_2 ->
222+ case happyOut20 happy_x_7 of { happy_var_7 ->
223+ case happyOut22 happy_x_9 of { happy_var_9 ->
225+ (Expr happy_var_2 happy_var_7 happy_var_9
226+ ) `HappyStk` happyRest}}}
228+happyReduce_17 = happySpecReduce_1 6# happyReduction_17
229+happyReduction_17 happy_x_1
230+ = case happyOut14 happy_x_1 of { happy_var_1 ->
232+ (Argument happy_var_1
235+happyReduce_18 = happySpecReduce_0 7# happyReduction_18
236+happyReduction_18 = happyIn21
240+happyReduce_19 = happySpecReduce_1 7# happyReduction_19
241+happyReduction_19 happy_x_1
242+ = case happyOut20 happy_x_1 of { happy_var_1 ->
247+happyReduce_20 = happySpecReduce_3 7# happyReduction_20
248+happyReduction_20 happy_x_3
251+ = case happyOut20 happy_x_1 of { happy_var_1 ->
252+ case happyOut21 happy_x_3 of { happy_var_3 ->
254+ ((:) happy_var_1 happy_var_3
257+happyReduce_21 = happySpecReduce_3 8# happyReduction_21
258+happyReduction_21 happy_x_3
261+ = case happyOut24 happy_x_2 of { happy_var_2 ->
263+ (Dictionary (reverse happy_var_2)
266+happyReduce_22 = happySpecReduce_3 9# happyReduction_22
267+happyReduction_22 happy_x_3
270+ = case happyOut25 happy_x_1 of { happy_var_1 ->
271+ case happyOut27 happy_x_3 of { happy_var_3 ->
273+ (Attribute happy_var_1 happy_var_3
276+happyReduce_23 = happySpecReduce_0 10# happyReduction_23
277+happyReduction_23 = happyIn24
281+happyReduce_24 = happySpecReduce_3 10# happyReduction_24
282+happyReduction_24 happy_x_3
285+ = case happyOut24 happy_x_1 of { happy_var_1 ->
286+ case happyOut23 happy_x_2 of { happy_var_2 ->
288+ (flip (:) happy_var_1 happy_var_2
291+happyReduce_25 = happySpecReduce_1 11# happyReduction_25
292+happyReduction_25 happy_x_1
293+ = case happyOut26 happy_x_1 of { happy_var_1 ->
295+ (Reference happy_var_1
298+happyReduce_26 = happySpecReduce_1 12# happyReduction_26
299+happyReduction_26 happy_x_1
300+ = case happyOut14 happy_x_1 of { happy_var_1 ->
305+happyReduce_27 = happySpecReduce_3 12# happyReduction_27
306+happyReduction_27 happy_x_3
309+ = case happyOut14 happy_x_1 of { happy_var_1 ->
310+ case happyOut26 happy_x_3 of { happy_var_3 ->
312+ ((:) happy_var_1 happy_var_3
315+happyReduce_28 = happySpecReduce_1 13# happyReduction_28
316+happyReduction_28 happy_x_1
317+ = case happyOut15 happy_x_1 of { happy_var_1 ->
319+ (StringV happy_var_1
322+happyReduce_29 = happySpecReduce_1 13# happyReduction_29
323+happyReduction_29 happy_x_1
324+ = case happyOut16 happy_x_1 of { happy_var_1 ->
326+ (QStringV happy_var_1
329+happyReduce_30 = happySpecReduce_1 13# happyReduction_30
330+happyReduction_30 happy_x_1
331+ = case happyOut17 happy_x_1 of { happy_var_1 ->
336+happyReduce_31 = happySpecReduce_1 13# happyReduction_31
337+happyReduction_31 happy_x_1
338+ = case happyOut18 happy_x_1 of { happy_var_1 ->
343+happyReduce_32 = happySpecReduce_1 13# happyReduction_32
344+happyReduction_32 happy_x_1
345+ = case happyOut29 happy_x_1 of { happy_var_1 ->
350+happyReduce_33 = happySpecReduce_1 13# happyReduction_33
351+happyReduction_33 happy_x_1
352+ = case happyOut25 happy_x_1 of { happy_var_1 ->
354+ (AttributeV happy_var_1
357+happyReduce_34 = happySpecReduce_3 13# happyReduction_34
358+happyReduction_34 happy_x_3
361+ = case happyOut28 happy_x_2 of { happy_var_2 ->
363+ (ListV (reverse happy_var_2)
366+happyReduce_35 = happySpecReduce_1 13# happyReduction_35
367+happyReduction_35 happy_x_1
368+ = case happyOut22 happy_x_1 of { happy_var_1 ->
370+ (DictionaryV happy_var_1
373+happyReduce_36 = happySpecReduce_2 13# happyReduction_36
374+happyReduction_36 happy_x_2
376+ = case happyOut25 happy_x_1 of { happy_var_1 ->
377+ case happyOut22 happy_x_2 of { happy_var_2 ->
379+ (FunctionV happy_var_1 happy_var_2
382+happyReduce_37 = happySpecReduce_0 14# happyReduction_37
383+happyReduction_37 = happyIn28
387+happyReduce_38 = happySpecReduce_2 14# happyReduction_38
388+happyReduction_38 happy_x_2
390+ = case happyOut28 happy_x_1 of { happy_var_1 ->
391+ case happyOut27 happy_x_2 of { happy_var_2 ->
393+ (flip (:) happy_var_1 happy_var_2
396+happyReduce_39 = happySpecReduce_1 15# happyReduction_39
397+happyReduction_39 happy_x_1
402+happyReduce_40 = happySpecReduce_1 15# happyReduction_40
403+happyReduction_40 happy_x_1
408+happyNewToken action sts stk [] =
409+ happyDoAction 21# notHappyAtAll action sts stk []
411+happyNewToken action sts stk (tk:tks) =
412+ let cont i = happyDoAction i tk action sts stk tks in
414+ PT _ (TS _ 1) -> cont 1#;
415+ PT _ (TS _ 2) -> cont 2#;
416+ PT _ (TS _ 3) -> cont 3#;
417+ PT _ (TS _ 4) -> cont 4#;
418+ PT _ (TS _ 5) -> cont 5#;
419+ PT _ (TS _ 6) -> cont 6#;
420+ PT _ (TS _ 7) -> cont 7#;
421+ PT _ (TS _ 8) -> cont 8#;
422+ PT _ (TS _ 9) -> cont 9#;
423+ PT _ (TS _ 10) -> cont 10#;
424+ PT _ (TS _ 11) -> cont 11#;
425+ PT _ (TS _ 12) -> cont 12#;
426+ PT _ (TS _ 13) -> cont 13#;
427+ PT _ (TS _ 14) -> cont 14#;
428+ PT _ (TV happy_dollar_dollar) -> cont 15#;
429+ PT _ (TL happy_dollar_dollar) -> cont 16#;
430+ PT _ (T_QString happy_dollar_dollar) -> cont 17#;
431+ PT _ (T_URL happy_dollar_dollar) -> cont 18#;
432+ PT _ (T_Path happy_dollar_dollar) -> cont 19#;
434+ _ -> happyError' (tk:tks)
437+happyError_ tk tks = happyError' (tk:tks)
439+happyThen :: () => Err a -> (a -> Err b) -> Err b
441+happyReturn :: () => a -> Err a
442+happyReturn = (returnM)
443+happyThen1 m k tks = (thenM) m (\a -> k a tks)
444+happyReturn1 :: () => a -> b -> Err a
445+happyReturn1 = \a tks -> (returnM) a
446+happyError' :: () => [(Token)] -> Err a
447+happyError' = happyError
449+pExpr tks = happySomeParser where
450+ happySomeParser = happyThen (happyParse 0# tks) (\x -> happyReturn (happyOut19 x))
452+pArgument tks = happySomeParser where
453+ happySomeParser = happyThen (happyParse 1# tks) (\x -> happyReturn (happyOut20 x))
455+pListArgument tks = happySomeParser where
456+ happySomeParser = happyThen (happyParse 2# tks) (\x -> happyReturn (happyOut21 x))
458+pDictionary tks = happySomeParser where
459+ happySomeParser = happyThen (happyParse 3# tks) (\x -> happyReturn (happyOut22 x))
461+pAttribute tks = happySomeParser where
462+ happySomeParser = happyThen (happyParse 4# tks) (\x -> happyReturn (happyOut23 x))
464+pListAttribute tks = happySomeParser where
465+ happySomeParser = happyThen (happyParse 5# tks) (\x -> happyReturn (happyOut24 x))
467+pReference tks = happySomeParser where
468+ happySomeParser = happyThen (happyParse 6# tks) (\x -> happyReturn (happyOut25 x))
470+pListIdent tks = happySomeParser where
471+ happySomeParser = happyThen (happyParse 7# tks) (\x -> happyReturn (happyOut26 x))
473+pValue tks = happySomeParser where
474+ happySomeParser = happyThen (happyParse 8# tks) (\x -> happyReturn (happyOut27 x))
476+pListValue tks = happySomeParser where
477+ happySomeParser = happyThen (happyParse 9# tks) (\x -> happyReturn (happyOut28 x))
479+pBoolean tks = happySomeParser where
480+ happySomeParser = happyThen (happyParse 10# tks) (\x -> happyReturn (happyOut29 x))
482+happySeq = happyDontSeq
485+returnM :: a -> Err a
488+thenM :: Err a -> (a -> Err b) -> Err b
491+happyError :: [Token] -> Err a
493+ Bad $ "syntax error at " ++ tokenPos ts ++
496+ [Err _] -> " due to lexer error"
497+ _ -> " before " ++ unwords (map (id . prToken) (take 4 ts))
500+{-# LINE 1 "templates/GenericTemplate.hs" #-}
501+{-# LINE 1 "templates/GenericTemplate.hs" #-}
502+{-# LINE 1 "<built-in>" #-}
503+{-# LINE 1 "<command-line>" #-}
504+{-# LINE 1 "templates/GenericTemplate.hs" #-}
505+-- Id: GenericTemplate.hs,v 1.26 2005/01/14 14:47:22 simonmar Exp
507+{-# LINE 30 "templates/GenericTemplate.hs" #-}
510+data Happy_IntList = HappyCons Happy_GHC_Exts.Int# Happy_IntList
516+{-# LINE 51 "templates/GenericTemplate.hs" #-}
518+{-# LINE 61 "templates/GenericTemplate.hs" #-}
520+{-# LINE 70 "templates/GenericTemplate.hs" #-}
523+data HappyStk a = HappyStk a (HappyStk a)
525+-----------------------------------------------------------------------------
526+-- starting the parse
528+happyParse start_state = happyNewToken start_state notHappyAtAll notHappyAtAll
530+-----------------------------------------------------------------------------
531+-- Accepting the parse
533+-- If the current token is 0#, it means we've just accepted a partial
534+-- parse (a %partial parser). We must ignore the saved token on the top of
535+-- the stack in this case.
536+happyAccept 0# tk st sts (_ `HappyStk` ans `HappyStk` _) =
538+happyAccept j tk st sts (HappyStk ans _) =
539+ (happyTcHack j (happyTcHack st)) (happyReturn1 ans)
541+-----------------------------------------------------------------------------
542+-- Arrays only: do the next action
546+happyDoAction i tk st
553+ -1# -> {- nothing -}
555+ n | (n Happy_GHC_Exts.<# (0# :: Happy_GHC_Exts.Int#)) -> {- nothing -}
557+ (happyReduceArr Happy_Data_Array.! rule) i tk st
558+ where rule = (Happy_GHC_Exts.I# ((Happy_GHC_Exts.negateInt# ((n Happy_GHC_Exts.+# (1# :: Happy_GHC_Exts.Int#))))))
562+ happyShift new_state i tk st
563+ where (new_state) = (n Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#))
564+ where (off) = indexShortOffAddr happyActOffsets st
565+ (off_i) = (off Happy_GHC_Exts.+# i)
566+ check = if (off_i Happy_GHC_Exts.>=# (0# :: Happy_GHC_Exts.Int#))
567+ then (indexShortOffAddr happyCheck off_i Happy_GHC_Exts.==# i)
570+ | check = indexShortOffAddr happyTable off_i
571+ | otherwise = indexShortOffAddr happyDefActions st
573+{-# LINE 130 "templates/GenericTemplate.hs" #-}
576+indexShortOffAddr (HappyA# arr) off =
577+ Happy_GHC_Exts.narrow16Int# i
579+ i = Happy_GHC_Exts.word2Int# (Happy_GHC_Exts.or# (Happy_GHC_Exts.uncheckedShiftL# high 8#) low)
580+ high = Happy_GHC_Exts.int2Word# (Happy_GHC_Exts.ord# (Happy_GHC_Exts.indexCharOffAddr# arr (off' Happy_GHC_Exts.+# 1#)))
581+ low = Happy_GHC_Exts.int2Word# (Happy_GHC_Exts.ord# (Happy_GHC_Exts.indexCharOffAddr# arr off'))
582+ off' = off Happy_GHC_Exts.*# 2#
588+data HappyAddr = HappyA# Happy_GHC_Exts.Addr#
593+-----------------------------------------------------------------------------
594+-- HappyState data type (not arrays)
596+{-# LINE 163 "templates/GenericTemplate.hs" #-}
598+-----------------------------------------------------------------------------
601+happyShift new_state 0# tk st sts stk@(x `HappyStk` _) =
602+ let (i) = (case Happy_GHC_Exts.unsafeCoerce# x of { (Happy_GHC_Exts.I# (i)) -> i }) in
603+-- trace "shifting the error token" $
604+ happyDoAction i tk new_state (HappyCons (st) (sts)) (stk)
606+happyShift new_state i tk st sts stk =
607+ happyNewToken new_state (HappyCons (st) (sts)) ((happyInTok (tk))`HappyStk`stk)
609+-- happyReduce is specialised for the common cases.
611+happySpecReduce_0 i fn 0# tk st sts stk
612+ = happyFail 0# tk st sts stk
613+happySpecReduce_0 nt fn j tk st@((action)) sts stk
614+ = happyGoto nt j tk st (HappyCons (st) (sts)) (fn `HappyStk` stk)
616+happySpecReduce_1 i fn 0# tk st sts stk
617+ = happyFail 0# tk st sts stk
618+happySpecReduce_1 nt fn j tk _ sts@((HappyCons (st@(action)) (_))) (v1`HappyStk`stk')
620+ happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk'))
622+happySpecReduce_2 i fn 0# tk st sts stk
623+ = happyFail 0# tk st sts stk
624+happySpecReduce_2 nt fn j tk _ (HappyCons (_) (sts@((HappyCons (st@(action)) (_))))) (v1`HappyStk`v2`HappyStk`stk')
625+ = let r = fn v1 v2 in
626+ happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk'))
628+happySpecReduce_3 i fn 0# tk st sts stk
629+ = happyFail 0# tk st sts stk
630+happySpecReduce_3 nt fn j tk _ (HappyCons (_) ((HappyCons (_) (sts@((HappyCons (st@(action)) (_))))))) (v1`HappyStk`v2`HappyStk`v3`HappyStk`stk')
631+ = let r = fn v1 v2 v3 in
632+ happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk'))
634+happyReduce k i fn 0# tk st sts stk
635+ = happyFail 0# tk st sts stk
636+happyReduce k nt fn j tk st sts stk
637+ = case happyDrop (k Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#)) sts of
638+ sts1@((HappyCons (st1@(action)) (_))) ->
639+ let r = fn stk in -- it doesn't hurt to always seq here...
640+ happyDoSeq r (happyGoto nt j tk st1 sts1 r)
642+happyMonadReduce k nt fn 0# tk st sts stk
643+ = happyFail 0# tk st sts stk
644+happyMonadReduce k nt fn j tk st sts stk =
645+ happyThen1 (fn stk tk) (\r -> happyGoto nt j tk st1 sts1 (r `HappyStk` drop_stk))
646+ where (sts1@((HappyCons (st1@(action)) (_)))) = happyDrop k (HappyCons (st) (sts))
647+ drop_stk = happyDropStk k stk
649+happyMonad2Reduce k nt fn 0# tk st sts stk
650+ = happyFail 0# tk st sts stk
651+happyMonad2Reduce k nt fn j tk st sts stk =
652+ happyThen1 (fn stk tk) (\r -> happyNewToken new_state sts1 (r `HappyStk` drop_stk))
653+ where (sts1@((HappyCons (st1@(action)) (_)))) = happyDrop k (HappyCons (st) (sts))
654+ drop_stk = happyDropStk k stk
656+ (off) = indexShortOffAddr happyGotoOffsets st1
657+ (off_i) = (off Happy_GHC_Exts.+# nt)
658+ (new_state) = indexShortOffAddr happyTable off_i
664+happyDrop n (HappyCons (_) (t)) = happyDrop (n Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#)) t
666+happyDropStk 0# l = l
667+happyDropStk n (x `HappyStk` xs) = happyDropStk (n Happy_GHC_Exts.-# (1#::Happy_GHC_Exts.Int#)) xs
669+-----------------------------------------------------------------------------
670+-- Moving to a new state after a reduction
673+happyGoto nt j tk st =
675+ happyDoAction j tk new_state
676+ where (off) = indexShortOffAddr happyGotoOffsets st
677+ (off_i) = (off Happy_GHC_Exts.+# nt)
678+ (new_state) = indexShortOffAddr happyTable off_i
683+-----------------------------------------------------------------------------
684+-- Error recovery (0# is the error token)
686+-- parse error if we are in recovery and we fail again
687+happyFail 0# tk old_st _ stk =
691+{- We don't need state discarding for our restricted implementation of
692+ "error". In fact, it can cause some bogus parses, so I've disabled it
696+happyFail 0# tk old_st (HappyCons ((action)) (sts))
697+ (saved_tok `HappyStk` _ `HappyStk` stk) =
698+-- trace ("discarding state, depth " ++ show (length stk)) $
699+ happyDoAction 0# tk action sts ((saved_tok`HappyStk`stk))
702+-- Enter error recovery: generate an error token,
703+-- save the old token and carry on.
704+happyFail i tk (action) sts stk =
705+-- trace "entering error recovery" $
706+ happyDoAction 0# tk action sts ( (Happy_GHC_Exts.unsafeCoerce# (Happy_GHC_Exts.I# (i))) `HappyStk` stk)
708+-- Internal happy errors:
711+notHappyAtAll = error "Internal Happy error\n"
713+-----------------------------------------------------------------------------
714+-- Hack to get the typechecker to accept our action functions
717+happyTcHack :: Happy_GHC_Exts.Int# -> a -> a
719+{-# INLINE happyTcHack #-}
722+-----------------------------------------------------------------------------
723+-- Seq-ing. If the --strict flag is given, then Happy emits
724+-- happySeq = happyDoSeq
725+-- otherwise it emits
726+-- happySeq = happyDontSeq
728+happyDoSeq, happyDontSeq :: a -> b -> b
729+happyDoSeq a b = a `seq` b
732+-----------------------------------------------------------------------------
733+-- Don't inline any functions from the template. GHC has a nasty habit
734+-- of deciding to inline happyGoto everywhere, which increases the size of
735+-- the generated parser quite a bit.
738+{-# NOINLINE happyDoAction #-}
739+{-# NOINLINE happyTable #-}
740+{-# NOINLINE happyCheck #-}
741+{-# NOINLINE happyActOffsets #-}
742+{-# NOINLINE happyGotoOffsets #-}
743+{-# NOINLINE happyDefActions #-}
745+{-# NOINLINE happyShift #-}
746+{-# NOINLINE happySpecReduce_0 #-}
747+{-# NOINLINE happySpecReduce_1 #-}
748+{-# NOINLINE happySpecReduce_2 #-}
749+{-# NOINLINE happySpecReduce_3 #-}
750+{-# NOINLINE happyReduce #-}
751+{-# NOINLINE happyMonadReduce #-}
752+{-# NOINLINE happyGoto #-}
753+{-# NOINLINE happyFail #-}
755+-- end of Happy Template.