cddl 0.16.0 → 0.18.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.
Files changed (44) hide show
  1. package/LICENSE +1 -1
  2. package/package.json +5 -1
  3. package/.release-it.ts +0 -10
  4. package/docs/README.md +0 -47
  5. package/docs/arrays.md +0 -356
  6. package/docs/ast-structure.md +0 -166
  7. package/docs/basic-types.md +0 -243
  8. package/docs/cddl-cheatsheet.md +0 -231
  9. package/docs/comments.md +0 -307
  10. package/docs/groups.md +0 -351
  11. package/docs/operators.md +0 -466
  12. package/docs/properties.md +0 -334
  13. package/docs/ranges.md +0 -339
  14. package/docs/references.md +0 -340
  15. package/docs/variables.md +0 -335
  16. package/src/ast.ts +0 -180
  17. package/src/cli/commands/repl.ts +0 -33
  18. package/src/cli/commands/validate.ts +0 -44
  19. package/src/cli/constants.ts +0 -1
  20. package/src/cli/index.ts +0 -18
  21. package/src/constants.ts +0 -16
  22. package/src/index.ts +0 -12
  23. package/src/lexer.ts +0 -238
  24. package/src/parser.ts +0 -993
  25. package/src/tokens.ts +0 -50
  26. package/src/utils.ts +0 -96
  27. package/tests/__snapshots__/complex_types.test.ts.snap +0 -80
  28. package/tests/__snapshots__/examples.test.ts.snap +0 -1077
  29. package/tests/__snapshots__/group-choices.test.ts.snap +0 -403
  30. package/tests/__snapshots__/parser.test.ts.snap +0 -3045
  31. package/tests/__snapshots__/webdriver-local.test.ts.snap +0 -11192
  32. package/tests/__snapshots__/webdriver-remote.test.ts.snap +0 -16350
  33. package/tests/commands/repl.test.ts +0 -52
  34. package/tests/commands/validate.test.ts +0 -66
  35. package/tests/complex_types.test.ts +0 -18
  36. package/tests/examples.test.ts +0 -25
  37. package/tests/group-choices.test.ts +0 -132
  38. package/tests/lexer.test.ts +0 -63
  39. package/tests/module.test.ts +0 -21
  40. package/tests/parser.test.ts +0 -63
  41. package/tests/utils.test.ts +0 -211
  42. package/tests/webdriver-local.test.ts +0 -15
  43. package/tests/webdriver-remote.test.ts +0 -15
  44. package/tsconfig.json +0 -11
@@ -1,3045 +0,0 @@
1
- // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
-
3
- exports[`parser > can parse arrays 1`] = `
4
- [
5
- {
6
- "Comments": [],
7
- "Name": "unlimited-people",
8
- "Type": "array",
9
- "Values": [
10
- {
11
- "Comments": [],
12
- "HasCut": false,
13
- "Name": "",
14
- "Occurrence": {
15
- "m": Infinity,
16
- "n": 0,
17
- },
18
- "Type": [
19
- {
20
- "Type": "group",
21
- "Unwrapped": false,
22
- "Value": "person",
23
- },
24
- ],
25
- },
26
- ],
27
- },
28
- {
29
- "Comments": [
30
- {
31
- "Content": "some",
32
- "Leading": false,
33
- "Type": "comment",
34
- },
35
- ],
36
- "Name": "at-least-one-person",
37
- "Type": "array",
38
- "Values": [
39
- {
40
- "Comments": [],
41
- "HasCut": false,
42
- "Name": "",
43
- "Occurrence": {
44
- "m": Infinity,
45
- "n": 1,
46
- },
47
- "Type": [
48
- {
49
- "Type": "group",
50
- "Unwrapped": false,
51
- "Value": "person",
52
- },
53
- ],
54
- },
55
- ],
56
- },
57
- {
58
- "Comments": [
59
- {
60
- "Content": "comment",
61
- "Leading": false,
62
- "Type": "comment",
63
- },
64
- ],
65
- "Name": "zero-or-one-person",
66
- "Type": "array",
67
- "Values": [
68
- {
69
- "Comments": [],
70
- "HasCut": false,
71
- "Name": "",
72
- "Occurrence": {
73
- "m": Infinity,
74
- "n": 0,
75
- },
76
- "Type": [
77
- {
78
- "Type": "group",
79
- "Unwrapped": false,
80
- "Value": "person",
81
- },
82
- ],
83
- },
84
- ],
85
- },
86
- {
87
- "Comments": [],
88
- "Name": "one-or-two-people",
89
- "Type": "array",
90
- "Values": [
91
- {
92
- "Comments": [],
93
- "HasCut": false,
94
- "Name": "",
95
- "Occurrence": {
96
- "m": 2,
97
- "n": 1,
98
- },
99
- "Type": [
100
- {
101
- "Type": "group",
102
- "Unwrapped": false,
103
- "Value": "person",
104
- },
105
- ],
106
- },
107
- ],
108
- },
109
- {
110
- "Comments": [],
111
- "Name": "zero-or-two-people",
112
- "Type": "array",
113
- "Values": [
114
- {
115
- "Comments": [],
116
- "HasCut": false,
117
- "Name": "",
118
- "Occurrence": {
119
- "m": 2,
120
- "n": 0,
121
- },
122
- "Type": [
123
- {
124
- "Type": "group",
125
- "Unwrapped": false,
126
- "Value": "person",
127
- },
128
- ],
129
- },
130
- ],
131
- },
132
- {
133
- "Comments": [],
134
- "Name": "two-or-infinity-people",
135
- "Type": "array",
136
- "Values": [
137
- {
138
- "Comments": [],
139
- "HasCut": false,
140
- "Name": "",
141
- "Occurrence": {
142
- "m": Infinity,
143
- "n": 2,
144
- },
145
- "Type": [
146
- {
147
- "Type": "group",
148
- "Unwrapped": false,
149
- "Value": "person",
150
- },
151
- ],
152
- },
153
- ],
154
- },
155
- {
156
- "Comments": [],
157
- "IsChoiceAddition": false,
158
- "Name": "person",
159
- "Properties": [
160
- {
161
- "Comments": [],
162
- "HasCut": true,
163
- "Name": "name",
164
- "Occurrence": {
165
- "m": 1,
166
- "n": 1,
167
- },
168
- "Type": [
169
- "tstr",
170
- ],
171
- },
172
- {
173
- "Comments": [],
174
- "HasCut": true,
175
- "Name": "age",
176
- "Occurrence": {
177
- "m": 1,
178
- "n": 1,
179
- },
180
- "Type": [
181
- "uint",
182
- ],
183
- },
184
- ],
185
- "Type": "group",
186
- },
187
- {
188
- "Comments": [],
189
- "Name": "ActionsPerformActionsParameters",
190
- "Type": "array",
191
- "Values": [
192
- {
193
- "Comments": [],
194
- "HasCut": false,
195
- "Name": "",
196
- "Occurrence": {
197
- "m": 4,
198
- "n": 1,
199
- },
200
- "Type": {
201
- "Comments": [],
202
- "IsChoiceAddition": false,
203
- "Name": "",
204
- "Properties": [
205
- {
206
- "Comments": [],
207
- "HasCut": true,
208
- "Name": "type",
209
- "Occurrence": {
210
- "m": 1,
211
- "n": 1,
212
- },
213
- "Type": [
214
- {
215
- "Type": "literal",
216
- "Unwrapped": false,
217
- "Value": "key",
218
- },
219
- ],
220
- },
221
- {
222
- "Comments": [],
223
- "HasCut": true,
224
- "Name": "id",
225
- "Occurrence": {
226
- "m": 1,
227
- "n": 1,
228
- },
229
- "Type": [
230
- "text",
231
- ],
232
- },
233
- {
234
- "Comments": [],
235
- "HasCut": true,
236
- "Name": "actions",
237
- "Occurrence": {
238
- "m": 1,
239
- "n": 1,
240
- },
241
- "Type": [
242
- {
243
- "Type": "group",
244
- "Unwrapped": false,
245
- "Value": "ActionItems",
246
- },
247
- ],
248
- },
249
- {
250
- "Comments": [],
251
- "HasCut": false,
252
- "Name": "text",
253
- "Occurrence": {
254
- "m": Infinity,
255
- "n": 0,
256
- },
257
- "Type": [
258
- "any",
259
- ],
260
- },
261
- ],
262
- "Type": "group",
263
- },
264
- },
265
- ],
266
- },
267
- {
268
- "Comments": [],
269
- "Name": "script.MappingRemoteValue",
270
- "Type": "array",
271
- "Values": [
272
- {
273
- "Comments": [],
274
- "HasCut": false,
275
- "Name": "",
276
- "Occurrence": {
277
- "m": Infinity,
278
- "n": 0,
279
- },
280
- "Type": {
281
- "Comments": [],
282
- "Name": "",
283
- "Type": "array",
284
- "Values": [
285
- {
286
- "Comments": [],
287
- "HasCut": false,
288
- "Name": "",
289
- "Occurrence": {
290
- "m": 1,
291
- "n": 1,
292
- },
293
- "Type": [
294
- {
295
- "Type": "group",
296
- "Unwrapped": false,
297
- "Value": "script.RemoteValue",
298
- },
299
- "text",
300
- ],
301
- },
302
- {
303
- "Comments": [],
304
- "HasCut": false,
305
- "Name": "",
306
- "Occurrence": {
307
- "m": 1,
308
- "n": 1,
309
- },
310
- "Type": [
311
- {
312
- "Type": "group",
313
- "Unwrapped": false,
314
- "Value": "script.RemoteValue",
315
- },
316
- ],
317
- },
318
- ],
319
- },
320
- },
321
- ],
322
- },
323
- ]
324
- `;
325
-
326
- exports[`parser > can parse choices 1`] = `
327
- [
328
- {
329
- "Comments": [],
330
- "IsChoiceAddition": false,
331
- "Name": "attire",
332
- "PropertyType": [
333
- {
334
- "Type": "literal",
335
- "Unwrapped": false,
336
- "Value": "bow tie",
337
- },
338
- {
339
- "Type": "literal",
340
- "Unwrapped": false,
341
- "Value": "necktie",
342
- },
343
- {
344
- "Type": "literal",
345
- "Unwrapped": false,
346
- "Value": "Internet attire",
347
- },
348
- ],
349
- "Type": "variable",
350
- },
351
- {
352
- "Comments": [],
353
- "IsChoiceAddition": false,
354
- "Name": "attireBlock",
355
- "PropertyType": [
356
- {
357
- "Type": "literal",
358
- "Unwrapped": false,
359
- "Value": "bow tie",
360
- },
361
- {
362
- "Type": "literal",
363
- "Unwrapped": false,
364
- "Value": "necktie",
365
- },
366
- {
367
- "Type": "literal",
368
- "Unwrapped": false,
369
- "Value": "Internet attire",
370
- },
371
- ],
372
- "Type": "variable",
373
- },
374
- {
375
- "Comments": [],
376
- "IsChoiceAddition": false,
377
- "Name": "attireGroup",
378
- "Properties": [
379
- [
380
- {
381
- "Comments": [],
382
- "HasCut": false,
383
- "Name": "",
384
- "Occurrence": {
385
- "m": 1,
386
- "n": 1,
387
- },
388
- "Type": {
389
- "Type": "group",
390
- "Unwrapped": false,
391
- "Value": "attire",
392
- },
393
- },
394
- ],
395
- {
396
- "Comments": [],
397
- "HasCut": false,
398
- "Name": "",
399
- "Occurrence": {
400
- "m": 1,
401
- "n": 1,
402
- },
403
- "Type": [
404
- {
405
- "Type": "group",
406
- "Unwrapped": false,
407
- "Value": "attireBlock",
408
- },
409
- ],
410
- },
411
- ],
412
- "Type": "group",
413
- },
414
- {
415
- "Comments": [],
416
- "IsChoiceAddition": false,
417
- "Name": "protocol",
418
- "PropertyType": [
419
- {
420
- "Type": "literal",
421
- "Unwrapped": false,
422
- "Value": 6,
423
- },
424
- {
425
- "Type": "literal",
426
- "Unwrapped": false,
427
- "Value": 17,
428
- },
429
- ],
430
- "Type": "variable",
431
- },
432
- {
433
- "Comments": [],
434
- "IsChoiceAddition": false,
435
- "Name": "address",
436
- "Properties": [
437
- {
438
- "Comments": [],
439
- "HasCut": false,
440
- "Name": "",
441
- "Occurrence": {
442
- "m": 1,
443
- "n": 1,
444
- },
445
- "Type": [
446
- {
447
- "Type": "group",
448
- "Unwrapped": false,
449
- "Value": "delivery",
450
- },
451
- ],
452
- },
453
- ],
454
- "Type": "group",
455
- },
456
- {
457
- "Comments": [],
458
- "IsChoiceAddition": false,
459
- "Name": "delivery",
460
- "Properties": [
461
- {
462
- "Comments": [],
463
- "HasCut": true,
464
- "Name": "street",
465
- "Occurrence": {
466
- "m": 1,
467
- "n": 1,
468
- },
469
- "Type": [
470
- "tstr",
471
- ],
472
- },
473
- {
474
- "Comments": [],
475
- "HasCut": true,
476
- "Name": "number",
477
- "Occurrence": {
478
- "m": Infinity,
479
- "n": 0,
480
- },
481
- "Type": [
482
- "uint",
483
- ],
484
- },
485
- [
486
- {
487
- "Comments": [],
488
- "HasCut": false,
489
- "Name": "",
490
- "Occurrence": {
491
- "m": 1,
492
- "n": 1,
493
- },
494
- "Type": {
495
- "Type": "group",
496
- "Unwrapped": false,
497
- "Value": "city",
498
- },
499
- },
500
- {
501
- "Comments": [],
502
- "HasCut": true,
503
- "Name": "po-box",
504
- "Occurrence": {
505
- "m": 1,
506
- "n": 1,
507
- },
508
- "Type": [
509
- "uint",
510
- ],
511
- },
512
- ],
513
- [
514
- {
515
- "Comments": [],
516
- "HasCut": false,
517
- "Name": "",
518
- "Occurrence": {
519
- "m": 1,
520
- "n": 1,
521
- },
522
- "Type": {
523
- "Type": "group",
524
- "Unwrapped": false,
525
- "Value": "city",
526
- },
527
- },
528
- {
529
- "Comments": [],
530
- "HasCut": true,
531
- "Name": "foo",
532
- "Occurrence": {
533
- "m": 1,
534
- "n": 1,
535
- },
536
- "Type": [
537
- "tstr",
538
- "uint",
539
- ],
540
- },
541
- {
542
- "Comments": [],
543
- "HasCut": false,
544
- "Name": "",
545
- "Occurrence": {
546
- "m": 1,
547
- "n": 1,
548
- },
549
- "Type": {
550
- "Type": "group",
551
- "Unwrapped": false,
552
- "Value": "foobar",
553
- },
554
- },
555
- {
556
- "Comments": [],
557
- "HasCut": true,
558
- "Name": "per-pickup",
559
- "Occurrence": {
560
- "m": 1,
561
- "n": 1,
562
- },
563
- "Type": [
564
- {
565
- "Type": "literal",
566
- "Unwrapped": false,
567
- "Value": true,
568
- },
569
- ],
570
- },
571
- ],
572
- ],
573
- "Type": "group",
574
- },
575
- {
576
- "Comments": [],
577
- "IsChoiceAddition": false,
578
- "Name": "city",
579
- "Properties": [
580
- {
581
- "Comments": [],
582
- "HasCut": true,
583
- "Name": "name",
584
- "Occurrence": {
585
- "m": 1,
586
- "n": 1,
587
- },
588
- "Type": [
589
- "tstr",
590
- ],
591
- },
592
- {
593
- "Comments": [],
594
- "HasCut": true,
595
- "Name": "zip-code",
596
- "Occurrence": {
597
- "m": 1,
598
- "n": 1,
599
- },
600
- "Type": [
601
- "uint",
602
- ],
603
- },
604
- ],
605
- "Type": "group",
606
- },
607
- {
608
- "Comments": [],
609
- "IsChoiceAddition": true,
610
- "Name": "attire",
611
- "PropertyType": [
612
- {
613
- "Type": "literal",
614
- "Unwrapped": false,
615
- "Value": "swimwear",
616
- },
617
- ],
618
- "Type": "variable",
619
- },
620
- {
621
- "Comments": [],
622
- "IsChoiceAddition": true,
623
- "Name": "delivery",
624
- "Properties": [
625
- {
626
- "Comments": [],
627
- "HasCut": true,
628
- "Name": "lat",
629
- "Occurrence": {
630
- "m": 1,
631
- "n": 1,
632
- },
633
- "Type": [
634
- "float",
635
- ],
636
- },
637
- {
638
- "Comments": [],
639
- "HasCut": true,
640
- "Name": "long",
641
- "Occurrence": {
642
- "m": 1,
643
- "n": 1,
644
- },
645
- "Type": [
646
- "float",
647
- ],
648
- },
649
- {
650
- "Comments": [],
651
- "HasCut": true,
652
- "Name": "drone-type",
653
- "Occurrence": {
654
- "m": 1,
655
- "n": 1,
656
- },
657
- "Type": [
658
- "tstr",
659
- ],
660
- },
661
- ],
662
- "Type": "group",
663
- },
664
- ]
665
- `;
666
-
667
- exports[`parser > can parse comments 1`] = `
668
- [
669
- {
670
- "Comments": [
671
- {
672
- "Content": "This is a comment",
673
- "Leading": false,
674
- "Type": "comment",
675
- },
676
- {
677
- "Content": "foobar",
678
- "Leading": false,
679
- "Type": "comment",
680
- },
681
- {
682
- "Content": "This is another",
683
- "Leading": false,
684
- "Type": "comment",
685
- },
686
- {
687
- "Content": "very nice comment",
688
- "Leading": false,
689
- "Type": "comment",
690
- },
691
- ],
692
- "IsChoiceAddition": false,
693
- "Name": "person",
694
- "Properties": [
695
- {
696
- "Comments": [
697
- {
698
- "Content": "a good employer",
699
- "Leading": false,
700
- "Type": "comment",
701
- },
702
- ],
703
- "HasCut": true,
704
- "Name": "employer",
705
- "Occurrence": {
706
- "m": 1,
707
- "n": 1,
708
- },
709
- "Type": [
710
- "tstr",
711
- ],
712
- },
713
- ],
714
- "Type": "group",
715
- },
716
- {
717
- "Comments": [
718
- {
719
- "Content": "some comment",
720
- "Leading": false,
721
- "Type": "comment",
722
- },
723
- {
724
- "Content": "another comment",
725
- "Leading": false,
726
- "Type": "comment",
727
- },
728
- ],
729
- "IsChoiceAddition": false,
730
- "Name": "foo",
731
- "Properties": [
732
- {
733
- "Comments": [],
734
- "HasCut": false,
735
- "Name": "",
736
- "Occurrence": {
737
- "m": 1,
738
- "n": 1,
739
- },
740
- "Type": [
741
- {
742
- "Type": "group",
743
- "Unwrapped": false,
744
- "Value": "bar",
745
- },
746
- ],
747
- },
748
- ],
749
- "Type": "group",
750
- },
751
- {
752
- "Comments": [
753
- {
754
- "Content": "some g",
755
- "Leading": false,
756
- "Type": "comment",
757
- },
758
- ],
759
- "IsChoiceAddition": false,
760
- "Name": "som",
761
- "Properties": [
762
- {
763
- "Comments": [],
764
- "HasCut": false,
765
- "Name": "",
766
- "Occurrence": {
767
- "m": 1,
768
- "n": 1,
769
- },
770
- "Type": [
771
- {
772
- "Type": "group",
773
- "Unwrapped": false,
774
- "Value": "g",
775
- },
776
- ],
777
- },
778
- ],
779
- "Type": "group",
780
- },
781
- ]
782
- `;
783
-
784
- exports[`parser > can parse compositions 1`] = `
785
- [
786
- {
787
- "Comments": [],
788
- "IsChoiceAddition": false,
789
- "Name": "person",
790
- "Properties": [
791
- {
792
- "Comments": [
793
- {
794
- "Content": "an identity",
795
- "Leading": false,
796
- "Type": "comment",
797
- },
798
- ],
799
- "HasCut": false,
800
- "Name": "",
801
- "Occurrence": {
802
- "m": 1,
803
- "n": 1,
804
- },
805
- "Type": [
806
- {
807
- "Type": "group",
808
- "Unwrapped": false,
809
- "Value": "identity",
810
- },
811
- ],
812
- },
813
- {
814
- "Comments": [
815
- {
816
- "Content": "some employer",
817
- "Leading": false,
818
- "Type": "comment",
819
- },
820
- ],
821
- "HasCut": true,
822
- "Name": "employer",
823
- "Occurrence": {
824
- "m": 1,
825
- "n": 1,
826
- },
827
- "Type": [
828
- "tstr",
829
- ],
830
- },
831
- ],
832
- "Type": "group",
833
- },
834
- {
835
- "Comments": [],
836
- "IsChoiceAddition": false,
837
- "Name": "dog",
838
- "Properties": [
839
- {
840
- "Comments": [
841
- {
842
- "Content": "an identity again",
843
- "Leading": false,
844
- "Type": "comment",
845
- },
846
- ],
847
- "HasCut": false,
848
- "Name": "",
849
- "Occurrence": {
850
- "m": 1,
851
- "n": 1,
852
- },
853
- "Type": [
854
- {
855
- "Type": "group",
856
- "Unwrapped": false,
857
- "Value": "identity",
858
- },
859
- ],
860
- },
861
- {
862
- "Comments": [
863
- {
864
- "Content": "some length",
865
- "Leading": false,
866
- "Type": "comment",
867
- },
868
- ],
869
- "HasCut": true,
870
- "Name": "leash-length",
871
- "Occurrence": {
872
- "m": 1,
873
- "n": 1,
874
- },
875
- "Type": [
876
- "float",
877
- ],
878
- },
879
- ],
880
- "Type": "group",
881
- },
882
- {
883
- "Comments": [],
884
- "IsChoiceAddition": false,
885
- "Name": "identity",
886
- "Properties": [
887
- {
888
- "Comments": [
889
- {
890
- "Content": "an age",
891
- "Leading": false,
892
- "Type": "comment",
893
- },
894
- ],
895
- "HasCut": true,
896
- "Name": "age",
897
- "Occurrence": {
898
- "m": 1,
899
- "n": 1,
900
- },
901
- "Type": [
902
- "int",
903
- ],
904
- },
905
- {
906
- "Comments": [
907
- {
908
- "Content": "a name",
909
- "Leading": false,
910
- "Type": "comment",
911
- },
912
- ],
913
- "HasCut": true,
914
- "Name": "name",
915
- "Occurrence": {
916
- "m": 1,
917
- "n": 1,
918
- },
919
- "Type": [
920
- "tstr",
921
- ],
922
- },
923
- ],
924
- "Type": "group",
925
- },
926
- {
927
- "Comments": [],
928
- "Name": "Geography",
929
- "Type": "array",
930
- "Values": [
931
- {
932
- "Comments": [
933
- {
934
- "Content": "a city",
935
- "Leading": false,
936
- "Type": "comment",
937
- },
938
- ],
939
- "HasCut": true,
940
- "Name": "city",
941
- "Occurrence": {
942
- "m": 1,
943
- "n": 1,
944
- },
945
- "Type": [
946
- "tstr",
947
- ],
948
- },
949
- {
950
- "Comments": [
951
- {
952
- "Content": "some coordinates",
953
- "Leading": false,
954
- "Type": "comment",
955
- },
956
- ],
957
- "HasCut": true,
958
- "Name": "gpsCoordinates",
959
- "Occurrence": {
960
- "m": 1,
961
- "n": 1,
962
- },
963
- "Type": [
964
- {
965
- "Type": "group",
966
- "Unwrapped": false,
967
- "Value": "GpsCoordinates",
968
- },
969
- ],
970
- },
971
- ],
972
- },
973
- {
974
- "Comments": [],
975
- "IsChoiceAddition": false,
976
- "Name": "GpsCoordinates",
977
- "Properties": [
978
- {
979
- "Comments": [
980
- {
981
- "Content": "degrees, scaled by 10^7",
982
- "Leading": false,
983
- "Type": "comment",
984
- },
985
- ],
986
- "HasCut": true,
987
- "Name": "longitude",
988
- "Occurrence": {
989
- "m": 1,
990
- "n": 1,
991
- },
992
- "Type": [
993
- "uint",
994
- ],
995
- },
996
- {
997
- "Comments": [
998
- {
999
- "Content": "degreed, scaled by 10^7",
1000
- "Leading": false,
1001
- "Type": "comment",
1002
- },
1003
- ],
1004
- "HasCut": true,
1005
- "Name": "latitude",
1006
- "Occurrence": {
1007
- "m": 1,
1008
- "n": 1,
1009
- },
1010
- "Type": [
1011
- "uint",
1012
- ],
1013
- },
1014
- ],
1015
- "Type": "group",
1016
- },
1017
- {
1018
- "Comments": [],
1019
- "IsChoiceAddition": false,
1020
- "Name": "located-samples",
1021
- "Properties": [
1022
- {
1023
- "Comments": [
1024
- {
1025
- "Content": "some",
1026
- "Leading": false,
1027
- "Type": "comment",
1028
- },
1029
- ],
1030
- "HasCut": false,
1031
- "Name": "sample-point",
1032
- "Occurrence": {
1033
- "m": 1,
1034
- "n": 1,
1035
- },
1036
- "Type": [
1037
- "int",
1038
- ],
1039
- },
1040
- {
1041
- "Comments": [
1042
- {
1043
- "Content": "comments",
1044
- "Leading": false,
1045
- "Type": "comment",
1046
- },
1047
- ],
1048
- "HasCut": false,
1049
- "Name": "samples",
1050
- "Occurrence": {
1051
- "m": 1,
1052
- "n": 1,
1053
- },
1054
- "Type": [
1055
- {
1056
- "Comments": [],
1057
- "Name": "",
1058
- "Type": "array",
1059
- "Values": [
1060
- {
1061
- "Comments": [],
1062
- "HasCut": false,
1063
- "Name": "",
1064
- "Occurrence": {
1065
- "m": Infinity,
1066
- "n": 1,
1067
- },
1068
- "Type": "float",
1069
- },
1070
- ],
1071
- },
1072
- ],
1073
- },
1074
- ],
1075
- "Type": "group",
1076
- },
1077
- {
1078
- "Comments": [],
1079
- "IsChoiceAddition": false,
1080
- "Name": "extensible-map-example",
1081
- "Properties": [
1082
- {
1083
- "Comments": [
1084
- {
1085
- "Content": "some",
1086
- "Leading": false,
1087
- "Type": "comment",
1088
- },
1089
- ],
1090
- "HasCut": true,
1091
- "Name": "optional-key",
1092
- "Occurrence": {
1093
- "m": Infinity,
1094
- "n": 0,
1095
- },
1096
- "Type": [
1097
- "int",
1098
- ],
1099
- },
1100
- {
1101
- "Comments": [
1102
- {
1103
- "Content": "really",
1104
- "Leading": false,
1105
- "Type": "comment",
1106
- },
1107
- ],
1108
- "HasCut": true,
1109
- "Name": "optional-key2",
1110
- "Occurrence": {
1111
- "m": Infinity,
1112
- "n": 0,
1113
- },
1114
- "Type": [
1115
- "int",
1116
- ],
1117
- },
1118
- {
1119
- "Comments": [
1120
- {
1121
- "Content": "interesting",
1122
- "Leading": false,
1123
- "Type": "comment",
1124
- },
1125
- ],
1126
- "HasCut": true,
1127
- "Name": "optional-key3",
1128
- "Occurrence": {
1129
- "m": Infinity,
1130
- "n": 0,
1131
- },
1132
- "Type": [
1133
- "int",
1134
- ],
1135
- },
1136
- {
1137
- "Comments": [
1138
- {
1139
- "Content": "comments",
1140
- "Leading": false,
1141
- "Type": "comment",
1142
- },
1143
- ],
1144
- "HasCut": false,
1145
- "Name": "tstr",
1146
- "Occurrence": {
1147
- "m": Infinity,
1148
- "n": 0,
1149
- },
1150
- "Type": [
1151
- "any",
1152
- ],
1153
- },
1154
- ],
1155
- "Type": "group",
1156
- },
1157
- {
1158
- "Comments": [],
1159
- "IsChoiceAddition": false,
1160
- "Name": "personWithoutComment",
1161
- "Properties": [
1162
- {
1163
- "Comments": [],
1164
- "HasCut": false,
1165
- "Name": "",
1166
- "Occurrence": {
1167
- "m": 1,
1168
- "n": 1,
1169
- },
1170
- "Type": [
1171
- {
1172
- "Type": "group",
1173
- "Unwrapped": false,
1174
- "Value": "identity",
1175
- },
1176
- ],
1177
- },
1178
- {
1179
- "Comments": [],
1180
- "HasCut": true,
1181
- "Name": "employer",
1182
- "Occurrence": {
1183
- "m": 1,
1184
- "n": 1,
1185
- },
1186
- "Type": [
1187
- "tstr",
1188
- ],
1189
- },
1190
- ],
1191
- "Type": "group",
1192
- },
1193
- {
1194
- "Comments": [],
1195
- "IsChoiceAddition": false,
1196
- "Name": "dogWithoutComment",
1197
- "Properties": [
1198
- {
1199
- "Comments": [],
1200
- "HasCut": false,
1201
- "Name": "",
1202
- "Occurrence": {
1203
- "m": 1,
1204
- "n": 1,
1205
- },
1206
- "Type": [
1207
- {
1208
- "Type": "group",
1209
- "Unwrapped": false,
1210
- "Value": "identity",
1211
- },
1212
- ],
1213
- },
1214
- {
1215
- "Comments": [],
1216
- "HasCut": true,
1217
- "Name": "leash-length",
1218
- "Occurrence": {
1219
- "m": 1,
1220
- "n": 1,
1221
- },
1222
- "Type": [
1223
- "float",
1224
- ],
1225
- },
1226
- ],
1227
- "Type": "group",
1228
- },
1229
- {
1230
- "Comments": [],
1231
- "IsChoiceAddition": false,
1232
- "Name": "identityWithoutComment",
1233
- "Properties": [
1234
- {
1235
- "Comments": [],
1236
- "HasCut": true,
1237
- "Name": "age",
1238
- "Occurrence": {
1239
- "m": 1,
1240
- "n": 1,
1241
- },
1242
- "Type": [
1243
- "int",
1244
- ],
1245
- },
1246
- {
1247
- "Comments": [],
1248
- "HasCut": true,
1249
- "Name": "name",
1250
- "Occurrence": {
1251
- "m": 1,
1252
- "n": 1,
1253
- },
1254
- "Type": [
1255
- "tstr",
1256
- ],
1257
- },
1258
- ],
1259
- "Type": "group",
1260
- },
1261
- {
1262
- "Comments": [],
1263
- "Name": "GeographyWithoutComment",
1264
- "Type": "array",
1265
- "Values": [
1266
- {
1267
- "Comments": [],
1268
- "HasCut": true,
1269
- "Name": "city",
1270
- "Occurrence": {
1271
- "m": 1,
1272
- "n": 1,
1273
- },
1274
- "Type": [
1275
- "tstr",
1276
- ],
1277
- },
1278
- {
1279
- "Comments": [],
1280
- "HasCut": true,
1281
- "Name": "gpsCoordinates",
1282
- "Occurrence": {
1283
- "m": 1,
1284
- "n": 1,
1285
- },
1286
- "Type": [
1287
- {
1288
- "Type": "group",
1289
- "Unwrapped": false,
1290
- "Value": "GpsCoordinates",
1291
- },
1292
- ],
1293
- },
1294
- ],
1295
- },
1296
- {
1297
- "Comments": [],
1298
- "IsChoiceAddition": false,
1299
- "Name": "GpsCoordinatesWithoutComment",
1300
- "Properties": [
1301
- {
1302
- "Comments": [],
1303
- "HasCut": true,
1304
- "Name": "longitude",
1305
- "Occurrence": {
1306
- "m": 1,
1307
- "n": 1,
1308
- },
1309
- "Type": [
1310
- "uint",
1311
- ],
1312
- },
1313
- {
1314
- "Comments": [],
1315
- "HasCut": true,
1316
- "Name": "latitude",
1317
- "Occurrence": {
1318
- "m": 1,
1319
- "n": 1,
1320
- },
1321
- "Type": [
1322
- "uint",
1323
- ],
1324
- },
1325
- ],
1326
- "Type": "group",
1327
- },
1328
- {
1329
- "Comments": [],
1330
- "IsChoiceAddition": false,
1331
- "Name": "located-samples-without-comments",
1332
- "Properties": [
1333
- {
1334
- "Comments": [],
1335
- "HasCut": false,
1336
- "Name": "sample-point",
1337
- "Occurrence": {
1338
- "m": 1,
1339
- "n": 1,
1340
- },
1341
- "Type": [
1342
- "int",
1343
- ],
1344
- },
1345
- {
1346
- "Comments": [],
1347
- "HasCut": false,
1348
- "Name": "samples",
1349
- "Occurrence": {
1350
- "m": 1,
1351
- "n": 1,
1352
- },
1353
- "Type": [
1354
- {
1355
- "Comments": [],
1356
- "Name": "",
1357
- "Type": "array",
1358
- "Values": [
1359
- {
1360
- "Comments": [],
1361
- "HasCut": false,
1362
- "Name": "",
1363
- "Occurrence": {
1364
- "m": Infinity,
1365
- "n": 1,
1366
- },
1367
- "Type": "float",
1368
- },
1369
- ],
1370
- },
1371
- ],
1372
- },
1373
- ],
1374
- "Type": "group",
1375
- },
1376
- {
1377
- "Comments": [],
1378
- "IsChoiceAddition": false,
1379
- "Name": "extensible-map-example-without-comments",
1380
- "Properties": [
1381
- {
1382
- "Comments": [],
1383
- "HasCut": true,
1384
- "Name": "optional-key",
1385
- "Occurrence": {
1386
- "m": Infinity,
1387
- "n": 0,
1388
- },
1389
- "Type": [
1390
- "int",
1391
- ],
1392
- },
1393
- {
1394
- "Comments": [],
1395
- "HasCut": true,
1396
- "Name": "optional-key2",
1397
- "Occurrence": {
1398
- "m": Infinity,
1399
- "n": 0,
1400
- },
1401
- "Type": [
1402
- "int",
1403
- ],
1404
- },
1405
- {
1406
- "Comments": [],
1407
- "HasCut": true,
1408
- "Name": "optional-key3",
1409
- "Occurrence": {
1410
- "m": Infinity,
1411
- "n": 0,
1412
- },
1413
- "Type": [
1414
- "int",
1415
- ],
1416
- },
1417
- {
1418
- "Comments": [],
1419
- "HasCut": false,
1420
- "Name": "tstr",
1421
- "Occurrence": {
1422
- "m": Infinity,
1423
- "n": 0,
1424
- },
1425
- "Type": [
1426
- "any",
1427
- ],
1428
- },
1429
- ],
1430
- "Type": "group",
1431
- },
1432
- ]
1433
- `;
1434
-
1435
- exports[`parser > can parse nested groups 1`] = `
1436
- [
1437
- {
1438
- "Comments": [],
1439
- "IsChoiceAddition": false,
1440
- "Name": "f",
1441
- "Properties": [
1442
- {
1443
- "Comments": [],
1444
- "HasCut": true,
1445
- "Name": "o",
1446
- "Occurrence": {
1447
- "m": 1,
1448
- "n": 1,
1449
- },
1450
- "Type": [
1451
- {
1452
- "Comments": [],
1453
- "IsChoiceAddition": false,
1454
- "Name": "",
1455
- "Properties": [
1456
- {
1457
- "Comments": [],
1458
- "HasCut": true,
1459
- "Name": "o",
1460
- "Occurrence": {
1461
- "m": 1,
1462
- "n": 1,
1463
- },
1464
- "Type": [
1465
- {
1466
- "Comments": [],
1467
- "IsChoiceAddition": false,
1468
- "Name": "",
1469
- "Properties": [
1470
- {
1471
- "Comments": [],
1472
- "HasCut": true,
1473
- "Name": "b",
1474
- "Occurrence": {
1475
- "m": 1,
1476
- "n": 1,
1477
- },
1478
- "Type": [
1479
- {
1480
- "Comments": [],
1481
- "IsChoiceAddition": false,
1482
- "Name": "",
1483
- "Properties": [
1484
- {
1485
- "Comments": [],
1486
- "HasCut": true,
1487
- "Name": "a",
1488
- "Occurrence": {
1489
- "m": 1,
1490
- "n": 1,
1491
- },
1492
- "Type": [
1493
- {
1494
- "Comments": [],
1495
- "IsChoiceAddition": false,
1496
- "Name": "",
1497
- "Properties": [
1498
- {
1499
- "Comments": [],
1500
- "HasCut": true,
1501
- "Name": "r",
1502
- "Occurrence": {
1503
- "m": 1,
1504
- "n": 1,
1505
- },
1506
- "Type": [
1507
- "text",
1508
- ],
1509
- },
1510
- ],
1511
- "Type": "group",
1512
- },
1513
- ],
1514
- },
1515
- ],
1516
- "Type": "group",
1517
- },
1518
- ],
1519
- },
1520
- ],
1521
- "Type": "group",
1522
- },
1523
- ],
1524
- },
1525
- ],
1526
- "Type": "group",
1527
- },
1528
- ],
1529
- },
1530
- ],
1531
- "Type": "group",
1532
- },
1533
- ]
1534
- `;
1535
-
1536
- exports[`parser > can parse occurrences 1`] = `
1537
- [
1538
- {
1539
- "Comments": [],
1540
- "IsChoiceAddition": false,
1541
- "Name": "someGroup",
1542
- "Properties": [
1543
- {
1544
- "Comments": [],
1545
- "HasCut": true,
1546
- "Name": "optional",
1547
- "Occurrence": {
1548
- "m": Infinity,
1549
- "n": 0,
1550
- },
1551
- "Type": [
1552
- "tstr",
1553
- ],
1554
- },
1555
- {
1556
- "Comments": [],
1557
- "HasCut": true,
1558
- "Name": "anotherOptional",
1559
- "Occurrence": {
1560
- "m": Infinity,
1561
- "n": 0,
1562
- },
1563
- "Type": [
1564
- "tstr",
1565
- ],
1566
- },
1567
- {
1568
- "Comments": [],
1569
- "HasCut": true,
1570
- "Name": "atLeastOne",
1571
- "Occurrence": {
1572
- "m": Infinity,
1573
- "n": 1,
1574
- },
1575
- "Type": [
1576
- "tstr",
1577
- ],
1578
- },
1579
- {
1580
- "Comments": [],
1581
- "HasCut": true,
1582
- "Name": "numberedOccurence",
1583
- "Occurrence": {
1584
- "m": 42,
1585
- "n": 23,
1586
- },
1587
- "Type": [
1588
- "tstr",
1589
- ],
1590
- },
1591
- {
1592
- "Comments": [],
1593
- "HasCut": true,
1594
- "Name": "withoutLeftSide",
1595
- "Occurrence": {
1596
- "m": 42,
1597
- "n": 0,
1598
- },
1599
- "Type": [
1600
- "tstr",
1601
- ],
1602
- },
1603
- {
1604
- "Comments": [],
1605
- "HasCut": true,
1606
- "Name": "withoutRightSide",
1607
- "Occurrence": {
1608
- "m": Infinity,
1609
- "n": 23,
1610
- },
1611
- "Type": [
1612
- "tstr",
1613
- ],
1614
- },
1615
- ],
1616
- "Type": "group",
1617
- },
1618
- ]
1619
- `;
1620
-
1621
- exports[`parser > can parse operators 1`] = `
1622
- [
1623
- {
1624
- "Comments": [],
1625
- "IsChoiceAddition": false,
1626
- "Name": "ip4",
1627
- "PropertyType": [
1628
- {
1629
- "Operator": {
1630
- "Type": "size",
1631
- "Value": {
1632
- "Type": "literal",
1633
- "Unwrapped": false,
1634
- "Value": 4,
1635
- },
1636
- },
1637
- "Type": "bstr",
1638
- },
1639
- ],
1640
- "Type": "variable",
1641
- },
1642
- {
1643
- "Comments": [],
1644
- "IsChoiceAddition": false,
1645
- "Name": "label",
1646
- "PropertyType": [
1647
- {
1648
- "Operator": {
1649
- "Type": "size",
1650
- "Value": {
1651
- "Type": "range",
1652
- "Unwrapped": false,
1653
- "Value": {
1654
- "Inclusive": true,
1655
- "Max": {
1656
- "Type": "literal",
1657
- "Unwrapped": false,
1658
- "Value": 63,
1659
- },
1660
- "Min": {
1661
- "Type": "literal",
1662
- "Unwrapped": false,
1663
- "Value": 1,
1664
- },
1665
- },
1666
- },
1667
- },
1668
- "Type": "bstr",
1669
- },
1670
- ],
1671
- "Type": "variable",
1672
- },
1673
- {
1674
- "Comments": [],
1675
- "IsChoiceAddition": false,
1676
- "Name": "nai",
1677
- "PropertyType": [
1678
- {
1679
- "Operator": {
1680
- "Type": "regexp",
1681
- "Value": {
1682
- "Type": "literal",
1683
- "Unwrapped": false,
1684
- "Value": "[A-Za-z0-9]+@[A-Za-z0-9]+(\\\\.[A-Za-z0-9]+)+",
1685
- },
1686
- },
1687
- "Type": "tstr",
1688
- },
1689
- ],
1690
- "Type": "variable",
1691
- },
1692
- {
1693
- "Comments": [],
1694
- "IsChoiceAddition": false,
1695
- "Name": "rwxbits",
1696
- "PropertyType": [
1697
- {
1698
- "Operator": {
1699
- "Type": "bits",
1700
- "Value": {
1701
- "Type": "group",
1702
- "Unwrapped": false,
1703
- "Value": "rwx",
1704
- },
1705
- },
1706
- "Type": "uint",
1707
- },
1708
- ],
1709
- "Type": "variable",
1710
- },
1711
- {
1712
- "Comments": [],
1713
- "IsChoiceAddition": false,
1714
- "Name": "foo",
1715
- "PropertyType": [
1716
- {
1717
- "Operator": {
1718
- "Type": "and",
1719
- "Value": {
1720
- "Type": "group",
1721
- "Unwrapped": false,
1722
- "Value": "nai",
1723
- },
1724
- },
1725
- "Type": {
1726
- "Type": "group",
1727
- "Unwrapped": false,
1728
- "Value": "ip4",
1729
- },
1730
- },
1731
- ],
1732
- "Type": "variable",
1733
- },
1734
- {
1735
- "Comments": [],
1736
- "IsChoiceAddition": false,
1737
- "Name": "fooWithin",
1738
- "PropertyType": [
1739
- {
1740
- "Operator": {
1741
- "Type": "within",
1742
- "Value": {
1743
- "Type": "group",
1744
- "Unwrapped": false,
1745
- "Value": "nai",
1746
- },
1747
- },
1748
- "Type": {
1749
- "Type": "group",
1750
- "Unwrapped": false,
1751
- "Value": "ip4",
1752
- },
1753
- },
1754
- ],
1755
- "Type": "variable",
1756
- },
1757
- {
1758
- "Comments": [],
1759
- "IsChoiceAddition": false,
1760
- "Name": "bar",
1761
- "PropertyType": [
1762
- {
1763
- "Operator": {
1764
- "Type": "ne",
1765
- "Value": {
1766
- "Type": "group",
1767
- "Unwrapped": false,
1768
- "Value": "fooWithin",
1769
- },
1770
- },
1771
- "Type": {
1772
- "Type": "group",
1773
- "Unwrapped": false,
1774
- "Value": "foo",
1775
- },
1776
- },
1777
- ],
1778
- "Type": "variable",
1779
- },
1780
- {
1781
- "Comments": [
1782
- {
1783
- "Content": "unit: m/s",
1784
- "Leading": false,
1785
- "Type": "comment",
1786
- },
1787
- ],
1788
- "IsChoiceAddition": false,
1789
- "Name": "speed",
1790
- "PropertyType": [
1791
- {
1792
- "Operator": {
1793
- "Type": "ge",
1794
- "Value": {
1795
- "Type": "literal",
1796
- "Unwrapped": false,
1797
- "Value": 0,
1798
- },
1799
- },
1800
- "Type": {
1801
- "Type": "group",
1802
- "Unwrapped": false,
1803
- "Value": "number",
1804
- },
1805
- },
1806
- ],
1807
- "Type": "variable",
1808
- },
1809
- {
1810
- "Comments": [
1811
- {
1812
- "Content": "unit: m/s",
1813
- "Leading": false,
1814
- "Type": "comment",
1815
- },
1816
- ],
1817
- "IsChoiceAddition": false,
1818
- "Name": "speed2",
1819
- "PropertyType": [
1820
- {
1821
- "Operator": {
1822
- "Type": "le",
1823
- "Value": {
1824
- "Type": "literal",
1825
- "Unwrapped": false,
1826
- "Value": 10,
1827
- },
1828
- },
1829
- "Type": {
1830
- "Type": "group",
1831
- "Unwrapped": false,
1832
- "Value": "number",
1833
- },
1834
- },
1835
- ],
1836
- "Type": "variable",
1837
- },
1838
- {
1839
- "Comments": [
1840
- {
1841
- "Content": "unit: m/s",
1842
- "Leading": false,
1843
- "Type": "comment",
1844
- },
1845
- ],
1846
- "IsChoiceAddition": false,
1847
- "Name": "speed3",
1848
- "PropertyType": [
1849
- {
1850
- "Operator": {
1851
- "Type": "gt",
1852
- "Value": {
1853
- "Type": "literal",
1854
- "Unwrapped": false,
1855
- "Value": 0,
1856
- },
1857
- },
1858
- "Type": {
1859
- "Type": "group",
1860
- "Unwrapped": false,
1861
- "Value": "number",
1862
- },
1863
- },
1864
- ],
1865
- "Type": "variable",
1866
- },
1867
- {
1868
- "Comments": [
1869
- {
1870
- "Content": "unit: m/s",
1871
- "Leading": false,
1872
- "Type": "comment",
1873
- },
1874
- ],
1875
- "IsChoiceAddition": false,
1876
- "Name": "speed4",
1877
- "PropertyType": [
1878
- {
1879
- "Operator": {
1880
- "Type": "lt",
1881
- "Value": {
1882
- "Type": "literal",
1883
- "Unwrapped": false,
1884
- "Value": 10,
1885
- },
1886
- },
1887
- "Type": {
1888
- "Type": "group",
1889
- "Unwrapped": false,
1890
- "Value": "number",
1891
- },
1892
- },
1893
- ],
1894
- "Type": "variable",
1895
- },
1896
- {
1897
- "Comments": [],
1898
- "IsChoiceAddition": false,
1899
- "Name": "displayed-step",
1900
- "PropertyType": [
1901
- {
1902
- "Operator": {
1903
- "Type": "default",
1904
- "Value": {
1905
- "Type": "literal",
1906
- "Unwrapped": false,
1907
- "Value": 1,
1908
- },
1909
- },
1910
- "Type": {
1911
- "Type": "group",
1912
- "Unwrapped": false,
1913
- "Value": "number",
1914
- },
1915
- },
1916
- ],
1917
- "Type": "variable",
1918
- },
1919
- {
1920
- "Comments": [],
1921
- "IsChoiceAddition": false,
1922
- "Name": "someGroup",
1923
- "Properties": [
1924
- {
1925
- "Comments": [],
1926
- "HasCut": true,
1927
- "Name": "optional",
1928
- "Occurrence": {
1929
- "m": Infinity,
1930
- "n": 0,
1931
- },
1932
- "Type": [
1933
- {
1934
- "Operator": {
1935
- "Type": "default",
1936
- "Value": {
1937
- "Type": "literal",
1938
- "Unwrapped": false,
1939
- "Value": "foobar",
1940
- },
1941
- },
1942
- "Type": "tstr",
1943
- },
1944
- ],
1945
- },
1946
- {
1947
- "Comments": [],
1948
- "HasCut": true,
1949
- "Name": "orientation",
1950
- "Occurrence": {
1951
- "m": Infinity,
1952
- "n": 0,
1953
- },
1954
- "Operator": {
1955
- "Type": "default",
1956
- "Value": {
1957
- "Type": "literal",
1958
- "Unwrapped": false,
1959
- "Value": "portrait",
1960
- },
1961
- },
1962
- "Type": [
1963
- {
1964
- "Type": "literal",
1965
- "Unwrapped": false,
1966
- "Value": "portrait",
1967
- },
1968
- {
1969
- "Type": "literal",
1970
- "Unwrapped": false,
1971
- "Value": "landscape",
1972
- },
1973
- ],
1974
- },
1975
- {
1976
- "Comments": [],
1977
- "HasCut": true,
1978
- "Name": "scale",
1979
- "Occurrence": {
1980
- "m": Infinity,
1981
- "n": 0,
1982
- },
1983
- "Type": [
1984
- {
1985
- "Operator": {
1986
- "Type": "default",
1987
- "Value": {
1988
- "Type": "literal",
1989
- "Unwrapped": false,
1990
- "Value": 1,
1991
- },
1992
- },
1993
- "Type": {
1994
- "Type": "range",
1995
- "Unwrapped": false,
1996
- "Value": {
1997
- "Inclusive": true,
1998
- "Max": {
1999
- "Type": "literal",
2000
- "Unwrapped": false,
2001
- "Value": 2,
2002
- },
2003
- "Min": {
2004
- "Type": "literal",
2005
- "Unwrapped": false,
2006
- "Value": 0.1,
2007
- },
2008
- },
2009
- },
2010
- },
2011
- ],
2012
- },
2013
- {
2014
- "Comments": [],
2015
- "HasCut": true,
2016
- "Name": "shrinkToFit",
2017
- "Occurrence": {
2018
- "m": Infinity,
2019
- "n": 0,
2020
- },
2021
- "Type": [
2022
- {
2023
- "Operator": {
2024
- "Type": "default",
2025
- "Value": {
2026
- "Type": "literal",
2027
- "Unwrapped": false,
2028
- "Value": true,
2029
- },
2030
- },
2031
- "Type": "bool",
2032
- },
2033
- ],
2034
- },
2035
- {
2036
- "Comments": [],
2037
- "HasCut": true,
2038
- "Name": "shrinkToFitP",
2039
- "Occurrence": {
2040
- "m": Infinity,
2041
- "n": 0,
2042
- },
2043
- "Operator": {
2044
- "Type": "default",
2045
- "Value": {
2046
- "Type": "literal",
2047
- "Unwrapped": false,
2048
- "Value": true,
2049
- },
2050
- },
2051
- "Type": [
2052
- "bool",
2053
- ],
2054
- },
2055
- {
2056
- "Comments": [],
2057
- "HasCut": true,
2058
- "Name": "bottom",
2059
- "Occurrence": {
2060
- "m": Infinity,
2061
- "n": 0,
2062
- },
2063
- "Operator": {
2064
- "Type": "default",
2065
- "Value": {
2066
- "Type": "literal",
2067
- "Unwrapped": false,
2068
- "Value": 1,
2069
- },
2070
- },
2071
- "Type": [
2072
- {
2073
- "Operator": {
2074
- "Type": "ge",
2075
- "Value": {
2076
- "Type": "literal",
2077
- "Unwrapped": false,
2078
- "Value": 0,
2079
- },
2080
- },
2081
- "Type": "float",
2082
- },
2083
- ],
2084
- },
2085
- ],
2086
- "Type": "group",
2087
- },
2088
- {
2089
- "Comments": [],
2090
- "IsChoiceAddition": false,
2091
- "Name": "optional",
2092
- "PropertyType": [
2093
- {
2094
- "Operator": {
2095
- "Type": "default",
2096
- "Value": {
2097
- "Type": "literal",
2098
- "Unwrapped": false,
2099
- "Value": "foobar",
2100
- },
2101
- },
2102
- "Type": "tstr",
2103
- },
2104
- ],
2105
- "Type": "variable",
2106
- },
2107
- {
2108
- "Comments": [],
2109
- "IsChoiceAddition": false,
2110
- "Name": "orientation",
2111
- "Operator": {
2112
- "Type": "default",
2113
- "Value": {
2114
- "Type": "literal",
2115
- "Unwrapped": false,
2116
- "Value": "portrait",
2117
- },
2118
- },
2119
- "PropertyType": [
2120
- {
2121
- "Type": "literal",
2122
- "Unwrapped": false,
2123
- "Value": "portrait",
2124
- },
2125
- {
2126
- "Type": "literal",
2127
- "Unwrapped": false,
2128
- "Value": "landscape",
2129
- },
2130
- ],
2131
- "Type": "variable",
2132
- },
2133
- {
2134
- "Comments": [],
2135
- "IsChoiceAddition": false,
2136
- "Name": "group1",
2137
- "Properties": [
2138
- {
2139
- "Comments": [],
2140
- "HasCut": true,
2141
- "Name": "name",
2142
- "Occurrence": {
2143
- "m": 1,
2144
- "n": 1,
2145
- },
2146
- "Type": [
2147
- "tstr",
2148
- ],
2149
- },
2150
- {
2151
- "Comments": [],
2152
- "HasCut": true,
2153
- "Name": "value",
2154
- "Occurrence": {
2155
- "m": 1,
2156
- "n": 1,
2157
- },
2158
- "Type": [
2159
- "tstr",
2160
- ],
2161
- },
2162
- ],
2163
- "Type": "group",
2164
- },
2165
- {
2166
- "Comments": [],
2167
- "IsChoiceAddition": false,
2168
- "Name": "group2",
2169
- "Properties": [
2170
- {
2171
- "Comments": [],
2172
- "HasCut": true,
2173
- "Name": "handle",
2174
- "Occurrence": {
2175
- "m": 1,
2176
- "n": 1,
2177
- },
2178
- "Type": [
2179
- "tstr",
2180
- ],
2181
- },
2182
- {
2183
- "Comments": [],
2184
- "HasCut": false,
2185
- "Name": "",
2186
- "Occurrence": {
2187
- "m": 1,
2188
- "n": 1,
2189
- },
2190
- "Operator": {
2191
- "Type": "and",
2192
- "Value": {
2193
- "Type": "group",
2194
- "Unwrapped": false,
2195
- "Value": "group1",
2196
- },
2197
- },
2198
- "Type": "group",
2199
- },
2200
- ],
2201
- "Type": "group",
2202
- },
2203
- {
2204
- "Comments": [],
2205
- "IsChoiceAddition": false,
2206
- "Name": "groupedRangeWithOperator",
2207
- "Properties": [
2208
- {
2209
- "Comments": [],
2210
- "HasCut": true,
2211
- "Name": "name",
2212
- "Occurrence": {
2213
- "m": 1,
2214
- "n": 1,
2215
- },
2216
- "Type": [
2217
- "tstr",
2218
- ],
2219
- },
2220
- {
2221
- "Comments": [],
2222
- "HasCut": true,
2223
- "Name": "range",
2224
- "Occurrence": {
2225
- "m": Infinity,
2226
- "n": 0,
2227
- },
2228
- "Operator": {
2229
- "Type": "default",
2230
- "Value": {
2231
- "Type": "literal",
2232
- "Unwrapped": false,
2233
- "Value": 1.5,
2234
- },
2235
- },
2236
- "Type": [
2237
- {
2238
- "Type": {
2239
- "Type": "range",
2240
- "Unwrapped": false,
2241
- "Value": {
2242
- "Inclusive": true,
2243
- "Max": {
2244
- "Type": "literal",
2245
- "Unwrapped": false,
2246
- "Value": 2,
2247
- },
2248
- "Min": {
2249
- "Type": "literal",
2250
- "Unwrapped": false,
2251
- "Value": 1,
2252
- },
2253
- },
2254
- },
2255
- },
2256
- ],
2257
- },
2258
- {
2259
- "Comments": [],
2260
- "HasCut": true,
2261
- "Name": "nullable",
2262
- "Occurrence": {
2263
- "m": Infinity,
2264
- "n": 0,
2265
- },
2266
- "Type": [
2267
- {
2268
- "Operator": {
2269
- "Type": "ge",
2270
- "Value": {
2271
- "Type": "literal",
2272
- "Unwrapped": false,
2273
- "Value": 1,
2274
- },
2275
- },
2276
- "Type": "float",
2277
- },
2278
- "null",
2279
- ],
2280
- },
2281
- {
2282
- "Comments": [],
2283
- "HasCut": true,
2284
- "Name": "rangeOrNull",
2285
- "Occurrence": {
2286
- "m": Infinity,
2287
- "n": 0,
2288
- },
2289
- "Type": [
2290
- {
2291
- "Type": {
2292
- "Type": "range",
2293
- "Unwrapped": false,
2294
- "Value": {
2295
- "Inclusive": false,
2296
- "Max": {
2297
- "Type": "literal",
2298
- "Unwrapped": false,
2299
- "Value": 360,
2300
- },
2301
- "Min": {
2302
- "Type": "literal",
2303
- "Unwrapped": false,
2304
- "Value": 0,
2305
- },
2306
- },
2307
- },
2308
- },
2309
- "null",
2310
- ],
2311
- },
2312
- {
2313
- "Comments": [],
2314
- "HasCut": true,
2315
- "Name": "choiceWithPostFixOperator",
2316
- "Occurrence": {
2317
- "m": Infinity,
2318
- "n": 0,
2319
- },
2320
- "Operator": {
2321
- "Type": "default",
2322
- "Value": "null",
2323
- },
2324
- "Type": [
2325
- "float",
2326
- "null",
2327
- ],
2328
- },
2329
- {
2330
- "Comments": [],
2331
- "HasCut": true,
2332
- "Name": "anotherChoice",
2333
- "Occurrence": {
2334
- "m": Infinity,
2335
- "n": 0,
2336
- },
2337
- "Operator": {
2338
- "Type": "default",
2339
- "Value": "null",
2340
- },
2341
- "Type": [
2342
- {
2343
- "Type": {
2344
- "Type": "range",
2345
- "Unwrapped": false,
2346
- "Value": {
2347
- "Inclusive": false,
2348
- "Max": {
2349
- "Type": "literal",
2350
- "Unwrapped": false,
2351
- "Value": 360,
2352
- },
2353
- "Min": {
2354
- "Type": "literal",
2355
- "Unwrapped": false,
2356
- "Value": 0,
2357
- },
2358
- },
2359
- },
2360
- },
2361
- "null",
2362
- ],
2363
- },
2364
- {
2365
- "Comments": [],
2366
- "HasCut": true,
2367
- "Name": "yetAnotherChoice",
2368
- "Occurrence": {
2369
- "m": Infinity,
2370
- "n": 0,
2371
- },
2372
- "Operator": {
2373
- "Type": "default",
2374
- "Value": "null",
2375
- },
2376
- "Type": [
2377
- {
2378
- "Operator": {
2379
- "Type": "ge",
2380
- "Value": {
2381
- "Type": "literal",
2382
- "Unwrapped": false,
2383
- "Value": 1,
2384
- },
2385
- },
2386
- "Type": "float",
2387
- },
2388
- "null",
2389
- ],
2390
- },
2391
- ],
2392
- "Type": "group",
2393
- },
2394
- ]
2395
- `;
2396
-
2397
- exports[`parser > can parse ranges 1`] = `
2398
- [
2399
- {
2400
- "Comments": [],
2401
- "IsChoiceAddition": false,
2402
- "Name": "device-address",
2403
- "PropertyType": [
2404
- {
2405
- "Type": "group",
2406
- "Unwrapped": false,
2407
- "Value": "byte",
2408
- },
2409
- ],
2410
- "Type": "variable",
2411
- },
2412
- {
2413
- "Comments": [],
2414
- "IsChoiceAddition": false,
2415
- "Name": "max-byte",
2416
- "PropertyType": [
2417
- {
2418
- "Type": "literal",
2419
- "Unwrapped": false,
2420
- "Value": 255,
2421
- },
2422
- "float",
2423
- "int",
2424
- ],
2425
- "Type": "variable",
2426
- },
2427
- {
2428
- "Comments": [],
2429
- "IsChoiceAddition": false,
2430
- "Name": "my_uri",
2431
- "PropertyType": [
2432
- {
2433
- "Type": "tag",
2434
- "Unwrapped": false,
2435
- "Value": {
2436
- "NumericPart": 6.32,
2437
- "TypePart": "tstr",
2438
- },
2439
- },
2440
- "tstr",
2441
- ],
2442
- "Type": "variable",
2443
- },
2444
- {
2445
- "Comments": [],
2446
- "IsChoiceAddition": false,
2447
- "Name": "byte",
2448
- "PropertyType": [
2449
- {
2450
- "Type": "range",
2451
- "Unwrapped": false,
2452
- "Value": {
2453
- "Inclusive": true,
2454
- "Max": {
2455
- "Type": "group",
2456
- "Unwrapped": false,
2457
- "Value": "max-byte",
2458
- },
2459
- "Min": {
2460
- "Type": "literal",
2461
- "Unwrapped": false,
2462
- "Value": 0,
2463
- },
2464
- },
2465
- },
2466
- ],
2467
- "Type": "variable",
2468
- },
2469
- {
2470
- "Comments": [],
2471
- "IsChoiceAddition": false,
2472
- "Name": "first-non-byte",
2473
- "PropertyType": [
2474
- {
2475
- "Type": "literal",
2476
- "Unwrapped": false,
2477
- "Value": 256,
2478
- },
2479
- ],
2480
- "Type": "variable",
2481
- },
2482
- {
2483
- "Comments": [],
2484
- "IsChoiceAddition": false,
2485
- "Name": "byte1",
2486
- "PropertyType": [
2487
- {
2488
- "Type": "range",
2489
- "Unwrapped": false,
2490
- "Value": {
2491
- "Inclusive": false,
2492
- "Max": {
2493
- "Type": "group",
2494
- "Unwrapped": false,
2495
- "Value": "first-non-byte",
2496
- },
2497
- "Min": {
2498
- "Type": "literal",
2499
- "Unwrapped": false,
2500
- "Value": 0,
2501
- },
2502
- },
2503
- },
2504
- ],
2505
- "Type": "variable",
2506
- },
2507
- {
2508
- "Comments": [],
2509
- "IsChoiceAddition": false,
2510
- "Name": "min..max",
2511
- "PropertyType": [
2512
- {
2513
- "Type": "literal",
2514
- "Unwrapped": false,
2515
- "Value": 0,
2516
- },
2517
- ],
2518
- "Type": "variable",
2519
- },
2520
- {
2521
- "Comments": [],
2522
- "IsChoiceAddition": false,
2523
- "Name": "byte2",
2524
- "PropertyType": [
2525
- {
2526
- "Type": "group",
2527
- "Unwrapped": false,
2528
- "Value": "min..max...first-non-byte",
2529
- },
2530
- ],
2531
- "Type": "variable",
2532
- },
2533
- {
2534
- "Comments": [],
2535
- "IsChoiceAddition": false,
2536
- "Name": "byte3",
2537
- "PropertyType": [
2538
- {
2539
- "Type": "range",
2540
- "Unwrapped": false,
2541
- "Value": {
2542
- "Inclusive": false,
2543
- "Max": {
2544
- "Type": "group",
2545
- "Unwrapped": false,
2546
- "Value": "first-non-byte",
2547
- },
2548
- "Min": "min..max",
2549
- },
2550
- },
2551
- ],
2552
- "Type": "variable",
2553
- },
2554
- {
2555
- "Comments": [],
2556
- "IsChoiceAddition": false,
2557
- "Name": "js-int",
2558
- "PropertyType": [
2559
- {
2560
- "Type": "range",
2561
- "Unwrapped": false,
2562
- "Value": {
2563
- "Inclusive": true,
2564
- "Max": {
2565
- "Type": "literal",
2566
- "Unwrapped": false,
2567
- "Value": 9007199254740991,
2568
- },
2569
- "Min": {
2570
- "Type": "literal",
2571
- "Unwrapped": false,
2572
- "Value": -9007199254740991,
2573
- },
2574
- },
2575
- },
2576
- ],
2577
- "Type": "variable",
2578
- },
2579
- {
2580
- "Comments": [],
2581
- "IsChoiceAddition": false,
2582
- "Name": "scale",
2583
- "PropertyType": [
2584
- {
2585
- "Operator": {
2586
- "Type": "default",
2587
- "Value": {
2588
- "Type": "literal",
2589
- "Unwrapped": false,
2590
- "Value": 1,
2591
- },
2592
- },
2593
- "Type": {
2594
- "Type": "range",
2595
- "Unwrapped": false,
2596
- "Value": {
2597
- "Inclusive": true,
2598
- "Max": {
2599
- "Type": "literal",
2600
- "Unwrapped": false,
2601
- "Value": 2,
2602
- },
2603
- "Min": {
2604
- "Type": "literal",
2605
- "Unwrapped": false,
2606
- "Value": 0.1,
2607
- },
2608
- },
2609
- },
2610
- },
2611
- ],
2612
- "Type": "variable",
2613
- },
2614
- ]
2615
- `;
2616
-
2617
- exports[`parser > can parse unwrapped arrays 1`] = `
2618
- [
2619
- {
2620
- "Comments": [],
2621
- "Name": "basic-header",
2622
- "Type": "array",
2623
- "Values": [
2624
- {
2625
- "Comments": [],
2626
- "HasCut": true,
2627
- "Name": "field1",
2628
- "Occurrence": {
2629
- "m": 1,
2630
- "n": 1,
2631
- },
2632
- "Type": [
2633
- "int",
2634
- ],
2635
- },
2636
- {
2637
- "Comments": [],
2638
- "HasCut": true,
2639
- "Name": "field2",
2640
- "Occurrence": {
2641
- "m": 1,
2642
- "n": 1,
2643
- },
2644
- "Type": [
2645
- "text",
2646
- ],
2647
- },
2648
- ],
2649
- },
2650
- {
2651
- "Comments": [],
2652
- "Name": "advanced-header",
2653
- "Type": "array",
2654
- "Values": [
2655
- {
2656
- "Comments": [],
2657
- "HasCut": false,
2658
- "Name": "",
2659
- "Occurrence": {
2660
- "m": 1,
2661
- "n": 1,
2662
- },
2663
- "Type": [
2664
- {
2665
- "Type": "group",
2666
- "Unwrapped": true,
2667
- "Value": "basic-header",
2668
- },
2669
- ],
2670
- },
2671
- {
2672
- "Comments": [],
2673
- "HasCut": true,
2674
- "Name": "field3",
2675
- "Occurrence": {
2676
- "m": 1,
2677
- "n": 1,
2678
- },
2679
- "Type": [
2680
- "bytes",
2681
- ],
2682
- },
2683
- {
2684
- "Comments": [],
2685
- "HasCut": true,
2686
- "Name": "field4",
2687
- "Occurrence": {
2688
- "m": 1,
2689
- "n": 1,
2690
- },
2691
- "Type": [
2692
- {
2693
- "Type": "group",
2694
- "Unwrapped": true,
2695
- "Value": "time",
2696
- },
2697
- ],
2698
- },
2699
- ],
2700
- },
2701
- ]
2702
- `;
2703
-
2704
- exports[`parser > should correctly parse CDDL file 1`] = `
2705
- [
2706
- {
2707
- "Comments": [],
2708
- "IsChoiceAddition": false,
2709
- "Name": "Example",
2710
- "Properties": [
2711
- {
2712
- "Comments": [
2713
- {
2714
- "Content": "summary of test",
2715
- "Leading": false,
2716
- "Type": "comment",
2717
- },
2718
- ],
2719
- "HasCut": true,
2720
- "Name": "title",
2721
- "Occurrence": {
2722
- "m": 1,
2723
- "n": 1,
2724
- },
2725
- "Type": [
2726
- "tstr",
2727
- ],
2728
- },
2729
- {
2730
- "Comments": [
2731
- {
2732
- "Content": "longer description of test",
2733
- "Leading": false,
2734
- "Type": "comment",
2735
- },
2736
- ],
2737
- "HasCut": true,
2738
- "Name": "description",
2739
- "Occurrence": {
2740
- "m": Infinity,
2741
- "n": 0,
2742
- },
2743
- "Type": [
2744
- "tstr",
2745
- ],
2746
- },
2747
- {
2748
- "Comments": [
2749
- {
2750
- "Content": "Is this a success or failure test",
2751
- "Leading": false,
2752
- "Type": "comment",
2753
- },
2754
- ],
2755
- "HasCut": true,
2756
- "Name": "fail",
2757
- "Occurrence": {
2758
- "m": Infinity,
2759
- "n": 0,
2760
- },
2761
- "Type": [
2762
- "bool",
2763
- ],
2764
- },
2765
- {
2766
- "Comments": [
2767
- {
2768
- "Content": "Inputs to create the test",
2769
- "Leading": false,
2770
- "Type": "comment",
2771
- },
2772
- ],
2773
- "HasCut": true,
2774
- "Name": "input",
2775
- "Occurrence": {
2776
- "m": 1,
2777
- "n": 1,
2778
- },
2779
- "Type": [
2780
- {
2781
- "Type": "group",
2782
- "Unwrapped": false,
2783
- "Value": "Inputs",
2784
- },
2785
- ],
2786
- },
2787
- {
2788
- "Comments": [
2789
- {
2790
- "Content": "Intermediate values for debugging",
2791
- "Leading": false,
2792
- "Type": "comment",
2793
- },
2794
- ],
2795
- "HasCut": true,
2796
- "Name": "intermediates",
2797
- "Occurrence": {
2798
- "m": Infinity,
2799
- "n": 0,
2800
- },
2801
- "Type": [
2802
- {
2803
- "Type": "group",
2804
- "Unwrapped": false,
2805
- "Value": "Intermediates",
2806
- },
2807
- ],
2808
- },
2809
- {
2810
- "Comments": [
2811
- {
2812
- "Content": "Outputs of the test",
2813
- "Leading": false,
2814
- "Type": "comment",
2815
- },
2816
- ],
2817
- "HasCut": true,
2818
- "Name": "output",
2819
- "Occurrence": {
2820
- "m": 1,
2821
- "n": 1,
2822
- },
2823
- "Type": [
2824
- {
2825
- "Type": "group",
2826
- "Unwrapped": false,
2827
- "Value": "Outputs",
2828
- },
2829
- ],
2830
- },
2831
- {
2832
- "Comments": [],
2833
- "HasCut": true,
2834
- "Name": "attire",
2835
- "Occurrence": {
2836
- "m": 1,
2837
- "n": 1,
2838
- },
2839
- "Type": [
2840
- {
2841
- "Type": "literal",
2842
- "Unwrapped": false,
2843
- "Value": "bow tie",
2844
- },
2845
- ],
2846
- },
2847
- {
2848
- "Comments": [],
2849
- "HasCut": true,
2850
- "Name": "someBool",
2851
- "Occurrence": {
2852
- "m": 1,
2853
- "n": 1,
2854
- },
2855
- "Type": [
2856
- {
2857
- "Type": "literal",
2858
- "Unwrapped": false,
2859
- "Value": true,
2860
- },
2861
- ],
2862
- },
2863
- {
2864
- "Comments": [],
2865
- "HasCut": true,
2866
- "Name": "someOtherBool",
2867
- "Occurrence": {
2868
- "m": 1,
2869
- "n": 1,
2870
- },
2871
- "Type": [
2872
- {
2873
- "Type": "literal",
2874
- "Unwrapped": false,
2875
- "Value": false,
2876
- },
2877
- ],
2878
- },
2879
- {
2880
- "Comments": [],
2881
- "HasCut": true,
2882
- "Name": "count",
2883
- "Occurrence": {
2884
- "m": 1,
2885
- "n": 1,
2886
- },
2887
- "Type": [
2888
- {
2889
- "Type": "literal",
2890
- "Unwrapped": false,
2891
- "Value": 123,
2892
- },
2893
- ],
2894
- },
2895
- {
2896
- "Comments": [],
2897
- "HasCut": true,
2898
- "Name": "negative-count",
2899
- "Occurrence": {
2900
- "m": 1,
2901
- "n": 1,
2902
- },
2903
- "Type": [
2904
- {
2905
- "Type": "literal",
2906
- "Unwrapped": false,
2907
- "Value": -123,
2908
- },
2909
- ],
2910
- },
2911
- {
2912
- "Comments": [],
2913
- "HasCut": true,
2914
- "Name": "rating",
2915
- "Occurrence": {
2916
- "m": Infinity,
2917
- "n": 0,
2918
- },
2919
- "Type": [
2920
- {
2921
- "Type": "literal",
2922
- "Unwrapped": false,
2923
- "Value": 0.5724646875815566,
2924
- },
2925
- ],
2926
- },
2927
- {
2928
- "Comments": [],
2929
- "HasCut": true,
2930
- "Name": "hexa",
2931
- "Occurrence": {
2932
- "m": 1,
2933
- "n": 1,
2934
- },
2935
- "Type": [
2936
- {
2937
- "Type": "literal",
2938
- "Unwrapped": false,
2939
- "Value": "0x123",
2940
- },
2941
- ],
2942
- },
2943
- {
2944
- "Comments": [],
2945
- "HasCut": true,
2946
- "Name": "bin",
2947
- "Occurrence": {
2948
- "m": 1,
2949
- "n": 1,
2950
- },
2951
- "Type": [
2952
- {
2953
- "Type": "literal",
2954
- "Unwrapped": false,
2955
- "Value": "0b123",
2956
- },
2957
- ],
2958
- },
2959
- {
2960
- "Comments": [],
2961
- "HasCut": false,
2962
- "Name": "",
2963
- "Occurrence": {
2964
- "m": 1,
2965
- "n": 1,
2966
- },
2967
- "Type": [
2968
- {
2969
- "Type": "group",
2970
- "Unwrapped": false,
2971
- "Value": "foobar",
2972
- },
2973
- ],
2974
- },
2975
- {
2976
- "Comments": [],
2977
- "HasCut": true,
2978
- "Name": "samples",
2979
- "Occurrence": {
2980
- "m": 1,
2981
- "n": 1,
2982
- },
2983
- "Type": [
2984
- {
2985
- "Comments": [],
2986
- "Name": "",
2987
- "Type": "array",
2988
- "Values": [
2989
- {
2990
- "Comments": [],
2991
- "HasCut": false,
2992
- "Name": "",
2993
- "Occurrence": {
2994
- "m": Infinity,
2995
- "n": 1,
2996
- },
2997
- "Type": "float",
2998
- },
2999
- ],
3000
- },
3001
- ],
3002
- },
3003
- {
3004
- "Comments": [],
3005
- "HasCut": true,
3006
- "Name": "multitype",
3007
- "Occurrence": {
3008
- "m": 1,
3009
- "n": 1,
3010
- },
3011
- "Type": [
3012
- "float",
3013
- "tstr",
3014
- {
3015
- "Type": "literal",
3016
- "Unwrapped": false,
3017
- "Value": "foobar",
3018
- },
3019
- ],
3020
- },
3021
- {
3022
- "Comments": [],
3023
- "HasCut": true,
3024
- "Name": "my_uri",
3025
- "Occurrence": {
3026
- "m": 1,
3027
- "n": 1,
3028
- },
3029
- "Type": [
3030
- {
3031
- "Type": "tag",
3032
- "Unwrapped": false,
3033
- "Value": {
3034
- "NumericPart": 6.32,
3035
- "TypePart": "tstr",
3036
- },
3037
- },
3038
- "tstr",
3039
- ],
3040
- },
3041
- ],
3042
- "Type": "group",
3043
- },
3044
- ]
3045
- `;