Source file annot_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
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
module MenhirBasics = struct
exception Error
let _eRR =
fun _s ->
raise Error
type token =
| TWeakdef
| TVersion
| TVNum of (
# 22 "compiler/lib/annot_parser.mly"
(string)
# 17 "compiler/lib/annot_parser.ml"
)
| TRequires
| TProvides
| TOTHER of (
# 24 "compiler/lib/annot_parser.mly"
(string)
# 24 "compiler/lib/annot_parser.ml"
)
| TIf
| TIdent of (
# 22 "compiler/lib/annot_parser.mly"
(string)
# 30 "compiler/lib/annot_parser.ml"
)
| TComma
| TColon
| TBang
| TAlways
| TAlias
| TA_Shallow
| TA_Pure
| TA_Object_literal
| TA_Mutator
| TA_Mutable
| TA_Const
| RPARENT
| LT
| LPARENT
| LE
| GT
| GE
| EQ
| EOL
| EOF
end
include MenhirBasics
type ('s, 'r) _menhir_state =
| MenhirState01 : ('s, _menhir_box_annot) _menhir_state
(** State 01.
Stack shape : .
Start symbol: annot. *)
| MenhirState07 : ('s, _menhir_box_annot) _menhir_state
(** State 07.
Stack shape : .
Start symbol: annot. *)
| MenhirState14 : (('s, _menhir_box_annot) _menhir_cell1_version, _menhir_box_annot) _menhir_state
(** State 14.
Stack shape : version.
Start symbol: annot. *)
| MenhirState18 : (('s, _menhir_box_annot) _menhir_cell1_separated_nonempty_list_TComma_version_, _menhir_box_annot) _menhir_state
(** State 18.
Stack shape : separated_nonempty_list(TComma,version).
Start symbol: annot. *)
| MenhirState21 : ('s, _menhir_box_annot) _menhir_state
(** State 21.
Stack shape : .
Start symbol: annot. *)
| MenhirState23 : (('s, _menhir_box_annot) _menhir_cell1_TIdent, _menhir_box_annot) _menhir_state
(** State 23.
Stack shape : TIdent.
Start symbol: annot. *)
| MenhirState25 : (('s, _menhir_box_annot) _menhir_cell1_separated_nonempty_list_TComma_TIdent_, _menhir_box_annot) _menhir_state
(** State 25.
Stack shape : separated_nonempty_list(TComma,TIdent).
Start symbol: annot. *)
| MenhirState36 : ('s _menhir_cell0_TIdent _menhir_cell0_option_prim_annot_, _menhir_box_annot) _menhir_state
(** State 36.
Stack shape : TIdent option(prim_annot).
Start symbol: annot. *)
| MenhirState45 : (('s, _menhir_box_annot) _menhir_cell1_arg_annot, _menhir_box_annot) _menhir_state
(** State 45.
Stack shape : arg_annot.
Start symbol: annot. *)
| MenhirState47 : ('s _menhir_cell0_TIdent _menhir_cell0_option_prim_annot_ _menhir_cell0_option_delimited_LPARENT_separated_list_TComma_arg_annot__RPARENT__, _menhir_box_annot) _menhir_state
(** State 47.
Stack shape : TIdent option(prim_annot) option(delimited(LPARENT,separated_list(TComma,arg_annot),RPARENT)).
Start symbol: annot. *)
| MenhirState51 : ('s _menhir_cell0_TIdent, _menhir_box_annot) _menhir_state
(** State 51.
Stack shape : TIdent.
Start symbol: annot. *)
| MenhirState54 : ('s _menhir_cell0_TIdent, _menhir_box_annot) _menhir_state
(** State 54.
Stack shape : TIdent.
Start symbol: annot. *)
| MenhirState56 : ('s, _menhir_box_annot) _menhir_state
(** State 56.
Stack shape : .
Start symbol: annot. *)
| MenhirState60 : ('s _menhir_cell0_TIdent, _menhir_box_annot) _menhir_state
(** State 60.
Stack shape : TIdent.
Start symbol: annot. *)
and ('s, 'r) _menhir_cell1_arg_annot =
| MenhirCell1_arg_annot of 's * ('s, 'r) _menhir_state * (Primitive.kind_arg)
and 's _menhir_cell0_option_delimited_LPARENT_separated_list_TComma_arg_annot__RPARENT__ =
| MenhirCell0_option_delimited_LPARENT_separated_list_TComma_arg_annot__RPARENT__ of 's * (Primitive.kind_arg list option)
and 's _menhir_cell0_option_prim_annot_ =
| MenhirCell0_option_prim_annot_ of 's * (Primitive.kind option)
and ('s, 'r) _menhir_cell1_separated_nonempty_list_TComma_TIdent_ =
| MenhirCell1_separated_nonempty_list_TComma_TIdent_ of 's * ('s, 'r) _menhir_state * (string list)
and ('s, 'r) _menhir_cell1_separated_nonempty_list_TComma_version_ =
| MenhirCell1_separated_nonempty_list_TComma_version_ of 's * ('s, 'r) _menhir_state * (((int -> int -> bool) * string) list)
and ('s, 'r) _menhir_cell1_version =
| MenhirCell1_version of 's * ('s, 'r) _menhir_state * ((int -> int -> bool) * string)
and ('s, 'r) _menhir_cell1_TIdent =
| MenhirCell1_TIdent of 's * ('s, 'r) _menhir_state * (
# 22 "compiler/lib/annot_parser.mly"
(string)
# 151 "compiler/lib/annot_parser.ml"
)
and 's _menhir_cell0_TIdent =
| MenhirCell0_TIdent of 's * (
# 22 "compiler/lib/annot_parser.mly"
(string)
# 158 "compiler/lib/annot_parser.ml"
)
and _menhir_box_annot =
| MenhirBox_annot of (Primitive.t) [@@unboxed]
let _menhir_action_01 =
fun args id opt ->
(
# 36 "compiler/lib/annot_parser.mly"
( `Provides (id,(match opt with None -> `Mutator | Some k -> k),args) )
# 169 "compiler/lib/annot_parser.ml"
: (Primitive.t))
let _menhir_action_02 =
fun l ->
(
# 38 "compiler/lib/annot_parser.mly"
( `Requires (l) )
# 177 "compiler/lib/annot_parser.ml"
: (Primitive.t))
let _menhir_action_03 =
fun l ->
(
# 40 "compiler/lib/annot_parser.mly"
( `Version (l) )
# 185 "compiler/lib/annot_parser.ml"
: (Primitive.t))
let _menhir_action_04 =
fun () ->
(
# 41 "compiler/lib/annot_parser.mly"
( `Weakdef )
# 193 "compiler/lib/annot_parser.ml"
: (Primitive.t))
let _menhir_action_05 =
fun () ->
(
# 42 "compiler/lib/annot_parser.mly"
( `Always )
# 201 "compiler/lib/annot_parser.ml"
: (Primitive.t))
let _menhir_action_06 =
fun name ->
(
# 43 "compiler/lib/annot_parser.mly"
( `Alias (name) )
# 209 "compiler/lib/annot_parser.ml"
: (Primitive.t))
let _menhir_action_07 =
fun name ->
(
# 44 "compiler/lib/annot_parser.mly"
( `If (name) )
# 217 "compiler/lib/annot_parser.ml"
: (Primitive.t))
let _menhir_action_08 =
fun name ->
(
# 45 "compiler/lib/annot_parser.mly"
( `Ifnot (name) )
# 225 "compiler/lib/annot_parser.ml"
: (Primitive.t))
let _menhir_action_09 =
fun () ->
(
# 53 "compiler/lib/annot_parser.mly"
( `Const )
# 233 "compiler/lib/annot_parser.ml"
: (Primitive.kind_arg))
let _menhir_action_10 =
fun () ->
(
# 54 "compiler/lib/annot_parser.mly"
( `Shallow_const)
# 241 "compiler/lib/annot_parser.ml"
: (Primitive.kind_arg))
let _menhir_action_11 =
fun () ->
(
# 55 "compiler/lib/annot_parser.mly"
( `Object_literal)
# 249 "compiler/lib/annot_parser.ml"
: (Primitive.kind_arg))
let _menhir_action_12 =
fun () ->
(
# 56 "compiler/lib/annot_parser.mly"
( `Mutable)
# 257 "compiler/lib/annot_parser.ml"
: (Primitive.kind_arg))
let _menhir_action_13 =
fun () ->
(
# 69 "compiler/lib/annot_parser.mly"
( () )
# 265 "compiler/lib/annot_parser.ml"
: (unit))
let _menhir_action_14 =
fun () ->
(
# 70 "compiler/lib/annot_parser.mly"
( () )
# 273 "compiler/lib/annot_parser.ml"
: (unit))
let _menhir_action_15 =
fun _1 ->
(
# 71 "compiler/lib/annot_parser.mly"
( failwith _1 )
# 281 "compiler/lib/annot_parser.ml"
: (unit))
let _menhir_action_16 =
fun () ->
(
# 145 "<standard.mly>"
( [] )
# 289 "compiler/lib/annot_parser.ml"
: (Primitive.kind_arg list))
let _menhir_action_17 =
fun x ->
(
# 148 "<standard.mly>"
( x )
# 297 "compiler/lib/annot_parser.ml"
: (Primitive.kind_arg list))
let _menhir_action_18 =
fun () ->
(
# 59 "compiler/lib/annot_parser.mly"
((<=))
# 305 "compiler/lib/annot_parser.ml"
: (int -> int -> bool))
let _menhir_action_19 =
fun () ->
(
# 60 "compiler/lib/annot_parser.mly"
((<))
# 313 "compiler/lib/annot_parser.ml"
: (int -> int -> bool))
let _menhir_action_20 =
fun () ->
(
# 61 "compiler/lib/annot_parser.mly"
((>))
# 321 "compiler/lib/annot_parser.ml"
: (int -> int -> bool))
let _menhir_action_21 =
fun () ->
(
# 62 "compiler/lib/annot_parser.mly"
((>=))
# 329 "compiler/lib/annot_parser.ml"
: (int -> int -> bool))
let _menhir_action_22 =
fun () ->
(
# 63 "compiler/lib/annot_parser.mly"
((=))
# 337 "compiler/lib/annot_parser.ml"
: (int -> int -> bool))
let _menhir_action_23 =
fun () ->
(
# 111 "<standard.mly>"
( None )
# 345 "compiler/lib/annot_parser.ml"
: (Primitive.kind_arg list option))
let _menhir_action_24 =
fun xs ->
let x =
let x =
# 241 "<standard.mly>"
( xs )
# 354 "compiler/lib/annot_parser.ml"
in
# 205 "<standard.mly>"
( x )
# 359 "compiler/lib/annot_parser.ml"
in
(
# 114 "<standard.mly>"
( Some x )
# 365 "compiler/lib/annot_parser.ml"
: (Primitive.kind_arg list option))
let _menhir_action_25 =
fun () ->
(
# 111 "<standard.mly>"
( None )
# 373 "compiler/lib/annot_parser.ml"
: (Primitive.kind option))
let _menhir_action_26 =
fun x ->
(
# 114 "<standard.mly>"
( Some x )
# 381 "compiler/lib/annot_parser.ml"
: (Primitive.kind option))
let _menhir_action_27 =
fun () ->
(
# 47 "compiler/lib/annot_parser.mly"
(`Pure)
# 389 "compiler/lib/annot_parser.ml"
: (Primitive.kind))
let _menhir_action_28 =
fun () ->
(
# 48 "compiler/lib/annot_parser.mly"
(`Pure)
# 397 "compiler/lib/annot_parser.ml"
: (Primitive.kind))
let _menhir_action_29 =
fun () ->
(
# 49 "compiler/lib/annot_parser.mly"
(`Mutable)
# 405 "compiler/lib/annot_parser.ml"
: (Primitive.kind))
let _menhir_action_30 =
fun () ->
(
# 50 "compiler/lib/annot_parser.mly"
(`Mutator)
# 413 "compiler/lib/annot_parser.ml"
: (Primitive.kind))
let _menhir_action_31 =
fun x ->
(
# 250 "<standard.mly>"
( [ x ] )
# 421 "compiler/lib/annot_parser.ml"
: (string list))
let _menhir_action_32 =
fun x xs ->
(
# 253 "<standard.mly>"
( x :: xs )
# 429 "compiler/lib/annot_parser.ml"
: (string list))
let _menhir_action_33 =
fun x ->
(
# 250 "<standard.mly>"
( [ x ] )
# 437 "compiler/lib/annot_parser.ml"
: (Primitive.kind_arg list))
let _menhir_action_34 =
fun x xs ->
(
# 253 "<standard.mly>"
( x :: xs )
# 445 "compiler/lib/annot_parser.ml"
: (Primitive.kind_arg list))
let _menhir_action_35 =
fun x ->
(
# 250 "<standard.mly>"
( [ x ] )
# 453 "compiler/lib/annot_parser.ml"
: (((int -> int -> bool) * string) list))
let _menhir_action_36 =
fun x xs ->
(
# 253 "<standard.mly>"
( x :: xs )
# 461 "compiler/lib/annot_parser.ml"
: (((int -> int -> bool) * string) list))
let _menhir_action_37 =
fun _1 _2 ->
(
# 66 "compiler/lib/annot_parser.mly"
( _1,_2 )
# 469 "compiler/lib/annot_parser.ml"
: ((int -> int -> bool) * string))
let _menhir_print_token : token -> string =
fun _tok ->
match _tok with
| EOF ->
"EOF"
| EOL ->
"EOL"
| EQ ->
"EQ"
| GE ->
"GE"
| GT ->
"GT"
| LE ->
"LE"
| LPARENT ->
"LPARENT"
| LT ->
"LT"
| RPARENT ->
"RPARENT"
| TA_Const ->
"TA_Const"
| TA_Mutable ->
"TA_Mutable"
| TA_Mutator ->
"TA_Mutator"
| TA_Object_literal ->
"TA_Object_literal"
| TA_Pure ->
"TA_Pure"
| TA_Shallow ->
"TA_Shallow"
| TAlias ->
"TAlias"
| TAlways ->
"TAlways"
| TBang ->
"TBang"
| TColon ->
"TColon"
| TComma ->
"TComma"
| TIdent _ ->
"TIdent"
| TIf ->
"TIf"
| TOTHER _ ->
"TOTHER"
| TProvides ->
"TProvides"
| TRequires ->
"TRequires"
| TVNum _ ->
"TVNum"
| TVersion ->
"TVersion"
| TWeakdef ->
"TWeakdef"
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 _menhir_goto_annot : type ttv_stack. ttv_stack -> _ -> _menhir_box_annot =
fun _menhir_stack _v ->
MenhirBox_annot _v
let _menhir_run_61 : type ttv_stack. ttv_stack _menhir_cell0_TIdent -> _menhir_box_annot =
fun _menhir_stack ->
let MenhirCell0_TIdent (_menhir_stack, name) = _menhir_stack in
let _v = _menhir_action_06 name in
_menhir_goto_annot _menhir_stack _v
let _menhir_run_57 : type ttv_stack. ttv_stack -> _menhir_box_annot =
fun _menhir_stack ->
let _v = _menhir_action_05 () in
_menhir_goto_annot _menhir_stack _v
let _menhir_run_55 : type ttv_stack. ttv_stack _menhir_cell0_TIdent -> _menhir_box_annot =
fun _menhir_stack ->
let MenhirCell0_TIdent (_menhir_stack, name) = _menhir_stack in
let _v = _menhir_action_08 name in
_menhir_goto_annot _menhir_stack _v
let _menhir_run_52 : type ttv_stack. ttv_stack _menhir_cell0_TIdent -> _menhir_box_annot =
fun _menhir_stack ->
let MenhirCell0_TIdent (_menhir_stack, name) = _menhir_stack in
let _v = _menhir_action_07 name in
_menhir_goto_annot _menhir_stack _v
let _menhir_run_48 : type ttv_stack. ttv_stack _menhir_cell0_TIdent _menhir_cell0_option_prim_annot_ _menhir_cell0_option_delimited_LPARENT_separated_list_TComma_arg_annot__RPARENT__ -> _menhir_box_annot =
fun _menhir_stack ->
let MenhirCell0_option_delimited_LPARENT_separated_list_TComma_arg_annot__RPARENT__ (_menhir_stack, args) = _menhir_stack in
let MenhirCell0_option_prim_annot_ (_menhir_stack, opt) = _menhir_stack in
let MenhirCell0_TIdent (_menhir_stack, id) = _menhir_stack in
let _v = _menhir_action_01 args id opt in
_menhir_goto_annot _menhir_stack _v
let _menhir_run_26 : type ttv_stack. (ttv_stack, _menhir_box_annot) _menhir_cell1_separated_nonempty_list_TComma_TIdent_ -> _menhir_box_annot =
fun _menhir_stack ->
let MenhirCell1_separated_nonempty_list_TComma_TIdent_ (_menhir_stack, _, l) = _menhir_stack in
let _v = _menhir_action_02 l in
_menhir_goto_annot _menhir_stack _v
let _menhir_run_19 : type ttv_stack. (ttv_stack, _menhir_box_annot) _menhir_cell1_separated_nonempty_list_TComma_version_ -> _menhir_box_annot =
fun _menhir_stack ->
let MenhirCell1_separated_nonempty_list_TComma_version_ (_menhir_stack, _, l) = _menhir_stack in
let _v = _menhir_action_03 l in
_menhir_goto_annot _menhir_stack _v
let _menhir_run_05 : type ttv_stack. ttv_stack -> _menhir_box_annot =
fun _menhir_stack ->
let _v = _menhir_action_04 () in
_menhir_goto_annot _menhir_stack _v
let _menhir_goto_endline : type ttv_stack. ttv_stack -> (ttv_stack, _menhir_box_annot) _menhir_state -> _menhir_box_annot =
fun _menhir_stack _menhir_s ->
match _menhir_s with
| MenhirState60 ->
_menhir_run_61 _menhir_stack
| MenhirState56 ->
_menhir_run_57 _menhir_stack
| MenhirState54 ->
_menhir_run_55 _menhir_stack
| MenhirState51 ->
_menhir_run_52 _menhir_stack
| MenhirState47 ->
_menhir_run_48 _menhir_stack
| MenhirState25 ->
_menhir_run_26 _menhir_stack
| MenhirState18 ->
_menhir_run_19 _menhir_stack
| MenhirState01 ->
_menhir_run_05 _menhir_stack
| _ ->
_menhir_fail ()
let _menhir_run_02 : type ttv_stack. ttv_stack -> _ -> (ttv_stack, _menhir_box_annot) _menhir_state -> _menhir_box_annot =
fun _menhir_stack _v _menhir_s ->
let _1 = _v in
let _ = _menhir_action_15 _1 in
_menhir_goto_endline _menhir_stack _menhir_s
let _menhir_run_03 : type ttv_stack. ttv_stack -> (ttv_stack, _menhir_box_annot) _menhir_state -> _menhir_box_annot =
fun _menhir_stack _menhir_s ->
let _ = _menhir_action_13 () in
_menhir_goto_endline _menhir_stack _menhir_s
let _menhir_run_04 : type ttv_stack. ttv_stack -> (ttv_stack, _menhir_box_annot) _menhir_state -> _menhir_box_annot =
fun _menhir_stack _menhir_s ->
let _ = _menhir_action_14 () in
_menhir_goto_endline _menhir_stack _menhir_s
let _menhir_run_18 : type ttv_stack. ttv_stack -> _ -> (ttv_stack, _menhir_box_annot) _menhir_state -> _ -> _menhir_box_annot =
fun _menhir_stack _v _menhir_s _tok ->
let _menhir_stack = MenhirCell1_separated_nonempty_list_TComma_version_ (_menhir_stack, _menhir_s, _v) in
match (_tok : MenhirBasics.token) with
| TOTHER _v_0 ->
_menhir_run_02 _menhir_stack _v_0 MenhirState18
| EOL ->
_menhir_run_03 _menhir_stack MenhirState18
| EOF ->
_menhir_run_04 _menhir_stack MenhirState18
| _ ->
_menhir_fail ()
let rec _menhir_goto_separated_nonempty_list_TComma_version_ : type ttv_stack. ttv_stack -> _ -> (ttv_stack, _menhir_box_annot) _menhir_state -> _ -> _menhir_box_annot =
fun _menhir_stack _v _menhir_s _tok ->
match _menhir_s with
| MenhirState07 ->
_menhir_run_18 _menhir_stack _v _menhir_s _tok
| MenhirState14 ->
_menhir_run_15 _menhir_stack _v _tok
| _ ->
_menhir_fail ()
and _menhir_run_15 : type ttv_stack. (ttv_stack, _menhir_box_annot) _menhir_cell1_version -> _ -> _ -> _menhir_box_annot =
fun _menhir_stack _v _tok ->
let MenhirCell1_version (_menhir_stack, _menhir_s, x) = _menhir_stack in
let xs = _v in
let _v = _menhir_action_36 x xs in
_menhir_goto_separated_nonempty_list_TComma_version_ _menhir_stack _v _menhir_s _tok
let rec _menhir_run_08 : type ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_annot) _menhir_state -> _menhir_box_annot =
fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
let _tok = _menhir_lexer _menhir_lexbuf in
let _v = _menhir_action_19 () in
_menhir_goto_op _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
and _menhir_goto_op : type ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_annot) _menhir_state -> _ -> _menhir_box_annot =
fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
match (_tok : MenhirBasics.token) with
| TVNum _v_0 ->
let _tok = _menhir_lexer _menhir_lexbuf in
let (_1, _2) = (_v, _v_0) in
let _v = _menhir_action_37 _1 _2 in
(match (_tok : MenhirBasics.token) with
| TComma ->
let _menhir_stack = MenhirCell1_version (_menhir_stack, _menhir_s, _v) in
let _menhir_s = MenhirState14 in
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| LT ->
_menhir_run_08 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
| LE ->
_menhir_run_09 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
| GT ->
_menhir_run_10 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
| GE ->
_menhir_run_11 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
| EQ ->
_menhir_run_12 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
| _ ->
_eRR ())
| EOF | EOL | TOTHER _ ->
let x = _v in
let _v = _menhir_action_35 x in
_menhir_goto_separated_nonempty_list_TComma_version_ _menhir_stack _v _menhir_s _tok
| _ ->
_eRR ())
| _ ->
_eRR ()
and _menhir_run_09 : type ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_annot) _menhir_state -> _menhir_box_annot =
fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
let _tok = _menhir_lexer _menhir_lexbuf in
let _v = _menhir_action_18 () in
_menhir_goto_op _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
and _menhir_run_10 : type ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_annot) _menhir_state -> _menhir_box_annot =
fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
let _tok = _menhir_lexer _menhir_lexbuf in
let _v = _menhir_action_20 () in
_menhir_goto_op _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
and _menhir_run_11 : type ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_annot) _menhir_state -> _menhir_box_annot =
fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
let _tok = _menhir_lexer _menhir_lexbuf in
let _v = _menhir_action_21 () in
_menhir_goto_op _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
and _menhir_run_12 : type ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_annot) _menhir_state -> _menhir_box_annot =
fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
let _tok = _menhir_lexer _menhir_lexbuf in
let _v = _menhir_action_22 () in
_menhir_goto_op _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
let _menhir_run_25 : type ttv_stack. ttv_stack -> _ -> (ttv_stack, _menhir_box_annot) _menhir_state -> _ -> _menhir_box_annot =
fun _menhir_stack _v _menhir_s _tok ->
let _menhir_stack = MenhirCell1_separated_nonempty_list_TComma_TIdent_ (_menhir_stack, _menhir_s, _v) in
match (_tok : MenhirBasics.token) with
| TOTHER _v_0 ->
_menhir_run_02 _menhir_stack _v_0 MenhirState25
| EOL ->
_menhir_run_03 _menhir_stack MenhirState25
| EOF ->
_menhir_run_04 _menhir_stack MenhirState25
| _ ->
_menhir_fail ()
let rec _menhir_goto_separated_nonempty_list_TComma_TIdent_ : type ttv_stack. ttv_stack -> _ -> (ttv_stack, _menhir_box_annot) _menhir_state -> _ -> _menhir_box_annot =
fun _menhir_stack _v _menhir_s _tok ->
match _menhir_s with
| MenhirState21 ->
_menhir_run_25 _menhir_stack _v _menhir_s _tok
| MenhirState23 ->
_menhir_run_24 _menhir_stack _v _tok
| _ ->
_menhir_fail ()
and _menhir_run_24 : type ttv_stack. (ttv_stack, _menhir_box_annot) _menhir_cell1_TIdent -> _ -> _ -> _menhir_box_annot =
fun _menhir_stack _v _tok ->
let MenhirCell1_TIdent (_menhir_stack, _menhir_s, x) = _menhir_stack in
let xs = _v in
let _v = _menhir_action_32 x xs in
_menhir_goto_separated_nonempty_list_TComma_TIdent_ _menhir_stack _v _menhir_s _tok
let rec _menhir_run_22 : type ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_annot) _menhir_state -> _menhir_box_annot =
fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
let _tok = _menhir_lexer _menhir_lexbuf in
match (_tok : MenhirBasics.token) with
| TComma ->
let _menhir_stack = MenhirCell1_TIdent (_menhir_stack, _menhir_s, _v) in
let _menhir_s = MenhirState23 in
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| TIdent _v ->
_menhir_run_22 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
| _ ->
_eRR ())
| EOF | EOL | TOTHER _ ->
let x = _v in
let _v = _menhir_action_31 x in
_menhir_goto_separated_nonempty_list_TComma_TIdent_ _menhir_stack _v _menhir_s _tok
| _ ->
_eRR ()
let _menhir_goto_option_delimited_LPARENT_separated_list_TComma_arg_annot__RPARENT__ : type ttv_stack. ttv_stack _menhir_cell0_TIdent _menhir_cell0_option_prim_annot_ -> _ -> _ -> _menhir_box_annot =
fun _menhir_stack _v _tok ->
let _menhir_stack = MenhirCell0_option_delimited_LPARENT_separated_list_TComma_arg_annot__RPARENT__ (_menhir_stack, _v) in
match (_tok : MenhirBasics.token) with
| TOTHER _v_0 ->
_menhir_run_02 _menhir_stack _v_0 MenhirState47
| EOL ->
_menhir_run_03 _menhir_stack MenhirState47
| EOF ->
_menhir_run_04 _menhir_stack MenhirState47
| _ ->
_eRR ()
let _menhir_goto_loption_separated_nonempty_list_TComma_arg_annot__ : type ttv_stack. ttv_stack _menhir_cell0_TIdent _menhir_cell0_option_prim_annot_ -> _ -> _ -> _ -> _menhir_box_annot =
fun _menhir_stack _menhir_lexbuf _menhir_lexer _v ->
let _tok = _menhir_lexer _menhir_lexbuf in
let xs = _v in
let _v = _menhir_action_24 xs in
_menhir_goto_option_delimited_LPARENT_separated_list_TComma_arg_annot__RPARENT__ _menhir_stack _v _tok
let _menhir_run_41 : type ttv_stack. ttv_stack _menhir_cell0_TIdent _menhir_cell0_option_prim_annot_ -> _ -> _ -> _ -> _menhir_box_annot =
fun _menhir_stack _menhir_lexbuf _menhir_lexer _v ->
let x = _v in
let _v = _menhir_action_17 x in
_menhir_goto_loption_separated_nonempty_list_TComma_arg_annot__ _menhir_stack _menhir_lexbuf _menhir_lexer _v
let rec _menhir_goto_separated_nonempty_list_TComma_arg_annot_ : type ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_annot) _menhir_state -> _menhir_box_annot =
fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s ->
match _menhir_s with
| MenhirState45 ->
_menhir_run_46 _menhir_stack _menhir_lexbuf _menhir_lexer _v
| MenhirState36 ->
_menhir_run_41 _menhir_stack _menhir_lexbuf _menhir_lexer _v
| _ ->
_menhir_fail ()
and _menhir_run_46 : type ttv_stack. (ttv_stack, _menhir_box_annot) _menhir_cell1_arg_annot -> _ -> _ -> _ -> _menhir_box_annot =
fun _menhir_stack _menhir_lexbuf _menhir_lexer _v ->
let MenhirCell1_arg_annot (_menhir_stack, _menhir_s, x) = _menhir_stack in
let xs = _v in
let _v = _menhir_action_34 x xs in
_menhir_goto_separated_nonempty_list_TComma_arg_annot_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
let rec _menhir_run_37 : type ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_annot) _menhir_state -> _menhir_box_annot =
fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
let _tok = _menhir_lexer _menhir_lexbuf in
let _v = _menhir_action_10 () in
_menhir_goto_arg_annot _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
and _menhir_goto_arg_annot : type ttv_stack. ttv_stack -> _ -> _ -> _ -> (ttv_stack, _menhir_box_annot) _menhir_state -> _ -> _menhir_box_annot =
fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok ->
match (_tok : MenhirBasics.token) with
| TComma ->
let _menhir_stack = MenhirCell1_arg_annot (_menhir_stack, _menhir_s, _v) in
let _menhir_s = MenhirState45 in
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| TA_Shallow ->
_menhir_run_37 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
| TA_Object_literal ->
_menhir_run_38 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
| TA_Mutable ->
_menhir_run_39 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
| TA_Const ->
_menhir_run_40 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
| _ ->
_eRR ())
| RPARENT ->
let x = _v in
let _v = _menhir_action_33 x in
_menhir_goto_separated_nonempty_list_TComma_arg_annot_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
| _ ->
_eRR ()
and _menhir_run_38 : type ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_annot) _menhir_state -> _menhir_box_annot =
fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
let _tok = _menhir_lexer _menhir_lexbuf in
let _v = _menhir_action_11 () in
_menhir_goto_arg_annot _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
and _menhir_run_39 : type ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_annot) _menhir_state -> _menhir_box_annot =
fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
let _tok = _menhir_lexer _menhir_lexbuf in
let _v = _menhir_action_12 () in
_menhir_goto_arg_annot _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
and _menhir_run_40 : type ttv_stack. ttv_stack -> _ -> _ -> (ttv_stack, _menhir_box_annot) _menhir_state -> _menhir_box_annot =
fun _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s ->
let _tok = _menhir_lexer _menhir_lexbuf in
let _v = _menhir_action_09 () in
_menhir_goto_arg_annot _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s _tok
let _menhir_goto_option_prim_annot_ : type ttv_stack. ttv_stack _menhir_cell0_TIdent -> _ -> _ -> _ -> _ -> _menhir_box_annot =
fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok ->
let _menhir_stack = MenhirCell0_option_prim_annot_ (_menhir_stack, _v) in
match (_tok : MenhirBasics.token) with
| LPARENT ->
let _menhir_s = MenhirState36 in
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| TA_Shallow ->
_menhir_run_37 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
| TA_Object_literal ->
_menhir_run_38 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
| TA_Mutable ->
_menhir_run_39 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
| TA_Const ->
_menhir_run_40 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
| RPARENT ->
let _v = _menhir_action_16 () in
_menhir_goto_loption_separated_nonempty_list_TComma_arg_annot__ _menhir_stack _menhir_lexbuf _menhir_lexer _v
| _ ->
_eRR ())
| EOF | EOL | TOTHER _ ->
let _v = _menhir_action_23 () in
_menhir_goto_option_delimited_LPARENT_separated_list_TComma_arg_annot__RPARENT__ _menhir_stack _v _tok
| _ ->
_eRR ()
let _menhir_goto_prim_annot : type ttv_stack. ttv_stack _menhir_cell0_TIdent -> _ -> _ -> _ -> _ -> _menhir_box_annot =
fun _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok ->
let x = _v in
let _v = _menhir_action_26 x in
_menhir_goto_option_prim_annot_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
let _menhir_run_00 : type ttv_stack. ttv_stack -> _ -> _ -> _menhir_box_annot =
fun _menhir_stack _menhir_lexbuf _menhir_lexer ->
let _tok = _menhir_lexer _menhir_lexbuf in
match (_tok : MenhirBasics.token) with
| TWeakdef ->
let _menhir_s = MenhirState01 in
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| TOTHER _v ->
_menhir_run_02 _menhir_stack _v _menhir_s
| EOL ->
_menhir_run_03 _menhir_stack _menhir_s
| EOF ->
_menhir_run_04 _menhir_stack _menhir_s
| _ ->
_eRR ())
| TVersion ->
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| TColon ->
let _menhir_s = MenhirState07 in
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| LT ->
_menhir_run_08 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
| LE ->
_menhir_run_09 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
| GT ->
_menhir_run_10 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
| GE ->
_menhir_run_11 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
| EQ ->
_menhir_run_12 _menhir_stack _menhir_lexbuf _menhir_lexer _menhir_s
| _ ->
_eRR ())
| _ ->
_eRR ())
| TRequires ->
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| TColon ->
let _menhir_s = MenhirState21 in
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| TIdent _v ->
_menhir_run_22 _menhir_stack _menhir_lexbuf _menhir_lexer _v _menhir_s
| _ ->
_eRR ())
| _ ->
_eRR ())
| TProvides ->
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| TColon ->
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| TIdent _v ->
let _menhir_stack = MenhirCell0_TIdent (_menhir_stack, _v) in
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| TA_Pure ->
let _tok = _menhir_lexer _menhir_lexbuf in
let _v = _menhir_action_27 () in
_menhir_goto_prim_annot _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
| TA_Mutator ->
let _tok = _menhir_lexer _menhir_lexbuf in
let _v = _menhir_action_30 () in
_menhir_goto_prim_annot _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
| TA_Mutable ->
let _tok = _menhir_lexer _menhir_lexbuf in
let _v = _menhir_action_29 () in
_menhir_goto_prim_annot _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
| TA_Const ->
let _tok = _menhir_lexer _menhir_lexbuf in
let _v = _menhir_action_28 () in
_menhir_goto_prim_annot _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
| EOF | EOL | LPARENT | TOTHER _ ->
let _v = _menhir_action_25 () in
_menhir_goto_option_prim_annot_ _menhir_stack _menhir_lexbuf _menhir_lexer _v _tok
| _ ->
_eRR ())
| _ ->
_eRR ())
| _ ->
_eRR ())
| TIf ->
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| TColon ->
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| TIdent _v ->
let _menhir_stack = MenhirCell0_TIdent (_menhir_stack, _v) in
let _menhir_s = MenhirState51 in
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| TOTHER _v ->
_menhir_run_02 _menhir_stack _v _menhir_s
| EOL ->
_menhir_run_03 _menhir_stack _menhir_s
| EOF ->
_menhir_run_04 _menhir_stack _menhir_s
| _ ->
_eRR ())
| TBang ->
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| TIdent _v ->
let _menhir_stack = MenhirCell0_TIdent (_menhir_stack, _v) in
let _menhir_s = MenhirState54 in
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| TOTHER _v ->
_menhir_run_02 _menhir_stack _v _menhir_s
| EOL ->
_menhir_run_03 _menhir_stack _menhir_s
| EOF ->
_menhir_run_04 _menhir_stack _menhir_s
| _ ->
_eRR ())
| _ ->
_eRR ())
| _ ->
_eRR ())
| _ ->
_eRR ())
| TAlways ->
let _menhir_s = MenhirState56 in
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| TOTHER _v ->
_menhir_run_02 _menhir_stack _v _menhir_s
| EOL ->
_menhir_run_03 _menhir_stack _menhir_s
| EOF ->
_menhir_run_04 _menhir_stack _menhir_s
| _ ->
_eRR ())
| TAlias ->
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| TColon ->
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| TIdent _v ->
let _menhir_stack = MenhirCell0_TIdent (_menhir_stack, _v) in
let _menhir_s = MenhirState60 in
let _tok = _menhir_lexer _menhir_lexbuf in
(match (_tok : MenhirBasics.token) with
| TOTHER _v ->
_menhir_run_02 _menhir_stack _v _menhir_s
| EOL ->
_menhir_run_03 _menhir_stack _menhir_s
| EOF ->
_menhir_run_04 _menhir_stack _menhir_s
| _ ->
_eRR ())
| _ ->
_eRR ())
| _ ->
_eRR ())
| _ ->
_eRR ()
end
let annot =
fun _menhir_lexer _menhir_lexbuf ->
let _menhir_stack = () in
let MenhirBox_annot v = _menhir_run_00 _menhir_stack _menhir_lexbuf _menhir_lexer in
v