@rejot-dev/tree-sitter-thalo 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1467 @@
1
+ {
2
+ "$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/grammar.schema.json",
3
+ "name": "thalo",
4
+ "rules": {
5
+ "source_file": {
6
+ "type": "REPEAT",
7
+ "content": {
8
+ "type": "CHOICE",
9
+ "members": [
10
+ {
11
+ "type": "SYMBOL",
12
+ "name": "entry"
13
+ },
14
+ {
15
+ "type": "SYMBOL",
16
+ "name": "comment"
17
+ },
18
+ {
19
+ "type": "SYMBOL",
20
+ "name": "_nl"
21
+ }
22
+ ]
23
+ }
24
+ },
25
+ "comment": {
26
+ "type": "TOKEN",
27
+ "content": {
28
+ "type": "SEQ",
29
+ "members": [
30
+ {
31
+ "type": "STRING",
32
+ "value": "//"
33
+ },
34
+ {
35
+ "type": "PATTERN",
36
+ "value": "[^\\r\\n]*"
37
+ }
38
+ ]
39
+ }
40
+ },
41
+ "comment_line": {
42
+ "type": "PREC",
43
+ "value": 2,
44
+ "content": {
45
+ "type": "SEQ",
46
+ "members": [
47
+ {
48
+ "type": "SYMBOL",
49
+ "name": "_indent"
50
+ },
51
+ {
52
+ "type": "SYMBOL",
53
+ "name": "comment"
54
+ }
55
+ ]
56
+ }
57
+ },
58
+ "entry": {
59
+ "type": "CHOICE",
60
+ "members": [
61
+ {
62
+ "type": "SYMBOL",
63
+ "name": "schema_entry"
64
+ },
65
+ {
66
+ "type": "SYMBOL",
67
+ "name": "data_entry"
68
+ }
69
+ ]
70
+ },
71
+ "schema_entry": {
72
+ "type": "SEQ",
73
+ "members": [
74
+ {
75
+ "type": "FIELD",
76
+ "name": "timestamp",
77
+ "content": {
78
+ "type": "SYMBOL",
79
+ "name": "timestamp"
80
+ }
81
+ },
82
+ {
83
+ "type": "FIELD",
84
+ "name": "directive",
85
+ "content": {
86
+ "type": "SYMBOL",
87
+ "name": "schema_directive"
88
+ }
89
+ },
90
+ {
91
+ "type": "FIELD",
92
+ "name": "argument",
93
+ "content": {
94
+ "type": "SYMBOL",
95
+ "name": "identifier"
96
+ }
97
+ },
98
+ {
99
+ "type": "FIELD",
100
+ "name": "title",
101
+ "content": {
102
+ "type": "SYMBOL",
103
+ "name": "title"
104
+ }
105
+ },
106
+ {
107
+ "type": "REPEAT",
108
+ "content": {
109
+ "type": "CHOICE",
110
+ "members": [
111
+ {
112
+ "type": "SYMBOL",
113
+ "name": "link"
114
+ },
115
+ {
116
+ "type": "SYMBOL",
117
+ "name": "tag"
118
+ }
119
+ ]
120
+ }
121
+ },
122
+ {
123
+ "type": "REPEAT",
124
+ "content": {
125
+ "type": "SYMBOL",
126
+ "name": "_schema_block"
127
+ }
128
+ }
129
+ ]
130
+ },
131
+ "schema_directive": {
132
+ "type": "CHOICE",
133
+ "members": [
134
+ {
135
+ "type": "STRING",
136
+ "value": "define-entity"
137
+ },
138
+ {
139
+ "type": "STRING",
140
+ "value": "alter-entity"
141
+ }
142
+ ]
143
+ },
144
+ "data_entry": {
145
+ "type": "SEQ",
146
+ "members": [
147
+ {
148
+ "type": "FIELD",
149
+ "name": "timestamp",
150
+ "content": {
151
+ "type": "SYMBOL",
152
+ "name": "timestamp"
153
+ }
154
+ },
155
+ {
156
+ "type": "FIELD",
157
+ "name": "directive",
158
+ "content": {
159
+ "type": "SYMBOL",
160
+ "name": "data_directive"
161
+ }
162
+ },
163
+ {
164
+ "type": "FIELD",
165
+ "name": "argument",
166
+ "content": {
167
+ "type": "CHOICE",
168
+ "members": [
169
+ {
170
+ "type": "CHOICE",
171
+ "members": [
172
+ {
173
+ "type": "SYMBOL",
174
+ "name": "identifier"
175
+ },
176
+ {
177
+ "type": "SYMBOL",
178
+ "name": "link"
179
+ }
180
+ ]
181
+ },
182
+ {
183
+ "type": "BLANK"
184
+ }
185
+ ]
186
+ }
187
+ },
188
+ {
189
+ "type": "FIELD",
190
+ "name": "title",
191
+ "content": {
192
+ "type": "CHOICE",
193
+ "members": [
194
+ {
195
+ "type": "SYMBOL",
196
+ "name": "title"
197
+ },
198
+ {
199
+ "type": "BLANK"
200
+ }
201
+ ]
202
+ }
203
+ },
204
+ {
205
+ "type": "REPEAT",
206
+ "content": {
207
+ "type": "CHOICE",
208
+ "members": [
209
+ {
210
+ "type": "SYMBOL",
211
+ "name": "link"
212
+ },
213
+ {
214
+ "type": "SYMBOL",
215
+ "name": "tag"
216
+ }
217
+ ]
218
+ }
219
+ },
220
+ {
221
+ "type": "REPEAT",
222
+ "content": {
223
+ "type": "CHOICE",
224
+ "members": [
225
+ {
226
+ "type": "SYMBOL",
227
+ "name": "metadata"
228
+ },
229
+ {
230
+ "type": "SYMBOL",
231
+ "name": "comment_line"
232
+ }
233
+ ]
234
+ }
235
+ },
236
+ {
237
+ "type": "CHOICE",
238
+ "members": [
239
+ {
240
+ "type": "SYMBOL",
241
+ "name": "content"
242
+ },
243
+ {
244
+ "type": "BLANK"
245
+ }
246
+ ]
247
+ }
248
+ ]
249
+ },
250
+ "data_directive": {
251
+ "type": "CHOICE",
252
+ "members": [
253
+ {
254
+ "type": "STRING",
255
+ "value": "create"
256
+ },
257
+ {
258
+ "type": "STRING",
259
+ "value": "update"
260
+ },
261
+ {
262
+ "type": "STRING",
263
+ "value": "define-synthesis"
264
+ },
265
+ {
266
+ "type": "STRING",
267
+ "value": "actualize-synthesis"
268
+ }
269
+ ]
270
+ },
271
+ "identifier": {
272
+ "type": "TOKEN",
273
+ "content": {
274
+ "type": "PATTERN",
275
+ "value": "[a-z][a-zA-Z0-9\\-_]*"
276
+ }
277
+ },
278
+ "metadata": {
279
+ "type": "PREC",
280
+ "value": 2,
281
+ "content": {
282
+ "type": "SEQ",
283
+ "members": [
284
+ {
285
+ "type": "SYMBOL",
286
+ "name": "_indent"
287
+ },
288
+ {
289
+ "type": "FIELD",
290
+ "name": "key",
291
+ "content": {
292
+ "type": "SYMBOL",
293
+ "name": "key"
294
+ }
295
+ },
296
+ {
297
+ "type": "STRING",
298
+ "value": ":"
299
+ },
300
+ {
301
+ "type": "FIELD",
302
+ "name": "value",
303
+ "content": {
304
+ "type": "SYMBOL",
305
+ "name": "value"
306
+ }
307
+ }
308
+ ]
309
+ }
310
+ },
311
+ "_schema_block": {
312
+ "type": "CHOICE",
313
+ "members": [
314
+ {
315
+ "type": "SYMBOL",
316
+ "name": "metadata_block"
317
+ },
318
+ {
319
+ "type": "SYMBOL",
320
+ "name": "sections_block"
321
+ },
322
+ {
323
+ "type": "SYMBOL",
324
+ "name": "remove_metadata_block"
325
+ },
326
+ {
327
+ "type": "SYMBOL",
328
+ "name": "remove_sections_block"
329
+ }
330
+ ]
331
+ },
332
+ "metadata_block": {
333
+ "type": "PREC",
334
+ "value": 2,
335
+ "content": {
336
+ "type": "SEQ",
337
+ "members": [
338
+ {
339
+ "type": "SYMBOL",
340
+ "name": "_metadata_header"
341
+ },
342
+ {
343
+ "type": "REPEAT1",
344
+ "content": {
345
+ "type": "SYMBOL",
346
+ "name": "field_definition"
347
+ }
348
+ }
349
+ ]
350
+ }
351
+ },
352
+ "sections_block": {
353
+ "type": "PREC",
354
+ "value": 2,
355
+ "content": {
356
+ "type": "SEQ",
357
+ "members": [
358
+ {
359
+ "type": "SYMBOL",
360
+ "name": "_sections_header"
361
+ },
362
+ {
363
+ "type": "SYMBOL",
364
+ "name": "_section_lines"
365
+ }
366
+ ]
367
+ }
368
+ },
369
+ "remove_metadata_block": {
370
+ "type": "PREC",
371
+ "value": 2,
372
+ "content": {
373
+ "type": "SEQ",
374
+ "members": [
375
+ {
376
+ "type": "SYMBOL",
377
+ "name": "_remove_metadata_header"
378
+ },
379
+ {
380
+ "type": "REPEAT1",
381
+ "content": {
382
+ "type": "SYMBOL",
383
+ "name": "field_removal"
384
+ }
385
+ }
386
+ ]
387
+ }
388
+ },
389
+ "remove_sections_block": {
390
+ "type": "PREC",
391
+ "value": 2,
392
+ "content": {
393
+ "type": "SEQ",
394
+ "members": [
395
+ {
396
+ "type": "SYMBOL",
397
+ "name": "_remove_sections_header"
398
+ },
399
+ {
400
+ "type": "REPEAT1",
401
+ "content": {
402
+ "type": "SYMBOL",
403
+ "name": "section_removal"
404
+ }
405
+ }
406
+ ]
407
+ }
408
+ },
409
+ "_section_lines": {
410
+ "type": "PREC_RIGHT",
411
+ "value": 0,
412
+ "content": {
413
+ "type": "REPEAT1",
414
+ "content": {
415
+ "type": "SYMBOL",
416
+ "name": "section_definition"
417
+ }
418
+ }
419
+ },
420
+ "_metadata_header": {
421
+ "type": "TOKEN",
422
+ "content": {
423
+ "type": "PATTERN",
424
+ "value": "\\r?\\n(?:[ \\t]*\\r?\\n)*(?:\\t|[ \\t][ \\t])+# Metadata"
425
+ }
426
+ },
427
+ "_sections_header": {
428
+ "type": "TOKEN",
429
+ "content": {
430
+ "type": "PATTERN",
431
+ "value": "\\r?\\n(?:[ \\t]*\\r?\\n)*(?:\\t|[ \\t][ \\t])+# Sections"
432
+ }
433
+ },
434
+ "_remove_metadata_header": {
435
+ "type": "TOKEN",
436
+ "content": {
437
+ "type": "PATTERN",
438
+ "value": "\\r?\\n(?:[ \\t]*\\r?\\n)*(?:\\t|[ \\t][ \\t])+# Remove Metadata"
439
+ }
440
+ },
441
+ "_remove_sections_header": {
442
+ "type": "TOKEN",
443
+ "content": {
444
+ "type": "PATTERN",
445
+ "value": "\\r?\\n(?:[ \\t]*\\r?\\n)*(?:\\t|[ \\t][ \\t])+# Remove Sections"
446
+ }
447
+ },
448
+ "field_definition": {
449
+ "type": "SEQ",
450
+ "members": [
451
+ {
452
+ "type": "SYMBOL",
453
+ "name": "_field_line_start"
454
+ },
455
+ {
456
+ "type": "CHOICE",
457
+ "members": [
458
+ {
459
+ "type": "SYMBOL",
460
+ "name": "optional_marker"
461
+ },
462
+ {
463
+ "type": "BLANK"
464
+ }
465
+ ]
466
+ },
467
+ {
468
+ "type": "STRING",
469
+ "value": ":"
470
+ },
471
+ {
472
+ "type": "FIELD",
473
+ "name": "type",
474
+ "content": {
475
+ "type": "SYMBOL",
476
+ "name": "type_expression"
477
+ }
478
+ },
479
+ {
480
+ "type": "CHOICE",
481
+ "members": [
482
+ {
483
+ "type": "SEQ",
484
+ "members": [
485
+ {
486
+ "type": "STRING",
487
+ "value": "="
488
+ },
489
+ {
490
+ "type": "FIELD",
491
+ "name": "default",
492
+ "content": {
493
+ "type": "SYMBOL",
494
+ "name": "default_value"
495
+ }
496
+ }
497
+ ]
498
+ },
499
+ {
500
+ "type": "BLANK"
501
+ }
502
+ ]
503
+ },
504
+ {
505
+ "type": "CHOICE",
506
+ "members": [
507
+ {
508
+ "type": "SEQ",
509
+ "members": [
510
+ {
511
+ "type": "STRING",
512
+ "value": ";"
513
+ },
514
+ {
515
+ "type": "FIELD",
516
+ "name": "description",
517
+ "content": {
518
+ "type": "SYMBOL",
519
+ "name": "description"
520
+ }
521
+ }
522
+ ]
523
+ },
524
+ {
525
+ "type": "BLANK"
526
+ }
527
+ ]
528
+ }
529
+ ]
530
+ },
531
+ "_field_line_start": {
532
+ "type": "ALIAS",
533
+ "content": {
534
+ "type": "SYMBOL",
535
+ "name": "_field_name_token"
536
+ },
537
+ "named": true,
538
+ "value": "field_name"
539
+ },
540
+ "_field_name_token": {
541
+ "type": "TOKEN",
542
+ "content": {
543
+ "type": "PATTERN",
544
+ "value": "\\r?\\n(?:\\t|[ \\t][ \\t])+[a-z][a-zA-Z0-9\\-_]*"
545
+ }
546
+ },
547
+ "optional_marker": {
548
+ "type": "STRING",
549
+ "value": "?"
550
+ },
551
+ "description": {
552
+ "type": "TOKEN",
553
+ "content": {
554
+ "type": "PATTERN",
555
+ "value": "\"[^\"]*\""
556
+ }
557
+ },
558
+ "section_definition": {
559
+ "type": "SEQ",
560
+ "members": [
561
+ {
562
+ "type": "SYMBOL",
563
+ "name": "_section_line_start"
564
+ },
565
+ {
566
+ "type": "CHOICE",
567
+ "members": [
568
+ {
569
+ "type": "SYMBOL",
570
+ "name": "optional_marker"
571
+ },
572
+ {
573
+ "type": "BLANK"
574
+ }
575
+ ]
576
+ },
577
+ {
578
+ "type": "CHOICE",
579
+ "members": [
580
+ {
581
+ "type": "SEQ",
582
+ "members": [
583
+ {
584
+ "type": "STRING",
585
+ "value": ";"
586
+ },
587
+ {
588
+ "type": "FIELD",
589
+ "name": "description",
590
+ "content": {
591
+ "type": "SYMBOL",
592
+ "name": "description"
593
+ }
594
+ }
595
+ ]
596
+ },
597
+ {
598
+ "type": "BLANK"
599
+ }
600
+ ]
601
+ }
602
+ ]
603
+ },
604
+ "_section_line_start": {
605
+ "type": "ALIAS",
606
+ "content": {
607
+ "type": "SYMBOL",
608
+ "name": "_section_name_token"
609
+ },
610
+ "named": true,
611
+ "value": "section_name"
612
+ },
613
+ "_section_name_token": {
614
+ "type": "TOKEN",
615
+ "content": {
616
+ "type": "PATTERN",
617
+ "value": "\\r?\\n(?:\\t|[ \\t][ \\t])+[A-Z][a-zA-Z0-9]*( +[a-zA-Z0-9]+)*"
618
+ }
619
+ },
620
+ "field_removal": {
621
+ "type": "SEQ",
622
+ "members": [
623
+ {
624
+ "type": "SYMBOL",
625
+ "name": "_field_line_start"
626
+ },
627
+ {
628
+ "type": "CHOICE",
629
+ "members": [
630
+ {
631
+ "type": "SEQ",
632
+ "members": [
633
+ {
634
+ "type": "STRING",
635
+ "value": ";"
636
+ },
637
+ {
638
+ "type": "FIELD",
639
+ "name": "reason",
640
+ "content": {
641
+ "type": "SYMBOL",
642
+ "name": "description"
643
+ }
644
+ }
645
+ ]
646
+ },
647
+ {
648
+ "type": "BLANK"
649
+ }
650
+ ]
651
+ }
652
+ ]
653
+ },
654
+ "section_removal": {
655
+ "type": "SEQ",
656
+ "members": [
657
+ {
658
+ "type": "SYMBOL",
659
+ "name": "_section_line_start"
660
+ },
661
+ {
662
+ "type": "CHOICE",
663
+ "members": [
664
+ {
665
+ "type": "SEQ",
666
+ "members": [
667
+ {
668
+ "type": "STRING",
669
+ "value": ";"
670
+ },
671
+ {
672
+ "type": "FIELD",
673
+ "name": "reason",
674
+ "content": {
675
+ "type": "SYMBOL",
676
+ "name": "description"
677
+ }
678
+ }
679
+ ]
680
+ },
681
+ {
682
+ "type": "BLANK"
683
+ }
684
+ ]
685
+ }
686
+ ]
687
+ },
688
+ "type_expression": {
689
+ "type": "CHOICE",
690
+ "members": [
691
+ {
692
+ "type": "SYMBOL",
693
+ "name": "union_type"
694
+ },
695
+ {
696
+ "type": "SYMBOL",
697
+ "name": "_type_term"
698
+ }
699
+ ]
700
+ },
701
+ "union_type": {
702
+ "type": "PREC_LEFT",
703
+ "value": 1,
704
+ "content": {
705
+ "type": "SEQ",
706
+ "members": [
707
+ {
708
+ "type": "SYMBOL",
709
+ "name": "_type_term"
710
+ },
711
+ {
712
+ "type": "REPEAT1",
713
+ "content": {
714
+ "type": "SEQ",
715
+ "members": [
716
+ {
717
+ "type": "STRING",
718
+ "value": "|"
719
+ },
720
+ {
721
+ "type": "SYMBOL",
722
+ "name": "_type_term"
723
+ }
724
+ ]
725
+ }
726
+ }
727
+ ]
728
+ }
729
+ },
730
+ "_type_term": {
731
+ "type": "CHOICE",
732
+ "members": [
733
+ {
734
+ "type": "SYMBOL",
735
+ "name": "array_type"
736
+ },
737
+ {
738
+ "type": "SYMBOL",
739
+ "name": "primitive_type"
740
+ },
741
+ {
742
+ "type": "SYMBOL",
743
+ "name": "literal_type"
744
+ },
745
+ {
746
+ "type": "SYMBOL",
747
+ "name": "unknown_type"
748
+ }
749
+ ]
750
+ },
751
+ "array_type": {
752
+ "type": "SEQ",
753
+ "members": [
754
+ {
755
+ "type": "SYMBOL",
756
+ "name": "_array_element"
757
+ },
758
+ {
759
+ "type": "IMMEDIATE_TOKEN",
760
+ "content": {
761
+ "type": "STRING",
762
+ "value": "[]"
763
+ }
764
+ }
765
+ ]
766
+ },
767
+ "_array_element": {
768
+ "type": "CHOICE",
769
+ "members": [
770
+ {
771
+ "type": "SYMBOL",
772
+ "name": "primitive_type"
773
+ },
774
+ {
775
+ "type": "SYMBOL",
776
+ "name": "literal_type"
777
+ },
778
+ {
779
+ "type": "SYMBOL",
780
+ "name": "paren_type"
781
+ },
782
+ {
783
+ "type": "SYMBOL",
784
+ "name": "unknown_type"
785
+ }
786
+ ]
787
+ },
788
+ "paren_type": {
789
+ "type": "SEQ",
790
+ "members": [
791
+ {
792
+ "type": "STRING",
793
+ "value": "("
794
+ },
795
+ {
796
+ "type": "SYMBOL",
797
+ "name": "type_expression"
798
+ },
799
+ {
800
+ "type": "STRING",
801
+ "value": ")"
802
+ }
803
+ ]
804
+ },
805
+ "primitive_type": {
806
+ "type": "CHOICE",
807
+ "members": [
808
+ {
809
+ "type": "STRING",
810
+ "value": "string"
811
+ },
812
+ {
813
+ "type": "STRING",
814
+ "value": "datetime"
815
+ },
816
+ {
817
+ "type": "STRING",
818
+ "value": "daterange"
819
+ },
820
+ {
821
+ "type": "STRING",
822
+ "value": "link"
823
+ },
824
+ {
825
+ "type": "STRING",
826
+ "value": "number"
827
+ }
828
+ ]
829
+ },
830
+ "literal_type": {
831
+ "type": "TOKEN",
832
+ "content": {
833
+ "type": "PATTERN",
834
+ "value": "\"[^\"]*\""
835
+ }
836
+ },
837
+ "unknown_type": {
838
+ "type": "TOKEN",
839
+ "content": {
840
+ "type": "PATTERN",
841
+ "value": "[a-z][a-zA-Z0-9\\-_]*"
842
+ }
843
+ },
844
+ "default_value": {
845
+ "type": "CHOICE",
846
+ "members": [
847
+ {
848
+ "type": "SYMBOL",
849
+ "name": "quoted_value"
850
+ },
851
+ {
852
+ "type": "SYMBOL",
853
+ "name": "link"
854
+ },
855
+ {
856
+ "type": "SYMBOL",
857
+ "name": "datetime_value"
858
+ },
859
+ {
860
+ "type": "SYMBOL",
861
+ "name": "number_value"
862
+ }
863
+ ]
864
+ },
865
+ "content": {
866
+ "type": "PREC_RIGHT",
867
+ "value": 0,
868
+ "content": {
869
+ "type": "SEQ",
870
+ "members": [
871
+ {
872
+ "type": "REPEAT",
873
+ "content": {
874
+ "type": "SYMBOL",
875
+ "name": "_content_blank"
876
+ }
877
+ },
878
+ {
879
+ "type": "SYMBOL",
880
+ "name": "markdown_header"
881
+ },
882
+ {
883
+ "type": "REPEAT",
884
+ "content": {
885
+ "type": "CHOICE",
886
+ "members": [
887
+ {
888
+ "type": "SYMBOL",
889
+ "name": "markdown_header"
890
+ },
891
+ {
892
+ "type": "SYMBOL",
893
+ "name": "content_line"
894
+ },
895
+ {
896
+ "type": "SYMBOL",
897
+ "name": "comment_line"
898
+ },
899
+ {
900
+ "type": "SYMBOL",
901
+ "name": "_content_blank"
902
+ }
903
+ ]
904
+ }
905
+ }
906
+ ]
907
+ }
908
+ },
909
+ "markdown_header": {
910
+ "type": "PREC_RIGHT",
911
+ "value": 2,
912
+ "content": {
913
+ "type": "SEQ",
914
+ "members": [
915
+ {
916
+ "type": "SYMBOL",
917
+ "name": "_indent"
918
+ },
919
+ {
920
+ "type": "SYMBOL",
921
+ "name": "md_indicator"
922
+ },
923
+ {
924
+ "type": "SYMBOL",
925
+ "name": "md_heading_text"
926
+ }
927
+ ]
928
+ }
929
+ },
930
+ "content_line": {
931
+ "type": "PREC_RIGHT",
932
+ "value": 1,
933
+ "content": {
934
+ "type": "SEQ",
935
+ "members": [
936
+ {
937
+ "type": "SYMBOL",
938
+ "name": "_indent"
939
+ },
940
+ {
941
+ "type": "SYMBOL",
942
+ "name": "content_text"
943
+ }
944
+ ]
945
+ }
946
+ },
947
+ "md_indicator": {
948
+ "type": "IMMEDIATE_TOKEN",
949
+ "content": {
950
+ "type": "PATTERN",
951
+ "value": "#+"
952
+ }
953
+ },
954
+ "md_heading_text": {
955
+ "type": "IMMEDIATE_TOKEN",
956
+ "content": {
957
+ "type": "PATTERN",
958
+ "value": " [^\\r\\n]+"
959
+ }
960
+ },
961
+ "content_text": {
962
+ "type": "IMMEDIATE_TOKEN",
963
+ "content": {
964
+ "type": "PATTERN",
965
+ "value": "[^#/\\r\\n][^\\r\\n]*|\\/[^/\\r\\n][^\\r\\n]*"
966
+ }
967
+ },
968
+ "_nl": {
969
+ "type": "PATTERN",
970
+ "value": "\\r?\\n"
971
+ },
972
+ "timestamp": {
973
+ "type": "SEQ",
974
+ "members": [
975
+ {
976
+ "type": "FIELD",
977
+ "name": "date",
978
+ "content": {
979
+ "type": "SYMBOL",
980
+ "name": "timestamp_date"
981
+ }
982
+ },
983
+ {
984
+ "type": "SYMBOL",
985
+ "name": "timestamp_t"
986
+ },
987
+ {
988
+ "type": "FIELD",
989
+ "name": "time",
990
+ "content": {
991
+ "type": "SYMBOL",
992
+ "name": "timestamp_time"
993
+ }
994
+ },
995
+ {
996
+ "type": "FIELD",
997
+ "name": "tz",
998
+ "content": {
999
+ "type": "CHOICE",
1000
+ "members": [
1001
+ {
1002
+ "type": "SYMBOL",
1003
+ "name": "timestamp_tz"
1004
+ },
1005
+ {
1006
+ "type": "BLANK"
1007
+ }
1008
+ ]
1009
+ }
1010
+ }
1011
+ ]
1012
+ },
1013
+ "timestamp_date": {
1014
+ "type": "TOKEN",
1015
+ "content": {
1016
+ "type": "PATTERN",
1017
+ "value": "[12]\\d{3}-[01]\\d-[0-3]\\d"
1018
+ }
1019
+ },
1020
+ "timestamp_t": {
1021
+ "type": "IMMEDIATE_TOKEN",
1022
+ "content": {
1023
+ "type": "STRING",
1024
+ "value": "T"
1025
+ }
1026
+ },
1027
+ "timestamp_time": {
1028
+ "type": "IMMEDIATE_TOKEN",
1029
+ "content": {
1030
+ "type": "PATTERN",
1031
+ "value": "[0-2]\\d:[0-5]\\d"
1032
+ }
1033
+ },
1034
+ "timestamp_tz": {
1035
+ "type": "IMMEDIATE_TOKEN",
1036
+ "content": {
1037
+ "type": "PATTERN",
1038
+ "value": "Z|[+-][0-2]\\d:[0-5]\\d"
1039
+ }
1040
+ },
1041
+ "title": {
1042
+ "type": "TOKEN",
1043
+ "content": {
1044
+ "type": "PATTERN",
1045
+ "value": "\"[^\"\\r\\n]*\"?"
1046
+ }
1047
+ },
1048
+ "link": {
1049
+ "type": "TOKEN",
1050
+ "content": {
1051
+ "type": "PATTERN",
1052
+ "value": "\\^[A-Za-z0-9\\-_/.:]*[A-Za-z0-9]"
1053
+ }
1054
+ },
1055
+ "tag": {
1056
+ "type": "TOKEN",
1057
+ "content": {
1058
+ "type": "PATTERN",
1059
+ "value": "#[A-Za-z0-9\\-_/.]+"
1060
+ }
1061
+ },
1062
+ "key": {
1063
+ "type": "TOKEN",
1064
+ "content": {
1065
+ "type": "PATTERN",
1066
+ "value": "[a-z][a-zA-Z0-9\\-_]*"
1067
+ }
1068
+ },
1069
+ "value": {
1070
+ "type": "CHOICE",
1071
+ "members": [
1072
+ {
1073
+ "type": "PREC_DYNAMIC",
1074
+ "value": 6,
1075
+ "content": {
1076
+ "type": "SYMBOL",
1077
+ "name": "value_array"
1078
+ }
1079
+ },
1080
+ {
1081
+ "type": "PREC_DYNAMIC",
1082
+ "value": 5,
1083
+ "content": {
1084
+ "type": "SYMBOL",
1085
+ "name": "daterange"
1086
+ }
1087
+ },
1088
+ {
1089
+ "type": "PREC_DYNAMIC",
1090
+ "value": 4,
1091
+ "content": {
1092
+ "type": "SYMBOL",
1093
+ "name": "datetime_value"
1094
+ }
1095
+ },
1096
+ {
1097
+ "type": "PREC_DYNAMIC",
1098
+ "value": 3,
1099
+ "content": {
1100
+ "type": "SYMBOL",
1101
+ "name": "query"
1102
+ }
1103
+ },
1104
+ {
1105
+ "type": "PREC_DYNAMIC",
1106
+ "value": 3,
1107
+ "content": {
1108
+ "type": "SYMBOL",
1109
+ "name": "link"
1110
+ }
1111
+ },
1112
+ {
1113
+ "type": "PREC_DYNAMIC",
1114
+ "value": 3,
1115
+ "content": {
1116
+ "type": "SYMBOL",
1117
+ "name": "quoted_value"
1118
+ }
1119
+ },
1120
+ {
1121
+ "type": "PREC_DYNAMIC",
1122
+ "value": 2,
1123
+ "content": {
1124
+ "type": "SYMBOL",
1125
+ "name": "number_value"
1126
+ }
1127
+ }
1128
+ ]
1129
+ },
1130
+ "quoted_value": {
1131
+ "type": "TOKEN",
1132
+ "content": {
1133
+ "type": "PATTERN",
1134
+ "value": "\"[^\"]*\""
1135
+ }
1136
+ },
1137
+ "number_value": {
1138
+ "type": "TOKEN",
1139
+ "content": {
1140
+ "type": "PATTERN",
1141
+ "value": "-?\\d+(\\.\\d+)?"
1142
+ }
1143
+ },
1144
+ "datetime_value": {
1145
+ "type": "SEQ",
1146
+ "members": [
1147
+ {
1148
+ "type": "FIELD",
1149
+ "name": "date",
1150
+ "content": {
1151
+ "type": "SYMBOL",
1152
+ "name": "datetime_date"
1153
+ }
1154
+ },
1155
+ {
1156
+ "type": "CHOICE",
1157
+ "members": [
1158
+ {
1159
+ "type": "SEQ",
1160
+ "members": [
1161
+ {
1162
+ "type": "SYMBOL",
1163
+ "name": "datetime_t"
1164
+ },
1165
+ {
1166
+ "type": "FIELD",
1167
+ "name": "time",
1168
+ "content": {
1169
+ "type": "SYMBOL",
1170
+ "name": "datetime_time"
1171
+ }
1172
+ },
1173
+ {
1174
+ "type": "CHOICE",
1175
+ "members": [
1176
+ {
1177
+ "type": "FIELD",
1178
+ "name": "tz",
1179
+ "content": {
1180
+ "type": "SYMBOL",
1181
+ "name": "datetime_tz"
1182
+ }
1183
+ },
1184
+ {
1185
+ "type": "BLANK"
1186
+ }
1187
+ ]
1188
+ }
1189
+ ]
1190
+ },
1191
+ {
1192
+ "type": "BLANK"
1193
+ }
1194
+ ]
1195
+ }
1196
+ ]
1197
+ },
1198
+ "datetime_date": {
1199
+ "type": "TOKEN",
1200
+ "content": {
1201
+ "type": "PATTERN",
1202
+ "value": "[12]\\d{3}-[01]\\d-[0-3]\\d"
1203
+ }
1204
+ },
1205
+ "datetime_t": {
1206
+ "type": "IMMEDIATE_TOKEN",
1207
+ "content": {
1208
+ "type": "STRING",
1209
+ "value": "T"
1210
+ }
1211
+ },
1212
+ "datetime_time": {
1213
+ "type": "IMMEDIATE_TOKEN",
1214
+ "content": {
1215
+ "type": "PATTERN",
1216
+ "value": "[0-2]\\d:[0-5]\\d"
1217
+ }
1218
+ },
1219
+ "datetime_tz": {
1220
+ "type": "IMMEDIATE_TOKEN",
1221
+ "content": {
1222
+ "type": "PATTERN",
1223
+ "value": "Z|[+-][0-2]\\d:[0-5]\\d"
1224
+ }
1225
+ },
1226
+ "daterange": {
1227
+ "type": "CHOICE",
1228
+ "members": [
1229
+ {
1230
+ "type": "TOKEN",
1231
+ "content": {
1232
+ "type": "PATTERN",
1233
+ "value": "[12]\\d{3} +Q[1-4]"
1234
+ }
1235
+ },
1236
+ {
1237
+ "type": "TOKEN",
1238
+ "content": {
1239
+ "type": "PATTERN",
1240
+ "value": "[12]\\d{3}(-[01]\\d(-[0-3]\\d)?)? *~( *[12]\\d{3}(-[01]\\d(-[0-3]\\d)?)?)?"
1241
+ }
1242
+ },
1243
+ {
1244
+ "type": "TOKEN",
1245
+ "content": {
1246
+ "type": "PATTERN",
1247
+ "value": "[12]\\d{3}-[01]\\d"
1248
+ }
1249
+ }
1250
+ ]
1251
+ },
1252
+ "value_array": {
1253
+ "type": "PREC_RIGHT",
1254
+ "value": 0,
1255
+ "content": {
1256
+ "type": "SEQ",
1257
+ "members": [
1258
+ {
1259
+ "type": "SYMBOL",
1260
+ "name": "_value_array_element"
1261
+ },
1262
+ {
1263
+ "type": "REPEAT1",
1264
+ "content": {
1265
+ "type": "SEQ",
1266
+ "members": [
1267
+ {
1268
+ "type": "STRING",
1269
+ "value": ","
1270
+ },
1271
+ {
1272
+ "type": "SYMBOL",
1273
+ "name": "_value_array_element"
1274
+ }
1275
+ ]
1276
+ }
1277
+ }
1278
+ ]
1279
+ }
1280
+ },
1281
+ "_value_array_element": {
1282
+ "type": "CHOICE",
1283
+ "members": [
1284
+ {
1285
+ "type": "SYMBOL",
1286
+ "name": "link"
1287
+ },
1288
+ {
1289
+ "type": "SYMBOL",
1290
+ "name": "quoted_value"
1291
+ },
1292
+ {
1293
+ "type": "SYMBOL",
1294
+ "name": "datetime_value"
1295
+ },
1296
+ {
1297
+ "type": "SYMBOL",
1298
+ "name": "daterange"
1299
+ },
1300
+ {
1301
+ "type": "SYMBOL",
1302
+ "name": "query"
1303
+ },
1304
+ {
1305
+ "type": "SYMBOL",
1306
+ "name": "number_value"
1307
+ }
1308
+ ]
1309
+ },
1310
+ "query": {
1311
+ "type": "SEQ",
1312
+ "members": [
1313
+ {
1314
+ "type": "FIELD",
1315
+ "name": "entity",
1316
+ "content": {
1317
+ "type": "SYMBOL",
1318
+ "name": "query_entity"
1319
+ }
1320
+ },
1321
+ {
1322
+ "type": "STRING",
1323
+ "value": "where"
1324
+ },
1325
+ {
1326
+ "type": "FIELD",
1327
+ "name": "conditions",
1328
+ "content": {
1329
+ "type": "SYMBOL",
1330
+ "name": "query_conditions"
1331
+ }
1332
+ }
1333
+ ]
1334
+ },
1335
+ "query_entity": {
1336
+ "type": "TOKEN",
1337
+ "content": {
1338
+ "type": "PATTERN",
1339
+ "value": "[a-z][a-zA-Z0-9\\-_]*"
1340
+ }
1341
+ },
1342
+ "query_conditions": {
1343
+ "type": "SEQ",
1344
+ "members": [
1345
+ {
1346
+ "type": "SYMBOL",
1347
+ "name": "query_condition"
1348
+ },
1349
+ {
1350
+ "type": "REPEAT",
1351
+ "content": {
1352
+ "type": "SEQ",
1353
+ "members": [
1354
+ {
1355
+ "type": "STRING",
1356
+ "value": "and"
1357
+ },
1358
+ {
1359
+ "type": "SYMBOL",
1360
+ "name": "query_condition"
1361
+ }
1362
+ ]
1363
+ }
1364
+ }
1365
+ ]
1366
+ },
1367
+ "query_condition": {
1368
+ "type": "CHOICE",
1369
+ "members": [
1370
+ {
1371
+ "type": "SYMBOL",
1372
+ "name": "field_condition"
1373
+ },
1374
+ {
1375
+ "type": "SYMBOL",
1376
+ "name": "tag_condition"
1377
+ },
1378
+ {
1379
+ "type": "SYMBOL",
1380
+ "name": "link_condition"
1381
+ }
1382
+ ]
1383
+ },
1384
+ "field_condition": {
1385
+ "type": "SEQ",
1386
+ "members": [
1387
+ {
1388
+ "type": "FIELD",
1389
+ "name": "field",
1390
+ "content": {
1391
+ "type": "SYMBOL",
1392
+ "name": "condition_field"
1393
+ }
1394
+ },
1395
+ {
1396
+ "type": "STRING",
1397
+ "value": "="
1398
+ },
1399
+ {
1400
+ "type": "FIELD",
1401
+ "name": "value",
1402
+ "content": {
1403
+ "type": "SYMBOL",
1404
+ "name": "_condition_value"
1405
+ }
1406
+ }
1407
+ ]
1408
+ },
1409
+ "condition_field": {
1410
+ "type": "TOKEN",
1411
+ "content": {
1412
+ "type": "PATTERN",
1413
+ "value": "[a-z][a-zA-Z0-9\\-_]*"
1414
+ }
1415
+ },
1416
+ "_condition_value": {
1417
+ "type": "CHOICE",
1418
+ "members": [
1419
+ {
1420
+ "type": "SYMBOL",
1421
+ "name": "link"
1422
+ },
1423
+ {
1424
+ "type": "SYMBOL",
1425
+ "name": "quoted_value"
1426
+ }
1427
+ ]
1428
+ },
1429
+ "tag_condition": {
1430
+ "type": "SYMBOL",
1431
+ "name": "tag"
1432
+ },
1433
+ "link_condition": {
1434
+ "type": "SYMBOL",
1435
+ "name": "link"
1436
+ }
1437
+ },
1438
+ "extras": [
1439
+ {
1440
+ "type": "STRING",
1441
+ "value": " "
1442
+ }
1443
+ ],
1444
+ "conflicts": [
1445
+ [
1446
+ "data_entry"
1447
+ ]
1448
+ ],
1449
+ "precedences": [],
1450
+ "externals": [
1451
+ {
1452
+ "type": "SYMBOL",
1453
+ "name": "_indent"
1454
+ },
1455
+ {
1456
+ "type": "SYMBOL",
1457
+ "name": "_content_blank"
1458
+ },
1459
+ {
1460
+ "type": "SYMBOL",
1461
+ "name": "error_sentinel"
1462
+ }
1463
+ ],
1464
+ "inline": [],
1465
+ "supertypes": [],
1466
+ "reserved": {}
1467
+ }