aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/naoina/toml/parse.peg.go
blob: d7de73b19c45a675bbcb2ab03700309d562921de (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
package toml

import (
    "fmt"
    "math"
    "sort"
    "strconv"
)

const endSymbol rune = 1114112

/* The rule types inferred from the grammar are below. */
type pegRule uint8

const (
    ruleUnknown pegRule = iota
    ruleTOML
    ruleExpression
    rulenewline
    rulews
    rulewsnl
    rulecomment
    rulekeyval
    rulekey
    rulebareKey
    rulequotedKey
    ruleval
    ruletable
    rulestdTable
    rulearrayTable
    ruleinlineTable
    ruleinlineTableKeyValues
    ruletableKey
    ruletableKeySep
    ruleinlineTableValSep
    ruleinteger
    ruleint
    rulefloat
    rulefrac
    ruleexp
    rulestring
    rulebasicString
    rulebasicChar
    ruleescaped
    rulebasicUnescaped
    ruleescape
    rulemlBasicString
    rulemlBasicBody
    ruleliteralString
    ruleliteralChar
    rulemlLiteralString
    rulemlLiteralBody
    rulemlLiteralChar
    rulehexdigit
    rulehexQuad
    ruleboolean
    ruledateFullYear
    ruledateMonth
    ruledateMDay
    ruletimeHour
    ruletimeMinute
    ruletimeSecond
    ruletimeSecfrac
    ruletimeNumoffset
    ruletimeOffset
    rulepartialTime
    rulefullDate
    rulefullTime
    ruledatetime
    ruledigit
    ruledigitDual
    ruledigitQuad
    rulearray
    rulearrayValues
    rulearraySep
    ruleAction0
    rulePegText
    ruleAction1
    ruleAction2
    ruleAction3
    ruleAction4
    ruleAction5
    ruleAction6
    ruleAction7
    ruleAction8
    ruleAction9
    ruleAction10
    ruleAction11
    ruleAction12
    ruleAction13
    ruleAction14
    ruleAction15
    ruleAction16
    ruleAction17
    ruleAction18
    ruleAction19
    ruleAction20
    ruleAction21
    ruleAction22
    ruleAction23
    ruleAction24
)

var rul3s = [...]string{
    "Unknown",
    "TOML",
    "Expression",
    "newline",
    "ws",
    "wsnl",
    "comment",
    "keyval",
    "key",
    "bareKey",
    "quotedKey",
    "val",
    "table",
    "stdTable",
    "arrayTable",
    "inlineTable",
    "inlineTableKeyValues",
    "tableKey",
    "tableKeySep",
    "inlineTableValSep",
    "integer",
    "int",
    "float",
    "frac",
    "exp",
    "string",
    "basicString",
    "basicChar",
    "escaped",
    "basicUnescaped",
    "escape",
    "mlBasicString",
    "mlBasicBody",
    "literalString",
    "literalChar",
    "mlLiteralString",
    "mlLiteralBody",
    "mlLiteralChar",
    "hexdigit",
    "hexQuad",
    "boolean",
    "dateFullYear",
    "dateMonth",
    "dateMDay",
    "timeHour",
    "timeMinute",
    "timeSecond",
    "timeSecfrac",
    "timeNumoffset",
    "timeOffset",
    "partialTime",
    "fullDate",
    "fullTime",
    "datetime",
    "digit",
    "digitDual",
    "digitQuad",
    "array",
    "arrayValues",
    "arraySep",
    "Action0",
    "PegText",
    "Action1",
    "Action2",
    "Action3",
    "Action4",
    "Action5",
    "Action6",
    "Action7",
    "Action8",
    "Action9",
    "Action10",
    "Action11",
    "Action12",
    "Action13",
    "Action14",
    "Action15",
    "Action16",
    "Action17",
    "Action18",
    "Action19",
    "Action20",
    "Action21",
    "Action22",
    "Action23",
    "Action24",
}

type token32 struct {
    pegRule
    begin, end uint32
}

func (t *token32) String() string {
    return fmt.Sprintf("\x1B[34m%v\x1B[m %v %v", rul3s[t.pegRule], t.begin, t.end)
}

type node32 struct {
    token32
    up, next *node32
}

func (node *node32) print(pretty bool, buffer string) {
    var print func(node *node32, depth int)
    print = func(node *node32, depth int) {
        for node != nil {
            for c := 0; c < depth; c++ {
                fmt.Printf(" ")
            }
            rule := rul3s[node.pegRule]
            quote := strconv.Quote(string(([]rune(buffer)[node.begin:node.end])))
            if !pretty {
                fmt.Printf("%v %v\n", rule, quote)
            } else {
                fmt.Printf("\x1B[34m%v\x1B[m %v\n", rule, quote)
            }
            if node.up != nil {
                print(node.up, depth+1)
            }
            node = node.next
        }
    }
    print(node, 0)
}

func (node *node32) Print(buffer string) {
    node.print(false, buffer)
}

func (node *node32) PrettyPrint(buffer string) {
    node.print(true, buffer)
}

type tokens32 struct {
    tree []token32
}

func (t *tokens32) Trim(length uint32) {
    t.tree = t.tree[:length]
}

func (t *tokens32) Print() {
    for _, token := range t.tree {
        fmt.Println(token.String())
    }
}

func (t *tokens32) AST() *node32 {
    type element struct {
        node *node32
        down *element
    }
    tokens := t.Tokens()
    var stack *element
    for _, token := range tokens {
        if token.begin == token.end {
            continue
        }
        node := &node32{token32: token}
        for stack != nil && stack.node.begin >= token.begin && stack.node.end <= token.end {
            stack.node.next = node.up
            node.up = stack.node
            stack = stack.down
        }
        stack = &element{node: node, down: stack}
    }
    if stack != nil {
        return stack.node
    }
    return nil
}

func (t *tokens32) PrintSyntaxTree(buffer string) {
    t.AST().Print(buffer)
}

func (t *tokens32) PrettyPrintSyntaxTree(buffer string) {
    t.AST().PrettyPrint(buffer)
}

func (t *tokens32) Add(rule pegRule, begin, end, index uint32) {
    if tree := t.tree; int(index) >= len(tree) {
        expanded := make([]token32, 2*len(tree))
        copy(expanded, tree)
        t.tree = expanded
    }
    t.tree[index] = token32{
        pegRule: rule,
        begin:   begin,
        end:     end,
    }
}

func (t *tokens32) Tokens() []token32 {
    return t.tree
}

type tomlParser struct {
    toml

    Buffer string
    buffer []rune
    rules  [86]func() bool
    parse  func(rule ...int) error
    reset  func()
    Pretty bool
    tokens32
}

func (p *tomlParser) Parse(rule ...int) error {
    return p.parse(rule...)
}

func (p *tomlParser) Reset() {
    p.reset()
}

type textPosition struct {
    line, symbol int
}

type textPositionMap map[int]textPosition

func translatePositions(buffer []rune, positions []int) textPositionMap {
    length, translations, j, line, symbol := len(positions), make(textPositionMap, len(positions)), 0, 1, 0
    sort.Ints(positions)

search:
    for i, c := range buffer {
        if c == '\n' {
            line, symbol = line+1, 0
        } else {
            symbol++
        }
        if i == positions[j] {
            translations[positions[j]] = textPosition{line, symbol}
            for j++; j < length; j++ {
                if i != positions[j] {
                    continue search
                }
            }
            break search
        }
    }

    return translations
}

type parseError struct {
    p   *tomlParser
    max token32
}

func (e *parseError) Error() string {
    tokens, error := []token32{e.max}, "\n"
    positions, p := make([]int, 2*len(tokens)), 0
    for _, token := range tokens {
        positions[p], p = int(token.begin), p+1
        positions[p], p = int(token.end), p+1
    }
    translations := translatePositions(e.p.buffer, positions)
    format := "parse error near %v (line %v symbol %v - line %v symbol %v):\n%v\n"
    if e.p.Pretty {
        format = "parse error near \x1B[34m%v\x1B[m (line %v symbol %v - line %v symbol %v):\n%v\n"
    }
    for _, token := range tokens {
        begin, end := int(token.begin), int(token.end)
        error += fmt.Sprintf(format,
            rul3s[token.pegRule],
            translations[begin].line, translations[begin].symbol,
            translations[end].line, translations[end].symbol,
            strconv.Quote(string(e.p.buffer[begin:end])))
    }

    return error
}

func (p *tomlParser) PrintSyntaxTree() {
    if p.Pretty {
        p.tokens32.PrettyPrintSyntaxTree(p.Buffer)
    } else {
        p.tokens32.PrintSyntaxTree(p.Buffer)
    }
}

func (p *tomlParser) Execute() {
    buffer, _buffer, text, begin, end := p.Buffer, p.buffer, "", 0, 0
    for _, token := range p.Tokens() {
        switch token.pegRule {

        case rulePegText:
            begin, end = int(token.begin), int(token.end)
            text = string(_buffer[begin:end])

        case ruleAction0:
            _ = buffer
        case ruleAction1:
            p.SetTableString(begin, end)
        case ruleAction2:
            p.AddLineCount(end - begin)
        case ruleAction3:
            p.AddLineCount(end - begin)
        case ruleAction4:
            p.AddKeyValue()
        case ruleAction5:
            p.SetKey(p.buffer, begin, end)
        case ruleAction6:
            p.SetKey(p.buffer, begin-1, end+1)
        case ruleAction7:
            p.SetTime(begin, end)
        case ruleAction8:
            p.SetFloat64(begin, end)
        case ruleAction9:
            p.SetInt64(begin, end)
        case ruleAction10:
            p.SetString(begin, end)
        case ruleAction11:
            p.SetBool(begin, end)
        case ruleAction12:
            p.SetArray(begin, end)
        case ruleAction13:
            p.SetTable(p.buffer, begin, end)
        case ruleAction14:
            p.SetArrayTable(p.buffer, begin, end)
        case ruleAction15:
            p.StartInlineTable()
        case ruleAction16:
            p.EndInlineTable()
        case ruleAction17:
            p.SetBasicString(p.buffer, begin, end)
        case ruleAction18:
            p.SetMultilineString()
        case ruleAction19:
            p.AddMultilineBasicBody(p.buffer, begin, end)
        case ruleAction20:
            p.SetLiteralString(p.buffer, begin, end)
        case ruleAction21:
            p.SetMultilineLiteralString(p.buffer, begin, end)
        case ruleAction22:
            p.StartArray()
        case ruleAction23:
            p.AddArrayVal()
        case ruleAction24:
            p.AddArrayVal()

        }
    }
    _, _, _, _, _ = buffer, _buffer, text, begin, end
}

func (p *tomlParser) Init() {
    var (
        max                  token32
        position, tokenIndex uint32
        buffer               []rune
    )
    p.reset = func() {
        max = token32{}
        position, tokenIndex = 0, 0

        p.buffer = []rune(p.Buffer)
        if len(p.buffer) == 0 || p.buffer[len(p.buffer)-1] != endSymbol {
            p.buffer = append(p.buffer, endSymbol)
        }
        buffer = p.buffer
    }
    p.reset()

    _rules := p.rules
    tree := tokens32{tree: make([]token32, math.MaxInt16)}
    p.parse = func(rule ...int) error {
        r := 1
        if len(rule) > 0 {
            r = rule[0]
        }
        matches := p.rules[r]()
        p.tokens32 = tree
        if matches {
            p.Trim(tokenIndex)
            return nil
        }
        return &parseError{p, max}
    }

    add := func(rule pegRule, begin uint32) {
        tree.Add(rule, begin, position, tokenIndex)
        tokenIndex++
        if begin != position && position > max.end {
            max = token32{rule, begin, position}
        }
    }

    matchDot := func() bool {
        if buffer[position] != endSymbol {
            position++
            return true
        }
        return false
    }

    /*matchChar := func(c byte) bool {
        if buffer[position] == c {
            position++
            return true
        }
        return false
    }*/

    /*matchRange := func(lower byte, upper byte) bool {
        if c := buffer[position]; c >= lower && c <= upper {
            position++
            return true
        }
        return false
    }*/

    _rules = [...]func() bool{
        nil,
        /* 0 TOML <- <(Expression (newline Expression)* newline? !. Action0)> */
        func() bool {
            position0, tokenIndex0 := position, tokenIndex
            {
                position1 := position
                if !_rules[ruleExpression]() {
                    goto l0
                }
            l2:
                {
                    position3, tokenIndex3 := position, tokenIndex
                    if !_rules[rulenewline]() {
                        goto l3
                    }
                    if !_rules[ruleExpression]() {
                        goto l3
                    }
                    goto l2
                l3:
                    position, tokenIndex = position3, tokenIndex3
                }
                {
                    position4, tokenIndex4 := position, tokenIndex
                    if !_rules[rulenewline]() {
                        goto l4
                    }
                    goto l5
                l4:
                    position, tokenIndex = position4, tokenIndex4
                }
            l5:
                {
                    position6, tokenIndex6 := position, tokenIndex
                    if !matchDot() {
                        goto l6
                    }
                    goto l0
                l6:
                    position, tokenIndex = position6, tokenIndex6
                }
                {
                    add(ruleAction0, position)
                }
                add(ruleTOML, position1)
            }
            return true
        l0:
            position, tokenIndex = position0, tokenIndex0
            return false
        },
        /* 1 Expression <- <((<(ws table ws comment? (wsnl keyval ws comment?)*)> Action1) / (ws keyval ws comment?) / (ws comment?) / ws)> */
        func() bool {
            position8, tokenIndex8 := position, tokenIndex
            {
                position9 := position
                {
                    position10, tokenIndex10 := position, tokenIndex
                    {
                        position12 := position
                        if !_rules[rulews]() {
                            goto l11
                        }
                        {
                            position13 := position
                            {
                                position14, tokenIndex14 := position, tokenIndex
                                {
                                    position16 := position
                                    if buffer[position] != rune('[') {
                                        goto l15
                                    }
                                    position++
                                    if !_rules[rulews]() {
                                        goto l15
                                    }
                                    {
                                        position17 := position
                                        if !_rules[ruletableKey]() {
                                            goto l15
                                        }
                                        add(rulePegText, position17)
                                    }
                                    if !_rules[rulews]() {
                                        goto l15
                                    }
                                    if buffer[position] != rune(']') {
                                        goto l15
                                    }
                                    position++
                                    {
                                        add(ruleAction13, position)
                                    }
                                    add(rulestdTable, position16)
                                }
                                goto l14
                            l15:
                                position, tokenIndex = position14, tokenIndex14
                                {
                                    position19 := position
                                    if buffer[position] != rune('[') {
                                        goto l11
                                    }
                                    position++
                                    if buffer[position] != rune('[') {
                                        goto l11
                                    }
                                    position++
                                    if !_rules[rulews]() {
                                        goto l11
                                    }
                                    {
                                        position20 := position
                                        if !_rules[ruletableKey]() {
                                            goto l11
                                        }
                                        add(rulePegText, position20)
                                    }
                                    if !_rules[rulews]() {
                                        goto l11
                                    }
                                    if buffer[position] != rune(']') {
                                        goto l11
                                    }
                                    position++
                                    if buffer[position] != rune(']') {
                                        goto l11
                                    }
                                    position++
                                    {
                                        add(ruleAction14, position)
                                    }
                                    add(rulearrayTable, position19)
                                }
                            }
                        l14:
                            add(ruletable, position13)
                        }
                        if !_rules[rulews]() {
                            goto l11
                        }
                        {
                            position22, tokenIndex22 := position, tokenIndex
                            if !_rules[rulecomment]() {
                                goto l22
                            }
                            goto l23
                        l22:
                            position, tokenIndex = position22, tokenIndex22
                        }
                    l23:
                    l24:
                        {
                            position25, tokenIndex25 := position, tokenIndex
                            if !_rules[rulewsnl]() {
                                goto l25
                            }
                            if !_rules[rulekeyval]() {
                                goto l25
                            }
                            if !_rules[rulews]() {
                                goto l25
                            }
                            {
                                position26, tokenIndex26 := position, tokenIndex
                                if !_rules[rulecomment]() {
                                    goto l26
                                }
                                goto l27
                            l26:
                                position, tokenIndex = position26, tokenIndex26
                            }
                        l27:
                            goto l24
                        l25:
                            position, tokenIndex = position25, tokenIndex25
                        }
                        add(rulePegText, position12)
                    }
                    {
                        add(ruleAction1, position)
                    }
                    goto l10
                l11:
                    position, tokenIndex = position10, tokenIndex10
                    if !_rules[rulews]() {
                        goto l29
                    }
                    if !_rules[rulekeyval]() {
                        goto l29
                    }
                    if !_rules[rulews]() {
                        goto l29
                    }
                    {
                        position30, tokenIndex30 := position, tokenIndex
                        if !_rules[rulecomment]() {
                            goto l30
                        }
                        goto l31
                    l30:
                        position, tokenIndex = position30, tokenIndex30
                    }
                l31:
                    goto l10
                l29:
                    position, tokenIndex = position10, tokenIndex10
                    if !_rules[rulews]() {
                        goto l32
                    }
                    {
                        position33, tokenIndex33 := position, tokenIndex
                        if !_rules[rulecomment]() {
                            goto l33
                        }
                        goto l34
                    l33:
                        position, tokenIndex = position33, tokenIndex33
                    }
                l34:
                    goto l10
                l32:
                    position, tokenIndex = position10, tokenIndex10
                    if !_rules[rulews]() {
                        goto l8
                    }
                }
            l10:
                add(ruleExpression, position9)
            }
            return true
        l8:
            position, tokenIndex = position8, tokenIndex8
            return false
        },
        /* 2 newline <- <(<('\r' / '\n')+> Action2)> */
        func() bool {
            position35, tokenIndex35 := position, tokenIndex
            {
                position36 := position
                {
                    position37 := position
                    {
                        position40, tokenIndex40 := position, tokenIndex
                        if buffer[position] != rune('\r') {
                            goto l41
                        }
                        position++
                        goto l40
                    l41:
                        position, tokenIndex = position40, tokenIndex40
                        if buffer[position] != rune('\n') {
                            goto l35
                        }
                        position++
                    }
                l40:
                l38:
                    {
                        position39, tokenIndex39 := position, tokenIndex
                        {
                            position42, tokenIndex42 := position, tokenIndex
                            if buffer[position] != rune('\r') {
                                goto l43
                            }
                            position++
                            goto l42
                        l43:
                            position, tokenIndex = position42, tokenIndex42
                            if buffer[position] != rune('\n') {
                                goto l39
                            }
                            position++
                        }
                    l42:
                        goto l38
                    l39:
                        position, tokenIndex = position39, tokenIndex39
                    }
                    add(rulePegText, position37)
                }
                {
                    add(ruleAction2, position)
                }
                add(rulenewline, position36)
            }
            return true
        l35:
            position, tokenIndex = position35, tokenIndex35
            return false
        },
        /* 3 ws <- <(' ' / '\t')*> */
        func() bool {
            {
                position46 := position
            l47:
                {
                    position48, tokenIndex48 := position, tokenIndex
                    {
                        position49, tokenIndex49 := position, tokenIndex
                        if buffer[position] != rune(' ') {
                            goto l50
                        }
                        position++
                        goto l49
                    l50:
                        position, tokenIndex = position49, tokenIndex49
                        if buffer[position] != rune('\t') {
                            goto l48
                        }
                        position++
                    }
                l49:
                    goto l47
                l48:
                    position, tokenIndex = position48, tokenIndex48
                }
                add(rulews, position46)
            }
            return true
        },
        /* 4 wsnl <- <((&('\t') '\t') | (&(' ') ' ') | (&('\n' | '\r') (<('\r' / '\n')> Action3)))*> */
        func() bool {
            {
                position52 := position
            l53:
                {
                    position54, tokenIndex54 := position, tokenIndex
                    {
                        switch buffer[position] {
                        case '\t':
                            if buffer[position] != rune('\t') {
                                goto l54
                            }
                            position++
                            break
                        case ' ':
                            if buffer[position] != rune(' ') {
                                goto l54
                            }
                            position++
                            break
                        default:
                            {
                                position56 := position
                                {
                                    position57, tokenIndex57 := position, tokenIndex
                                    if buffer[position] != rune('\r') {
                                        goto l58
                                    }
                                    position++
                                    goto l57
                                l58:
                                    position, tokenIndex = position57, tokenIndex57
                                    if buffer[position] != rune('\n') {
                                        goto l54
                                    }
                                    position++
                                }
                            l57:
                                add(rulePegText, position56)
                            }
                            {
                                add(ruleAction3, position)
                            }
                            break
                        }
                    }

                    goto l53
                l54:
                    position, tokenIndex = position54, tokenIndex54
                }
                add(rulewsnl, position52)
            }
            return true
        },
        /* 5 comment <- <('#' <('\t' / [ -\U0010ffff])*>)> */
        func() bool {
            position60, tokenIndex60 := position, tokenIndex
            {
                position61 := position
                if buffer[position] != rune('#') {
                    goto l60
                }
                position++
                {
                    position62 := position
                l63:
                    {
                        position64, tokenIndex64 := position, tokenIndex
                        {
                            position65, tokenIndex65 := position, tokenIndex
                            if buffer[position] != rune('\t') {
                                goto l66
                            }
                            position++
                            goto l65
                        l66:
                            position, tokenIndex = position65, tokenIndex65
                            if c := buffer[position]; c < rune(' ') || c > rune('\U0010ffff') {
                                goto l64
                            }
                            position++
                        }
                    l65:
                        goto l63
                    l64:
                        position, tokenIndex = position64, tokenIndex64
                    }
                    add(rulePegText, position62)
                }
                add(rulecomment, position61)
            }
            return true
        l60:
            position, tokenIndex = position60, tokenIndex60
            return false
        },
        /* 6 keyval <- <(key ws '=' ws val Action4)> */
        func() bool {
            position67, tokenIndex67 := position, tokenIndex
            {
                position68 := position
                if !_rules[rulekey]() {
                    goto l67
                }
                if !_rules[rulews]() {
                    goto l67
                }
                if buffer[position] != rune('=') {
                    goto l67
                }
                position++
                if !_rules[rulews]() {
                    goto l67
                }
                if !_rules[ruleval]() {
                    goto l67
                }
                {
                    add(ruleAction4, position)
                }
                add(rulekeyval, position68)
            }
            return true
        l67:
            position, tokenIndex = position67, tokenIndex67
            return false
        },
        /* 7 key <- <(bareKey / quotedKey)> */
        func() bool {
            position70, tokenIndex70 := position, tokenIndex
            {
                position71 := position
                {
                    position72, tokenIndex72 := position, tokenIndex
                    {
                        position74 := position
                        {
                            position75 := position
                            {
                                switch buffer[position] {
                                case '_':
                                    if buffer[position] != rune('_') {
                                        goto l73
                                    }
                                    position++
                                    break
                                case '-':
                                    if buffer[position] != rune('-') {
                                        goto l73
                                    }
                                    position++
                                    break
                                case 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z':
                                    if c := buffer[position]; c < rune('a') || c > rune('z') {
                                        goto l73
                                    }
                                    position++
                                    break
                                case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
                                    if c := buffer[position]; c < rune('0') || c > rune('9') {
                                        goto l73
                                    }
                                    position++
                                    break
                                default:
                                    if c := buffer[position]; c < rune('A') || c > rune('Z') {
                                        goto l73
                                    }
                                    position++
                                    break
                                }
                            }

                        l76:
                            {
                                position77, tokenIndex77 := position, tokenIndex
                                {
                                    switch buffer[position] {
                                    case '_':
                                        if buffer[position] != rune('_') {
                                            goto l77
                                        }
                                        position++
                                        break
                                    case '-':
                                        if buffer[position] != rune('-') {
                                            goto l77
                                        }
                                        position++
                                        break
                                    case 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z':
                                        if c := buffer[position]; c < rune('a') || c > rune('z') {
                                            goto l77
                                        }
                                        position++
                                        break
                                    case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
                                        if c := buffer[position]; c < rune('0') || c > rune('9') {
                                            goto l77
                                        }
                                        position++
                                        break
                                    default:
                                        if c := buffer[position]; c < rune('A') || c > rune('Z') {
                                            goto l77
                                        }
                                        position++
                                        break
                                    }
                                }

                                goto l76
                            l77:
                                position, tokenIndex = position77, tokenIndex77
                            }
                            add(rulePegText, position75)
                        }
                        {
                            add(ruleAction5, position)
                        }
                        add(rulebareKey, position74)
                    }
                    goto l72
                l73:
                    position, tokenIndex = position72, tokenIndex72
                    {
                        position81 := position
                        if buffer[position] != rune('"') {
                            goto l70
                        }
                        position++
                        {
                            position82 := position
                            if !_rules[rulebasicChar]() {
                                goto l70
                            }
                        l83:
                            {
                                position84, tokenIndex84 := position, tokenIndex
                                if !_rules[rulebasicChar]() {
                                    goto l84
                                }
                                goto l83
                            l84:
                                position, tokenIndex = position84, tokenIndex84
                            }
                            add(rulePegText, position82)
                        }
                        if buffer[position] != rune('"') {
                            goto l70
                        }
                        position++
                        {
                            add(ruleAction6, position)
                        }
                        add(rulequotedKey, position81)
                    }
                }
            l72:
                add(rulekey, position71)
            }
            return true
        l70:
            position, tokenIndex = position70, tokenIndex70
            return false
        },
        /* 8 bareKey <- <(<((&('_') '_') | (&('-') '-') | (&('a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z') [a-z]) | (&('0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9') [0-9]) | (&('A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z') [A-Z]))+> Action5)> */
        nil,
        /* 9 quotedKey <- <('"' <basicChar+> '"' Action6)> */
        nil,
        /* 10 val <- <((<datetime> Action7) / (<float> Action8) / ((&('{') inlineTable) | (&('[') (<array> Action12)) | (&('f' | 't') (<boolean> Action11)) | (&('"' | '\'') (<string> Action10)) | (&('+' | '-' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9') (<integer> Action9))))> */
        func() bool {
            position88, tokenIndex88 := position, tokenIndex
            {
                position89 := position
                {
                    position90, tokenIndex90 := position, tokenIndex
                    {
                        position92 := position
                        {
                            position93 := position
                            {
                                position94, tokenIndex94 := position, tokenIndex
                                {
                                    position96 := position
                                    {
                                        position97 := position
                                        {
                                            position98 := position
                                            if !_rules[ruledigitDual]() {
                                                goto l95
                                            }
                                            if !_rules[ruledigitDual]() {
                                                goto l95
                                            }
                                            add(ruledigitQuad, position98)
                                        }
                                        add(ruledateFullYear, position97)
                                    }
                                    if buffer[position] != rune('-') {
                                        goto l95
                                    }
                                    position++
                                    {
                                        position99 := position
                                        if !_rules[ruledigitDual]() {
                                            goto l95
                                        }
                                        add(ruledateMonth, position99)
                                    }
                                    if buffer[position] != rune('-') {
                                        goto l95
                                    }
                                    position++
                                    {
                                        position100 := position
                                        if !_rules[ruledigitDual]() {
                                            goto l95
                                        }
                                        add(ruledateMDay, position100)
                                    }
                                    add(rulefullDate, position96)
                                }
                                {
                                    position101, tokenIndex101 := position, tokenIndex
                                    if buffer[position] != rune('T') {
                                        goto l101
                                    }
                                    position++
                                    {
                                        position103 := position
                                        if !_rules[rulepartialTime]() {
                                            goto l101
                                        }
                                        {
                                            position104 := position
                                            {
                                                position105, tokenIndex105 := position, tokenIndex
                                                if buffer[position] != rune('Z') {
                                                    goto l106
                                                }
                                                position++
                                                goto l105
                                            l106:
                                                position, tokenIndex = position105, tokenIndex105
                                                {
                                                    position107 := position
                                                    {
                                                        position108, tokenIndex108 := position, tokenIndex
                                                        if buffer[position] != rune('-') {
                                                            goto l109
                                                        }
                                                        position++
                                                        goto l108
                                                    l109:
                                                        position, tokenIndex = position108, tokenIndex108
                                                        if buffer[position] != rune('+') {
                                                            goto l101
                                                        }
                                                        position++
                                                    }
                                                l108:
                                                    if !_rules[ruletimeHour]() {
                                                        goto l101
                                                    }
                                                    if buffer[position] != rune(':') {
                                                        goto l101
                                                    }
                                                    position++
                                                    if !_rules[ruletimeMinute]() {
                                                        goto l101
                                                    }
                                                    add(ruletimeNumoffset, position107)
                                                }
                                            }
                                        l105:
                                            add(ruletimeOffset, position104)
                                        }
                                        add(rulefullTime, position103)
                                    }
                                    goto l102
                                l101:
                                    position, tokenIndex = position101, tokenIndex101
                                }
                            l102:
                                goto l94
                            l95:
                                position, tokenIndex = position94, tokenIndex94
                                if !_rules[rulepartialTime]() {
                                    goto l91
                                }
                            }
                        l94:
                            add(ruledatetime, position93)
                        }
                        add(rulePegText, position92)
                    }
                    {
                        add(ruleAction7, position)
                    }
                    goto l90
                l91:
                    position, tokenIndex = position90, tokenIndex90
                    {
                        position112 := position
                        {
                            position113 := position
                            if !_rules[ruleinteger]() {
                                goto l111
                            }
                            {
                                position114, tokenIndex114 := position, tokenIndex
                                if !_rules[rulefrac]() {
                                    goto l115
                                }
                                {
                                    position116, tokenIndex116 := position, tokenIndex
                                    if !_rules[ruleexp]() {
                                        goto l116
                                    }
                                    goto l117
                                l116:
                                    position, tokenIndex = position116, tokenIndex116
                                }
                            l117:
                                goto l114
                            l115:
                                position, tokenIndex = position114, tokenIndex114
                                {
                                    position118, tokenIndex118 := position, tokenIndex
                                    if !_rules[rulefrac]() {
                                        goto l118
                                    }
                                    goto l119
                                l118:
                                    position, tokenIndex = position118, tokenIndex118
                                }
                            l119:
                                if !_rules[ruleexp]() {
                                    goto l111
                                }
                            }
                        l114:
                            add(rulefloat, position113)
                        }
                        add(rulePegText, position112)
                    }
                    {
                        add(ruleAction8, position)
                    }
                    goto l90
                l111:
                    position, tokenIndex = position90, tokenIndex90
                    {
                        switch buffer[position] {
                        case '{':
                            {
                                position122 := position
                                if buffer[position] != rune('{') {
                                    goto l88
                                }
                                position++
                                {
                                    add(ruleAction15, position)
                                }
                                if !_rules[rulews]() {
                                    goto l88
                                }
                                {
                                    position124 := position
                                l125:
                                    {
                                        position126, tokenIndex126 := position, tokenIndex
                                        if !_rules[rulekeyval]() {
                                            goto l126
                                        }
                                        {
                                            position127, tokenIndex127 := position, tokenIndex
                                            {
                                                position129 := position
                                                if !_rules[rulews]() {
                                                    goto l127
                                                }
                                                if buffer[position] != rune(',') {
                                                    goto l127
                                                }
                                                position++
                                                if !_rules[rulews]() {
                                                    goto l127
                                                }
                                                add(ruleinlineTableValSep, position129)
                                            }
                                            goto l128
                                        l127:
                                            position, tokenIndex = position127, tokenIndex127
                                        }
                                    l128:
                                        goto l125
                                    l126:
                                        position, tokenIndex = position126, tokenIndex126
                                    }
                                    add(ruleinlineTableKeyValues, position124)
                                }
                                if !_rules[rulews]() {
                                    goto l88
                                }
                                if buffer[position] != rune('}') {
                                    goto l88
                                }
                                position++
                                {
                                    add(ruleAction16, position)
                                }
                                add(ruleinlineTable, position122)
                            }
                            break
                        case '[':
                            {
                                position131 := position
                                {
                                    position132 := position
                                    if buffer[position] != rune('[') {
                                        goto l88
                                    }
                                    position++
                                    {
                                        add(ruleAction22, position)
                                    }
                                    if !_rules[rulewsnl]() {
                                        goto l88
                                    }
                                    {
                                        position134, tokenIndex134 := position, tokenIndex
                                        {
                                            position136 := position
                                            if !_rules[ruleval]() {
                                                goto l134
                                            }
                                            {
                                                add(ruleAction23, position)
                                            }
                                        l138:
                                            {
                                                position139, tokenIndex139 := position, tokenIndex
                                                if !_rules[rulewsnl]() {
                                                    goto l139
                                                }
                                                {
                                                    position140, tokenIndex140 := position, tokenIndex
                                                    if !_rules[rulecomment]() {
                                                        goto l140
                                                    }
                                                    goto l141
                                                l140:
                                                    position, tokenIndex = position140, tokenIndex140
                                                }
                                            l141:
                                                if !_rules[rulewsnl]() {
                                                    goto l139
                                                }
                                                if !_rules[rulearraySep]() {
                                                    goto l139
                                                }
                                                if !_rules[rulewsnl]() {
                                                    goto l139
                                                }
                                                {
                                                    position142, tokenIndex142 := position, tokenIndex
                                                    if !_rules[rulecomment]() {
                                                        goto l142
                                                    }
                                                    goto l143
                                                l142:
                                                    position, tokenIndex = position142, tokenIndex142
                                                }
                                            l143:
                                                if !_rules[rulewsnl]() {
                                                    goto l139
                                                }
                                                if !_rules[ruleval]() {
                                                    goto l139
                                                }
                                                {
                                                    add(ruleAction24, position)
                                                }
                                                goto l138
                                            l139:
                                                position, tokenIndex = position139, tokenIndex139
                                            }
                                            if !_rules[rulewsnl]() {
                                                goto l134
                                            }
                                            {
                                                position145, tokenIndex145 := position, tokenIndex
                                                if !_rules[rulearraySep]() {
                                                    goto l145
                                                }
                                                goto l146
                                            l145:
                                                position, tokenIndex = position145, tokenIndex145
                                            }
                                        l146:
                                            if !_rules[rulewsnl]() {
                                                goto l134
                                            }
                                            {
                                                position147, tokenIndex147 := position, tokenIndex
                                                if !_rules[rulecomment]() {
                                                    goto l147
                                                }
                                                goto l148
                                            l147:
                                                position, tokenIndex = position147, tokenIndex147
                                            }
                                        l148:
                                            add(rulearrayValues, position136)
                                        }
                                        goto l135
                                    l134:
                                        position, tokenIndex = position134, tokenIndex134
                                    }
                                l135:
                                    if !_rules[rulewsnl]() {
                                        goto l88
                                    }
                                    if buffer[position] != rune(']') {
                                        goto l88
                                    }
                                    position++
                                    add(rulearray, position132)
                                }
                                add(rulePegText, position131)
                            }
                            {
                                add(ruleAction12, position)
                            }
                            break
                        case 'f', 't':
                            {
                                position150 := position
                                {
                                    position151 := position
                                    {
                                        position152, tokenIndex152 := position, tokenIndex
                                        if buffer[position] != rune('t') {
                                            goto l153
                                        }
                                        position++
                                        if buffer[position] != rune('r') {
                                            goto l153
                                        }
                                        position++
                                        if buffer[position] != rune('u') {
                                            goto l153
                                        }
                                        position++
                                        if buffer[position] != rune('e') {
                                            goto l153
                                        }
                                        position++
                                        goto l152
                                    l153:
                                        position, tokenIndex = position152, tokenIndex152
                                        if buffer[position] != rune('f') {
                                            goto l88
                                        }
                                        position++
                                        if buffer[position] != rune('a') {
                                            goto l88
                                        }
                                        position++
                                        if buffer[position] != rune('l') {
                                            goto l88
                                        }
                                        position++
                                        if buffer[position] != rune('s') {
                                            goto l88
                                        }
                                        position++
                                        if buffer[position] != rune('e') {
                                            goto l88
                                        }
                                        position++
                                    }
                                l152:
                                    add(ruleboolean, position151)
                                }
                                add(rulePegText, position150)
                            }
                            {
                                add(ruleAction11, position)
                            }
                            break
                        case '"', '\'':
                            {
                                position155 := position
                                {
                                    position156 := position
                                    {
                                        position157, tokenIndex157 := position, tokenIndex
                                        {
                                            position159 := position
                                            if buffer[position] != rune('\'') {
                                                goto l158
                                            }
                                            position++
                                            if buffer[position] != rune('\'') {
                                                goto l158
                                            }
                                            position++
                                            if buffer[position] != rune('\'') {
                                                goto l158
                                            }
                                            position++
                                            {
                                                position160 := position
                                                {
                                                    position161 := position
                                                l162:
                                                    {
                                                        position163, tokenIndex163 := position, tokenIndex
                                                        {
                                                            position164, tokenIndex164 := position, tokenIndex
                                                            if buffer[position] != rune('\'') {
                                                                goto l164
                                                            }
                                                            position++
                                                            if buffer[position] != rune('\'') {
                                                                goto l164
                                                            }
                                                            position++
                                                            if buffer[position] != rune('\'') {
                                                                goto l164
                                                            }
                                                            position++
                                                            goto l163
                                                        l164:
                                                            position, tokenIndex = position164, tokenIndex164
                                                        }
                                                        {
                                                            position165, tokenIndex165 := position, tokenIndex
                                                            {
                                                                position167 := position
                                                                {
                                                                    position168, tokenIndex168 := position, tokenIndex
                                                                    if buffer[position] != rune('\t') {
                                                                        goto l169
                                                                    }
                                                                    position++
                                                                    goto l168
                                                                l169:
                                                                    position, tokenIndex = position168, tokenIndex168
                                                                    if c := buffer[position]; c < rune(' ') || c > rune('\U0010ffff') {
                                                                        goto l166
                                                                    }
                                                                    position++
                                                                }
                                                            l168:
                                                                add(rulemlLiteralChar, position167)
                                                            }
                                                            goto l165
                                                        l166:
                                                            position, tokenIndex = position165, tokenIndex165
                                                            if !_rules[rulenewline]() {
                                                                goto l163
                                                            }
                                                        }
                                                    l165:
                                                        goto l162
                                                    l163:
                                                        position, tokenIndex = position163, tokenIndex163
                                                    }
                                                    add(rulemlLiteralBody, position161)
                                                }
                                                add(rulePegText, position160)
                                            }
                                            if buffer[position] != rune('\'') {
                                                goto l158
                                            }
                                            position++
                                            if buffer[position] != rune('\'') {
                                                goto l158
                                            }
                                            position++
                                            if buffer[position] != rune('\'') {
                                                goto l158
                                            }
                                            position++
                                            {
                                                add(ruleAction21, position)
                                            }
                                            add(rulemlLiteralString, position159)
                                        }
                                        goto l157
                                    l158:
                                        position, tokenIndex = position157, tokenIndex157
                                        {
                                            position172 := position
                                            if buffer[position] != rune('\'') {
                                                goto l171
                                            }
                                            position++
                                            {
                                                position173 := position
                                            l174:
                                                {
                                                    position175, tokenIndex175 := position, tokenIndex
                                                    {
                                                        position176 := position
                                                        {
                                                            switch buffer[position] {
                                                            case '\t':
                                                                if buffer[position] != rune('\t') {
                                                                    goto l175
                                                                }
                                                                position++
                                                                break
                                                            case ' ', '!', '"', '#', '$', '%', '&':
                                                                if c := buffer[position]; c < rune(' ') || c > rune('&') {
                                                                    goto l175
                                                                }
                                                                position++
                                                                break
                                                            default:
                                                                if c := buffer[position]; c < rune('(') || c > rune('\U0010ffff') {
                                                                    goto l175
                                                                }
                                                                position++
                                                                break
                                                            }
                                                        }

                                                        add(ruleliteralChar, position176)
                                                    }
                                                    goto l174
                                                l175:
                                                    position, tokenIndex = position175, tokenIndex175
                                                }
                                                add(rulePegText, position173)
                                            }
                                            if buffer[position] != rune('\'') {
                                                goto l171
                                            }
                                            position++
                                            {
                                                add(ruleAction20, position)
                                            }
                                            add(ruleliteralString, position172)
                                        }
                                        goto l157
                                    l171:
                                        position, tokenIndex = position157, tokenIndex157
                                        {
                                            position180 := position
                                            if buffer[position] != rune('"') {
                                                goto l179
                                            }
                                            position++
                                            if buffer[position] != rune('"') {
                                                goto l179
                                            }
                                            position++
                                            if buffer[position] != rune('"') {
                                                goto l179
                                            }
                                            position++
                                            {
                                                position181 := position
                                            l182:
                                                {
                                                    position183, tokenIndex183 := position, tokenIndex
                                                    {
                                                        position184, tokenIndex184 := position, tokenIndex
                                                        {
                                                            position186 := position
                                                            {
                                                                position187, tokenIndex187 := position, tokenIndex
                                                                if !_rules[rulebasicChar]() {
                                                                    goto l188
                                                                }
                                                                goto l187
                                                            l188:
                                                                position, tokenIndex = position187, tokenIndex187
                                                                if !_rules[rulenewline]() {
                                                                    goto l185
                                                                }
                                                            }
                                                        l187:
                                                            add(rulePegText, position186)
                                                        }
                                                        {
                                                            add(ruleAction19, position)
                                                        }
                                                        goto l184
                                                    l185:
                                                        position, tokenIndex = position184, tokenIndex184
                                                        if !_rules[ruleescape]() {
                                                            goto l183
                                                        }
                                                        if !_rules[rulenewline]() {
                                                            goto l183
                                                        }
                                                        if !_rules[rulewsnl]() {
                                                            goto l183
                                                        }
                                                    }
                                                l184:
                                                    goto l182
                                                l183:
                                                    position, tokenIndex = position183, tokenIndex183
                                                }
                                                add(rulemlBasicBody, position181)
                                            }
                                            if buffer[position] != rune('"') {
                                                goto l179
                                            }
                                            position++
                                            if buffer[position] != rune('"') {
                                                goto l179
                                            }
                                            position++
                                            if buffer[position] != rune('"') {
                                                goto l179
                                            }
                                            position++
                                            {
                                                add(ruleAction18, position)
                                            }
                                            add(rulemlBasicString, position180)
                                        }
                                        goto l157
                                    l179:
                                        position, tokenIndex = position157, tokenIndex157
                                        {
                                            position191 := position
                                            {
                                                position192 := position
                                                if buffer[position] != rune('"') {
                                                    goto l88
                                                }
                                                position++
                                            l193:
                                                {
                                                    position194, tokenIndex194 := position, tokenIndex
                                                    if !_rules[rulebasicChar]() {
                                                        goto l194
                                                    }
                                                    goto l193
                                                l194:
                                                    position, tokenIndex = position194, tokenIndex194
                                                }
                                                if buffer[position] != rune('"') {
                                                    goto l88
                                                }
                                                position++
                                                add(rulePegText, position192)
                                            }
                                            {
                                                add(ruleAction17, position)
                                            }
                                            add(rulebasicString, position191)
                                        }
                                    }
                                l157:
                                    add(rulestring, position156)
                                }
                                add(rulePegText, position155)
                            }
                            {
                                add(ruleAction10, position)
                            }
                            break
                        default:
                            {
                                position197 := position
                                if !_rules[ruleinteger]() {
                                    goto l88
                                }
                                add(rulePegText, position197)
                            }
                            {
                                add(ruleAction9, position)
                            }
                            break
                        }
                    }

                }
            l90:
                add(ruleval, position89)
            }
            return true
        l88:
            position, tokenIndex = position88, tokenIndex88
            return false
        },
        /* 11 table <- <(stdTable / arrayTable)> */
        nil,
        /* 12 stdTable <- <('[' ws <tableKey> ws ']' Action13)> */
        nil,
        /* 13 arrayTable <- <('[' '[' ws <tableKey> ws (']' ']') Action14)> */
        nil,
        /* 14 inlineTable <- <('{' Action15 ws inlineTableKeyValues ws '}' Action16)> */
        nil,
        /* 15 inlineTableKeyValues <- <(keyval inlineTableValSep?)*> */
        nil,
        /* 16 tableKey <- <(key (tableKeySep key)*)> */
        func() bool {
            position204, tokenIndex204 := position, tokenIndex
            {
                position205 := position
                if !_rules[rulekey]() {
                    goto l204
                }
            l206:
                {
                    position207, tokenIndex207 := position, tokenIndex
                    {
                        position208 := position
                        if !_rules[rulews]() {
                            goto l207
                        }
                        if buffer[position] != rune('.') {
                            goto l207
                        }
                        position++
                        if !_rules[rulews]() {
                            goto l207
                        }
                        add(ruletableKeySep, position208)
                    }
                    if !_rules[rulekey]() {
                        goto l207
                    }
                    goto l206
                l207:
                    position, tokenIndex = position207, tokenIndex207
                }
                add(ruletableKey, position205)
            }
            return true
        l204:
            position, tokenIndex = position204, tokenIndex204
            return false
        },
        /* 17 tableKeySep <- <(ws '.' ws)> */
        nil,
        /* 18 inlineTableValSep <- <(ws ',' ws)> */
        nil,
        /* 19 integer <- <(('-' / '+')? int)> */
        func() bool {
            position211, tokenIndex211 := position, tokenIndex
            {
                position212 := position
                {
                    position213, tokenIndex213 := position, tokenIndex
                    {
                        position215, tokenIndex215 := position, tokenIndex
                        if buffer[position] != rune('-') {
                            goto l216
                        }
                        position++
                        goto l215
                    l216:
                        position, tokenIndex = position215, tokenIndex215
                        if buffer[position] != rune('+') {
                            goto l213
                        }
                        position++
                    }
                l215:
                    goto l214
                l213:
                    position, tokenIndex = position213, tokenIndex213
                }
            l214:
                {
                    position217 := position
                    {
                        position218, tokenIndex218 := position, tokenIndex
                        if c := buffer[position]; c < rune('1') || c > rune('9') {
                            goto l219
                        }
                        position++
                        {
                            position222, tokenIndex222 := position, tokenIndex
                            if !_rules[ruledigit]() {
                                goto l223
                            }
                            goto l222
                        l223:
                            position, tokenIndex = position222, tokenIndex222
                            if buffer[position] != rune('_') {
                                goto l219
                            }
                            position++
                            if !_rules[ruledigit]() {
                                goto l219
                            }
                        }
                    l222:
                    l220:
                        {
                            position221, tokenIndex221 := position, tokenIndex
                            {
                                position224, tokenIndex224 := position, tokenIndex
                                if !_rules[ruledigit]() {
                                    goto l225
                                }
                                goto l224
                            l225:
                                position, tokenIndex = position224, tokenIndex224
                                if buffer[position] != rune('_') {
                                    goto l221
                                }
                                position++
                                if !_rules[ruledigit]() {
                                    goto l221
                                }
                            }
                        l224:
                            goto l220
                        l221:
                            position, tokenIndex = position221, tokenIndex221
                        }
                        goto l218
                    l219:
                        position, tokenIndex = position218, tokenIndex218
                        if !_rules[ruledigit]() {
                            goto l211
                        }
                    }
                l218:
                    add(ruleint, position217)
                }
                add(ruleinteger, position212)
            }
            return true
        l211:
            position, tokenIndex = position211, tokenIndex211
            return false
        },
        /* 20 int <- <(([1-9] (digit / ('_' digit))+) / digit)> */
        nil,
        /* 21 float <- <(integer ((frac exp?) / (frac? exp)))> */
        nil,
        /* 22 frac <- <('.' digit (digit / ('_' digit))*)> */
        func() bool {
            position228, tokenIndex228 := position, tokenIndex
            {
                position229 := position
                if buffer[position] != rune('.') {
                    goto l228
                }
                position++
                if !_rules[ruledigit]() {
                    goto l228
                }
            l230:
                {
                    position231, tokenIndex231 := position, tokenIndex
                    {
                        position232, tokenIndex232 := position, tokenIndex
                        if !_rules[ruledigit]() {
                            goto l233
                        }
                        goto l232
                    l233:
                        position, tokenIndex = position232, tokenIndex232
                        if buffer[position] != rune('_') {
                            goto l231
                        }
                        position++
                        if !_rules[ruledigit]() {
                            goto l231
                        }
                    }
                l232:
                    goto l230
                l231:
                    position, tokenIndex = position231, tokenIndex231
                }
                add(rulefrac, position229)
            }
            return true
        l228:
            position, tokenIndex = position228, tokenIndex228
            return false
        },
        /* 23 exp <- <(('e' / 'E') ('-' / '+')? digit (digit / ('_' digit))*)> */
        func() bool {
            position234, tokenIndex234 := position, tokenIndex
            {
                position235 := position
                {
                    position236, tokenIndex236 := position, tokenIndex
                    if buffer[position] != rune('e') {
                        goto l237
                    }
                    position++
                    goto l236
                l237:
                    position, tokenIndex = position236, tokenIndex236
                    if buffer[position] != rune('E') {
                        goto l234
                    }
                    position++
                }
            l236:
                {
                    position238, tokenIndex238 := position, tokenIndex
                    {
                        position240, tokenIndex240 := position, tokenIndex
                        if buffer[position] != rune('-') {
                            goto l241
                        }
                        position++
                        goto l240
                    l241:
                        position, tokenIndex = position240, tokenIndex240
                        if buffer[position] != rune('+') {
                            goto l238
                        }
                        position++
                    }
                l240:
                    goto l239
                l238:
                    position, tokenIndex = position238, tokenIndex238
                }
            l239:
                if !_rules[ruledigit]() {
                    goto l234
                }
            l242:
                {
                    position243, tokenIndex243 := position, tokenIndex
                    {
                        position244, tokenIndex244 := position, tokenIndex
                        if !_rules[ruledigit]() {
                            goto l245
                        }
                        goto l244
                    l245:
                        position, tokenIndex = position244, tokenIndex244
                        if buffer[position] != rune('_') {
                            goto l243
                        }
                        position++
                        if !_rules[ruledigit]() {
                            goto l243
                        }
                    }
                l244:
                    goto l242
                l243:
                    position, tokenIndex = position243, tokenIndex243
                }
                add(ruleexp, position235)
            }
            return true
        l234:
            position, tokenIndex = position234, tokenIndex234
            return false
        },
        /* 24 string <- <(mlLiteralString / literalString / mlBasicString / basicString)> */
        nil,
        /* 25 basicString <- <(<('"' basicChar* '"')> Action17)> */
        nil,
        /* 26 basicChar <- <(basicUnescaped / escaped)> */
        func() bool {
            position248, tokenIndex248 := position, tokenIndex
            {
                position249 := position
                {
                    position250, tokenIndex250 := position, tokenIndex
                    {
                        position252 := position
                        {
                            switch buffer[position] {
                            case ' ', '!':
                                if c := buffer[position]; c < rune(' ') || c > rune('!') {
                                    goto l251
                                }
                                position++
                                break
                            case '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[':
                                if c := buffer[position]; c < rune('#') || c > rune('[') {
                                    goto l251
                                }
                                position++
                                break
                            default:
                                if c := buffer[position]; c < rune(']') || c > rune('\U0010ffff') {
                                    goto l251
                                }
                                position++
                                break
                            }
                        }

                        add(rulebasicUnescaped, position252)
                    }
                    goto l250
                l251:
                    position, tokenIndex = position250, tokenIndex250
                    {
                        position254 := position
                        if !_rules[ruleescape]() {
                            goto l248
                        }
                        {
                            switch buffer[position] {
                            case 'U':
                                if buffer[position] != rune('U') {
                                    goto l248
                                }
                                position++
                                if !_rules[rulehexQuad]() {
                                    goto l248
                                }
                                if !_rules[rulehexQuad]() {
                                    goto l248
                                }
                                break
                            case 'u':
                                if buffer[position] != rune('u') {
                                    goto l248
                                }
                                position++
                                if !_rules[rulehexQuad]() {
                                    goto l248
                                }
                                break
                            case '\\':
                                if buffer[position] != rune('\\') {
                                    goto l248
                                }
                                position++
                                break
                            case '/':
                                if buffer[position] != rune('/') {
                                    goto l248
                                }
                                position++
                                break
                            case '"':
                                if buffer[position] != rune('"') {
                                    goto l248
                                }
                                position++
                                break
                            case 'r':
                                if buffer[position] != rune('r') {
                                    goto l248
                                }
                                position++
                                break
                            case 'f':
                                if buffer[position] != rune('f') {
                                    goto l248
                                }
                                position++
                                break
                            case 'n':
                                if buffer[position] != rune('n') {
                                    goto l248
                                }
                                position++
                                break
                            case 't':
                                if buffer[position] != rune('t') {
                                    goto l248
                                }
                                position++
                                break
                            default:
                                if buffer[position] != rune('b') {
                                    goto l248
                                }
                                position++
                                break
                            }
                        }

                        add(ruleescaped, position254)
                    }
                }
            l250:
                add(rulebasicChar, position249)
            }
            return true
        l248:
            position, tokenIndex = position248, tokenIndex248
            return false
        },
        /* 27 escaped <- <(escape ((&('U') ('U' hexQuad hexQuad)) | (&('u') ('u' hexQuad)) | (&('\\') '\\') | (&('/') '/') | (&('"') '"') | (&('r') 'r') | (&('f') 'f') | (&('n') 'n') | (&('t') 't') | (&('b') 'b')))> */
        nil,
        /* 28 basicUnescaped <- <((&(' ' | '!') [ -!]) | (&('#' | '$' | '%' | '&' | '\'' | '(' | ')' | '*' | '+' | ',' | '-' | '.' | '/' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | ':' | ';' | '<' | '=' | '>' | '?' | '@' | 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z' | '[') [#-[]) | (&(']' | '^' | '_' | '`' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z' | '{' | '|' | '}' | '~' | '\u007f' | '\u0080' | '\u0081' | '\u0082' | '\u0083' | '\u0084' | '\u0085' | '\u0086' | '\u0087' | '\u0088' | '\u0089' | '\u008a' | '\u008b' | '\u008c' | '\u008d' | '\u008e' | '\u008f' | '\u0090' | '\u0091' | '\u0092' | '\u0093' | '\u0094' | '\u0095' | '\u0096' | '\u0097' | '\u0098' | '\u0099' | '\u009a' | '\u009b' | '\u009c' | '\u009d' | '\u009e' | '\u009f' | '\u00a0' | '¡' | '¢' | '£' | '¤' | '¥' | '¦' | '§' | '¨' | '©' | 'ª' | '«' | '¬' | '\u00ad' | '®' | '¯' | '°' | '±' | '²' | '³' | '´' | 'µ' | '¶' | '·' | '¸' | '¹' | 'º' | '»' | '¼' | '½' | '¾' | '¿' | 'À' | 'Á' | 'Â' | 'Ã' | 'Ä' | 'Å' | 'Æ' | 'Ç' | 'È' | 'É' | 'Ê' | 'Ë' | 'Ì' | 'Í' | 'Î' | 'Ï' | 'Ð' | 'Ñ' | 'Ò' | 'Ó' | 'Ô' | 'Õ' | 'Ö' | '×' | 'Ø' | 'Ù' | 'Ú' | 'Û' | 'Ü' | 'Ý' | 'Þ' | 'ß' | 'à' | 'á' | 'â' | 'ã' | 'ä' | 'å' | 'æ' | 'ç' | 'è' | 'é' | 'ê' | 'ë' | 'ì' | 'í' | 'î' | 'ï' | 'ð' | 'ñ' | 'ò' | 'ó' | 'ô' | 'õ' | 'ö' | '÷' | 'ø' | 'ù' | 'ú' | 'û' | 'ü' | 'ý' | 'þ' | 'ÿ') []-\U0010ffff]))> */
        nil,
        /* 29 escape <- <'\\'> */
        func() bool {
            position258, tokenIndex258 := position, tokenIndex
            {
                position259 := position
                if buffer[position] != rune('\\') {
                    goto l258
                }
                position++
                add(ruleescape, position259)
            }
            return true
        l258:
            position, tokenIndex = position258, tokenIndex258
            return false
        },
        /* 30 mlBasicString <- <('"' '"' '"' mlBasicBody ('"' '"' '"') Action18)> */
        nil,
        /* 31 mlBasicBody <- <((<(basicChar / newline)> Action19) / (escape newline wsnl))*> */
        nil,
        /* 32 literalString <- <('\'' <literalChar*> '\'' Action20)> */
        nil,
        /* 33 literalChar <- <((&('\t') '\t') | (&(' ' | '!' | '"' | '#' | '$' | '%' | '&') [ -&]) | (&('(' | ')' | '*' | '+' | ',' | '-' | '.' | '/' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | ':' | ';' | '<' | '=' | '>' | '?' | '@' | 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z' | '[' | '\\' | ']' | '^' | '_' | '`' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z' | '{' | '|' | '}' | '~' | '\u007f' | '\u0080' | '\u0081' | '\u0082' | '\u0083' | '\u0084' | '\u0085' | '\u0086' | '\u0087' | '\u0088' | '\u0089' | '\u008a' | '\u008b' | '\u008c' | '\u008d' | '\u008e' | '\u008f' | '\u0090' | '\u0091' | '\u0092' | '\u0093' | '\u0094' | '\u0095' | '\u0096' | '\u0097' | '\u0098' | '\u0099' | '\u009a' | '\u009b' | '\u009c' | '\u009d' | '\u009e' | '\u009f' | '\u00a0' | '¡' | '¢' | '£' | '¤' | '¥' | '¦' | '§' | '¨' | '©' | 'ª' | '«' | '¬' | '\u00ad' | '®' | '¯' | '°' | '±' | '²' | '³' | '´' | 'µ' | '¶' | '·' | '¸' | '¹' | 'º' | '»' | '¼' | '½' | '¾' | '¿' | 'À' | 'Á' | 'Â' | 'Ã' | 'Ä' | 'Å' | 'Æ' | 'Ç' | 'È' | 'É' | 'Ê' | 'Ë' | 'Ì' | 'Í' | 'Î' | 'Ï' | 'Ð' | 'Ñ' | 'Ò' | 'Ó' | 'Ô' | 'Õ' | 'Ö' | '×' | 'Ø' | 'Ù' | 'Ú' | 'Û' | 'Ü' | 'Ý' | 'Þ' | 'ß' | 'à' | 'á' | 'â' | 'ã' | 'ä' | 'å' | 'æ' | 'ç' | 'è' | 'é' | 'ê' | 'ë' | 'ì' | 'í' | 'î' | 'ï' | 'ð' | 'ñ' | 'ò' | 'ó' | 'ô' | 'õ' | 'ö' | '÷' | 'ø' | 'ù' | 'ú' | 'û' | 'ü' | 'ý' | 'þ' | 'ÿ') [(-\U0010ffff]))> */
        nil,
        /* 34 mlLiteralString <- <('\'' '\'' '\'' <mlLiteralBody> ('\'' '\'' '\'') Action21)> */
        nil,
        /* 35 mlLiteralBody <- <(!('\'' '\'' '\'') (mlLiteralChar / newline))*> */
        nil,
        /* 36 mlLiteralChar <- <('\t' / [ -\U0010ffff])> */
        nil,
        /* 37 hexdigit <- <((&('a' | 'b' | 'c' | 'd' | 'e' | 'f') [a-f]) | (&('A' | 'B' | 'C' | 'D' | 'E' | 'F') [A-F]) | (&('0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9') [0-9]))> */
        func() bool {
            position267, tokenIndex267 := position, tokenIndex
            {
                position268 := position
                {
                    switch buffer[position] {
                    case 'a', 'b', 'c', 'd', 'e', 'f':
                        if c := buffer[position]; c < rune('a') || c > rune('f') {
                            goto l267
                        }
                        position++
                        break
                    case 'A', 'B', 'C', 'D', 'E', 'F':
                        if c := buffer[position]; c < rune('A') || c > rune('F') {
                            goto l267
                        }
                        position++
                        break
                    default:
                        if c := buffer[position]; c < rune('0') || c > rune('9') {
                            goto l267
                        }
                        position++
                        break
                    }
                }

                add(rulehexdigit, position268)
            }
            return true
        l267:
            position, tokenIndex = position267, tokenIndex267
            return false
        },
        /* 38 hexQuad <- <(hexdigit hexdigit hexdigit hexdigit)> */
        func() bool {
            position270, tokenIndex270 := position, tokenIndex
            {
                position271 := position
                if !_rules[rulehexdigit]() {
                    goto l270
                }
                if !_rules[rulehexdigit]() {
                    goto l270
                }
                if !_rules[rulehexdigit]() {
                    goto l270
                }
                if !_rules[rulehexdigit]() {
                    goto l270
                }
                add(rulehexQuad, position271)
            }
            return true
        l270:
            position, tokenIndex = position270, tokenIndex270
            return false
        },
        /* 39 boolean <- <(('t' 'r' 'u' 'e') / ('f' 'a' 'l' 's' 'e'))> */
        nil,
        /* 40 dateFullYear <- <digitQuad> */
        nil,
        /* 41 dateMonth <- <digitDual> */
        nil,
        /* 42 dateMDay <- <digitDual> */
        nil,
        /* 43 timeHour <- <digitDual> */
        func() bool {
            position276, tokenIndex276 := position, tokenIndex
            {
                position277 := position
                if !_rules[ruledigitDual]() {
                    goto l276
                }
                add(ruletimeHour, position277)
            }
            return true
        l276:
            position, tokenIndex = position276, tokenIndex276
            return false
        },
        /* 44 timeMinute <- <digitDual> */
        func() bool {
            position278, tokenIndex278 := position, tokenIndex
            {
                position279 := position
                if !_rules[ruledigitDual]() {
                    goto l278
                }
                add(ruletimeMinute, position279)
            }
            return true
        l278:
            position, tokenIndex = position278, tokenIndex278
            return false
        },
        /* 45 timeSecond <- <digitDual> */
        nil,
        /* 46 timeSecfrac <- <('.' digit+)> */
        nil,
        /* 47 timeNumoffset <- <(('-' / '+') timeHour ':' timeMinute)> */
        nil,
        /* 48 timeOffset <- <('Z' / timeNumoffset)> */
        nil,
        /* 49 partialTime <- <(timeHour ':' timeMinute ':' timeSecond timeSecfrac?)> */
        func() bool {
            position284, tokenIndex284 := position, tokenIndex
            {
                position285 := position
                if !_rules[ruletimeHour]() {
                    goto l284
                }
                if buffer[position] != rune(':') {
                    goto l284
                }
                position++
                if !_rules[ruletimeMinute]() {
                    goto l284
                }
                if buffer[position] != rune(':') {
                    goto l284
                }
                position++
                {
                    position286 := position
                    if !_rules[ruledigitDual]() {
                        goto l284
                    }
                    add(ruletimeSecond, position286)
                }
                {
                    position287, tokenIndex287 := position, tokenIndex
                    {
                        position289 := position
                        if buffer[position] != rune('.') {
                            goto l287
                        }
                        position++
                        if !_rules[ruledigit]() {
                            goto l287
                        }
                    l290:
                        {
                            position291, tokenIndex291 := position, tokenIndex
                            if !_rules[ruledigit]() {
                                goto l291
                            }
                            goto l290
                        l291:
                            position, tokenIndex = position291, tokenIndex291
                        }
                        add(ruletimeSecfrac, position289)
                    }
                    goto l288
                l287:
                    position, tokenIndex = position287, tokenIndex287
                }
            l288:
                add(rulepartialTime, position285)
            }
            return true
        l284:
            position, tokenIndex = position284, tokenIndex284
            return false
        },
        /* 50 fullDate <- <(dateFullYear '-' dateMonth '-' dateMDay)> */
        nil,
        /* 51 fullTime <- <(partialTime timeOffset)> */
        nil,
        /* 52 datetime <- <((fullDate ('T' fullTime)?) / partialTime)> */
        nil,
        /* 53 digit <- <[0-9]> */
        func() bool {
            position295, tokenIndex295 := position, tokenIndex
            {
                position296 := position
                if c := buffer[position]; c < rune('0') || c > rune('9') {
                    goto l295
                }
                position++
                add(ruledigit, position296)
            }
            return true
        l295:
            position, tokenIndex = position295, tokenIndex295
            return false
        },
        /* 54 digitDual <- <(digit digit)> */
        func() bool {
            position297, tokenIndex297 := position, tokenIndex
            {
                position298 := position
                if !_rules[ruledigit]() {
                    goto l297
                }
                if !_rules[ruledigit]() {
                    goto l297
                }
                add(ruledigitDual, position298)
            }
            return true
        l297:
            position, tokenIndex = position297, tokenIndex297
            return false
        },
        /* 55 digitQuad <- <(digitDual digitDual)> */
        nil,
        /* 56 array <- <('[' Action22 wsnl arrayValues? wsnl ']')> */
        nil,
        /* 57 arrayValues <- <(val Action23 (wsnl comment? wsnl arraySep wsnl comment? wsnl val Action24)* wsnl arraySep? wsnl comment?)> */
        nil,
        /* 58 arraySep <- <','> */
        func() bool {
            position302, tokenIndex302 := position, tokenIndex
            {
                position303 := position
                if buffer[position] != rune(',') {
                    goto l302
                }
                position++
                add(rulearraySep, position303)
            }
            return true
        l302:
            position, tokenIndex = position302, tokenIndex302
            return false
        },
        /* 60 Action0 <- <{ _ = buffer }> */
        nil,
        nil,
        /* 62 Action1 <- <{ p.SetTableString(begin, end) }> */
        nil,
        /* 63 Action2 <- <{ p.AddLineCount(end - begin) }> */
        nil,
        /* 64 Action3 <- <{ p.AddLineCount(end - begin) }> */
        nil,
        /* 65 Action4 <- <{ p.AddKeyValue() }> */
        nil,
        /* 66 Action5 <- <{ p.SetKey(p.buffer, begin, end) }> */
        nil,
        /* 67 Action6 <- <{ p.SetKey(p.buffer, begin-1, end+1) }> */
        nil,
        /* 68 Action7 <- <{ p.SetTime(begin, end) }> */
        nil,
        /* 69 Action8 <- <{ p.SetFloat64(begin, end) }> */
        nil,
        /* 70 Action9 <- <{ p.SetInt64(begin, end) }> */
        nil,
        /* 71 Action10 <- <{ p.SetString(begin, end) }> */
        nil,
        /* 72 Action11 <- <{ p.SetBool(begin, end) }> */
        nil,
        /* 73 Action12 <- <{ p.SetArray(begin, end) }> */
        nil,
        /* 74 Action13 <- <{ p.SetTable(p.buffer, begin, end) }> */
        nil,
        /* 75 Action14 <- <{ p.SetArrayTable(p.buffer, begin, end) }> */
        nil,
        /* 76 Action15 <- <{ p.StartInlineTable() }> */
        nil,
        /* 77 Action16 <- <{ p.EndInlineTable() }> */
        nil,
        /* 78 Action17 <- <{ p.SetBasicString(p.buffer, begin, end) }> */
        nil,
        /* 79 Action18 <- <{ p.SetMultilineString() }> */
        nil,
        /* 80 Action19 <- <{ p.AddMultilineBasicBody(p.buffer, begin, end) }> */
        nil,
        /* 81 Action20 <- <{ p.SetLiteralString(p.buffer, begin, end) }> */
        nil,
        /* 82 Action21 <- <{ p.SetMultilineLiteralString(p.buffer, begin, end) }> */
        nil,
        /* 83 Action22 <- <{ p.StartArray() }> */
        nil,
        /* 84 Action23 <- <{ p.AddArrayVal() }> */
        nil,
        /* 85 Action24 <- <{ p.AddArrayVal() }> */
        nil,
    }
    p.rules = _rules
}