-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathql.dbscheme
More file actions
1356 lines (1064 loc) · 48.5 KB
/
ql.dbscheme
File metadata and controls
1356 lines (1064 loc) · 48.5 KB
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
// CodeQL database schema for QL
// Automatically generated from the tree-sitter grammar; do not edit
// To regenerate, run 'scripts/create-extractor-pack.sh' in ql/
/*- Files and folders -*/
/**
* The location of an element.
* The location spans column `startcolumn` of line `startline` to
* column `endcolumn` of line `endline` in file `file`.
* For more information, see
* [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
*/
locations_default(
unique int id: @location_default,
int file: @file ref,
int beginLine: int ref,
int beginColumn: int ref,
int endLine: int ref,
int endColumn: int ref
);
files(
unique int id: @file,
string name: string ref
);
folders(
unique int id: @folder,
string name: string ref
);
@container = @file | @folder
containerparent(
int parent: @container ref,
unique int child: @container ref
);
/*- Empty location -*/
empty_location(
int location: @location_default ref
);
/*- Source location prefix -*/
/**
* The source location of the snapshot.
*/
sourceLocationPrefix(string prefix : string ref);
/*- Diagnostic messages -*/
diagnostics(
unique int id: @diagnostic,
int severity: int ref,
string error_tag: string ref,
string error_message: string ref,
string full_error_message: string ref,
int location: @location_default ref
);
/*- Diagnostic messages: severity -*/
case @diagnostic.severity of
10 = @diagnostic_debug
| 20 = @diagnostic_info
| 30 = @diagnostic_warning
| 40 = @diagnostic_error
;
/*- YAML -*/
#keyset[parent, idx]
yaml (unique int id: @yaml_node,
int kind: int ref,
int parent: @yaml_node_parent ref,
int idx: int ref,
string tag: string ref,
string tostring: string ref);
case @yaml_node.kind of
0 = @yaml_scalar_node
| 1 = @yaml_mapping_node
| 2 = @yaml_sequence_node
| 3 = @yaml_alias_node
;
@yaml_collection_node = @yaml_mapping_node | @yaml_sequence_node;
@yaml_node_parent = @yaml_collection_node | @file;
yaml_anchors (unique int node: @yaml_node ref,
string anchor: string ref);
yaml_aliases (unique int alias: @yaml_alias_node ref,
string target: string ref);
yaml_scalars (unique int scalar: @yaml_scalar_node ref,
int style: int ref,
string value: string ref);
yaml_errors (unique int id: @yaml_error,
string message: string ref);
yaml_locations(unique int locatable: @yaml_locatable ref,
int location: @location_default ref);
@yaml_locatable = @yaml_node | @yaml_error;
/*- Database metadata -*/
/**
* The CLI will automatically emit applicable tuples for this table,
* such as `databaseMetadata("isOverlay", "true")` when building an
* overlay database.
*/
databaseMetadata(
string metadataKey: string ref,
string value: string ref
);
/*- Overlay support -*/
/**
* The CLI will automatically emit tuples for each new/modified/deleted file
* when building an overlay database.
*/
overlayChangedFiles(
string path: string ref
);
/*- QL dbscheme -*/
@ql_add_expr_left_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_variable
@ql_add_expr_right_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_variable
ql_add_expr_def(
unique int id: @ql_add_expr,
int left: @ql_add_expr_left_type ref,
int right: @ql_add_expr_right_type ref,
int child: @ql_token_addop ref
);
@ql_aggregate_child_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_aggregate_body | @ql_expr_annotation | @ql_full_aggregate_body | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_token_agg_id | @ql_unary_expr | @ql_variable
#keyset[ql_aggregate, index]
ql_aggregate_child(
int ql_aggregate: @ql_aggregate ref,
int index: int ref,
unique int child: @ql_aggregate_child_type ref
);
ql_aggregate_def(
unique int id: @ql_aggregate
);
@ql_annotArg_child_type = @ql_token_result | @ql_token_simple_id | @ql_token_this
ql_annot_arg_def(
unique int id: @ql_annot_arg,
int child: @ql_annotArg_child_type ref
);
@ql_annotation_args_type = @ql_annot_arg | @ql_reserved_word
#keyset[ql_annotation, index]
ql_annotation_args(
int ql_annotation: @ql_annotation ref,
int index: int ref,
unique int args: @ql_annotation_args_type ref
);
ql_annotation_def(
unique int id: @ql_annotation,
int name: @ql_token_annot_name ref
);
ql_arityless_predicate_expr_qualifier(
unique int ql_arityless_predicate_expr: @ql_arityless_predicate_expr ref,
unique int qualifier: @ql_module_expr ref
);
ql_arityless_predicate_expr_def(
unique int id: @ql_arityless_predicate_expr,
int name: @ql_token_literal_id ref
);
@ql_asExpr_child_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_var_name | @ql_variable
#keyset[ql_as_expr, index]
ql_as_expr_child(
int ql_as_expr: @ql_as_expr ref,
int index: int ref,
unique int child: @ql_asExpr_child_type ref
);
ql_as_expr_def(
unique int id: @ql_as_expr
);
#keyset[ql_as_exprs, index]
ql_as_exprs_child(
int ql_as_exprs: @ql_as_exprs ref,
int index: int ref,
unique int child: @ql_as_expr ref
);
ql_as_exprs_def(
unique int id: @ql_as_exprs
);
@ql_body_child_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_variable
ql_body_def(
unique int id: @ql_body,
int child: @ql_body_child_type ref
);
@ql_bool_child_type = @ql_token_false | @ql_token_true
ql_bool_def(
unique int id: @ql_bool,
int child: @ql_bool_child_type ref
);
@ql_call_body_child_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_token_underscore | @ql_unary_expr | @ql_variable
#keyset[ql_call_body, index]
ql_call_body_child(
int ql_call_body: @ql_call_body ref,
int index: int ref,
unique int child: @ql_call_body_child_type ref
);
ql_call_body_def(
unique int id: @ql_call_body
);
@ql_call_or_unqual_agg_expr_child_type = @ql_arityless_predicate_expr | @ql_call_body | @ql_token_closure | @ql_unqual_agg_body
#keyset[ql_call_or_unqual_agg_expr, index]
ql_call_or_unqual_agg_expr_child(
int ql_call_or_unqual_agg_expr: @ql_call_or_unqual_agg_expr ref,
int index: int ref,
unique int child: @ql_call_or_unqual_agg_expr_child_type ref
);
ql_call_or_unqual_agg_expr_def(
unique int id: @ql_call_or_unqual_agg_expr
);
@ql_charpred_body_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_variable
ql_charpred_def(
unique int id: @ql_charpred,
int body: @ql_charpred_body_type ref,
int child: @ql_token_class_name ref
);
@ql_classMember_child_type = @ql_annotation | @ql_charpred | @ql_field | @ql_member_predicate | @ql_token_qldoc
#keyset[ql_class_member, index]
ql_class_member_child(
int ql_class_member: @ql_class_member ref,
int index: int ref,
unique int child: @ql_classMember_child_type ref
);
ql_class_member_def(
unique int id: @ql_class_member
);
@ql_classlessPredicate_returnType_type = @ql_token_predicate | @ql_type_expr
@ql_classlessPredicate_child_type = @ql_body | @ql_higher_order_term | @ql_predicate_alias_body | @ql_token_empty | @ql_var_decl
#keyset[ql_classless_predicate, index]
ql_classless_predicate_child(
int ql_classless_predicate: @ql_classless_predicate ref,
int index: int ref,
unique int child: @ql_classlessPredicate_child_type ref
);
ql_classless_predicate_def(
unique int id: @ql_classless_predicate,
int name: @ql_token_predicate_name ref,
int return_type: @ql_classlessPredicate_returnType_type ref
);
@ql_comp_term_left_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_variable
@ql_comp_term_right_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_variable
ql_comp_term_def(
unique int id: @ql_comp_term,
int left: @ql_comp_term_left_type ref,
int right: @ql_comp_term_right_type ref,
int child: @ql_token_compop ref
);
@ql_conjunction_left_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_variable
@ql_conjunction_right_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_variable
ql_conjunction_def(
unique int id: @ql_conjunction,
int left: @ql_conjunction_left_type ref,
int right: @ql_conjunction_right_type ref
);
@ql_dataclass_extends_type = @ql_reserved_word | @ql_type_expr
#keyset[ql_dataclass, index]
ql_dataclass_extends(
int ql_dataclass: @ql_dataclass ref,
int index: int ref,
unique int extends: @ql_dataclass_extends_type ref
);
@ql_dataclass_instanceof_type = @ql_reserved_word | @ql_type_expr
#keyset[ql_dataclass, index]
ql_dataclass_instanceof(
int ql_dataclass: @ql_dataclass ref,
int index: int ref,
unique int instanceof: @ql_dataclass_instanceof_type ref
);
@ql_dataclass_child_type = @ql_class_member | @ql_type_alias_body | @ql_type_union_body
#keyset[ql_dataclass, index]
ql_dataclass_child(
int ql_dataclass: @ql_dataclass ref,
int index: int ref,
unique int child: @ql_dataclass_child_type ref
);
ql_dataclass_def(
unique int id: @ql_dataclass,
int name: @ql_token_class_name ref
);
ql_datatype_def(
unique int id: @ql_datatype,
int name: @ql_token_class_name ref,
int child: @ql_datatype_branches ref
);
@ql_datatypeBranch_child_type = @ql_annotation | @ql_body | @ql_token_qldoc | @ql_var_decl
#keyset[ql_datatype_branch, index]
ql_datatype_branch_child(
int ql_datatype_branch: @ql_datatype_branch ref,
int index: int ref,
unique int child: @ql_datatypeBranch_child_type ref
);
ql_datatype_branch_def(
unique int id: @ql_datatype_branch,
int name: @ql_token_class_name ref
);
#keyset[ql_datatype_branches, index]
ql_datatype_branches_child(
int ql_datatype_branches: @ql_datatype_branches ref,
int index: int ref,
unique int child: @ql_datatype_branch ref
);
ql_datatype_branches_def(
unique int id: @ql_datatype_branches
);
@ql_disjunction_left_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_variable
@ql_disjunction_right_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_variable
ql_disjunction_def(
unique int id: @ql_disjunction,
int left: @ql_disjunction_left_type ref,
int right: @ql_disjunction_right_type ref
);
ql_expr_aggregate_body_order_bys(
unique int ql_expr_aggregate_body: @ql_expr_aggregate_body ref,
unique int order_bys: @ql_order_bys ref
);
ql_expr_aggregate_body_def(
unique int id: @ql_expr_aggregate_body,
int as_exprs: @ql_as_exprs ref
);
@ql_expr_annotation_child_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_variable
ql_expr_annotation_def(
unique int id: @ql_expr_annotation,
int annot_arg: @ql_token_annot_name ref,
int name: @ql_token_annot_name ref,
int child: @ql_expr_annotation_child_type ref
);
ql_field_def(
unique int id: @ql_field,
int child: @ql_var_decl ref
);
ql_full_aggregate_body_as_exprs(
unique int ql_full_aggregate_body: @ql_full_aggregate_body ref,
unique int as_exprs: @ql_as_exprs ref
);
@ql_full_aggregate_body_guard_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_variable
ql_full_aggregate_body_guard(
unique int ql_full_aggregate_body: @ql_full_aggregate_body ref,
unique int guard: @ql_full_aggregate_body_guard_type ref
);
ql_full_aggregate_body_order_bys(
unique int ql_full_aggregate_body: @ql_full_aggregate_body ref,
unique int order_bys: @ql_order_bys ref
);
#keyset[ql_full_aggregate_body, index]
ql_full_aggregate_body_child(
int ql_full_aggregate_body: @ql_full_aggregate_body ref,
int index: int ref,
unique int child: @ql_var_decl ref
);
ql_full_aggregate_body_def(
unique int id: @ql_full_aggregate_body
);
@ql_higherOrderTerm_child_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_predicate_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_token_underscore | @ql_unary_expr | @ql_variable
#keyset[ql_higher_order_term, index]
ql_higher_order_term_child(
int ql_higher_order_term: @ql_higher_order_term ref,
int index: int ref,
unique int child: @ql_higherOrderTerm_child_type ref
);
ql_higher_order_term_def(
unique int id: @ql_higher_order_term,
int name: @ql_token_literal_id ref
);
@ql_if_term_cond_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_variable
@ql_if_term_first_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_variable
@ql_if_term_second_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_variable
ql_if_term_def(
unique int id: @ql_if_term,
int cond: @ql_if_term_cond_type ref,
int first: @ql_if_term_first_type ref,
int second: @ql_if_term_second_type ref
);
@ql_implication_left_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_variable
@ql_implication_right_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_variable
ql_implication_def(
unique int id: @ql_implication,
int left: @ql_implication_left_type ref,
int right: @ql_implication_right_type ref
);
@ql_importDirective_child_type = @ql_import_module_expr | @ql_module_name
#keyset[ql_import_directive, index]
ql_import_directive_child(
int ql_import_directive: @ql_import_directive ref,
int index: int ref,
unique int child: @ql_importDirective_child_type ref
);
ql_import_directive_def(
unique int id: @ql_import_directive
);
#keyset[ql_import_module_expr, index]
ql_import_module_expr_qual_name(
int ql_import_module_expr: @ql_import_module_expr ref,
int index: int ref,
unique int qual_name: @ql_token_simple_id ref
);
ql_import_module_expr_def(
unique int id: @ql_import_module_expr,
int child: @ql_module_expr ref
);
@ql_in_expr_left_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_variable
@ql_in_expr_right_type = @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_expr_annotation | @ql_literal | @ql_par_expr | @ql_qualified_expr | @ql_range | @ql_set_literal | @ql_super_ref | @ql_variable
ql_in_expr_def(
unique int id: @ql_in_expr,
int left: @ql_in_expr_left_type ref,
int right: @ql_in_expr_right_type ref
);
@ql_instance_of_child_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_type_expr | @ql_unary_expr | @ql_variable
#keyset[ql_instance_of, index]
ql_instance_of_child(
int ql_instance_of: @ql_instance_of ref,
int index: int ref,
unique int child: @ql_instance_of_child_type ref
);
ql_instance_of_def(
unique int id: @ql_instance_of
);
@ql_literal_child_type = @ql_bool | @ql_token_float | @ql_token_integer | @ql_token_string
ql_literal_def(
unique int id: @ql_literal,
int child: @ql_literal_child_type ref
);
@ql_memberPredicate_returnType_type = @ql_token_predicate | @ql_type_expr
@ql_memberPredicate_child_type = @ql_body | @ql_higher_order_term | @ql_token_empty | @ql_var_decl
#keyset[ql_member_predicate, index]
ql_member_predicate_child(
int ql_member_predicate: @ql_member_predicate ref,
int index: int ref,
unique int child: @ql_memberPredicate_child_type ref
);
ql_member_predicate_def(
unique int id: @ql_member_predicate,
int name: @ql_token_predicate_name ref,
int return_type: @ql_memberPredicate_returnType_type ref
);
#keyset[ql_module, index]
ql_module_implements(
int ql_module: @ql_module ref,
int index: int ref,
unique int implements: @ql_signature_expr ref
);
#keyset[ql_module, index]
ql_module_parameter(
int ql_module: @ql_module ref,
int index: int ref,
unique int parameter: @ql_module_param ref
);
@ql_module_child_type = @ql_module_alias_body | @ql_module_member
#keyset[ql_module, index]
ql_module_child(
int ql_module: @ql_module ref,
int index: int ref,
unique int child: @ql_module_child_type ref
);
ql_module_def(
unique int id: @ql_module,
int name: @ql_module_name ref
);
ql_module_alias_body_def(
unique int id: @ql_module_alias_body,
int child: @ql_module_expr ref
);
@ql_moduleExpr_name_type = @ql_module_instantiation | @ql_token_simple_id
ql_module_expr_name(
unique int ql_module_expr: @ql_module_expr ref,
unique int name: @ql_moduleExpr_name_type ref
);
@ql_moduleExpr_child_type = @ql_module_expr | @ql_module_instantiation | @ql_token_simple_id
ql_module_expr_def(
unique int id: @ql_module_expr,
int child: @ql_moduleExpr_child_type ref
);
#keyset[ql_module_instantiation, index]
ql_module_instantiation_child(
int ql_module_instantiation: @ql_module_instantiation ref,
int index: int ref,
unique int child: @ql_signature_expr ref
);
ql_module_instantiation_def(
unique int id: @ql_module_instantiation,
int name: @ql_module_name ref
);
@ql_moduleMember_child_type = @ql_annotation | @ql_classless_predicate | @ql_dataclass | @ql_datatype | @ql_import_directive | @ql_module | @ql_select | @ql_token_qldoc
#keyset[ql_module_member, index]
ql_module_member_child(
int ql_module_member: @ql_module_member ref,
int index: int ref,
unique int child: @ql_moduleMember_child_type ref
);
ql_module_member_def(
unique int id: @ql_module_member
);
ql_module_name_def(
unique int id: @ql_module_name,
int child: @ql_token_simple_id ref
);
ql_module_param_def(
unique int id: @ql_module_param,
int parameter: @ql_token_simple_id ref,
int signature: @ql_signature_expr ref
);
@ql_mul_expr_left_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_variable
@ql_mul_expr_right_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_variable
ql_mul_expr_def(
unique int id: @ql_mul_expr,
int left: @ql_mul_expr_left_type ref,
int right: @ql_mul_expr_right_type ref,
int child: @ql_token_mulop ref
);
@ql_negation_child_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_variable
ql_negation_def(
unique int id: @ql_negation,
int child: @ql_negation_child_type ref
);
@ql_orderBy_child_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_token_direction | @ql_unary_expr | @ql_variable
#keyset[ql_order_by, index]
ql_order_by_child(
int ql_order_by: @ql_order_by ref,
int index: int ref,
unique int child: @ql_orderBy_child_type ref
);
ql_order_by_def(
unique int id: @ql_order_by
);
#keyset[ql_order_bys, index]
ql_order_bys_child(
int ql_order_bys: @ql_order_bys ref,
int index: int ref,
unique int child: @ql_order_by ref
);
ql_order_bys_def(
unique int id: @ql_order_bys
);
@ql_par_expr_child_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_variable
ql_par_expr_def(
unique int id: @ql_par_expr,
int child: @ql_par_expr_child_type ref
);
ql_predicate_alias_body_def(
unique int id: @ql_predicate_alias_body,
int child: @ql_predicate_expr ref
);
@ql_predicateExpr_child_type = @ql_arityless_predicate_expr | @ql_token_integer
#keyset[ql_predicate_expr, index]
ql_predicate_expr_child(
int ql_predicate_expr: @ql_predicate_expr ref,
int index: int ref,
unique int child: @ql_predicateExpr_child_type ref
);
ql_predicate_expr_def(
unique int id: @ql_predicate_expr
);
@ql_prefix_cast_child_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_type_expr | @ql_unary_expr | @ql_variable
#keyset[ql_prefix_cast, index]
ql_prefix_cast_child(
int ql_prefix_cast: @ql_prefix_cast ref,
int index: int ref,
unique int child: @ql_prefix_cast_child_type ref
);
ql_prefix_cast_def(
unique int id: @ql_prefix_cast
);
#keyset[ql_ql, index]
ql_ql_child(
int ql_ql: @ql_ql ref,
int index: int ref,
unique int child: @ql_module_member ref
);
ql_ql_def(
unique int id: @ql_ql
);
ql_qualified_rhs_name(
unique int ql_qualified_rhs: @ql_qualified_rhs ref,
unique int name: @ql_token_predicate_name ref
);
@ql_qualifiedRhs_child_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_token_closure | @ql_token_underscore | @ql_type_expr | @ql_unary_expr | @ql_variable
#keyset[ql_qualified_rhs, index]
ql_qualified_rhs_child(
int ql_qualified_rhs: @ql_qualified_rhs ref,
int index: int ref,
unique int child: @ql_qualifiedRhs_child_type ref
);
ql_qualified_rhs_def(
unique int id: @ql_qualified_rhs
);
@ql_qualified_expr_child_type = @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_expr_annotation | @ql_literal | @ql_par_expr | @ql_qualified_expr | @ql_qualified_rhs | @ql_range | @ql_set_literal | @ql_super_ref | @ql_variable
#keyset[ql_qualified_expr, index]
ql_qualified_expr_child(
int ql_qualified_expr: @ql_qualified_expr ref,
int index: int ref,
unique int child: @ql_qualified_expr_child_type ref
);
ql_qualified_expr_def(
unique int id: @ql_qualified_expr
);
@ql_quantified_expr_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_variable
ql_quantified_expr(
unique int ql_quantified: @ql_quantified ref,
unique int expr: @ql_quantified_expr_type ref
);
@ql_quantified_formula_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_variable
ql_quantified_formula(
unique int ql_quantified: @ql_quantified ref,
unique int formula: @ql_quantified_formula_type ref
);
@ql_quantified_range_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_variable
ql_quantified_range(
unique int ql_quantified: @ql_quantified ref,
unique int range: @ql_quantified_range_type ref
);
@ql_quantified_child_type = @ql_token_quantifier | @ql_var_decl
#keyset[ql_quantified, index]
ql_quantified_child(
int ql_quantified: @ql_quantified ref,
int index: int ref,
unique int child: @ql_quantified_child_type ref
);
ql_quantified_def(
unique int id: @ql_quantified
);
@ql_range_lower_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_variable
@ql_range_upper_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_variable
ql_range_def(
unique int id: @ql_range,
int lower: @ql_range_lower_type ref,
int upper: @ql_range_upper_type ref
);
@ql_select_child_type = @ql_add_expr | @ql_aggregate | @ql_as_exprs | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_order_bys | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_var_decl | @ql_variable
#keyset[ql_select, index]
ql_select_child(
int ql_select: @ql_select ref,
int index: int ref,
unique int child: @ql_select_child_type ref
);
ql_select_def(
unique int id: @ql_select
);
@ql_set_literal_child_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_variable
#keyset[ql_set_literal, index]
ql_set_literal_child(
int ql_set_literal: @ql_set_literal ref,
int index: int ref,
unique int child: @ql_set_literal_child_type ref
);
ql_set_literal_def(
unique int id: @ql_set_literal
);
ql_signature_expr_mod_expr(
unique int ql_signature_expr: @ql_signature_expr ref,
unique int mod_expr: @ql_module_expr ref
);
ql_signature_expr_predicate(
unique int ql_signature_expr: @ql_signature_expr ref,
unique int predicate: @ql_predicate_expr ref
);
ql_signature_expr_type_expr(
unique int ql_signature_expr: @ql_signature_expr ref,
unique int type_expr: @ql_type_expr ref
);
ql_signature_expr_def(
unique int id: @ql_signature_expr
);
ql_special_call_def(
unique int id: @ql_special_call,
int child: @ql_token_special_id ref
);
@ql_super_ref_child_type = @ql_token_super | @ql_type_expr
#keyset[ql_super_ref, index]
ql_super_ref_child(
int ql_super_ref: @ql_super_ref ref,
int index: int ref,
unique int child: @ql_super_ref_child_type ref
);
ql_super_ref_def(
unique int id: @ql_super_ref
);
ql_type_alias_body_def(
unique int id: @ql_type_alias_body,
int child: @ql_type_expr ref
);
ql_type_expr_name(
unique int ql_type_expr: @ql_type_expr ref,
unique int name: @ql_token_class_name ref
);
ql_type_expr_qualifier(
unique int ql_type_expr: @ql_type_expr ref,
unique int qualifier: @ql_module_expr ref
);
@ql_typeExpr_child_type = @ql_token_dbtype | @ql_token_primitive_type
ql_type_expr_child(
unique int ql_type_expr: @ql_type_expr ref,
unique int child: @ql_typeExpr_child_type ref
);
ql_type_expr_def(
unique int id: @ql_type_expr
);
#keyset[ql_type_union_body, index]
ql_type_union_body_child(
int ql_type_union_body: @ql_type_union_body ref,
int index: int ref,
unique int child: @ql_type_expr ref
);
ql_type_union_body_def(
unique int id: @ql_type_union_body
);
@ql_unary_expr_child_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_token_unop | @ql_unary_expr | @ql_variable
#keyset[ql_unary_expr, index]
ql_unary_expr_child(
int ql_unary_expr: @ql_unary_expr ref,
int index: int ref,
unique int child: @ql_unary_expr_child_type ref
);
ql_unary_expr_def(
unique int id: @ql_unary_expr
);
@ql_unqual_agg_body_asExprs_type = @ql_as_exprs | @ql_reserved_word
#keyset[ql_unqual_agg_body, index]
ql_unqual_agg_body_as_exprs(
int ql_unqual_agg_body: @ql_unqual_agg_body ref,
int index: int ref,
unique int as_exprs: @ql_unqual_agg_body_asExprs_type ref
);
@ql_unqual_agg_body_guard_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_variable
ql_unqual_agg_body_guard(
unique int ql_unqual_agg_body: @ql_unqual_agg_body ref,
unique int guard: @ql_unqual_agg_body_guard_type ref
);
#keyset[ql_unqual_agg_body, index]
ql_unqual_agg_body_child(
int ql_unqual_agg_body: @ql_unqual_agg_body ref,
int index: int ref,
unique int child: @ql_var_decl ref
);
ql_unqual_agg_body_def(
unique int id: @ql_unqual_agg_body
);
@ql_varDecl_child_type = @ql_type_expr | @ql_var_name
#keyset[ql_var_decl, index]
ql_var_decl_child(
int ql_var_decl: @ql_var_decl ref,
int index: int ref,
unique int child: @ql_varDecl_child_type ref
);
ql_var_decl_def(
unique int id: @ql_var_decl
);
ql_var_name_def(
unique int id: @ql_var_name,
int child: @ql_token_simple_id ref
);
@ql_variable_child_type = @ql_token_result | @ql_token_this | @ql_var_name
ql_variable_def(
unique int id: @ql_variable,
int child: @ql_variable_child_type ref
);
ql_tokeninfo(
unique int id: @ql_token,
int kind: int ref,
string value: string ref
);
case @ql_token.kind of
0 = @ql_reserved_word
| 1 = @ql_token_addop
| 2 = @ql_token_agg_id
| 3 = @ql_token_annot_name
| 4 = @ql_token_block_comment
| 5 = @ql_token_class_name
| 6 = @ql_token_closure
| 7 = @ql_token_compop
| 8 = @ql_token_dbtype
| 9 = @ql_token_direction
| 10 = @ql_token_empty
| 11 = @ql_token_false
| 12 = @ql_token_float
| 13 = @ql_token_integer
| 14 = @ql_token_line_comment
| 15 = @ql_token_literal_id
| 16 = @ql_token_mulop
| 17 = @ql_token_predicate
| 18 = @ql_token_predicate_name
| 19 = @ql_token_primitive_type
| 20 = @ql_token_qldoc
| 21 = @ql_token_quantifier
| 22 = @ql_token_result
| 23 = @ql_token_simple_id
| 24 = @ql_token_special_id
| 25 = @ql_token_string
| 26 = @ql_token_super
| 27 = @ql_token_this
| 28 = @ql_token_true
| 29 = @ql_token_underscore
| 30 = @ql_token_unop
;