package stog

  1. Overview
  2. Docs
Static web site compiler, able to handle blog posts as well as regular pages or any XML document in general

Install

Dune Dependency

Authors

Maintainers

Sources

stog-1.1.0.tar.bz2
md5=03c4072037bf05666a249d02954396c3
sha512=299fdb7036c92bd5317726ed20f982123f57897e0d8611dfae383251a6d793e63d372c6628742412d803224a3155ab021f79550fada2e980c7d6179d90f8e43f

doc/src/stog/filter_parser.ml.html

Source file filter_parser.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376

module MenhirBasics = struct
  
  exception Error
  
  let _eRR =
    fun _s ->
      raise Error
  
  type token = 
    | String of (
# 4 "lib/filter_parser.mly"
       (string)
# 15 "lib/filter_parser.ml"
  )
    | RPAR
    | OR
    | NOT
    | LPAR
    | EQUAL
    | EOF
    | COLON
    | Attribute of (
# 3 "lib/filter_parser.mly"
       (string)
# 27 "lib/filter_parser.ml"
  )
    | AND
  
end

include MenhirBasics

type ('s, 'r) _menhir_state = 
  | MenhirState00 : ('s, _menhir_box_filter) _menhir_state
    (** State 00.
        Stack shape : .
        Start symbol: filter. *)

  | MenhirState01 : (('s, _menhir_box_filter) _menhir_cell1_NOT, _menhir_box_filter) _menhir_state
    (** State 01.
        Stack shape : NOT.
        Start symbol: filter. *)

  | MenhirState02 : (('s, _menhir_box_filter) _menhir_cell1_LPAR, _menhir_box_filter) _menhir_state
    (** State 02.
        Stack shape : LPAR.
        Start symbol: filter. *)

  | MenhirState12 : (('s, _menhir_box_filter) _menhir_cell1_filter_exp, _menhir_box_filter) _menhir_state
    (** State 12.
        Stack shape : filter_exp.
        Start symbol: filter. *)

  | MenhirState14 : (('s, _menhir_box_filter) _menhir_cell1_filter_exp, _menhir_box_filter) _menhir_state
    (** State 14.
        Stack shape : filter_exp.
        Start symbol: filter. *)


and ('s, 'r) _menhir_cell1_filter_exp = 
  | MenhirCell1_filter_exp of 's * ('s, 'r) _menhir_state * (Filter_types.t)

and ('s, 'r) _menhir_cell1_LPAR = 
  | MenhirCell1_LPAR of 's * ('s, 'r) _menhir_state

and ('s, 'r) _menhir_cell1_NOT = 
  | MenhirCell1_NOT of 's * ('s, 'r) _menhir_state

and _menhir_box_filter = 
  | MenhirBox_filter of (Filter_types.t) [@@unboxed]

let _menhir_action_1 =
  fun _1 ->
    (
# 18 "lib/filter_parser.mly"
                       ( _1 )
# 79 "lib/filter_parser.ml"
     : (Filter_types.t))

let _menhir_action_2 =
  fun _2 ->
    (
# 21 "lib/filter_parser.mly"
                       ( _2 )
# 87 "lib/filter_parser.ml"
     : (Filter_types.t))

let _menhir_action_3 =
  fun _1 _3 ->
    (
# 22 "lib/filter_parser.mly"
                         ( Filter_types.Pred (("", _1), _3) )
# 95 "lib/filter_parser.ml"
     : (Filter_types.t))

let _menhir_action_4 =
  fun _1 _3 _5 ->
    (
# 23 "lib/filter_parser.mly"
                                         ( Filter_types.Pred ((_1, _3), _5) )
# 103 "lib/filter_parser.ml"
     : (Filter_types.t))

let _menhir_action_5 =
  fun _1 _3 ->
    (
# 24 "lib/filter_parser.mly"
                           ( Filter_types.Or (_1, _3) )
# 111 "lib/filter_parser.ml"
     : (Filter_types.t))

let _menhir_action_6 =
  fun _1 _3 ->
    (
# 25 "lib/filter_parser.mly"
                            ( Filter_types.And (_1, _3) )
# 119 "lib/filter_parser.ml"
     : (Filter_types.t))

let _menhir_action_7 =
  fun _2 ->
    (
# 26 "lib/filter_parser.mly"
                 ( Filter_types.Not _2 )
# 127 "lib/filter_parser.ml"
     : (Filter_types.t))

let _menhir_print_token : token -> string =
  fun _tok ->
    match _tok with
    | AND ->
        "AND"
    | Attribute _ ->
        "Attribute"
    | COLON ->
        "COLON"
    | EOF ->
        "EOF"
    | EQUAL ->
        "EQUAL"
    | LPAR ->
        "LPAR"
    | NOT ->
        "NOT"
    | OR ->
        "OR"
    | RPAR ->
        "RPAR"
    | String _ ->
        "String"

let _menhir_fail : unit -> 'a =
  fun () ->
    Printf.eprintf "Internal failure -- please contact the parser generator's developers.\n%!";
    assert false

include struct
  
  [@@@ocaml.warning "-4-37"]
  
  let rec _menhir_run_01 : type  ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_filter) _menhir_state -> _menhir_box_filter =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _menhir_stack = MenhirCell1_NOT (_menhir_stack, _menhir_s) in
      let _menhir_s = MenhirState01 in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | NOT ->
          _menhir_run_01 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | LPAR ->
          _menhir_run_02 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | Attribute _v ->
          _menhir_run_03 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_02 : type  ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_filter) _menhir_state -> _menhir_box_filter =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
      let _menhir_stack = MenhirCell1_LPAR (_menhir_stack, _menhir_s) in
      let _menhir_s = MenhirState02 in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | NOT ->
          _menhir_run_01 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | LPAR ->
          _menhir_run_02 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | Attribute _v ->
          _menhir_run_03 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_03 : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_filter) _menhir_state -> _menhir_box_filter =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | EQUAL ->
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | String _v_0 ->
              let _tok = _menhir_lexer _menhir_lexbuf in
              let (_3, _1) = (_v_0, _v) in
              let _v = _menhir_action_3 _1 _3 in
              _menhir_goto_filter_exp _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
          | _ ->
              _eRR ())
      | COLON ->
          let _tok = _menhir_lexer _menhir_lexbuf in
          (match (_tok : MenhirBasics.token) with
          | Attribute _v_1 ->
              let _tok = _menhir_lexer _menhir_lexbuf in
              (match (_tok : MenhirBasics.token) with
              | EQUAL ->
                  let _tok = _menhir_lexer _menhir_lexbuf in
                  (match (_tok : MenhirBasics.token) with
                  | String _v_2 ->
                      let _tok = _menhir_lexer _menhir_lexbuf in
                      let (_3, _1, _5) = (_v_1, _v, _v_2) in
                      let _v = _menhir_action_4 _1 _3 _5 in
                      _menhir_goto_filter_exp _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
                  | _ ->
                      _eRR ())
              | _ ->
                  _eRR ())
          | _ ->
              _eRR ())
      | _ ->
          _eRR ()
  
  and _menhir_goto_filter_exp : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_filter) _menhir_state -> _ -> _menhir_box_filter =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      match _menhir_s with
      | MenhirState00 ->
          _menhir_run_17 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | MenhirState01 ->
          _menhir_run_16 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | MenhirState14 ->
          _menhir_run_15 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | MenhirState12 ->
          _menhir_run_13 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | MenhirState02 ->
          _menhir_run_10 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
  
  and _menhir_run_17 : type  ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_filter) _menhir_state -> _ -> _menhir_box_filter =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      match (_tok : MenhirBasics.token) with
      | OR ->
          let _menhir_stack = MenhirCell1_filter_exp (_menhir_stack, _menhir_s, _v) in
          _menhir_run_12 _menhir_stack _menhir_lexbuf _menhir_lexer
      | EOF ->
          let _1 = _v in
          let _v = _menhir_action_1 _1 in
          MenhirBox_filter _v
      | AND ->
          let _menhir_stack = MenhirCell1_filter_exp (_menhir_stack, _menhir_s, _v) in
          _menhir_run_14 _menhir_stack _menhir_lexbuf _menhir_lexer
      | _ ->
          _eRR ()
  
  and _menhir_run_12 : type  ttv_stack. (ttv_stack, _menhir_box_filter) _menhir_cell1_filter_exp -> _ -> _ -> _menhir_box_filter =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer ->
      let _menhir_s = MenhirState12 in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | NOT ->
          _menhir_run_01 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | LPAR ->
          _menhir_run_02 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | Attribute _v ->
          _menhir_run_03 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_14 : type  ttv_stack. (ttv_stack, _menhir_box_filter) _menhir_cell1_filter_exp -> _ -> _ -> _menhir_box_filter =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer ->
      let _menhir_s = MenhirState14 in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | NOT ->
          _menhir_run_01 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | LPAR ->
          _menhir_run_02 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | Attribute _v ->
          _menhir_run_03 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | _ ->
          _eRR ()
  
  and _menhir_run_16 : type  ttv_stack. ((ttv_stack, _menhir_box_filter) _menhir_cell1_NOT as 'stack) -> _ -> _ -> _ -> ('stack, _menhir_box_filter) _menhir_state -> _ -> _menhir_box_filter =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      match (_tok : MenhirBasics.token) with
      | OR ->
          let _menhir_stack = MenhirCell1_filter_exp (_menhir_stack, _menhir_s, _v) in
          _menhir_run_12 _menhir_stack _menhir_lexbuf _menhir_lexer
      | AND ->
          let _menhir_stack = MenhirCell1_filter_exp (_menhir_stack, _menhir_s, _v) in
          _menhir_run_14 _menhir_stack _menhir_lexbuf _menhir_lexer
      | EOF | RPAR ->
          let MenhirCell1_NOT (_menhir_stack, _menhir_s) = _menhir_stack in
          let _2 = _v in
          let _v = _menhir_action_7 _2 in
          _menhir_goto_filter_exp _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | _ ->
          _eRR ()
  
  and _menhir_run_15 : type  ttv_stack. ((ttv_stack, _menhir_box_filter) _menhir_cell1_filter_exp as 'stack) -> _ -> _ -> _ -> ('stack, _menhir_box_filter) _menhir_state -> _ -> _menhir_box_filter =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      match (_tok : MenhirBasics.token) with
      | OR ->
          let _menhir_stack = MenhirCell1_filter_exp (_menhir_stack, _menhir_s, _v) in
          _menhir_run_12 _menhir_stack _menhir_lexbuf _menhir_lexer
      | AND ->
          let _menhir_stack = MenhirCell1_filter_exp (_menhir_stack, _menhir_s, _v) in
          _menhir_run_14 _menhir_stack _menhir_lexbuf _menhir_lexer
      | EOF | RPAR ->
          let MenhirCell1_filter_exp (_menhir_stack, _menhir_s, _1) = _menhir_stack in
          let _3 = _v in
          let _v = _menhir_action_6 _1 _3 in
          _menhir_goto_filter_exp _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | _ ->
          _eRR ()
  
  and _menhir_run_13 : type  ttv_stack. ((ttv_stack, _menhir_box_filter) _menhir_cell1_filter_exp as 'stack) -> _ -> _ -> _ -> ('stack, _menhir_box_filter) _menhir_state -> _ -> _menhir_box_filter =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      match (_tok : MenhirBasics.token) with
      | OR ->
          let _menhir_stack = MenhirCell1_filter_exp (_menhir_stack, _menhir_s, _v) in
          _menhir_run_12 _menhir_stack _menhir_lexbuf _menhir_lexer
      | AND ->
          let _menhir_stack = MenhirCell1_filter_exp (_menhir_stack, _menhir_s, _v) in
          _menhir_run_14 _menhir_stack _menhir_lexbuf _menhir_lexer
      | EOF | RPAR ->
          let MenhirCell1_filter_exp (_menhir_stack, _menhir_s, _1) = _menhir_stack in
          let _3 = _v in
          let _v = _menhir_action_5 _1 _3 in
          _menhir_goto_filter_exp _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | _ ->
          _eRR ()
  
  and _menhir_run_10 : type  ttv_stack. ((ttv_stack, _menhir_box_filter) _menhir_cell1_LPAR as 'stack) -> _ -> _ -> _ -> ('stack, _menhir_box_filter) _menhir_state -> _ -> _menhir_box_filter =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
      match (_tok : MenhirBasics.token) with
      | RPAR ->
          let _tok = _menhir_lexer _menhir_lexbuf in
          let MenhirCell1_LPAR (_menhir_stack, _menhir_s) = _menhir_stack in
          let _2 = _v in
          let _v = _menhir_action_2 _2 in
          _menhir_goto_filter_exp _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
      | OR ->
          let _menhir_stack = MenhirCell1_filter_exp (_menhir_stack, _menhir_s, _v) in
          _menhir_run_12 _menhir_stack _menhir_lexbuf _menhir_lexer
      | AND ->
          let _menhir_stack = MenhirCell1_filter_exp (_menhir_stack, _menhir_s, _v) in
          _menhir_run_14 _menhir_stack _menhir_lexbuf _menhir_lexer
      | _ ->
          _eRR ()
  
  let _menhir_run_00 : type  ttv_stack. ttv_stack -> _ -> _ -> _menhir_box_filter =
    fun _menhir_stack _menhir_lexbuf _menhir_lexer ->
      let _menhir_s = MenhirState00 in
      let _tok = _menhir_lexer _menhir_lexbuf in
      match (_tok : MenhirBasics.token) with
      | NOT ->
          _menhir_run_01 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | LPAR ->
          _menhir_run_02 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
      | Attribute _v ->
          _menhir_run_03 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
      | _ ->
          _eRR ()
  
end

let filter =
  fun _menhir_lexer _menhir_lexbuf ->
    let _menhir_stack = () in
    let MenhirBox_filter v = _menhir_run_00 _menhir_stack _menhir_lexbuf _menhir_lexer in
    v
OCaml

Innovation. Community. Security.