@gmb/bitmark-parser-generator 4.13.0 → 4.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/bitmark-parser-generator.min.js +1 -1
- package/dist/browser/bundle-report.html +2 -2
- package/dist/browser/cjs/index.cjs +1338 -379
- package/dist/browser/cjs/index.cjs.map +1 -1
- package/dist/browser/cjs/index.d.cts +92 -10
- package/dist/browser/esm/index.d.ts +92 -10
- package/dist/browser/esm/index.js +1338 -379
- package/dist/browser/esm/index.js.map +1 -1
- package/dist/index.cjs +1338 -379
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +92 -10
- package/dist/index.d.ts +92 -10
- package/dist/index.js +1338 -379
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -632,6 +632,7 @@ var BitType = (0, import_superenum.superenum)({
|
|
|
632
632
|
surveyRatingOnce: "survey-rating-once",
|
|
633
633
|
table: "table",
|
|
634
634
|
tableAlt: "table-alt",
|
|
635
|
+
tableExtended: "table-extended",
|
|
635
636
|
tableImage: "table-image",
|
|
636
637
|
tableImageAlt: "table-image-alt",
|
|
637
638
|
takePicture: "take-picture",
|
|
@@ -762,6 +763,7 @@ var CardSetConfigKey = (0, import_superenum7.superenum)({
|
|
|
762
763
|
matchImagePairs: "matchImagePairs",
|
|
763
764
|
matchMatrix: "matchMatrix",
|
|
764
765
|
table: "table",
|
|
766
|
+
tableExtended: "tableExtended",
|
|
765
767
|
pronunciationTable: "pronunciationTable",
|
|
766
768
|
botActionResponses: "botActionResponses",
|
|
767
769
|
exampleBitList: "exampleBitList",
|
|
@@ -1252,6 +1254,7 @@ var propertyKeys = {
|
|
|
1252
1254
|
property_index: "@index",
|
|
1253
1255
|
property_internalComment: "@internalComment",
|
|
1254
1256
|
property_internalPrintPdf: "@internalPrintPdf",
|
|
1257
|
+
property_hasPrintRestriction: "@hasPrintRestriction",
|
|
1255
1258
|
property_isCaseSensitive: "@isCaseSensitive",
|
|
1256
1259
|
property_isInfoOnly: "@isInfoOnly",
|
|
1257
1260
|
property_isPublic: "@isPublic",
|
|
@@ -1375,6 +1378,10 @@ var propertyKeys = {
|
|
|
1375
1378
|
property_tableSearch: "@tableSearch",
|
|
1376
1379
|
property_tableSort: "@tableSort",
|
|
1377
1380
|
property_tableWhitespaceNoWrap: "@tableWhitespaceNoWrap",
|
|
1381
|
+
property_tableCellType: "@tableCellType",
|
|
1382
|
+
property_tableRowSpan: "@tableRowSpan",
|
|
1383
|
+
property_tableColSpan: "@tableColSpan",
|
|
1384
|
+
property_tableScope: "@tableScope",
|
|
1378
1385
|
property_tag: "@tag",
|
|
1379
1386
|
property_target: "@target",
|
|
1380
1387
|
property_technicalTerm: "@technicalTerm",
|
|
@@ -2457,6 +2464,47 @@ var CARDSETS = {
|
|
|
2457
2464
|
]
|
|
2458
2465
|
]
|
|
2459
2466
|
},
|
|
2467
|
+
[CardSetConfigKey.tableExtended]: {
|
|
2468
|
+
variants: [
|
|
2469
|
+
// Side 1
|
|
2470
|
+
[
|
|
2471
|
+
// Variant 1..N
|
|
2472
|
+
{
|
|
2473
|
+
tags: [
|
|
2474
|
+
{
|
|
2475
|
+
key: ConfigKey.group_standardItemLeadInstructionHint,
|
|
2476
|
+
description: "Standard tags for lead, instruction, and hint."
|
|
2477
|
+
},
|
|
2478
|
+
{
|
|
2479
|
+
key: ConfigKey.tag_title,
|
|
2480
|
+
description: "Title of the table."
|
|
2481
|
+
},
|
|
2482
|
+
{
|
|
2483
|
+
key: ConfigKey.property_tableCellType,
|
|
2484
|
+
description: "Table cell type (th/td).",
|
|
2485
|
+
format: TagFormat.plainText
|
|
2486
|
+
},
|
|
2487
|
+
{
|
|
2488
|
+
key: ConfigKey.property_tableRowSpan,
|
|
2489
|
+
description: "Number of rows the cell spans.",
|
|
2490
|
+
format: TagFormat.number
|
|
2491
|
+
},
|
|
2492
|
+
{
|
|
2493
|
+
key: ConfigKey.property_tableColSpan,
|
|
2494
|
+
description: "Number of columns the cell spans.",
|
|
2495
|
+
format: TagFormat.number
|
|
2496
|
+
},
|
|
2497
|
+
{
|
|
2498
|
+
key: ConfigKey.property_tableScope,
|
|
2499
|
+
description: "Scope attribute for header cells.",
|
|
2500
|
+
format: TagFormat.plainText
|
|
2501
|
+
}
|
|
2502
|
+
],
|
|
2503
|
+
repeatCount: Count.infinity
|
|
2504
|
+
}
|
|
2505
|
+
]
|
|
2506
|
+
]
|
|
2507
|
+
},
|
|
2460
2508
|
[CardSetConfigKey.pronunciationTable]: {
|
|
2461
2509
|
variants: [
|
|
2462
2510
|
// Side 1
|
|
@@ -3331,6 +3379,12 @@ var GROUPS = {
|
|
|
3331
3379
|
key: ConfigKey.property_internalPrintPdf,
|
|
3332
3380
|
description: "Url of the internal print PDF for the book",
|
|
3333
3381
|
format: TagFormat.plainText
|
|
3382
|
+
},
|
|
3383
|
+
{
|
|
3384
|
+
key: ConfigKey.property_hasPrintRestriction,
|
|
3385
|
+
description: "If true, the book has print restrictions",
|
|
3386
|
+
format: TagFormat.boolean,
|
|
3387
|
+
defaultValue: "true"
|
|
3334
3388
|
}
|
|
3335
3389
|
]
|
|
3336
3390
|
},
|
|
@@ -8578,6 +8632,12 @@ var BITS = {
|
|
|
8578
8632
|
],
|
|
8579
8633
|
cardSet: CardSetConfigKey.table
|
|
8580
8634
|
},
|
|
8635
|
+
[BitType.tableExtended]: {
|
|
8636
|
+
since: "4.14.0",
|
|
8637
|
+
baseBitType: BitType.table,
|
|
8638
|
+
description: "Extended table bit, used to create complex tables with all HTML table features",
|
|
8639
|
+
cardSet: CardSetConfigKey.tableExtended
|
|
8640
|
+
},
|
|
8581
8641
|
[BitType.tableAlt]: {
|
|
8582
8642
|
since: "1.16.0",
|
|
8583
8643
|
baseBitType: BitType.table,
|
|
@@ -9559,7 +9619,7 @@ var instance2 = new Config();
|
|
|
9559
9619
|
// src/generated/package_info.ts
|
|
9560
9620
|
var PACKAGE_INFO = {
|
|
9561
9621
|
"name": "@gmb/bitmark-parser-generator",
|
|
9562
|
-
"version": "4.
|
|
9622
|
+
"version": "4.14.1",
|
|
9563
9623
|
"author": "Get More Brain Ltd",
|
|
9564
9624
|
"license": "ISC",
|
|
9565
9625
|
"description": "A bitmark parser and generator using Peggy.js"
|
|
@@ -10060,6 +10120,7 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
10060
10120
|
durationValue: "durationValue",
|
|
10061
10121
|
elements: "elements",
|
|
10062
10122
|
elementsValue: "elementsValue",
|
|
10123
|
+
elementsValueValue: "elementsValueValue",
|
|
10063
10124
|
emphasis: "emphasis",
|
|
10064
10125
|
end: "end",
|
|
10065
10126
|
errors: "errors",
|
|
@@ -10088,6 +10149,7 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
10088
10149
|
focusY: "focusY",
|
|
10089
10150
|
focusYValue: "focusYValue",
|
|
10090
10151
|
footer: "footer",
|
|
10152
|
+
footerValue: "footerValue",
|
|
10091
10153
|
footerText: "footerText",
|
|
10092
10154
|
forKeys: "forKeys",
|
|
10093
10155
|
format: "format",
|
|
@@ -10110,11 +10172,13 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
10110
10172
|
hasBookNavigationValue: "hasBookNavigationValue",
|
|
10111
10173
|
hasMarkAsDone: "hasMarkAsDone",
|
|
10112
10174
|
hasMarkAsDoneValue: "hasMarkAsDoneValue",
|
|
10175
|
+
head: "head",
|
|
10113
10176
|
heading: "heading",
|
|
10114
10177
|
height: "height",
|
|
10115
10178
|
heightValue: "heightValue",
|
|
10116
10179
|
highlight: "highlight",
|
|
10117
10180
|
hint: "hint",
|
|
10181
|
+
hintValue: "hintValue",
|
|
10118
10182
|
href: "href",
|
|
10119
10183
|
icon: "icon",
|
|
10120
10184
|
iconTag: "iconTag",
|
|
@@ -10136,10 +10200,13 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
10136
10200
|
ingredients: "ingredients",
|
|
10137
10201
|
ingredientsValue: "ingredientsValue",
|
|
10138
10202
|
instruction: "instruction",
|
|
10203
|
+
instructionValue: "instructionValue",
|
|
10139
10204
|
internalComment: "internalComment",
|
|
10140
10205
|
internalCommentValue: "internalCommentValue",
|
|
10141
10206
|
internalPrintPdf: "internalPrintPdf",
|
|
10142
10207
|
internalPrintPdfValue: "internalPrintPdfValue",
|
|
10208
|
+
hasPrintRestriction: "hasPrintRestriction",
|
|
10209
|
+
hasPrintRestrictionValue: "hasPrintRestrictionValue",
|
|
10143
10210
|
isCaseSensitive: "isCaseSensitive",
|
|
10144
10211
|
isCommented: "isCommented",
|
|
10145
10212
|
isCorrect: "isCorrect",
|
|
@@ -10158,6 +10225,7 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
10158
10225
|
isTracked: "isTracked",
|
|
10159
10226
|
isTrackedValue: "isTrackedValue",
|
|
10160
10227
|
item: "item",
|
|
10228
|
+
itemValue: "itemValue",
|
|
10161
10229
|
itemLead: "itemLead",
|
|
10162
10230
|
jobTitle: "jobTitle",
|
|
10163
10231
|
jobTitleValue: "jobTitleValue",
|
|
@@ -10184,6 +10252,7 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
10184
10252
|
layerRoleValue: "layerRoleValue",
|
|
10185
10253
|
layerValue: "layerValue",
|
|
10186
10254
|
lead: "lead",
|
|
10255
|
+
leadValue: "leadValue",
|
|
10187
10256
|
level: "level",
|
|
10188
10257
|
levelACTFL: "levelACTFL",
|
|
10189
10258
|
levelACTFLValue: "levelACTFLValue",
|
|
@@ -10205,6 +10274,7 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
10205
10274
|
machineTranslatedValue: "machineTranslatedValue",
|
|
10206
10275
|
mailingList: "mailingList",
|
|
10207
10276
|
marginNumber: "marginNumber",
|
|
10277
|
+
marginNumberValue: "marginNumberValue",
|
|
10208
10278
|
mark: "mark",
|
|
10209
10279
|
markConfig: "markConfig",
|
|
10210
10280
|
markConfigValue: "markConfigValue",
|
|
@@ -10233,6 +10303,7 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
10233
10303
|
pageNo: "pageNo",
|
|
10234
10304
|
pageNoValue: "pageNoValue",
|
|
10235
10305
|
pageNumber: "pageNumber",
|
|
10306
|
+
pageNumberValue: "pageNumberValue",
|
|
10236
10307
|
pageValue: "pageValue",
|
|
10237
10308
|
pairs: "pairs",
|
|
10238
10309
|
pairsValue: "pairsValue",
|
|
@@ -10316,6 +10387,7 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
10316
10387
|
publisherValue: "publisherValue",
|
|
10317
10388
|
quantity: "quantity",
|
|
10318
10389
|
question: "question",
|
|
10390
|
+
questionValue: "questionValue",
|
|
10319
10391
|
questions: "questions",
|
|
10320
10392
|
questionsValue: "questionsValue",
|
|
10321
10393
|
quizCountItems: "quizCountItems",
|
|
@@ -10368,6 +10440,10 @@ var NodeType = (0, import_superenum20.superenum)({
|
|
|
10368
10440
|
revealSolutions: "revealSolutions",
|
|
10369
10441
|
root: "root",
|
|
10370
10442
|
// bit type (root)
|
|
10443
|
+
rows: "rows",
|
|
10444
|
+
rowsValue: "rowsValue",
|
|
10445
|
+
rubric: "rubric",
|
|
10446
|
+
rubricValue: "rubricValue",
|
|
10371
10447
|
sampleSolution: "sampleSolution",
|
|
10372
10448
|
sampleSolutionValue: "sampleSolutionValue",
|
|
10373
10449
|
scormSource: "scormSource",
|
|
@@ -10973,6 +11049,103 @@ var DeprecatedTextFormat = (0, import_superenum23.superenum)({
|
|
|
10973
11049
|
// bitmark-- text format, deprecated
|
|
10974
11050
|
});
|
|
10975
11051
|
|
|
11052
|
+
// src/parser/json/TableUtils.ts
|
|
11053
|
+
function isTableBasicFormat(table) {
|
|
11054
|
+
const t = table;
|
|
11055
|
+
return !!(t.columns || t.data) && !(t.head || t.body || t.foot);
|
|
11056
|
+
}
|
|
11057
|
+
function isTableExtendedFormat(table) {
|
|
11058
|
+
const t = table;
|
|
11059
|
+
return !!(t.head || t.body || t.foot);
|
|
11060
|
+
}
|
|
11061
|
+
function isMixedTableFormat(table) {
|
|
11062
|
+
const t = table;
|
|
11063
|
+
const hasOld = !!(t.columns || t.data);
|
|
11064
|
+
const hasNew = !!(t.head || t.body || t.foot);
|
|
11065
|
+
return hasOld && hasNew;
|
|
11066
|
+
}
|
|
11067
|
+
function convertBasicToExtendedTableFormat(table) {
|
|
11068
|
+
const tableExtended = {};
|
|
11069
|
+
if (table.columns && table.columns.length > 0) {
|
|
11070
|
+
tableExtended.head = {
|
|
11071
|
+
rows: [
|
|
11072
|
+
{
|
|
11073
|
+
cells: table.columns.map((col) => ({
|
|
11074
|
+
content: col,
|
|
11075
|
+
title: true
|
|
11076
|
+
}))
|
|
11077
|
+
}
|
|
11078
|
+
]
|
|
11079
|
+
};
|
|
11080
|
+
}
|
|
11081
|
+
if (table.data && table.data.length > 0) {
|
|
11082
|
+
tableExtended.body = {
|
|
11083
|
+
rows: table.data.map((row) => ({
|
|
11084
|
+
cells: row.map((cell) => ({
|
|
11085
|
+
content: cell
|
|
11086
|
+
}))
|
|
11087
|
+
}))
|
|
11088
|
+
};
|
|
11089
|
+
}
|
|
11090
|
+
return tableExtended;
|
|
11091
|
+
}
|
|
11092
|
+
function convertExtendedToBasicTableFormat(tableExtended) {
|
|
11093
|
+
const table = {};
|
|
11094
|
+
const extractRowCells = (row) => {
|
|
11095
|
+
if (!row || !Array.isArray(row.cells)) {
|
|
11096
|
+
return [];
|
|
11097
|
+
}
|
|
11098
|
+
return row.cells.map((cell) => cell?.content).filter((content) => content !== void 0);
|
|
11099
|
+
};
|
|
11100
|
+
const dataRows = [];
|
|
11101
|
+
const headRows = tableExtended.head?.rows ?? [];
|
|
11102
|
+
if (headRows.length > 0) {
|
|
11103
|
+
const primaryHeader = extractRowCells(headRows[0]);
|
|
11104
|
+
if (primaryHeader.length > 0) {
|
|
11105
|
+
table.columns = primaryHeader;
|
|
11106
|
+
}
|
|
11107
|
+
const remainingHeadRows = headRows.slice(1);
|
|
11108
|
+
remainingHeadRows.forEach((row) => {
|
|
11109
|
+
const cells = extractRowCells(row);
|
|
11110
|
+
if (cells.length > 0) {
|
|
11111
|
+
dataRows.push(cells);
|
|
11112
|
+
}
|
|
11113
|
+
});
|
|
11114
|
+
}
|
|
11115
|
+
const appendSectionRows = (section) => {
|
|
11116
|
+
if (!section || !Array.isArray(section.rows)) {
|
|
11117
|
+
return;
|
|
11118
|
+
}
|
|
11119
|
+
section.rows.forEach((row) => {
|
|
11120
|
+
const cells = extractRowCells(row);
|
|
11121
|
+
if (cells.length > 0) {
|
|
11122
|
+
dataRows.push(cells);
|
|
11123
|
+
}
|
|
11124
|
+
});
|
|
11125
|
+
};
|
|
11126
|
+
appendSectionRows(tableExtended.body);
|
|
11127
|
+
appendSectionRows(tableExtended.foot);
|
|
11128
|
+
if (dataRows.length > 0) {
|
|
11129
|
+
table.data = dataRows;
|
|
11130
|
+
}
|
|
11131
|
+
return table;
|
|
11132
|
+
}
|
|
11133
|
+
function normalizeTableFormat(bitType, table) {
|
|
11134
|
+
if (isMixedTableFormat(table)) {
|
|
11135
|
+
const t = table;
|
|
11136
|
+
delete t.columns;
|
|
11137
|
+
delete t.data;
|
|
11138
|
+
}
|
|
11139
|
+
const isExtended = instance2.isOfBitType(bitType, BitType.tableExtended);
|
|
11140
|
+
if (isExtended && isTableBasicFormat(table)) {
|
|
11141
|
+
return convertBasicToExtendedTableFormat(table);
|
|
11142
|
+
}
|
|
11143
|
+
if (!isExtended && isTableExtendedFormat(table)) {
|
|
11144
|
+
return convertExtendedToBasicTableFormat(table);
|
|
11145
|
+
}
|
|
11146
|
+
return table;
|
|
11147
|
+
}
|
|
11148
|
+
|
|
10976
11149
|
// src/utils/ArrayUtils.ts
|
|
10977
11150
|
var ArrayUtils = class {
|
|
10978
11151
|
/**
|
|
@@ -22766,6 +22939,7 @@ var Builder = class extends BaseBuilder {
|
|
|
22766
22939
|
* @returns
|
|
22767
22940
|
*/
|
|
22768
22941
|
buildBit(data, options) {
|
|
22942
|
+
data = structuredClone(data);
|
|
22769
22943
|
const bitType = data.bitType;
|
|
22770
22944
|
const bitConfig = instance2.getBitConfig(bitType);
|
|
22771
22945
|
const deprecatedTextFormat = DeprecatedTextFormat.fromValue(data.textFormat);
|
|
@@ -23434,6 +23608,12 @@ var Builder = class extends BaseBuilder {
|
|
|
23434
23608
|
data.internalPrintPdf,
|
|
23435
23609
|
options
|
|
23436
23610
|
),
|
|
23611
|
+
hasPrintRestriction: this.toAstProperty(
|
|
23612
|
+
bitType,
|
|
23613
|
+
ConfigKey.property_hasPrintRestriction,
|
|
23614
|
+
data.hasPrintRestriction,
|
|
23615
|
+
options
|
|
23616
|
+
),
|
|
23437
23617
|
tocResource: this.toAstProperty(
|
|
23438
23618
|
bitType,
|
|
23439
23619
|
ConfigKey.property_tocResource,
|
|
@@ -24203,21 +24383,53 @@ var Builder = class extends BaseBuilder {
|
|
|
24203
24383
|
return node;
|
|
24204
24384
|
}
|
|
24205
24385
|
/**
|
|
24206
|
-
* Build table node
|
|
24386
|
+
* Build table / table extended node
|
|
24207
24387
|
*
|
|
24208
24388
|
* @param data - data for the node
|
|
24209
24389
|
* @returns
|
|
24210
24390
|
*/
|
|
24211
24391
|
buildTable(context, dataIn) {
|
|
24212
24392
|
if (!dataIn) return void 0;
|
|
24213
|
-
const node =
|
|
24214
|
-
|
|
24393
|
+
const node = normalizeTableFormat(context.bitType, dataIn);
|
|
24394
|
+
const nodeTable = node;
|
|
24395
|
+
const nodeTableExtended = node;
|
|
24396
|
+
if (Array.isArray(nodeTable.columns) && nodeTable.columns.length > 0) {
|
|
24397
|
+
nodeTable.columns = nodeTable.columns.map(
|
|
24215
24398
|
(col) => this.handleJsonText(context, TextLocation.tag, col)
|
|
24216
|
-
)
|
|
24217
|
-
|
|
24399
|
+
);
|
|
24400
|
+
}
|
|
24401
|
+
if (Array.isArray(nodeTable.data) && nodeTable.data.length > 0) {
|
|
24402
|
+
nodeTable.data = nodeTable.data.map(
|
|
24218
24403
|
(row) => (row || []).map((cell) => this.handleJsonText(context, TextLocation.tag, cell))
|
|
24219
|
-
)
|
|
24404
|
+
);
|
|
24405
|
+
}
|
|
24406
|
+
const buildSection = (section) => {
|
|
24407
|
+
if (!section || !Array.isArray(section.rows)) return void 0;
|
|
24408
|
+
const rows = section.rows.map((row) => {
|
|
24409
|
+
const cells = (row.cells || []).map((cell) => {
|
|
24410
|
+
const tableCell = {
|
|
24411
|
+
content: this.handleJsonText(context, TextLocation.tag, cell.content)
|
|
24412
|
+
};
|
|
24413
|
+
if (cell.title != null) tableCell.title = cell.title;
|
|
24414
|
+
if (cell.rowspan != null) tableCell.rowspan = cell.rowspan;
|
|
24415
|
+
if (cell.colspan != null) tableCell.colspan = cell.colspan;
|
|
24416
|
+
if (cell.scope) tableCell.scope = cell.scope;
|
|
24417
|
+
return tableCell;
|
|
24418
|
+
});
|
|
24419
|
+
return {
|
|
24420
|
+
cells
|
|
24421
|
+
};
|
|
24422
|
+
});
|
|
24423
|
+
return {
|
|
24424
|
+
rows
|
|
24425
|
+
};
|
|
24220
24426
|
};
|
|
24427
|
+
const head = buildSection(nodeTableExtended.head);
|
|
24428
|
+
if (head && head.rows?.length > 0) nodeTableExtended.head = head;
|
|
24429
|
+
const body = buildSection(nodeTableExtended.body);
|
|
24430
|
+
if (body && body.rows?.length > 0) nodeTableExtended.body = body;
|
|
24431
|
+
const foot = buildSection(nodeTableExtended.foot);
|
|
24432
|
+
if (foot && foot.rows?.length > 0) nodeTableExtended.foot = foot;
|
|
24221
24433
|
return node;
|
|
24222
24434
|
}
|
|
24223
24435
|
/**
|
|
@@ -24241,7 +24453,7 @@ var Builder = class extends BaseBuilder {
|
|
|
24241
24453
|
if (!data) return void 0;
|
|
24242
24454
|
const defaultExample = data.__sampleSolutionAst;
|
|
24243
24455
|
const node = {
|
|
24244
|
-
question: data.question
|
|
24456
|
+
question: this.handleJsonText(context, TextLocation.body, data.question),
|
|
24245
24457
|
partialAnswer: data.partialAnswer ?? "",
|
|
24246
24458
|
sampleSolution: data.sampleSolution ?? "",
|
|
24247
24459
|
additionalSolutions: data.additionalSolutions ?? void 0,
|
|
@@ -24255,9 +24467,9 @@ var Builder = class extends BaseBuilder {
|
|
|
24255
24467
|
};
|
|
24256
24468
|
objectUtils.removeUnwantedProperties(node, {
|
|
24257
24469
|
ignoreAllFalse: true,
|
|
24258
|
-
ignoreEmptyArrays: ["item", "hint", "instruction"],
|
|
24470
|
+
ignoreEmptyArrays: ["question", "item", "hint", "instruction"],
|
|
24259
24471
|
ignoreUndefined: ["example"],
|
|
24260
|
-
ignoreEmptyString: ["
|
|
24472
|
+
ignoreEmptyString: ["partialAnswer", "sampleSolution"]
|
|
24261
24473
|
});
|
|
24262
24474
|
return node;
|
|
24263
24475
|
}
|
|
@@ -24795,7 +25007,7 @@ var Builder = class extends BaseBuilder {
|
|
|
24795
25007
|
buildStatement(context, data) {
|
|
24796
25008
|
if (!data) return void 0;
|
|
24797
25009
|
const node = {
|
|
24798
|
-
statement: data.statement
|
|
25010
|
+
statement: this.handleJsonText(context, TextLocation.tag, data.statement),
|
|
24799
25011
|
isCorrect: !!data.isCorrect,
|
|
24800
25012
|
item: this.handleJsonText(context, TextLocation.tag, data.item),
|
|
24801
25013
|
lead: this.handleJsonText(context, TextLocation.tag, data.lead),
|
|
@@ -24805,7 +25017,7 @@ var Builder = class extends BaseBuilder {
|
|
|
24805
25017
|
};
|
|
24806
25018
|
objectUtils.removeUnwantedProperties(node, {
|
|
24807
25019
|
ignoreAllFalse: true,
|
|
24808
|
-
|
|
25020
|
+
ignoreEmptyArrays: ["statement"],
|
|
24809
25021
|
ignoreUndefined: ["example"]
|
|
24810
25022
|
});
|
|
24811
25023
|
return node;
|
|
@@ -25017,7 +25229,7 @@ var Builder = class extends BaseBuilder {
|
|
|
25017
25229
|
const node = {
|
|
25018
25230
|
heading: this.buildHeading(context, data.heading),
|
|
25019
25231
|
questions: this.buildQuestions(context, data.questions),
|
|
25020
|
-
elements: data.elements,
|
|
25232
|
+
elements: this.handleJsonText(context, TextLocation.body, data.elements),
|
|
25021
25233
|
flashcards: this.buildFlashcards(context, data.flashcards),
|
|
25022
25234
|
definitions: this.buildDefinitionList(context, data.definitions ?? data.legend),
|
|
25023
25235
|
statement: this.buildStatement(context, data.statement),
|
|
@@ -25036,7 +25248,9 @@ var Builder = class extends BaseBuilder {
|
|
|
25036
25248
|
// captionDefinitionList: this.buildCaptionDefinitionList(context, data.captionDefinitionList),
|
|
25037
25249
|
cardBits: this.buildCardBits(context, data.cardBits)
|
|
25038
25250
|
};
|
|
25039
|
-
objectUtils.removeUnwantedProperties(node
|
|
25251
|
+
objectUtils.removeUnwantedProperties(node, {
|
|
25252
|
+
ignoreEmptyObjects: ["table"]
|
|
25253
|
+
});
|
|
25040
25254
|
return Object.keys(node).length > 0 ? node : void 0;
|
|
25041
25255
|
}
|
|
25042
25256
|
/**
|
|
@@ -25540,6 +25754,7 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
25540
25754
|
__publicField(this, "hasCardSet", false);
|
|
25541
25755
|
__publicField(this, "hasFooter", false);
|
|
25542
25756
|
__publicField(this, "inTag", true);
|
|
25757
|
+
__publicField(this, "skipTableTraversal", false);
|
|
25543
25758
|
this.enter = this.enter.bind(this);
|
|
25544
25759
|
this.between = this.between.bind(this);
|
|
25545
25760
|
this.exit = this.exit.bind(this);
|
|
@@ -26242,7 +26457,7 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
26242
26457
|
enter_elements(_node, _route) {
|
|
26243
26458
|
}
|
|
26244
26459
|
between_elements(_node, _left, _right, _route) {
|
|
26245
|
-
this.
|
|
26460
|
+
this.writeCardSetSideDivider();
|
|
26246
26461
|
}
|
|
26247
26462
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> flashcards
|
|
26248
26463
|
between_flashcards(_node, _left, _right, _route) {
|
|
@@ -26369,6 +26584,7 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
26369
26584
|
enter_matrix(_node, _route) {
|
|
26370
26585
|
}
|
|
26371
26586
|
between_matrix(_node, _left, _right, _route) {
|
|
26587
|
+
if (!this.isCardAllowed) return;
|
|
26372
26588
|
this.writeCardSetCardDivider();
|
|
26373
26589
|
}
|
|
26374
26590
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> pairs -> pairsValue -> values
|
|
@@ -26389,12 +26605,83 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
26389
26605
|
this.writeCardSetCardDivider();
|
|
26390
26606
|
}
|
|
26391
26607
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> table
|
|
26608
|
+
enter_table(node, route) {
|
|
26609
|
+
const parent = this.getParentNode(route);
|
|
26610
|
+
if (parent?.key !== NodeType.cardNode) return true;
|
|
26611
|
+
const table = node.value;
|
|
26612
|
+
if (!table) return true;
|
|
26613
|
+
if (this.writeAdvancedTable(table)) {
|
|
26614
|
+
return false;
|
|
26615
|
+
}
|
|
26616
|
+
return true;
|
|
26617
|
+
}
|
|
26392
26618
|
between_table(_node, _left, _right, route) {
|
|
26393
26619
|
const parent = this.getParentNode(route);
|
|
26394
26620
|
if (parent?.key !== NodeType.cardNode) return;
|
|
26395
26621
|
if (!this.isCardAllowed) return;
|
|
26396
26622
|
this.writeCardSetCardDivider();
|
|
26397
26623
|
}
|
|
26624
|
+
writeAdvancedTable(table) {
|
|
26625
|
+
const normalized = normalizeTableFormat(BitType.tableExtended, table);
|
|
26626
|
+
const sections = [
|
|
26627
|
+
{ key: "thead", qualifier: "thead", section: normalized.head },
|
|
26628
|
+
{ key: "tbody", qualifier: void 0, section: normalized.body },
|
|
26629
|
+
{ key: "tfoot", qualifier: "tfoot", section: normalized.foot }
|
|
26630
|
+
];
|
|
26631
|
+
let rowCount = 0;
|
|
26632
|
+
for (const { key, qualifier, section } of sections) {
|
|
26633
|
+
const rows = section?.rows ?? [];
|
|
26634
|
+
if (rows.length === 0) {
|
|
26635
|
+
continue;
|
|
26636
|
+
}
|
|
26637
|
+
for (const row of rows) {
|
|
26638
|
+
this.writeCardSetCardDivider(qualifier);
|
|
26639
|
+
this.writeTableRow(row, key);
|
|
26640
|
+
rowCount++;
|
|
26641
|
+
}
|
|
26642
|
+
}
|
|
26643
|
+
return rowCount > 0;
|
|
26644
|
+
}
|
|
26645
|
+
writeTableRow(row, section) {
|
|
26646
|
+
const cells = row?.cells ?? [];
|
|
26647
|
+
if (cells.length === 0) return;
|
|
26648
|
+
for (let index = 0; index < cells.length; index++) {
|
|
26649
|
+
if (index > 0) {
|
|
26650
|
+
this.writeCardSetSideDivider();
|
|
26651
|
+
}
|
|
26652
|
+
this.writeNL();
|
|
26653
|
+
this.writeTableCell(cells[index], section);
|
|
26654
|
+
}
|
|
26655
|
+
}
|
|
26656
|
+
writeTableCell(cell, section) {
|
|
26657
|
+
const defaultCellType = section === "tbody" ? "td" : "th";
|
|
26658
|
+
const cellType = cell.title ? "th" : "td";
|
|
26659
|
+
if (cellType !== defaultCellType) {
|
|
26660
|
+
this.writeTableCellProperty("tableCellType", cellType);
|
|
26661
|
+
this.writeNL();
|
|
26662
|
+
}
|
|
26663
|
+
if (cell.rowspan && cell.rowspan > 1) {
|
|
26664
|
+
this.writeTableCellProperty("tableRowSpan", cell.rowspan);
|
|
26665
|
+
this.writeNL();
|
|
26666
|
+
}
|
|
26667
|
+
if (cell.colspan && cell.colspan > 1) {
|
|
26668
|
+
this.writeTableCellProperty("tableColSpan", cell.colspan);
|
|
26669
|
+
this.writeNL();
|
|
26670
|
+
}
|
|
26671
|
+
if (cell.scope) {
|
|
26672
|
+
this.writeTableCellProperty("tableScope", cell.scope);
|
|
26673
|
+
this.writeNL();
|
|
26674
|
+
}
|
|
26675
|
+
const content = cell.content ?? instance3.EMPTY_STRING;
|
|
26676
|
+
this.writeTextOrValue(content, this.textFormat, TextLocation.body);
|
|
26677
|
+
}
|
|
26678
|
+
writeTableCellProperty(name, value) {
|
|
26679
|
+
this.writeOPA();
|
|
26680
|
+
this.writeTagKey(name);
|
|
26681
|
+
this.writeColon();
|
|
26682
|
+
this.writeTextOrValue(`${value}`, TextFormat.plainText, TextLocation.tag);
|
|
26683
|
+
this.writeCL();
|
|
26684
|
+
}
|
|
26398
26685
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> table -> data
|
|
26399
26686
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> pronunciationTable -> data
|
|
26400
26687
|
between_data(_node, _left, _right, route) {
|
|
@@ -26916,12 +27203,13 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
26916
27203
|
} else {
|
|
26917
27204
|
}
|
|
26918
27205
|
}
|
|
26919
|
-
// bitmarkAst -> bits -> bitsValue -> elements -> elementsValue
|
|
26920
|
-
|
|
27206
|
+
// bitmarkAst -> bits -> bitsValue -> cardNode -> elements -> elementsValue
|
|
27207
|
+
enter_elementsValue(node, _route) {
|
|
26921
27208
|
if (node.value) {
|
|
26922
27209
|
this.writeNL();
|
|
26923
27210
|
this.writeTextOrValue(node.value, this.textFormat, TextLocation.body);
|
|
26924
27211
|
}
|
|
27212
|
+
return false;
|
|
26925
27213
|
}
|
|
26926
27214
|
// bitmarkAst -> bits -> bitsValue -> body -> bodyValue -> gap -> solutions -> solution
|
|
26927
27215
|
// ? -> solutions -> solution
|
|
@@ -27000,10 +27288,20 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
27000
27288
|
}
|
|
27001
27289
|
}
|
|
27002
27290
|
// bitmarkAst -> bits -> bitsValue -> questions -> questionsValue -> question
|
|
27291
|
+
// bitmarkAst -> bits -> bitsValue -> cardNode -> questions -> questionsValue -> question
|
|
27292
|
+
enter_question(node, route) {
|
|
27293
|
+
const parent = this.getParentNode(route);
|
|
27294
|
+
if (parent?.key !== NodeType.questionsValue) return true;
|
|
27295
|
+
if (node.value) {
|
|
27296
|
+
this.writeNL();
|
|
27297
|
+
this.writeTextOrValue(node.value, this.textFormat, TextLocation.body);
|
|
27298
|
+
}
|
|
27299
|
+
return false;
|
|
27300
|
+
}
|
|
27003
27301
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> flashcards -> flashcardsValue -> question
|
|
27004
27302
|
leaf_question(node, route) {
|
|
27005
27303
|
const parent = this.getParentNode(route);
|
|
27006
|
-
if (parent?.key !== NodeType.
|
|
27304
|
+
if (parent?.key !== NodeType.flashcardsValue) return;
|
|
27007
27305
|
if (node.value) {
|
|
27008
27306
|
this.writeNL();
|
|
27009
27307
|
this.writeTextOrValue(node.value, this.textFormat, TextLocation.body);
|
|
@@ -27479,12 +27777,12 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
27479
27777
|
} else {
|
|
27480
27778
|
}
|
|
27481
27779
|
}
|
|
27482
|
-
writeCardSetCardDivider() {
|
|
27780
|
+
writeCardSetCardDivider(qualifier) {
|
|
27483
27781
|
this.writeNL();
|
|
27484
|
-
|
|
27485
|
-
|
|
27486
|
-
|
|
27487
|
-
this.
|
|
27782
|
+
const divider = this.getCardDividerMarker();
|
|
27783
|
+
this.write(divider);
|
|
27784
|
+
if (qualifier) {
|
|
27785
|
+
this.appendCardDividerQualifier(qualifier);
|
|
27488
27786
|
}
|
|
27489
27787
|
}
|
|
27490
27788
|
writeCardSetSideDivider() {
|
|
@@ -27503,6 +27801,20 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
27503
27801
|
this.write("++");
|
|
27504
27802
|
}
|
|
27505
27803
|
}
|
|
27804
|
+
getCardDividerMarker() {
|
|
27805
|
+
return this.options.cardSetVersion === CardSetVersion.v1 ? "===" : "====";
|
|
27806
|
+
}
|
|
27807
|
+
appendCardDividerQualifier(qualifier) {
|
|
27808
|
+
const marker = this.getCardDividerMarker();
|
|
27809
|
+
const normalizedQualifier = instance3.breakscape(qualifier, {
|
|
27810
|
+
format: TextFormat.plainText,
|
|
27811
|
+
location: TextLocation.tag
|
|
27812
|
+
});
|
|
27813
|
+
this.write(" ");
|
|
27814
|
+
this.write(normalizedQualifier);
|
|
27815
|
+
this.write(" ");
|
|
27816
|
+
this.write(marker);
|
|
27817
|
+
}
|
|
27506
27818
|
writeNL_IfNotChain(route) {
|
|
27507
27819
|
if (!this.isChain(route)) {
|
|
27508
27820
|
this.writeNL();
|
|
@@ -27607,7 +27919,10 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
27607
27919
|
return !!writeFormat;
|
|
27608
27920
|
}
|
|
27609
27921
|
calculateIsCardAllowed() {
|
|
27610
|
-
return this.isBodyBitmarkText && !this.isOfBitType1();
|
|
27922
|
+
return this.isBodyBitmarkText && !this.isOfBitType1() && !this.isTableBitType();
|
|
27923
|
+
}
|
|
27924
|
+
isTableBitType() {
|
|
27925
|
+
return this.isOfBitType([BitType.table]);
|
|
27611
27926
|
}
|
|
27612
27927
|
isOfBitType1() {
|
|
27613
27928
|
return this.isOfBitType([
|
|
@@ -28124,7 +28439,7 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
28124
28439
|
const parent = this.getParentNode(route);
|
|
28125
28440
|
if (parent?.key !== NodeType.cardNode) return;
|
|
28126
28441
|
if (statement) {
|
|
28127
|
-
this.bitJson.statement = statement.statement ??
|
|
28442
|
+
this.bitJson.statement = statement.statement ?? [];
|
|
28128
28443
|
this.bitJson.isCorrect = statement.isCorrect ?? false;
|
|
28129
28444
|
this.bitJson.example = statement.example;
|
|
28130
28445
|
this.bitJson.isExample = statement.isExample;
|
|
@@ -28746,6 +29061,9 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
28746
29061
|
if (bitJson.footer == null) bitJson.footer = this.textDefault;
|
|
28747
29062
|
if (bitJson.questions == null) bitJson.questions = [];
|
|
28748
29063
|
}
|
|
29064
|
+
if (instance2.isOfBitType(bitType, BitType.sequence)) {
|
|
29065
|
+
if (bitJson.elements == null) bitJson.elements = [];
|
|
29066
|
+
}
|
|
28749
29067
|
if (bitType === BitType.matchMatrix) {
|
|
28750
29068
|
isTopLevelExample = true;
|
|
28751
29069
|
}
|
|
@@ -28806,6 +29124,7 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
28806
29124
|
}
|
|
28807
29125
|
if (instance2.isOfBitType(bitType, BitType.book)) {
|
|
28808
29126
|
if (bitJson.maxTocChapterLevel == null) bitJson.maxTocChapterLevel = -1;
|
|
29127
|
+
if (bitJson.hasPrintRestriction == null) bitJson.hasPrintRestriction = true;
|
|
28809
29128
|
if (bitJson.hasMarkAsDone == null) bitJson.hasMarkAsDone = false;
|
|
28810
29129
|
if (bitJson.processHandIn == null) bitJson.processHandIn = false;
|
|
28811
29130
|
if (bitJson.isPublic == null) bitJson.isPublic = false;
|
|
@@ -29463,6 +29782,9 @@ var BitmarkPegParserHelper = class {
|
|
|
29463
29782
|
__publicField(this, "cardIndex", 0);
|
|
29464
29783
|
__publicField(this, "cardSideIndex", 0);
|
|
29465
29784
|
__publicField(this, "cardVariantIndex", 0);
|
|
29785
|
+
__publicField(this, "currentCardQualifier");
|
|
29786
|
+
__publicField(this, "currentSideQualifier");
|
|
29787
|
+
__publicField(this, "currentVariantQualifier");
|
|
29466
29788
|
__publicField(this, "parse");
|
|
29467
29789
|
__publicField(this, "parserText");
|
|
29468
29790
|
__publicField(this, "parserLocation");
|
|
@@ -29631,30 +29953,43 @@ var BitmarkPegParserHelper = class {
|
|
|
29631
29953
|
cardIndex,
|
|
29632
29954
|
cardSideIndex,
|
|
29633
29955
|
cardVariantIndex: cardContentIndex,
|
|
29634
|
-
value: value2
|
|
29956
|
+
value: value2,
|
|
29957
|
+
cardQualifier,
|
|
29958
|
+
cardSideQualifier,
|
|
29959
|
+
cardVariantQualifier
|
|
29635
29960
|
} = cardData;
|
|
29636
29961
|
let card = unparsedCardSet.cards[cardIndex];
|
|
29637
29962
|
if (!card) {
|
|
29638
29963
|
card = {
|
|
29639
|
-
sides: []
|
|
29964
|
+
sides: [],
|
|
29965
|
+
qualifier: cardQualifier
|
|
29640
29966
|
};
|
|
29641
29967
|
unparsedCardSet.cards[cardIndex] = card;
|
|
29968
|
+
} else if (cardQualifier && !card.qualifier) {
|
|
29969
|
+
card.qualifier = cardQualifier;
|
|
29642
29970
|
}
|
|
29643
29971
|
let side = card.sides[cardSideIndex];
|
|
29644
29972
|
if (!side) {
|
|
29645
29973
|
side = {
|
|
29646
|
-
variants: []
|
|
29974
|
+
variants: [],
|
|
29975
|
+
qualifier: cardSideQualifier
|
|
29647
29976
|
};
|
|
29648
29977
|
card.sides[cardSideIndex] = side;
|
|
29978
|
+
} else if (cardSideQualifier && !side.qualifier) {
|
|
29979
|
+
side.qualifier = cardSideQualifier;
|
|
29649
29980
|
}
|
|
29650
29981
|
const variant = side.variants[cardContentIndex];
|
|
29651
29982
|
if (!variant) {
|
|
29652
29983
|
side.variants[cardContentIndex] = {
|
|
29653
29984
|
value: value2,
|
|
29654
|
-
parser: parser3
|
|
29985
|
+
parser: parser3,
|
|
29986
|
+
qualifier: cardVariantQualifier
|
|
29655
29987
|
};
|
|
29656
29988
|
} else {
|
|
29657
29989
|
side.variants[cardContentIndex].value += value2;
|
|
29990
|
+
if (cardVariantQualifier && !variant.qualifier) {
|
|
29991
|
+
variant.qualifier = cardVariantQualifier;
|
|
29992
|
+
}
|
|
29658
29993
|
}
|
|
29659
29994
|
}
|
|
29660
29995
|
unparsedCardSet.cards = unparsedCardSet.cards.filter((card) => {
|
|
@@ -29667,12 +30002,14 @@ var BitmarkPegParserHelper = class {
|
|
|
29667
30002
|
});
|
|
29668
30003
|
for (const unparsedCard of unparsedCardSet.cards) {
|
|
29669
30004
|
const card = {
|
|
29670
|
-
sides: []
|
|
30005
|
+
sides: [],
|
|
30006
|
+
qualifier: unparsedCard.qualifier
|
|
29671
30007
|
};
|
|
29672
30008
|
cardSet.cards.push(card);
|
|
29673
30009
|
for (const unparsedSide of unparsedCard.sides) {
|
|
29674
30010
|
const side = {
|
|
29675
|
-
variants: []
|
|
30011
|
+
variants: [],
|
|
30012
|
+
qualifier: unparsedSide.qualifier
|
|
29676
30013
|
};
|
|
29677
30014
|
card.sides.push(side);
|
|
29678
30015
|
for (const unparsedContent of unparsedSide.variants) {
|
|
@@ -29697,7 +30034,8 @@ var BitmarkPegParserHelper = class {
|
|
|
29697
30034
|
if (DEBUG_TRACE_CARD_PARSED) this.debugPrint("parsedCardContent", content);
|
|
29698
30035
|
side.variants.push({
|
|
29699
30036
|
parser: parser2,
|
|
29700
|
-
content
|
|
30037
|
+
content,
|
|
30038
|
+
qualifier: unparsedContent.qualifier
|
|
29701
30039
|
});
|
|
29702
30040
|
}
|
|
29703
30041
|
}
|
|
@@ -29717,12 +30055,18 @@ var BitmarkPegParserHelper = class {
|
|
|
29717
30055
|
this.cardIndex = -1;
|
|
29718
30056
|
this.cardSideIndex = 0;
|
|
29719
30057
|
this.cardVariantIndex = 0;
|
|
30058
|
+
this.currentCardQualifier = void 0;
|
|
30059
|
+
this.currentSideQualifier = void 0;
|
|
30060
|
+
this.currentVariantQualifier = void 0;
|
|
29720
30061
|
}
|
|
29721
30062
|
handleCardSetEnd() {
|
|
29722
30063
|
if (DEBUG_TRACE_CARD_SET_END) this.debugPrint("CardSetEnd");
|
|
29723
30064
|
this.cardIndex = 0;
|
|
29724
30065
|
this.cardSideIndex = 0;
|
|
29725
30066
|
this.cardVariantIndex = 0;
|
|
30067
|
+
this.currentCardQualifier = void 0;
|
|
30068
|
+
this.currentSideQualifier = void 0;
|
|
30069
|
+
this.currentVariantQualifier = void 0;
|
|
29726
30070
|
}
|
|
29727
30071
|
handleCards(value) {
|
|
29728
30072
|
return value;
|
|
@@ -29732,27 +30076,45 @@ var BitmarkPegParserHelper = class {
|
|
|
29732
30076
|
let isCardDivider = false;
|
|
29733
30077
|
let isSideDivider = false;
|
|
29734
30078
|
let isVariantDivider = false;
|
|
30079
|
+
let qualifier;
|
|
29735
30080
|
if (Array.isArray(value) && value.length === 2) {
|
|
29736
|
-
|
|
29737
|
-
if (
|
|
29738
|
-
|
|
29739
|
-
|
|
29740
|
-
|
|
30081
|
+
const [divider, maybeQualifier] = value;
|
|
30082
|
+
if (typeof divider === "string") {
|
|
30083
|
+
value = divider;
|
|
30084
|
+
if (typeof maybeQualifier === "string" && maybeQualifier.trim() === maybeQualifier && maybeQualifier.length > 0) {
|
|
30085
|
+
qualifier = maybeQualifier;
|
|
30086
|
+
}
|
|
29741
30087
|
} else {
|
|
29742
|
-
|
|
29743
|
-
isSideDivider = value === CARD_SIDE_DIVIDER_V2;
|
|
29744
|
-
isVariantDivider = value === CARD_VARIANT_DIVIDER_V2;
|
|
30088
|
+
value = divider;
|
|
29745
30089
|
}
|
|
30090
|
+
} else if (Array.isArray(value) && value.length === 1) {
|
|
30091
|
+
const [divider] = value;
|
|
30092
|
+
value = divider;
|
|
30093
|
+
}
|
|
30094
|
+
if (version === CardSetVersion.v1) {
|
|
30095
|
+
isCardDivider = value === CARD_DIVIDER_V1;
|
|
30096
|
+
isSideDivider = value === CARD_SIDE_DIVIDER_V1;
|
|
30097
|
+
isVariantDivider = value === CARD_VARIANT_DIVIDER_V1;
|
|
30098
|
+
} else {
|
|
30099
|
+
isCardDivider = value === CARD_DIVIDER_V2;
|
|
30100
|
+
isSideDivider = value === CARD_SIDE_DIVIDER_V2;
|
|
30101
|
+
isVariantDivider = value === CARD_VARIANT_DIVIDER_V2;
|
|
29746
30102
|
}
|
|
29747
30103
|
if (isCardDivider) {
|
|
29748
30104
|
this.cardIndex++;
|
|
29749
30105
|
this.cardSideIndex = 0;
|
|
29750
30106
|
this.cardVariantIndex = 0;
|
|
30107
|
+
this.currentCardQualifier = qualifier;
|
|
30108
|
+
this.currentSideQualifier = void 0;
|
|
30109
|
+
this.currentVariantQualifier = void 0;
|
|
29751
30110
|
} else if (isSideDivider) {
|
|
29752
30111
|
this.cardSideIndex++;
|
|
29753
30112
|
this.cardVariantIndex = 0;
|
|
30113
|
+
this.currentSideQualifier = qualifier;
|
|
30114
|
+
this.currentVariantQualifier = void 0;
|
|
29754
30115
|
} else if (isVariantDivider) {
|
|
29755
30116
|
this.cardVariantIndex++;
|
|
30117
|
+
this.currentVariantQualifier = qualifier;
|
|
29756
30118
|
}
|
|
29757
30119
|
if (this.isType(value, TypeKey.Card)) return value;
|
|
29758
30120
|
return {
|
|
@@ -29761,7 +30123,10 @@ var BitmarkPegParserHelper = class {
|
|
|
29761
30123
|
cardIndex: this.cardIndex,
|
|
29762
30124
|
cardSideIndex: this.cardSideIndex,
|
|
29763
30125
|
cardVariantIndex: this.cardVariantIndex,
|
|
29764
|
-
value: ""
|
|
30126
|
+
value: "",
|
|
30127
|
+
cardQualifier: this.currentCardQualifier,
|
|
30128
|
+
cardSideQualifier: this.currentSideQualifier,
|
|
30129
|
+
cardVariantQualifier: this.currentVariantQualifier
|
|
29765
30130
|
},
|
|
29766
30131
|
parser: {
|
|
29767
30132
|
text: this.parserText(),
|
|
@@ -29782,7 +30147,10 @@ var BitmarkPegParserHelper = class {
|
|
|
29782
30147
|
cardIndex: this.cardIndex,
|
|
29783
30148
|
cardSideIndex: this.cardSideIndex,
|
|
29784
30149
|
cardVariantIndex: this.cardVariantIndex,
|
|
29785
|
-
value
|
|
30150
|
+
value,
|
|
30151
|
+
cardQualifier: this.currentCardQualifier,
|
|
30152
|
+
cardSideQualifier: this.currentSideQualifier,
|
|
30153
|
+
cardVariantQualifier: this.currentVariantQualifier
|
|
29786
30154
|
},
|
|
29787
30155
|
parser: {
|
|
29788
30156
|
text: this.parserText(),
|
|
@@ -30879,6 +31247,7 @@ function buildCards(context, bitType, textFormat, parsedCardSet, statementV1, st
|
|
|
30879
31247
|
result = parsePronunciationTable(context, bitType, processedCardSet);
|
|
30880
31248
|
break;
|
|
30881
31249
|
case CardSetConfigKey.table:
|
|
31250
|
+
case CardSetConfigKey.tableExtended:
|
|
30882
31251
|
result = parseTable(context, bitType, processedCardSet);
|
|
30883
31252
|
break;
|
|
30884
31253
|
case CardSetConfigKey.botActionResponses:
|
|
@@ -30915,20 +31284,23 @@ function processCardSet(context, parsedCardSet) {
|
|
|
30915
31284
|
for (const card of parsedCardSet.cards) {
|
|
30916
31285
|
const processedCard = {
|
|
30917
31286
|
no: cardNo++,
|
|
30918
|
-
sides: []
|
|
31287
|
+
sides: [],
|
|
31288
|
+
qualifier: card.qualifier
|
|
30919
31289
|
};
|
|
30920
31290
|
processedCardSet.cards.push(processedCard);
|
|
30921
31291
|
for (const side of card.sides) {
|
|
30922
31292
|
const processedSide = {
|
|
30923
31293
|
no: sideNo++,
|
|
30924
|
-
variants: []
|
|
31294
|
+
variants: [],
|
|
31295
|
+
qualifier: side.qualifier
|
|
30925
31296
|
};
|
|
30926
31297
|
processedCard.sides.push(processedSide);
|
|
30927
31298
|
for (const variant of side.variants) {
|
|
30928
31299
|
const { parser: parser2, content } = variant;
|
|
30929
31300
|
const processedVariant = {
|
|
30930
31301
|
parser: parser2,
|
|
30931
|
-
no: variantNo
|
|
31302
|
+
no: variantNo++,
|
|
31303
|
+
qualifier: variant.qualifier
|
|
30932
31304
|
};
|
|
30933
31305
|
processedSide.variants.push(processedVariant);
|
|
30934
31306
|
const tagsConfig = instance2.getTagsConfigForCardSet(bitType, sideNo, variantNo);
|
|
@@ -31042,7 +31414,8 @@ function parseElements(_context, _bitType, cardSet) {
|
|
|
31042
31414
|
for (const side of card.sides) {
|
|
31043
31415
|
for (const content of side.variants) {
|
|
31044
31416
|
const tags2 = content.data;
|
|
31045
|
-
|
|
31417
|
+
const element = tags2.cardBody?.body ?? tags2.cardBodyStr ?? instance3.EMPTY_STRING;
|
|
31418
|
+
elements.push(element);
|
|
31046
31419
|
}
|
|
31047
31420
|
}
|
|
31048
31421
|
}
|
|
@@ -31059,7 +31432,7 @@ function parseStatements(_context, _bitType, cardSet, statementV1, statementsV1)
|
|
|
31059
31432
|
if (Array.isArray(chainedStatements)) {
|
|
31060
31433
|
for (const s of chainedStatements) {
|
|
31061
31434
|
const statement = {
|
|
31062
|
-
statement: s.statement ??
|
|
31435
|
+
statement: s.statement ?? [],
|
|
31063
31436
|
isCorrect: s.isCorrect,
|
|
31064
31437
|
item: s.item,
|
|
31065
31438
|
lead: s.lead,
|
|
@@ -31201,7 +31574,7 @@ function parseQuestions(_context, _bitType, cardSet) {
|
|
|
31201
31574
|
for (const content of side.variants) {
|
|
31202
31575
|
const tags2 = content.data;
|
|
31203
31576
|
const q = {
|
|
31204
|
-
question: tags2.cardBodyStr ??
|
|
31577
|
+
question: tags2.cardBody?.body ?? tags2.cardBodyStr ?? instance3.EMPTY_STRING,
|
|
31205
31578
|
...tags2
|
|
31206
31579
|
};
|
|
31207
31580
|
if (q) questions.push(q);
|
|
@@ -31405,37 +31778,158 @@ function parsePronunciationTable(_context, _bitType, cardSet) {
|
|
|
31405
31778
|
};
|
|
31406
31779
|
return { pronunciationTable: table };
|
|
31407
31780
|
}
|
|
31408
|
-
function parseTable(
|
|
31409
|
-
|
|
31410
|
-
|
|
31411
|
-
|
|
31412
|
-
|
|
31781
|
+
function parseTable(context, _bitType, cardSet) {
|
|
31782
|
+
const sectionRows = {
|
|
31783
|
+
thead: [],
|
|
31784
|
+
tbody: [],
|
|
31785
|
+
tfoot: []
|
|
31786
|
+
};
|
|
31787
|
+
const getNormalizedQualifier = (rawQualifier) => {
|
|
31788
|
+
if (!rawQualifier) return void 0;
|
|
31789
|
+
const normalized = rawQualifier.trim().toLowerCase();
|
|
31790
|
+
if (normalized === "thead" || normalized === "tbody" || normalized === "tfoot") {
|
|
31791
|
+
return normalized;
|
|
31792
|
+
}
|
|
31793
|
+
context.addWarning(`Unknown table section qualifier '${rawQualifier}', defaulting to tbody.`);
|
|
31794
|
+
return void 0;
|
|
31795
|
+
};
|
|
31796
|
+
const isLegacyHeadingRow = (card, cardIndex) => {
|
|
31797
|
+
if (cardIndex !== 0) return false;
|
|
31798
|
+
return card.sides.some(
|
|
31799
|
+
(side) => side.variants.some((variant) => {
|
|
31800
|
+
const titles = variant.data.title;
|
|
31801
|
+
return Array.isArray(titles) && titles[1]?.titleAst;
|
|
31802
|
+
})
|
|
31803
|
+
);
|
|
31804
|
+
};
|
|
31805
|
+
const readExtraProperty = (extra, key) => {
|
|
31806
|
+
if (!extra) return void 0;
|
|
31807
|
+
const value = extra[key];
|
|
31808
|
+
return Array.isArray(value) ? value[0] : value;
|
|
31809
|
+
};
|
|
31810
|
+
const cleanupExtraProperties = (tags2, keys) => {
|
|
31811
|
+
const extra = tags2.extraProperties;
|
|
31812
|
+
if (!extra) return;
|
|
31813
|
+
for (const key of keys) {
|
|
31814
|
+
if (Object.prototype.hasOwnProperty.call(extra, key)) delete extra[key];
|
|
31815
|
+
}
|
|
31816
|
+
if (Object.keys(extra).length === 0) {
|
|
31817
|
+
delete tags2.extraProperties;
|
|
31818
|
+
}
|
|
31819
|
+
};
|
|
31820
|
+
const normalizeCellType = (raw, section) => {
|
|
31821
|
+
if (typeof raw === "string") {
|
|
31822
|
+
const normalized = raw.trim().toLowerCase();
|
|
31823
|
+
if (normalized === "th" || normalized === "td") {
|
|
31824
|
+
return normalized;
|
|
31825
|
+
}
|
|
31826
|
+
context.addWarning(
|
|
31827
|
+
`Invalid table cell type '${raw}', using default for section '${section}'.`
|
|
31828
|
+
);
|
|
31829
|
+
}
|
|
31830
|
+
return section === "tbody" ? "td" : "th";
|
|
31831
|
+
};
|
|
31832
|
+
const normalizeSpan = (raw, kind) => {
|
|
31833
|
+
if (raw == null) return 1;
|
|
31834
|
+
const numeric = instance6.asNumber(raw);
|
|
31835
|
+
if (numeric == null || !Number.isInteger(numeric) || numeric < 1) {
|
|
31836
|
+
context.addWarning(`Invalid table ${kind} '${raw}', defaulting to 1.`);
|
|
31837
|
+
return 1;
|
|
31838
|
+
}
|
|
31839
|
+
return numeric;
|
|
31840
|
+
};
|
|
31841
|
+
const normalizeScope = (raw) => {
|
|
31842
|
+
if (raw == null) return void 0;
|
|
31843
|
+
if (typeof raw !== "string") {
|
|
31844
|
+
context.addWarning(`Invalid table scope '${raw}', ignoring.`);
|
|
31845
|
+
return void 0;
|
|
31846
|
+
}
|
|
31847
|
+
const normalized = raw.trim().toLowerCase();
|
|
31848
|
+
switch (normalized) {
|
|
31849
|
+
case "row":
|
|
31850
|
+
case "col":
|
|
31851
|
+
case "rowgroup":
|
|
31852
|
+
case "colgroup":
|
|
31853
|
+
return normalized;
|
|
31854
|
+
default:
|
|
31855
|
+
context.addWarning(`Invalid table scope '${raw}', ignoring.`);
|
|
31856
|
+
return void 0;
|
|
31857
|
+
}
|
|
31858
|
+
};
|
|
31859
|
+
const buildCell = (variant, section) => {
|
|
31860
|
+
const tags2 = variant.data;
|
|
31861
|
+
const heading = tags2.title && tags2.title[1]?.titleAst;
|
|
31862
|
+
const bodyContent = tags2.cardBody?.body ?? tags2.cardBodyStr ?? instance3.EMPTY_STRING;
|
|
31863
|
+
const content = heading ?? bodyContent;
|
|
31864
|
+
const cellTypeRaw = tags2.tableCellType ?? readExtraProperty(tags2.extraProperties, "tableCellType");
|
|
31865
|
+
const rowSpanRaw = tags2.tableRowSpan ?? readExtraProperty(tags2.extraProperties, "tableRowSpan");
|
|
31866
|
+
const colSpanRaw = tags2.tableColSpan ?? readExtraProperty(tags2.extraProperties, "tableColSpan");
|
|
31867
|
+
const scopeRaw = tags2.tableScope ?? readExtraProperty(tags2.extraProperties, "tableScope");
|
|
31868
|
+
cleanupExtraProperties(tags2, ["tableCellType", "tableRowSpan", "tableColSpan", "tableScope"]);
|
|
31869
|
+
const cellType = normalizeCellType(cellTypeRaw, section);
|
|
31870
|
+
const rowspan = normalizeSpan(rowSpanRaw, "rowspan");
|
|
31871
|
+
const colspan = normalizeSpan(colSpanRaw, "colspan");
|
|
31872
|
+
const scope = normalizeScope(scopeRaw);
|
|
31873
|
+
const cell = {
|
|
31874
|
+
content
|
|
31875
|
+
};
|
|
31876
|
+
if (cellType === "th") cell.title = true;
|
|
31877
|
+
if (rowspan > 1) cell.rowspan = rowspan;
|
|
31878
|
+
if (colspan > 1) cell.colspan = colspan;
|
|
31879
|
+
if (scope) cell.scope = scope;
|
|
31880
|
+
return cell;
|
|
31881
|
+
};
|
|
31882
|
+
const resolveSectionQualifier = (card) => {
|
|
31883
|
+
const cardQualifier = getNormalizedQualifier(card.qualifier);
|
|
31884
|
+
if (cardQualifier) return cardQualifier;
|
|
31885
|
+
for (const side of card.sides) {
|
|
31886
|
+
const sideQualifier = getNormalizedQualifier(side.qualifier);
|
|
31887
|
+
if (sideQualifier) return sideQualifier;
|
|
31888
|
+
for (const variant of side.variants) {
|
|
31889
|
+
const variantQualifier = getNormalizedQualifier(variant.qualifier);
|
|
31890
|
+
if (variantQualifier) return variantQualifier;
|
|
31891
|
+
}
|
|
31892
|
+
}
|
|
31893
|
+
return void 0;
|
|
31894
|
+
};
|
|
31413
31895
|
for (let cardIdx = 0; cardIdx < cardSet.cards.length; cardIdx++) {
|
|
31414
31896
|
const card = cardSet.cards[cardIdx];
|
|
31415
|
-
|
|
31416
|
-
|
|
31897
|
+
const qualifier = resolveSectionQualifier(card);
|
|
31898
|
+
const section = qualifier ? qualifier : isLegacyHeadingRow(card, cardIdx) ? "thead" : "tbody";
|
|
31899
|
+
const cells = [];
|
|
31417
31900
|
for (const side of card.sides) {
|
|
31418
|
-
for (const
|
|
31419
|
-
|
|
31420
|
-
const { title, cardBody } = tags2;
|
|
31421
|
-
const heading = title && title[1].titleAst;
|
|
31422
|
-
if (cardIdx === 0 && heading != null) isHeading = true;
|
|
31423
|
-
if (isHeading) {
|
|
31424
|
-
columns.push(heading ?? []);
|
|
31425
|
-
} else {
|
|
31426
|
-
const value = cardBody?.body ?? [];
|
|
31427
|
-
rowValues.push(value);
|
|
31428
|
-
}
|
|
31901
|
+
for (const variant of side.variants) {
|
|
31902
|
+
cells.push(buildCell(variant, section));
|
|
31429
31903
|
}
|
|
31430
31904
|
}
|
|
31431
|
-
|
|
31432
|
-
|
|
31433
|
-
}
|
|
31905
|
+
sectionRows[section].push({
|
|
31906
|
+
cells
|
|
31907
|
+
});
|
|
31908
|
+
}
|
|
31909
|
+
const table = {};
|
|
31910
|
+
const hasHeadRows = sectionRows.thead.length > 0;
|
|
31911
|
+
const hasBodyRows = sectionRows.tbody.length > 0;
|
|
31912
|
+
const hasFootRows = sectionRows.tfoot.length > 0;
|
|
31913
|
+
if (hasHeadRows) {
|
|
31914
|
+
table.head = {
|
|
31915
|
+
rows: sectionRows.thead
|
|
31916
|
+
};
|
|
31917
|
+
}
|
|
31918
|
+
if (hasBodyRows) {
|
|
31919
|
+
table.body = {
|
|
31920
|
+
rows: sectionRows.tbody
|
|
31921
|
+
};
|
|
31922
|
+
}
|
|
31923
|
+
if (hasFootRows) {
|
|
31924
|
+
table.foot = {
|
|
31925
|
+
rows: sectionRows.tfoot
|
|
31926
|
+
};
|
|
31927
|
+
}
|
|
31928
|
+
if (!hasHeadRows && !hasBodyRows && !hasFootRows) {
|
|
31929
|
+
table.head = { rows: [] };
|
|
31930
|
+
table.body = { rows: [] };
|
|
31931
|
+
table.foot = { rows: [] };
|
|
31434
31932
|
}
|
|
31435
|
-
const table = {
|
|
31436
|
-
columns,
|
|
31437
|
-
data: rows
|
|
31438
|
-
};
|
|
31439
31933
|
return { table };
|
|
31440
31934
|
}
|
|
31441
31935
|
function parseBotActionResponses(_context, _bitType, cardSet) {
|
|
@@ -31586,11 +32080,11 @@ function extractHeadingCard(cardSet, valuesIsArray = false) {
|
|
|
31586
32080
|
function defaultTagContentProcessor(context, _contentDepth, _tagsConfig, content, target) {
|
|
31587
32081
|
const { type, value } = content;
|
|
31588
32082
|
const { textFormat } = context;
|
|
31589
|
-
const
|
|
32083
|
+
const textParser10 = new TextParser();
|
|
31590
32084
|
const trimmedStringValue = stringUtils.trimmedString(value);
|
|
31591
32085
|
switch (type) {
|
|
31592
32086
|
case TypeKey.Instruction: {
|
|
31593
|
-
target.instruction =
|
|
32087
|
+
target.instruction = textParser10.toAst(trimmedStringValue, {
|
|
31594
32088
|
format: textFormat,
|
|
31595
32089
|
location: TextLocation.tag
|
|
31596
32090
|
});
|
|
@@ -31601,7 +32095,7 @@ function defaultTagContentProcessor(context, _contentDepth, _tagsConfig, content
|
|
|
31601
32095
|
break;
|
|
31602
32096
|
}
|
|
31603
32097
|
case TypeKey.Hint: {
|
|
31604
|
-
target.hint =
|
|
32098
|
+
target.hint = textParser10.toAst(trimmedStringValue, {
|
|
31605
32099
|
format: textFormat,
|
|
31606
32100
|
location: TextLocation.tag
|
|
31607
32101
|
});
|
|
@@ -31631,7 +32125,7 @@ function defaultTagContentProcessor(context, _contentDepth, _tagsConfig, content
|
|
|
31631
32125
|
format: TextFormat.bitmarkText,
|
|
31632
32126
|
location: TextLocation.tag
|
|
31633
32127
|
});
|
|
31634
|
-
target.__sampleSolutionAst =
|
|
32128
|
+
target.__sampleSolutionAst = textParser10.toAst(trimmedStringValue, {
|
|
31635
32129
|
format: textFormat,
|
|
31636
32130
|
location: TextLocation.tag
|
|
31637
32131
|
});
|
|
@@ -31738,10 +32232,10 @@ function buildGap(context, _contentDepth, tagsConfig, content) {
|
|
|
31738
32232
|
function itemLeadTagContentProcessor(context, _contentDepth, _tagsConfig, content, target) {
|
|
31739
32233
|
const { textFormat } = context;
|
|
31740
32234
|
const { value } = content;
|
|
31741
|
-
const
|
|
32235
|
+
const textParser10 = new TextParser();
|
|
31742
32236
|
const trimmedStringValue = stringUtils.trimmedString(value);
|
|
31743
32237
|
if (!target.itemLead) target.itemLead = [];
|
|
31744
|
-
const text =
|
|
32238
|
+
const text = textParser10.toAst(trimmedStringValue, {
|
|
31745
32239
|
format: textFormat,
|
|
31746
32240
|
location: TextLocation.tag
|
|
31747
32241
|
});
|
|
@@ -32492,7 +32986,9 @@ function buildTitles(_context, bitType, title) {
|
|
|
32492
32986
|
}
|
|
32493
32987
|
|
|
32494
32988
|
// src/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.ts
|
|
32495
|
-
|
|
32989
|
+
var textParser9 = new TextParser();
|
|
32990
|
+
function trueFalseTagContentProcessor(context, _contentDepth, content, target) {
|
|
32991
|
+
const { textFormat } = context;
|
|
32496
32992
|
const { type, value } = content;
|
|
32497
32993
|
const trueFalse = target.trueFalse;
|
|
32498
32994
|
if (!trueFalse) return;
|
|
@@ -32503,8 +32999,13 @@ function trueFalseTagContentProcessor(_context, _contentDepth, content, target)
|
|
|
32503
32999
|
location: TextLocation.tag
|
|
32504
33000
|
}
|
|
32505
33001
|
);
|
|
33002
|
+
const textAst = textParser9.toAst(trimmedStringValue ?? "", {
|
|
33003
|
+
format: textFormat,
|
|
33004
|
+
location: TextLocation.tag
|
|
33005
|
+
});
|
|
32506
33006
|
trueFalse.push({
|
|
32507
33007
|
text: trimmedStringValue,
|
|
33008
|
+
textAst,
|
|
32508
33009
|
isCorrect: type === TypeKey.True,
|
|
32509
33010
|
__isDefaultExample: false
|
|
32510
33011
|
});
|
|
@@ -32608,7 +33109,7 @@ function buildStatementsChoicesResponses(context, tagsConfig, trueFalseContent)
|
|
|
32608
33109
|
const { statement: _ignore, ...tagsRest } = tags2;
|
|
32609
33110
|
const statement = {
|
|
32610
33111
|
...firstTrueFalse,
|
|
32611
|
-
statement: firstTrueFalse.
|
|
33112
|
+
statement: firstTrueFalse.textAst ?? [],
|
|
32612
33113
|
...tagsRest
|
|
32613
33114
|
};
|
|
32614
33115
|
if (statement) statements.push(statement);
|
|
@@ -33393,36 +33894,39 @@ function peg$parse2(input, options) {
|
|
|
33393
33894
|
const peg$c7 = "text";
|
|
33394
33895
|
const peg$c8 = "~~~~";
|
|
33395
33896
|
const peg$c9 = "footer";
|
|
33396
|
-
const peg$c10 = "
|
|
33397
|
-
const peg$c11 = "
|
|
33398
|
-
const peg$c12 = "
|
|
33399
|
-
const peg$c13 = "
|
|
33400
|
-
const peg$c14 = "
|
|
33401
|
-
const peg$c15 = "
|
|
33402
|
-
const peg$c16 = "
|
|
33403
|
-
const peg$c17 = "[\
|
|
33404
|
-
const peg$c18 = "[
|
|
33405
|
-
const peg$c19 = "[
|
|
33406
|
-
const peg$c20 = "[
|
|
33407
|
-
const peg$c21 = "[
|
|
33408
|
-
const peg$c22 = "[
|
|
33409
|
-
const peg$c23 = "[
|
|
33410
|
-
const peg$c24 = "[
|
|
33411
|
-
const peg$c25 = "[
|
|
33412
|
-
const peg$c26 = "[
|
|
33413
|
-
const peg$c27 = "[
|
|
33414
|
-
const peg$c28 = "
|
|
33415
|
-
const peg$c29 = "
|
|
33416
|
-
const peg$c30 = "
|
|
33417
|
-
const peg$c31 = "
|
|
33418
|
-
const peg$c32 = "\
|
|
33897
|
+
const peg$c10 = " ";
|
|
33898
|
+
const peg$c11 = "--";
|
|
33899
|
+
const peg$c12 = "++";
|
|
33900
|
+
const peg$c13 = "===";
|
|
33901
|
+
const peg$c14 = "==";
|
|
33902
|
+
const peg$c15 = "[@id";
|
|
33903
|
+
const peg$c16 = "#";
|
|
33904
|
+
const peg$c17 = "[\u25BC";
|
|
33905
|
+
const peg$c18 = "[\u25BA";
|
|
33906
|
+
const peg$c19 = "[@";
|
|
33907
|
+
const peg$c20 = "[%";
|
|
33908
|
+
const peg$c21 = "[!";
|
|
33909
|
+
const peg$c22 = "[?";
|
|
33910
|
+
const peg$c23 = "[+";
|
|
33911
|
+
const peg$c24 = "[-";
|
|
33912
|
+
const peg$c25 = "[$";
|
|
33913
|
+
const peg$c26 = "[_";
|
|
33914
|
+
const peg$c27 = "[=";
|
|
33915
|
+
const peg$c28 = "[&";
|
|
33916
|
+
const peg$c29 = "^]";
|
|
33917
|
+
const peg$c30 = "id:";
|
|
33918
|
+
const peg$c31 = ".";
|
|
33919
|
+
const peg$c32 = "\n";
|
|
33920
|
+
const peg$c33 = "\r\n";
|
|
33419
33921
|
const peg$r0 = /^[^\]]/;
|
|
33420
|
-
const peg$r1 = /^[
|
|
33421
|
-
const peg$r2 = /^[
|
|
33422
|
-
const peg$r3 = /^[
|
|
33423
|
-
const peg$r4 = /^[
|
|
33424
|
-
const peg$r5 = /^[\r\u2028
|
|
33425
|
-
const peg$r6 = /^[ \t
|
|
33922
|
+
const peg$r1 = /^[a-z]/;
|
|
33923
|
+
const peg$r2 = /^[a-z0-9\-]/;
|
|
33924
|
+
const peg$r3 = /^[^:\]]/;
|
|
33925
|
+
const peg$r4 = /^[^&:\]]/;
|
|
33926
|
+
const peg$r5 = /^[^\n\r\u2028\u2029]/;
|
|
33927
|
+
const peg$r6 = /^[ \t]/;
|
|
33928
|
+
const peg$r7 = /^[\r\u2028-\u2029]/;
|
|
33929
|
+
const peg$r8 = /^[ \t\n\r\u2028\u2029]/;
|
|
33426
33930
|
const peg$e0 = peg$literalExpectation("[.", false);
|
|
33427
33931
|
const peg$e1 = peg$classExpectation(["]"], true, false, false);
|
|
33428
33932
|
const peg$e2 = peg$literalExpectation("]", false);
|
|
@@ -33435,40 +33939,43 @@ function peg$parse2(input, options) {
|
|
|
33435
33939
|
const peg$e9 = peg$literalExpectation("text", false);
|
|
33436
33940
|
const peg$e10 = peg$literalExpectation("~~~~", false);
|
|
33437
33941
|
const peg$e11 = peg$literalExpectation("footer", false);
|
|
33438
|
-
const peg$e12 = peg$literalExpectation("
|
|
33439
|
-
const peg$e13 = peg$literalExpectation("
|
|
33440
|
-
const peg$e14 = peg$literalExpectation("
|
|
33441
|
-
const peg$e15 = peg$literalExpectation("
|
|
33442
|
-
const peg$e16 = peg$literalExpectation("
|
|
33443
|
-
const peg$e17 = peg$
|
|
33444
|
-
const peg$e18 = peg$
|
|
33445
|
-
const peg$e19 = peg$literalExpectation("[
|
|
33446
|
-
const peg$e20 = peg$literalExpectation("
|
|
33447
|
-
const peg$e21 = peg$literalExpectation("[
|
|
33448
|
-
const peg$e22 = peg$literalExpectation("[
|
|
33449
|
-
const peg$e23 = peg$literalExpectation("[
|
|
33450
|
-
const peg$e24 = peg$literalExpectation("[
|
|
33451
|
-
const peg$e25 = peg$literalExpectation("[
|
|
33452
|
-
const peg$e26 = peg$literalExpectation("[
|
|
33453
|
-
const peg$e27 = peg$literalExpectation("[
|
|
33454
|
-
const peg$e28 = peg$literalExpectation("[
|
|
33455
|
-
const peg$e29 = peg$literalExpectation("[
|
|
33456
|
-
const peg$e30 = peg$literalExpectation("
|
|
33457
|
-
const peg$e31 = peg$literalExpectation("
|
|
33458
|
-
const peg$e32 = peg$
|
|
33459
|
-
const peg$e33 = peg$literalExpectation("
|
|
33460
|
-
const peg$e34 = peg$
|
|
33461
|
-
const peg$e35 = peg$
|
|
33462
|
-
const peg$e36 = peg$
|
|
33463
|
-
const peg$e37 = peg$
|
|
33464
|
-
const peg$e38 = peg$
|
|
33465
|
-
const peg$e39 = peg$
|
|
33466
|
-
const peg$e40 = peg$
|
|
33467
|
-
const peg$e41 = peg$
|
|
33468
|
-
const peg$e42 = peg$
|
|
33469
|
-
const peg$e43 = peg$
|
|
33470
|
-
const peg$e44 = peg$
|
|
33471
|
-
const peg$e45 = peg$classExpectation(["
|
|
33942
|
+
const peg$e12 = peg$literalExpectation(" ", false);
|
|
33943
|
+
const peg$e13 = peg$literalExpectation("--", false);
|
|
33944
|
+
const peg$e14 = peg$literalExpectation("++", false);
|
|
33945
|
+
const peg$e15 = peg$literalExpectation("===", false);
|
|
33946
|
+
const peg$e16 = peg$literalExpectation("==", false);
|
|
33947
|
+
const peg$e17 = peg$classExpectation([["a", "z"]], false, false, false);
|
|
33948
|
+
const peg$e18 = peg$classExpectation([["a", "z"], ["0", "9"], "-"], false, false, false);
|
|
33949
|
+
const peg$e19 = peg$literalExpectation("[@id", false);
|
|
33950
|
+
const peg$e20 = peg$literalExpectation("#", false);
|
|
33951
|
+
const peg$e21 = peg$literalExpectation("[\u25BC", false);
|
|
33952
|
+
const peg$e22 = peg$literalExpectation("[\u25BA", false);
|
|
33953
|
+
const peg$e23 = peg$literalExpectation("[@", false);
|
|
33954
|
+
const peg$e24 = peg$literalExpectation("[%", false);
|
|
33955
|
+
const peg$e25 = peg$literalExpectation("[!", false);
|
|
33956
|
+
const peg$e26 = peg$literalExpectation("[?", false);
|
|
33957
|
+
const peg$e27 = peg$literalExpectation("[+", false);
|
|
33958
|
+
const peg$e28 = peg$literalExpectation("[-", false);
|
|
33959
|
+
const peg$e29 = peg$literalExpectation("[$", false);
|
|
33960
|
+
const peg$e30 = peg$literalExpectation("[_", false);
|
|
33961
|
+
const peg$e31 = peg$literalExpectation("[=", false);
|
|
33962
|
+
const peg$e32 = peg$literalExpectation("[&", false);
|
|
33963
|
+
const peg$e33 = peg$literalExpectation("^]", false);
|
|
33964
|
+
const peg$e34 = peg$literalExpectation("id:", false);
|
|
33965
|
+
const peg$e35 = peg$classExpectation([":", "]"], true, false, false);
|
|
33966
|
+
const peg$e36 = peg$literalExpectation(".", false);
|
|
33967
|
+
const peg$e37 = peg$classExpectation(["&", ":", "]"], true, false, false);
|
|
33968
|
+
const peg$e38 = peg$otherExpectation("Character");
|
|
33969
|
+
const peg$e39 = peg$classExpectation(["\n", "\r", "\u2028", "\u2029"], true, false, false);
|
|
33970
|
+
const peg$e40 = peg$otherExpectation("Blank Line");
|
|
33971
|
+
const peg$e41 = peg$classExpectation([" ", " "], false, false, false);
|
|
33972
|
+
const peg$e42 = peg$otherExpectation("Line Terminator");
|
|
33973
|
+
const peg$e43 = peg$literalExpectation("\n", false);
|
|
33974
|
+
const peg$e44 = peg$literalExpectation("\r\n", false);
|
|
33975
|
+
const peg$e45 = peg$classExpectation(["\r", ["\u2028", "\u2029"]], false, false, false);
|
|
33976
|
+
const peg$e46 = peg$otherExpectation("Whitespace, then Line Terminator");
|
|
33977
|
+
const peg$e47 = peg$otherExpectation("whitespace");
|
|
33978
|
+
const peg$e48 = peg$classExpectation([" ", " ", "\n", "\r", "\u2028", "\u2029"], false, false, false);
|
|
33472
33979
|
function peg$f0(firstBit, bits) {
|
|
33473
33980
|
return processor.buildBits([firstBit, ...bits]);
|
|
33474
33981
|
}
|
|
@@ -33541,91 +34048,112 @@ function peg$parse2(input, options) {
|
|
|
33541
34048
|
function peg$f23(value) {
|
|
33542
34049
|
return helper.handleCardLineOrDivider(value, 2);
|
|
33543
34050
|
}
|
|
33544
|
-
function peg$f24(
|
|
34051
|
+
function peg$f24(qualifier) {
|
|
34052
|
+
return ["====", qualifier];
|
|
34053
|
+
}
|
|
34054
|
+
function peg$f25() {
|
|
34055
|
+
return ["===="];
|
|
34056
|
+
}
|
|
34057
|
+
function peg$f26(qualifier) {
|
|
34058
|
+
return ["--", qualifier];
|
|
34059
|
+
}
|
|
34060
|
+
function peg$f27() {
|
|
34061
|
+
return ["--"];
|
|
34062
|
+
}
|
|
34063
|
+
function peg$f28(qualifier) {
|
|
34064
|
+
return ["++", qualifier];
|
|
34065
|
+
}
|
|
34066
|
+
function peg$f29() {
|
|
34067
|
+
return ["++"];
|
|
34068
|
+
}
|
|
34069
|
+
function peg$f30(value) {
|
|
33545
34070
|
return helper.handleCardLine(value);
|
|
33546
34071
|
}
|
|
33547
|
-
function peg$
|
|
34072
|
+
function peg$f31(value) {
|
|
33548
34073
|
return helper.handleCardSet(value[1].flat());
|
|
33549
34074
|
}
|
|
33550
|
-
function peg$
|
|
34075
|
+
function peg$f32() {
|
|
33551
34076
|
helper.handleCardSetStart();
|
|
33552
34077
|
}
|
|
33553
|
-
function peg$
|
|
34078
|
+
function peg$f33() {
|
|
33554
34079
|
helper.handleCardSetEnd();
|
|
33555
34080
|
}
|
|
33556
|
-
function peg$
|
|
34081
|
+
function peg$f34(value) {
|
|
33557
34082
|
return helper.handleCards(value);
|
|
33558
34083
|
}
|
|
33559
|
-
function peg$
|
|
34084
|
+
function peg$f35(value) {
|
|
33560
34085
|
return helper.handleCardLineOrDivider(value, 1);
|
|
33561
34086
|
}
|
|
33562
|
-
function peg$
|
|
34087
|
+
function peg$f36(value) {
|
|
33563
34088
|
return helper.handleCardLine(value);
|
|
33564
34089
|
}
|
|
33565
|
-
function peg$
|
|
34090
|
+
function peg$f37(value) {
|
|
34091
|
+
return value;
|
|
34092
|
+
}
|
|
34093
|
+
function peg$f38(value) {
|
|
33566
34094
|
return helper.handleCardContent(value);
|
|
33567
34095
|
}
|
|
33568
|
-
function peg$
|
|
34096
|
+
function peg$f39(value) {
|
|
33569
34097
|
return { type: TypeKey.CardChar, value };
|
|
33570
34098
|
}
|
|
33571
|
-
function peg$
|
|
34099
|
+
function peg$f40(value) {
|
|
33572
34100
|
return helper.handlePropertyTag("id", value);
|
|
33573
34101
|
}
|
|
33574
|
-
function peg$
|
|
34102
|
+
function peg$f41(level, title) {
|
|
33575
34103
|
return helper.handleTag(TypeKey.Title, { level, title });
|
|
33576
34104
|
}
|
|
33577
|
-
function peg$
|
|
34105
|
+
function peg$f42(value) {
|
|
33578
34106
|
return helper.handleTag(TypeKey.Anchor, value);
|
|
33579
34107
|
}
|
|
33580
|
-
function peg$
|
|
34108
|
+
function peg$f43(value) {
|
|
33581
34109
|
return helper.handleTag(TypeKey.Reference, value);
|
|
33582
34110
|
}
|
|
33583
|
-
function peg$
|
|
34111
|
+
function peg$f44(key, value) {
|
|
33584
34112
|
return helper.handlePropertyTag(key, value);
|
|
33585
34113
|
}
|
|
33586
|
-
function peg$
|
|
34114
|
+
function peg$f45(value) {
|
|
33587
34115
|
return helper.handleTag(TypeKey.ItemLead, value);
|
|
33588
34116
|
}
|
|
33589
|
-
function peg$
|
|
34117
|
+
function peg$f46(value) {
|
|
33590
34118
|
return helper.handleTag(TypeKey.Instruction, value);
|
|
33591
34119
|
}
|
|
33592
|
-
function peg$
|
|
34120
|
+
function peg$f47(value) {
|
|
33593
34121
|
return helper.handleTag(TypeKey.Hint, value);
|
|
33594
34122
|
}
|
|
33595
|
-
function peg$
|
|
34123
|
+
function peg$f48(value) {
|
|
33596
34124
|
return helper.handleTag(TypeKey.True, value);
|
|
33597
34125
|
}
|
|
33598
|
-
function peg$
|
|
34126
|
+
function peg$f49(value) {
|
|
33599
34127
|
return helper.handleTag(TypeKey.False, value);
|
|
33600
34128
|
}
|
|
33601
|
-
function peg$
|
|
34129
|
+
function peg$f50(value) {
|
|
33602
34130
|
return helper.handleTag(TypeKey.SampleSolution, value);
|
|
33603
34131
|
}
|
|
33604
|
-
function peg$
|
|
34132
|
+
function peg$f51(value) {
|
|
33605
34133
|
return helper.handleTag(TypeKey.Gap, value);
|
|
33606
34134
|
}
|
|
33607
|
-
function peg$
|
|
34135
|
+
function peg$f52(value) {
|
|
33608
34136
|
return helper.handleTag(TypeKey.Mark, value);
|
|
33609
34137
|
}
|
|
33610
|
-
function peg$
|
|
34138
|
+
function peg$f53(key, value) {
|
|
33611
34139
|
return helper.handleResourceTag(key, value);
|
|
33612
34140
|
}
|
|
33613
|
-
function peg$
|
|
34141
|
+
function peg$f54(value) {
|
|
33614
34142
|
return value;
|
|
33615
34143
|
}
|
|
33616
|
-
function peg$
|
|
34144
|
+
function peg$f55(value) {
|
|
33617
34145
|
return value ? value.trim() : "";
|
|
33618
34146
|
}
|
|
33619
|
-
function peg$
|
|
34147
|
+
function peg$f56(value) {
|
|
33620
34148
|
return value.length;
|
|
33621
34149
|
}
|
|
33622
|
-
function peg$
|
|
34150
|
+
function peg$f57(value) {
|
|
33623
34151
|
return value ? value.trim() : null;
|
|
33624
34152
|
}
|
|
33625
|
-
function peg$
|
|
34153
|
+
function peg$f58(value) {
|
|
33626
34154
|
return value ? value.trim() : "";
|
|
33627
34155
|
}
|
|
33628
|
-
function peg$
|
|
34156
|
+
function peg$f59() {
|
|
33629
34157
|
return true;
|
|
33630
34158
|
}
|
|
33631
34159
|
let peg$currPos = options.peg$currPos | 0;
|
|
@@ -34543,35 +35071,28 @@ function peg$parse2(input, options) {
|
|
|
34543
35071
|
return s0;
|
|
34544
35072
|
}
|
|
34545
35073
|
function peg$parseCardSetStart_V2() {
|
|
34546
|
-
let s0, s1, s2, s3
|
|
35074
|
+
let s0, s1, s2, s3;
|
|
34547
35075
|
s0 = peg$currPos;
|
|
34548
|
-
s1 =
|
|
35076
|
+
s1 = [];
|
|
35077
|
+
s2 = peg$parseWNL();
|
|
35078
|
+
if (s2 === peg$FAILED) {
|
|
35079
|
+
s2 = peg$parseNL();
|
|
35080
|
+
}
|
|
35081
|
+
if (s2 !== peg$FAILED) {
|
|
35082
|
+
while (s2 !== peg$FAILED) {
|
|
35083
|
+
s1.push(s2);
|
|
35084
|
+
s2 = peg$parseWNL();
|
|
35085
|
+
if (s2 === peg$FAILED) {
|
|
35086
|
+
s2 = peg$parseNL();
|
|
35087
|
+
}
|
|
35088
|
+
}
|
|
35089
|
+
} else {
|
|
35090
|
+
s1 = peg$FAILED;
|
|
35091
|
+
}
|
|
34549
35092
|
if (s1 !== peg$FAILED) {
|
|
34550
35093
|
s2 = peg$currPos;
|
|
34551
35094
|
peg$silentFails++;
|
|
34552
|
-
s3 = peg$
|
|
34553
|
-
if (input.substr(peg$currPos, 4) === peg$c6) {
|
|
34554
|
-
s4 = peg$c6;
|
|
34555
|
-
peg$currPos += 4;
|
|
34556
|
-
} else {
|
|
34557
|
-
s4 = peg$FAILED;
|
|
34558
|
-
if (peg$silentFails === 0) {
|
|
34559
|
-
peg$fail(peg$e8);
|
|
34560
|
-
}
|
|
34561
|
-
}
|
|
34562
|
-
if (s4 !== peg$FAILED) {
|
|
34563
|
-
s5 = peg$parseWNL();
|
|
34564
|
-
if (s5 !== peg$FAILED) {
|
|
34565
|
-
s4 = [s4, s5];
|
|
34566
|
-
s3 = s4;
|
|
34567
|
-
} else {
|
|
34568
|
-
peg$currPos = s3;
|
|
34569
|
-
s3 = peg$FAILED;
|
|
34570
|
-
}
|
|
34571
|
-
} else {
|
|
34572
|
-
peg$currPos = s3;
|
|
34573
|
-
s3 = peg$FAILED;
|
|
34574
|
-
}
|
|
35095
|
+
s3 = peg$parseCardDividerLookahead_V2();
|
|
34575
35096
|
peg$silentFails--;
|
|
34576
35097
|
if (s3 !== peg$FAILED) {
|
|
34577
35098
|
peg$currPos = s2;
|
|
@@ -34636,39 +35157,147 @@ function peg$parse2(input, options) {
|
|
|
34636
35157
|
return s0;
|
|
34637
35158
|
}
|
|
34638
35159
|
function peg$parseCardLineOrDivider_V2() {
|
|
34639
|
-
let s0, s1
|
|
35160
|
+
let s0, s1;
|
|
35161
|
+
s0 = peg$currPos;
|
|
35162
|
+
s1 = peg$parseCardDividerToken_V2();
|
|
35163
|
+
if (s1 === peg$FAILED) {
|
|
35164
|
+
s1 = peg$parseCardSideDividerToken_V2();
|
|
35165
|
+
if (s1 === peg$FAILED) {
|
|
35166
|
+
s1 = peg$parseCardVariantDividerToken_V2();
|
|
35167
|
+
if (s1 === peg$FAILED) {
|
|
35168
|
+
s1 = peg$parseCardLine_V2();
|
|
35169
|
+
}
|
|
35170
|
+
}
|
|
35171
|
+
}
|
|
35172
|
+
if (s1 !== peg$FAILED) {
|
|
35173
|
+
peg$savedPos = s0;
|
|
35174
|
+
s1 = peg$f23(s1);
|
|
35175
|
+
}
|
|
35176
|
+
s0 = s1;
|
|
35177
|
+
return s0;
|
|
35178
|
+
}
|
|
35179
|
+
function peg$parseCardDividerToken_V2() {
|
|
35180
|
+
let s0, s1, s2, s3, s4, s5, s6;
|
|
34640
35181
|
s0 = peg$currPos;
|
|
34641
|
-
s1 = peg$currPos;
|
|
34642
35182
|
if (input.substr(peg$currPos, 4) === peg$c6) {
|
|
34643
|
-
|
|
35183
|
+
s1 = peg$c6;
|
|
34644
35184
|
peg$currPos += 4;
|
|
34645
35185
|
} else {
|
|
34646
|
-
|
|
35186
|
+
s1 = peg$FAILED;
|
|
34647
35187
|
if (peg$silentFails === 0) {
|
|
34648
35188
|
peg$fail(peg$e8);
|
|
34649
35189
|
}
|
|
34650
35190
|
}
|
|
34651
|
-
if (
|
|
34652
|
-
|
|
34653
|
-
|
|
34654
|
-
|
|
35191
|
+
if (s1 !== peg$FAILED) {
|
|
35192
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35193
|
+
s2 = peg$c10;
|
|
35194
|
+
peg$currPos++;
|
|
35195
|
+
} else {
|
|
35196
|
+
s2 = peg$FAILED;
|
|
35197
|
+
if (peg$silentFails === 0) {
|
|
35198
|
+
peg$fail(peg$e12);
|
|
35199
|
+
}
|
|
34655
35200
|
}
|
|
34656
|
-
if (
|
|
34657
|
-
|
|
34658
|
-
|
|
35201
|
+
if (s2 !== peg$FAILED) {
|
|
35202
|
+
s3 = peg$parseQualifier();
|
|
35203
|
+
if (s3 !== peg$FAILED) {
|
|
35204
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35205
|
+
s4 = peg$c10;
|
|
35206
|
+
peg$currPos++;
|
|
35207
|
+
} else {
|
|
35208
|
+
s4 = peg$FAILED;
|
|
35209
|
+
if (peg$silentFails === 0) {
|
|
35210
|
+
peg$fail(peg$e12);
|
|
35211
|
+
}
|
|
35212
|
+
}
|
|
35213
|
+
if (s4 !== peg$FAILED) {
|
|
35214
|
+
if (input.substr(peg$currPos, 4) === peg$c6) {
|
|
35215
|
+
s5 = peg$c6;
|
|
35216
|
+
peg$currPos += 4;
|
|
35217
|
+
} else {
|
|
35218
|
+
s5 = peg$FAILED;
|
|
35219
|
+
if (peg$silentFails === 0) {
|
|
35220
|
+
peg$fail(peg$e8);
|
|
35221
|
+
}
|
|
35222
|
+
}
|
|
35223
|
+
if (s5 !== peg$FAILED) {
|
|
35224
|
+
s6 = peg$parseWNL();
|
|
35225
|
+
if (s6 === peg$FAILED) {
|
|
35226
|
+
s6 = peg$parseWEOL();
|
|
35227
|
+
}
|
|
35228
|
+
if (s6 !== peg$FAILED) {
|
|
35229
|
+
peg$savedPos = s0;
|
|
35230
|
+
s0 = peg$f24(s3);
|
|
35231
|
+
} else {
|
|
35232
|
+
peg$currPos = s0;
|
|
35233
|
+
s0 = peg$FAILED;
|
|
35234
|
+
}
|
|
35235
|
+
} else {
|
|
35236
|
+
peg$currPos = s0;
|
|
35237
|
+
s0 = peg$FAILED;
|
|
35238
|
+
}
|
|
35239
|
+
} else {
|
|
35240
|
+
peg$currPos = s0;
|
|
35241
|
+
s0 = peg$FAILED;
|
|
35242
|
+
}
|
|
35243
|
+
} else {
|
|
35244
|
+
peg$currPos = s0;
|
|
35245
|
+
s0 = peg$FAILED;
|
|
35246
|
+
}
|
|
35247
|
+
} else {
|
|
35248
|
+
peg$currPos = s0;
|
|
35249
|
+
s0 = peg$FAILED;
|
|
35250
|
+
}
|
|
35251
|
+
} else {
|
|
35252
|
+
peg$currPos = s0;
|
|
35253
|
+
s0 = peg$FAILED;
|
|
35254
|
+
}
|
|
35255
|
+
if (s0 === peg$FAILED) {
|
|
35256
|
+
s0 = peg$currPos;
|
|
35257
|
+
if (input.substr(peg$currPos, 4) === peg$c6) {
|
|
35258
|
+
s1 = peg$c6;
|
|
35259
|
+
peg$currPos += 4;
|
|
34659
35260
|
} else {
|
|
34660
|
-
peg$currPos = s1;
|
|
34661
35261
|
s1 = peg$FAILED;
|
|
35262
|
+
if (peg$silentFails === 0) {
|
|
35263
|
+
peg$fail(peg$e8);
|
|
35264
|
+
}
|
|
34662
35265
|
}
|
|
35266
|
+
if (s1 !== peg$FAILED) {
|
|
35267
|
+
s2 = peg$parseWNL();
|
|
35268
|
+
if (s2 === peg$FAILED) {
|
|
35269
|
+
s2 = peg$parseWEOL();
|
|
35270
|
+
}
|
|
35271
|
+
if (s2 !== peg$FAILED) {
|
|
35272
|
+
peg$savedPos = s0;
|
|
35273
|
+
s0 = peg$f25();
|
|
35274
|
+
} else {
|
|
35275
|
+
peg$currPos = s0;
|
|
35276
|
+
s0 = peg$FAILED;
|
|
35277
|
+
}
|
|
35278
|
+
} else {
|
|
35279
|
+
peg$currPos = s0;
|
|
35280
|
+
s0 = peg$FAILED;
|
|
35281
|
+
}
|
|
35282
|
+
}
|
|
35283
|
+
return s0;
|
|
35284
|
+
}
|
|
35285
|
+
function peg$parseCardSideDividerToken_V2() {
|
|
35286
|
+
let s0, s1, s2, s3, s4, s5, s6;
|
|
35287
|
+
s0 = peg$currPos;
|
|
35288
|
+
if (input.substr(peg$currPos, 2) === peg$c11) {
|
|
35289
|
+
s1 = peg$c11;
|
|
35290
|
+
peg$currPos += 2;
|
|
34663
35291
|
} else {
|
|
34664
|
-
peg$currPos = s1;
|
|
34665
35292
|
s1 = peg$FAILED;
|
|
35293
|
+
if (peg$silentFails === 0) {
|
|
35294
|
+
peg$fail(peg$e13);
|
|
35295
|
+
}
|
|
34666
35296
|
}
|
|
34667
|
-
if (s1
|
|
34668
|
-
|
|
34669
|
-
if (input.substr(peg$currPos, 2) === peg$c10) {
|
|
35297
|
+
if (s1 !== peg$FAILED) {
|
|
35298
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
34670
35299
|
s2 = peg$c10;
|
|
34671
|
-
peg$currPos
|
|
35300
|
+
peg$currPos++;
|
|
34672
35301
|
} else {
|
|
34673
35302
|
s2 = peg$FAILED;
|
|
34674
35303
|
if (peg$silentFails === 0) {
|
|
@@ -34676,58 +35305,277 @@ function peg$parse2(input, options) {
|
|
|
34676
35305
|
}
|
|
34677
35306
|
}
|
|
34678
35307
|
if (s2 !== peg$FAILED) {
|
|
34679
|
-
s3 = peg$
|
|
34680
|
-
if (s3 === peg$FAILED) {
|
|
34681
|
-
s3 = peg$parseWEOL();
|
|
34682
|
-
}
|
|
35308
|
+
s3 = peg$parseQualifier();
|
|
34683
35309
|
if (s3 !== peg$FAILED) {
|
|
34684
|
-
|
|
34685
|
-
|
|
35310
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35311
|
+
s4 = peg$c10;
|
|
35312
|
+
peg$currPos++;
|
|
35313
|
+
} else {
|
|
35314
|
+
s4 = peg$FAILED;
|
|
35315
|
+
if (peg$silentFails === 0) {
|
|
35316
|
+
peg$fail(peg$e12);
|
|
35317
|
+
}
|
|
35318
|
+
}
|
|
35319
|
+
if (s4 !== peg$FAILED) {
|
|
35320
|
+
if (input.substr(peg$currPos, 2) === peg$c11) {
|
|
35321
|
+
s5 = peg$c11;
|
|
35322
|
+
peg$currPos += 2;
|
|
35323
|
+
} else {
|
|
35324
|
+
s5 = peg$FAILED;
|
|
35325
|
+
if (peg$silentFails === 0) {
|
|
35326
|
+
peg$fail(peg$e13);
|
|
35327
|
+
}
|
|
35328
|
+
}
|
|
35329
|
+
if (s5 !== peg$FAILED) {
|
|
35330
|
+
s6 = peg$parseWNL();
|
|
35331
|
+
if (s6 === peg$FAILED) {
|
|
35332
|
+
s6 = peg$parseWEOL();
|
|
35333
|
+
}
|
|
35334
|
+
if (s6 !== peg$FAILED) {
|
|
35335
|
+
peg$savedPos = s0;
|
|
35336
|
+
s0 = peg$f26(s3);
|
|
35337
|
+
} else {
|
|
35338
|
+
peg$currPos = s0;
|
|
35339
|
+
s0 = peg$FAILED;
|
|
35340
|
+
}
|
|
35341
|
+
} else {
|
|
35342
|
+
peg$currPos = s0;
|
|
35343
|
+
s0 = peg$FAILED;
|
|
35344
|
+
}
|
|
35345
|
+
} else {
|
|
35346
|
+
peg$currPos = s0;
|
|
35347
|
+
s0 = peg$FAILED;
|
|
35348
|
+
}
|
|
34686
35349
|
} else {
|
|
34687
|
-
peg$currPos =
|
|
34688
|
-
|
|
35350
|
+
peg$currPos = s0;
|
|
35351
|
+
s0 = peg$FAILED;
|
|
34689
35352
|
}
|
|
34690
35353
|
} else {
|
|
34691
|
-
peg$currPos =
|
|
35354
|
+
peg$currPos = s0;
|
|
35355
|
+
s0 = peg$FAILED;
|
|
35356
|
+
}
|
|
35357
|
+
} else {
|
|
35358
|
+
peg$currPos = s0;
|
|
35359
|
+
s0 = peg$FAILED;
|
|
35360
|
+
}
|
|
35361
|
+
if (s0 === peg$FAILED) {
|
|
35362
|
+
s0 = peg$currPos;
|
|
35363
|
+
if (input.substr(peg$currPos, 2) === peg$c11) {
|
|
35364
|
+
s1 = peg$c11;
|
|
35365
|
+
peg$currPos += 2;
|
|
35366
|
+
} else {
|
|
34692
35367
|
s1 = peg$FAILED;
|
|
35368
|
+
if (peg$silentFails === 0) {
|
|
35369
|
+
peg$fail(peg$e13);
|
|
35370
|
+
}
|
|
34693
35371
|
}
|
|
34694
|
-
if (s1
|
|
34695
|
-
|
|
34696
|
-
if (
|
|
34697
|
-
s2 = peg$
|
|
34698
|
-
peg$currPos += 2;
|
|
34699
|
-
} else {
|
|
34700
|
-
s2 = peg$FAILED;
|
|
34701
|
-
if (peg$silentFails === 0) {
|
|
34702
|
-
peg$fail(peg$e13);
|
|
34703
|
-
}
|
|
35372
|
+
if (s1 !== peg$FAILED) {
|
|
35373
|
+
s2 = peg$parseWNL();
|
|
35374
|
+
if (s2 === peg$FAILED) {
|
|
35375
|
+
s2 = peg$parseWEOL();
|
|
34704
35376
|
}
|
|
34705
35377
|
if (s2 !== peg$FAILED) {
|
|
34706
|
-
|
|
34707
|
-
|
|
34708
|
-
|
|
35378
|
+
peg$savedPos = s0;
|
|
35379
|
+
s0 = peg$f27();
|
|
35380
|
+
} else {
|
|
35381
|
+
peg$currPos = s0;
|
|
35382
|
+
s0 = peg$FAILED;
|
|
35383
|
+
}
|
|
35384
|
+
} else {
|
|
35385
|
+
peg$currPos = s0;
|
|
35386
|
+
s0 = peg$FAILED;
|
|
35387
|
+
}
|
|
35388
|
+
}
|
|
35389
|
+
return s0;
|
|
35390
|
+
}
|
|
35391
|
+
function peg$parseCardVariantDividerToken_V2() {
|
|
35392
|
+
let s0, s1, s2, s3, s4, s5, s6;
|
|
35393
|
+
s0 = peg$currPos;
|
|
35394
|
+
if (input.substr(peg$currPos, 2) === peg$c12) {
|
|
35395
|
+
s1 = peg$c12;
|
|
35396
|
+
peg$currPos += 2;
|
|
35397
|
+
} else {
|
|
35398
|
+
s1 = peg$FAILED;
|
|
35399
|
+
if (peg$silentFails === 0) {
|
|
35400
|
+
peg$fail(peg$e14);
|
|
35401
|
+
}
|
|
35402
|
+
}
|
|
35403
|
+
if (s1 !== peg$FAILED) {
|
|
35404
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35405
|
+
s2 = peg$c10;
|
|
35406
|
+
peg$currPos++;
|
|
35407
|
+
} else {
|
|
35408
|
+
s2 = peg$FAILED;
|
|
35409
|
+
if (peg$silentFails === 0) {
|
|
35410
|
+
peg$fail(peg$e12);
|
|
35411
|
+
}
|
|
35412
|
+
}
|
|
35413
|
+
if (s2 !== peg$FAILED) {
|
|
35414
|
+
s3 = peg$parseQualifier();
|
|
35415
|
+
if (s3 !== peg$FAILED) {
|
|
35416
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35417
|
+
s4 = peg$c10;
|
|
35418
|
+
peg$currPos++;
|
|
35419
|
+
} else {
|
|
35420
|
+
s4 = peg$FAILED;
|
|
35421
|
+
if (peg$silentFails === 0) {
|
|
35422
|
+
peg$fail(peg$e12);
|
|
35423
|
+
}
|
|
34709
35424
|
}
|
|
34710
|
-
if (
|
|
34711
|
-
|
|
34712
|
-
|
|
35425
|
+
if (s4 !== peg$FAILED) {
|
|
35426
|
+
if (input.substr(peg$currPos, 2) === peg$c12) {
|
|
35427
|
+
s5 = peg$c12;
|
|
35428
|
+
peg$currPos += 2;
|
|
35429
|
+
} else {
|
|
35430
|
+
s5 = peg$FAILED;
|
|
35431
|
+
if (peg$silentFails === 0) {
|
|
35432
|
+
peg$fail(peg$e14);
|
|
35433
|
+
}
|
|
35434
|
+
}
|
|
35435
|
+
if (s5 !== peg$FAILED) {
|
|
35436
|
+
s6 = peg$parseWNL();
|
|
35437
|
+
if (s6 === peg$FAILED) {
|
|
35438
|
+
s6 = peg$parseWEOL();
|
|
35439
|
+
}
|
|
35440
|
+
if (s6 !== peg$FAILED) {
|
|
35441
|
+
peg$savedPos = s0;
|
|
35442
|
+
s0 = peg$f28(s3);
|
|
35443
|
+
} else {
|
|
35444
|
+
peg$currPos = s0;
|
|
35445
|
+
s0 = peg$FAILED;
|
|
35446
|
+
}
|
|
35447
|
+
} else {
|
|
35448
|
+
peg$currPos = s0;
|
|
35449
|
+
s0 = peg$FAILED;
|
|
35450
|
+
}
|
|
34713
35451
|
} else {
|
|
34714
|
-
peg$currPos =
|
|
34715
|
-
|
|
35452
|
+
peg$currPos = s0;
|
|
35453
|
+
s0 = peg$FAILED;
|
|
34716
35454
|
}
|
|
34717
35455
|
} else {
|
|
34718
|
-
peg$currPos =
|
|
34719
|
-
|
|
35456
|
+
peg$currPos = s0;
|
|
35457
|
+
s0 = peg$FAILED;
|
|
34720
35458
|
}
|
|
34721
|
-
|
|
34722
|
-
|
|
35459
|
+
} else {
|
|
35460
|
+
peg$currPos = s0;
|
|
35461
|
+
s0 = peg$FAILED;
|
|
35462
|
+
}
|
|
35463
|
+
} else {
|
|
35464
|
+
peg$currPos = s0;
|
|
35465
|
+
s0 = peg$FAILED;
|
|
35466
|
+
}
|
|
35467
|
+
if (s0 === peg$FAILED) {
|
|
35468
|
+
s0 = peg$currPos;
|
|
35469
|
+
if (input.substr(peg$currPos, 2) === peg$c12) {
|
|
35470
|
+
s1 = peg$c12;
|
|
35471
|
+
peg$currPos += 2;
|
|
35472
|
+
} else {
|
|
35473
|
+
s1 = peg$FAILED;
|
|
35474
|
+
if (peg$silentFails === 0) {
|
|
35475
|
+
peg$fail(peg$e14);
|
|
34723
35476
|
}
|
|
34724
35477
|
}
|
|
35478
|
+
if (s1 !== peg$FAILED) {
|
|
35479
|
+
s2 = peg$parseWNL();
|
|
35480
|
+
if (s2 === peg$FAILED) {
|
|
35481
|
+
s2 = peg$parseWEOL();
|
|
35482
|
+
}
|
|
35483
|
+
if (s2 !== peg$FAILED) {
|
|
35484
|
+
peg$savedPos = s0;
|
|
35485
|
+
s0 = peg$f29();
|
|
35486
|
+
} else {
|
|
35487
|
+
peg$currPos = s0;
|
|
35488
|
+
s0 = peg$FAILED;
|
|
35489
|
+
}
|
|
35490
|
+
} else {
|
|
35491
|
+
peg$currPos = s0;
|
|
35492
|
+
s0 = peg$FAILED;
|
|
35493
|
+
}
|
|
35494
|
+
}
|
|
35495
|
+
return s0;
|
|
35496
|
+
}
|
|
35497
|
+
function peg$parseCardDividerLookahead_V2() {
|
|
35498
|
+
let s0, s1, s2, s3, s4, s5, s6;
|
|
35499
|
+
s0 = peg$currPos;
|
|
35500
|
+
if (input.substr(peg$currPos, 4) === peg$c6) {
|
|
35501
|
+
s1 = peg$c6;
|
|
35502
|
+
peg$currPos += 4;
|
|
35503
|
+
} else {
|
|
35504
|
+
s1 = peg$FAILED;
|
|
35505
|
+
if (peg$silentFails === 0) {
|
|
35506
|
+
peg$fail(peg$e8);
|
|
35507
|
+
}
|
|
34725
35508
|
}
|
|
34726
35509
|
if (s1 !== peg$FAILED) {
|
|
34727
|
-
|
|
34728
|
-
|
|
35510
|
+
s2 = peg$currPos;
|
|
35511
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35512
|
+
s3 = peg$c10;
|
|
35513
|
+
peg$currPos++;
|
|
35514
|
+
} else {
|
|
35515
|
+
s3 = peg$FAILED;
|
|
35516
|
+
if (peg$silentFails === 0) {
|
|
35517
|
+
peg$fail(peg$e12);
|
|
35518
|
+
}
|
|
35519
|
+
}
|
|
35520
|
+
if (s3 !== peg$FAILED) {
|
|
35521
|
+
s4 = peg$parseQualifier();
|
|
35522
|
+
if (s4 !== peg$FAILED) {
|
|
35523
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35524
|
+
s5 = peg$c10;
|
|
35525
|
+
peg$currPos++;
|
|
35526
|
+
} else {
|
|
35527
|
+
s5 = peg$FAILED;
|
|
35528
|
+
if (peg$silentFails === 0) {
|
|
35529
|
+
peg$fail(peg$e12);
|
|
35530
|
+
}
|
|
35531
|
+
}
|
|
35532
|
+
if (s5 !== peg$FAILED) {
|
|
35533
|
+
if (input.substr(peg$currPos, 4) === peg$c6) {
|
|
35534
|
+
s6 = peg$c6;
|
|
35535
|
+
peg$currPos += 4;
|
|
35536
|
+
} else {
|
|
35537
|
+
s6 = peg$FAILED;
|
|
35538
|
+
if (peg$silentFails === 0) {
|
|
35539
|
+
peg$fail(peg$e8);
|
|
35540
|
+
}
|
|
35541
|
+
}
|
|
35542
|
+
if (s6 !== peg$FAILED) {
|
|
35543
|
+
s3 = [s3, s4, s5, s6];
|
|
35544
|
+
s2 = s3;
|
|
35545
|
+
} else {
|
|
35546
|
+
peg$currPos = s2;
|
|
35547
|
+
s2 = peg$FAILED;
|
|
35548
|
+
}
|
|
35549
|
+
} else {
|
|
35550
|
+
peg$currPos = s2;
|
|
35551
|
+
s2 = peg$FAILED;
|
|
35552
|
+
}
|
|
35553
|
+
} else {
|
|
35554
|
+
peg$currPos = s2;
|
|
35555
|
+
s2 = peg$FAILED;
|
|
35556
|
+
}
|
|
35557
|
+
} else {
|
|
35558
|
+
peg$currPos = s2;
|
|
35559
|
+
s2 = peg$FAILED;
|
|
35560
|
+
}
|
|
35561
|
+
if (s2 === peg$FAILED) {
|
|
35562
|
+
s2 = null;
|
|
35563
|
+
}
|
|
35564
|
+
s3 = peg$parseWNL();
|
|
35565
|
+
if (s3 === peg$FAILED) {
|
|
35566
|
+
s3 = peg$parseWEOL();
|
|
35567
|
+
}
|
|
35568
|
+
if (s3 !== peg$FAILED) {
|
|
35569
|
+
s1 = [s1, s2, s3];
|
|
35570
|
+
s0 = s1;
|
|
35571
|
+
} else {
|
|
35572
|
+
peg$currPos = s0;
|
|
35573
|
+
s0 = peg$FAILED;
|
|
35574
|
+
}
|
|
35575
|
+
} else {
|
|
35576
|
+
peg$currPos = s0;
|
|
35577
|
+
s0 = peg$FAILED;
|
|
34729
35578
|
}
|
|
34730
|
-
s0 = s1;
|
|
34731
35579
|
return s0;
|
|
34732
35580
|
}
|
|
34733
35581
|
function peg$parseCardLine_V2() {
|
|
@@ -34802,7 +35650,7 @@ function peg$parse2(input, options) {
|
|
|
34802
35650
|
}
|
|
34803
35651
|
if (s2 !== peg$FAILED) {
|
|
34804
35652
|
peg$savedPos = s0;
|
|
34805
|
-
s0 = peg$
|
|
35653
|
+
s0 = peg$f30(s2);
|
|
34806
35654
|
} else {
|
|
34807
35655
|
peg$currPos = s0;
|
|
34808
35656
|
s0 = peg$FAILED;
|
|
@@ -34839,7 +35687,7 @@ function peg$parse2(input, options) {
|
|
|
34839
35687
|
}
|
|
34840
35688
|
if (s1 !== peg$FAILED) {
|
|
34841
35689
|
peg$savedPos = s0;
|
|
34842
|
-
s1 = peg$
|
|
35690
|
+
s1 = peg$f31(s1);
|
|
34843
35691
|
}
|
|
34844
35692
|
s0 = s1;
|
|
34845
35693
|
return s0;
|
|
@@ -34847,18 +35695,33 @@ function peg$parse2(input, options) {
|
|
|
34847
35695
|
function peg$parseCardSetStart_V1() {
|
|
34848
35696
|
let s0, s1, s2, s3, s4, s5;
|
|
34849
35697
|
s0 = peg$currPos;
|
|
34850
|
-
s1 =
|
|
35698
|
+
s1 = [];
|
|
35699
|
+
s2 = peg$parseWNL();
|
|
35700
|
+
if (s2 === peg$FAILED) {
|
|
35701
|
+
s2 = peg$parseNL();
|
|
35702
|
+
}
|
|
35703
|
+
if (s2 !== peg$FAILED) {
|
|
35704
|
+
while (s2 !== peg$FAILED) {
|
|
35705
|
+
s1.push(s2);
|
|
35706
|
+
s2 = peg$parseWNL();
|
|
35707
|
+
if (s2 === peg$FAILED) {
|
|
35708
|
+
s2 = peg$parseNL();
|
|
35709
|
+
}
|
|
35710
|
+
}
|
|
35711
|
+
} else {
|
|
35712
|
+
s1 = peg$FAILED;
|
|
35713
|
+
}
|
|
34851
35714
|
if (s1 !== peg$FAILED) {
|
|
34852
35715
|
s2 = peg$currPos;
|
|
34853
35716
|
peg$silentFails++;
|
|
34854
35717
|
s3 = peg$currPos;
|
|
34855
|
-
if (input.substr(peg$currPos, 3) === peg$
|
|
34856
|
-
s4 = peg$
|
|
35718
|
+
if (input.substr(peg$currPos, 3) === peg$c13) {
|
|
35719
|
+
s4 = peg$c13;
|
|
34857
35720
|
peg$currPos += 3;
|
|
34858
35721
|
} else {
|
|
34859
35722
|
s4 = peg$FAILED;
|
|
34860
35723
|
if (peg$silentFails === 0) {
|
|
34861
|
-
peg$fail(peg$
|
|
35724
|
+
peg$fail(peg$e15);
|
|
34862
35725
|
}
|
|
34863
35726
|
}
|
|
34864
35727
|
if (s4 !== peg$FAILED) {
|
|
@@ -34883,7 +35746,7 @@ function peg$parse2(input, options) {
|
|
|
34883
35746
|
}
|
|
34884
35747
|
if (s2 !== peg$FAILED) {
|
|
34885
35748
|
peg$savedPos = s0;
|
|
34886
|
-
s0 = peg$
|
|
35749
|
+
s0 = peg$f32();
|
|
34887
35750
|
} else {
|
|
34888
35751
|
peg$currPos = s0;
|
|
34889
35752
|
s0 = peg$FAILED;
|
|
@@ -34921,7 +35784,7 @@ function peg$parse2(input, options) {
|
|
|
34921
35784
|
}
|
|
34922
35785
|
if (s1 !== peg$FAILED) {
|
|
34923
35786
|
peg$savedPos = s0;
|
|
34924
|
-
s1 = peg$
|
|
35787
|
+
s1 = peg$f33();
|
|
34925
35788
|
}
|
|
34926
35789
|
s0 = s1;
|
|
34927
35790
|
return s0;
|
|
@@ -34932,7 +35795,7 @@ function peg$parse2(input, options) {
|
|
|
34932
35795
|
s1 = peg$parseCardLineOrDivider_V1();
|
|
34933
35796
|
if (s1 !== peg$FAILED) {
|
|
34934
35797
|
peg$savedPos = s0;
|
|
34935
|
-
s1 = peg$
|
|
35798
|
+
s1 = peg$f34(s1);
|
|
34936
35799
|
}
|
|
34937
35800
|
s0 = s1;
|
|
34938
35801
|
return s0;
|
|
@@ -34941,13 +35804,13 @@ function peg$parse2(input, options) {
|
|
|
34941
35804
|
let s0, s1, s2, s3;
|
|
34942
35805
|
s0 = peg$currPos;
|
|
34943
35806
|
s1 = peg$currPos;
|
|
34944
|
-
if (input.substr(peg$currPos, 3) === peg$
|
|
34945
|
-
s2 = peg$
|
|
35807
|
+
if (input.substr(peg$currPos, 3) === peg$c13) {
|
|
35808
|
+
s2 = peg$c13;
|
|
34946
35809
|
peg$currPos += 3;
|
|
34947
35810
|
} else {
|
|
34948
35811
|
s2 = peg$FAILED;
|
|
34949
35812
|
if (peg$silentFails === 0) {
|
|
34950
|
-
peg$fail(peg$
|
|
35813
|
+
peg$fail(peg$e15);
|
|
34951
35814
|
}
|
|
34952
35815
|
}
|
|
34953
35816
|
if (s2 !== peg$FAILED) {
|
|
@@ -34968,13 +35831,13 @@ function peg$parse2(input, options) {
|
|
|
34968
35831
|
}
|
|
34969
35832
|
if (s1 === peg$FAILED) {
|
|
34970
35833
|
s1 = peg$currPos;
|
|
34971
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
34972
|
-
s2 = peg$
|
|
35834
|
+
if (input.substr(peg$currPos, 2) === peg$c14) {
|
|
35835
|
+
s2 = peg$c14;
|
|
34973
35836
|
peg$currPos += 2;
|
|
34974
35837
|
} else {
|
|
34975
35838
|
s2 = peg$FAILED;
|
|
34976
35839
|
if (peg$silentFails === 0) {
|
|
34977
|
-
peg$fail(peg$
|
|
35840
|
+
peg$fail(peg$e16);
|
|
34978
35841
|
}
|
|
34979
35842
|
}
|
|
34980
35843
|
if (s2 !== peg$FAILED) {
|
|
@@ -34995,13 +35858,13 @@ function peg$parse2(input, options) {
|
|
|
34995
35858
|
}
|
|
34996
35859
|
if (s1 === peg$FAILED) {
|
|
34997
35860
|
s1 = peg$currPos;
|
|
34998
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
34999
|
-
s2 = peg$
|
|
35861
|
+
if (input.substr(peg$currPos, 2) === peg$c11) {
|
|
35862
|
+
s2 = peg$c11;
|
|
35000
35863
|
peg$currPos += 2;
|
|
35001
35864
|
} else {
|
|
35002
35865
|
s2 = peg$FAILED;
|
|
35003
35866
|
if (peg$silentFails === 0) {
|
|
35004
|
-
peg$fail(peg$
|
|
35867
|
+
peg$fail(peg$e13);
|
|
35005
35868
|
}
|
|
35006
35869
|
}
|
|
35007
35870
|
if (s2 !== peg$FAILED) {
|
|
@@ -35027,7 +35890,7 @@ function peg$parse2(input, options) {
|
|
|
35027
35890
|
}
|
|
35028
35891
|
if (s1 !== peg$FAILED) {
|
|
35029
35892
|
peg$savedPos = s0;
|
|
35030
|
-
s1 = peg$
|
|
35893
|
+
s1 = peg$f35(s1);
|
|
35031
35894
|
}
|
|
35032
35895
|
s0 = s1;
|
|
35033
35896
|
return s0;
|
|
@@ -35104,7 +35967,7 @@ function peg$parse2(input, options) {
|
|
|
35104
35967
|
}
|
|
35105
35968
|
if (s2 !== peg$FAILED) {
|
|
35106
35969
|
peg$savedPos = s0;
|
|
35107
|
-
s0 = peg$
|
|
35970
|
+
s0 = peg$f36(s2);
|
|
35108
35971
|
} else {
|
|
35109
35972
|
peg$currPos = s0;
|
|
35110
35973
|
s0 = peg$FAILED;
|
|
@@ -35115,6 +35978,102 @@ function peg$parse2(input, options) {
|
|
|
35115
35978
|
}
|
|
35116
35979
|
return s0;
|
|
35117
35980
|
}
|
|
35981
|
+
function peg$parseQualifier() {
|
|
35982
|
+
let s0, s1, s2;
|
|
35983
|
+
s0 = peg$currPos;
|
|
35984
|
+
s1 = peg$currPos;
|
|
35985
|
+
peg$silentFails++;
|
|
35986
|
+
if (input.substr(peg$currPos, 6) === peg$c9) {
|
|
35987
|
+
s2 = peg$c9;
|
|
35988
|
+
peg$currPos += 6;
|
|
35989
|
+
} else {
|
|
35990
|
+
s2 = peg$FAILED;
|
|
35991
|
+
if (peg$silentFails === 0) {
|
|
35992
|
+
peg$fail(peg$e11);
|
|
35993
|
+
}
|
|
35994
|
+
}
|
|
35995
|
+
if (s2 === peg$FAILED) {
|
|
35996
|
+
if (input.substr(peg$currPos, 4) === peg$c7) {
|
|
35997
|
+
s2 = peg$c7;
|
|
35998
|
+
peg$currPos += 4;
|
|
35999
|
+
} else {
|
|
36000
|
+
s2 = peg$FAILED;
|
|
36001
|
+
if (peg$silentFails === 0) {
|
|
36002
|
+
peg$fail(peg$e9);
|
|
36003
|
+
}
|
|
36004
|
+
}
|
|
36005
|
+
}
|
|
36006
|
+
peg$silentFails--;
|
|
36007
|
+
if (s2 === peg$FAILED) {
|
|
36008
|
+
s1 = void 0;
|
|
36009
|
+
} else {
|
|
36010
|
+
peg$currPos = s1;
|
|
36011
|
+
s1 = peg$FAILED;
|
|
36012
|
+
}
|
|
36013
|
+
if (s1 !== peg$FAILED) {
|
|
36014
|
+
s2 = peg$parseQualifierName();
|
|
36015
|
+
if (s2 !== peg$FAILED) {
|
|
36016
|
+
peg$savedPos = s0;
|
|
36017
|
+
s0 = peg$f37(s2);
|
|
36018
|
+
} else {
|
|
36019
|
+
peg$currPos = s0;
|
|
36020
|
+
s0 = peg$FAILED;
|
|
36021
|
+
}
|
|
36022
|
+
} else {
|
|
36023
|
+
peg$currPos = s0;
|
|
36024
|
+
s0 = peg$FAILED;
|
|
36025
|
+
}
|
|
36026
|
+
return s0;
|
|
36027
|
+
}
|
|
36028
|
+
function peg$parseQualifierName() {
|
|
36029
|
+
let s0, s1, s2, s3, s4;
|
|
36030
|
+
s0 = peg$currPos;
|
|
36031
|
+
s1 = peg$currPos;
|
|
36032
|
+
s2 = input.charAt(peg$currPos);
|
|
36033
|
+
if (peg$r1.test(s2)) {
|
|
36034
|
+
peg$currPos++;
|
|
36035
|
+
} else {
|
|
36036
|
+
s2 = peg$FAILED;
|
|
36037
|
+
if (peg$silentFails === 0) {
|
|
36038
|
+
peg$fail(peg$e17);
|
|
36039
|
+
}
|
|
36040
|
+
}
|
|
36041
|
+
if (s2 !== peg$FAILED) {
|
|
36042
|
+
s3 = [];
|
|
36043
|
+
s4 = input.charAt(peg$currPos);
|
|
36044
|
+
if (peg$r2.test(s4)) {
|
|
36045
|
+
peg$currPos++;
|
|
36046
|
+
} else {
|
|
36047
|
+
s4 = peg$FAILED;
|
|
36048
|
+
if (peg$silentFails === 0) {
|
|
36049
|
+
peg$fail(peg$e18);
|
|
36050
|
+
}
|
|
36051
|
+
}
|
|
36052
|
+
while (s4 !== peg$FAILED) {
|
|
36053
|
+
s3.push(s4);
|
|
36054
|
+
s4 = input.charAt(peg$currPos);
|
|
36055
|
+
if (peg$r2.test(s4)) {
|
|
36056
|
+
peg$currPos++;
|
|
36057
|
+
} else {
|
|
36058
|
+
s4 = peg$FAILED;
|
|
36059
|
+
if (peg$silentFails === 0) {
|
|
36060
|
+
peg$fail(peg$e18);
|
|
36061
|
+
}
|
|
36062
|
+
}
|
|
36063
|
+
}
|
|
36064
|
+
s2 = [s2, s3];
|
|
36065
|
+
s1 = s2;
|
|
36066
|
+
} else {
|
|
36067
|
+
peg$currPos = s1;
|
|
36068
|
+
s1 = peg$FAILED;
|
|
36069
|
+
}
|
|
36070
|
+
if (s1 !== peg$FAILED) {
|
|
36071
|
+
s0 = input.substring(s0, peg$currPos);
|
|
36072
|
+
} else {
|
|
36073
|
+
s0 = s1;
|
|
36074
|
+
}
|
|
36075
|
+
return s0;
|
|
36076
|
+
}
|
|
35118
36077
|
function peg$parsecardContent() {
|
|
35119
36078
|
let s0, s1, s2;
|
|
35120
36079
|
s0 = peg$currPos;
|
|
@@ -35131,7 +36090,7 @@ function peg$parse2(input, options) {
|
|
|
35131
36090
|
}
|
|
35132
36091
|
}
|
|
35133
36092
|
peg$savedPos = s0;
|
|
35134
|
-
s1 = peg$
|
|
36093
|
+
s1 = peg$f38(s1);
|
|
35135
36094
|
s0 = s1;
|
|
35136
36095
|
return s0;
|
|
35137
36096
|
}
|
|
@@ -35149,7 +36108,7 @@ function peg$parse2(input, options) {
|
|
|
35149
36108
|
}
|
|
35150
36109
|
if (s1 !== peg$FAILED) {
|
|
35151
36110
|
peg$savedPos = s0;
|
|
35152
|
-
s1 = peg$
|
|
36111
|
+
s1 = peg$f39(s1);
|
|
35153
36112
|
}
|
|
35154
36113
|
s0 = s1;
|
|
35155
36114
|
return s0;
|
|
@@ -35157,13 +36116,13 @@ function peg$parse2(input, options) {
|
|
|
35157
36116
|
function peg$parseIDTag() {
|
|
35158
36117
|
let s0, s1, s2, s3;
|
|
35159
36118
|
s0 = peg$currPos;
|
|
35160
|
-
if (input.substr(peg$currPos, 4) === peg$
|
|
35161
|
-
s1 = peg$
|
|
36119
|
+
if (input.substr(peg$currPos, 4) === peg$c15) {
|
|
36120
|
+
s1 = peg$c15;
|
|
35162
36121
|
peg$currPos += 4;
|
|
35163
36122
|
} else {
|
|
35164
36123
|
s1 = peg$FAILED;
|
|
35165
36124
|
if (peg$silentFails === 0) {
|
|
35166
|
-
peg$fail(peg$
|
|
36125
|
+
peg$fail(peg$e19);
|
|
35167
36126
|
}
|
|
35168
36127
|
}
|
|
35169
36128
|
if (s1 !== peg$FAILED) {
|
|
@@ -35172,7 +36131,7 @@ function peg$parse2(input, options) {
|
|
|
35172
36131
|
s3 = peg$parseTag_Close();
|
|
35173
36132
|
if (s3 !== peg$FAILED) {
|
|
35174
36133
|
peg$savedPos = s0;
|
|
35175
|
-
s0 = peg$
|
|
36134
|
+
s0 = peg$f40(s2);
|
|
35176
36135
|
} else {
|
|
35177
36136
|
peg$currPos = s0;
|
|
35178
36137
|
s0 = peg$FAILED;
|
|
@@ -35202,24 +36161,24 @@ function peg$parse2(input, options) {
|
|
|
35202
36161
|
if (s1 !== peg$FAILED) {
|
|
35203
36162
|
s2 = [];
|
|
35204
36163
|
if (input.charCodeAt(peg$currPos) === 35) {
|
|
35205
|
-
s3 = peg$
|
|
36164
|
+
s3 = peg$c16;
|
|
35206
36165
|
peg$currPos++;
|
|
35207
36166
|
} else {
|
|
35208
36167
|
s3 = peg$FAILED;
|
|
35209
36168
|
if (peg$silentFails === 0) {
|
|
35210
|
-
peg$fail(peg$
|
|
36169
|
+
peg$fail(peg$e20);
|
|
35211
36170
|
}
|
|
35212
36171
|
}
|
|
35213
36172
|
if (s3 !== peg$FAILED) {
|
|
35214
36173
|
while (s3 !== peg$FAILED) {
|
|
35215
36174
|
s2.push(s3);
|
|
35216
36175
|
if (input.charCodeAt(peg$currPos) === 35) {
|
|
35217
|
-
s3 = peg$
|
|
36176
|
+
s3 = peg$c16;
|
|
35218
36177
|
peg$currPos++;
|
|
35219
36178
|
} else {
|
|
35220
36179
|
s3 = peg$FAILED;
|
|
35221
36180
|
if (peg$silentFails === 0) {
|
|
35222
|
-
peg$fail(peg$
|
|
36181
|
+
peg$fail(peg$e20);
|
|
35223
36182
|
}
|
|
35224
36183
|
}
|
|
35225
36184
|
}
|
|
@@ -35231,7 +36190,7 @@ function peg$parse2(input, options) {
|
|
|
35231
36190
|
s4 = peg$parseTag_CloseOrEOF();
|
|
35232
36191
|
if (s4 !== peg$FAILED) {
|
|
35233
36192
|
peg$savedPos = s0;
|
|
35234
|
-
s0 = peg$
|
|
36193
|
+
s0 = peg$f41(s2, s3);
|
|
35235
36194
|
} else {
|
|
35236
36195
|
peg$currPos = s0;
|
|
35237
36196
|
s0 = peg$FAILED;
|
|
@@ -35249,13 +36208,13 @@ function peg$parse2(input, options) {
|
|
|
35249
36208
|
function peg$parseAnchorTag() {
|
|
35250
36209
|
let s0, s1, s2, s3;
|
|
35251
36210
|
s0 = peg$currPos;
|
|
35252
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35253
|
-
s1 = peg$
|
|
36211
|
+
if (input.substr(peg$currPos, 2) === peg$c17) {
|
|
36212
|
+
s1 = peg$c17;
|
|
35254
36213
|
peg$currPos += 2;
|
|
35255
36214
|
} else {
|
|
35256
36215
|
s1 = peg$FAILED;
|
|
35257
36216
|
if (peg$silentFails === 0) {
|
|
35258
|
-
peg$fail(peg$
|
|
36217
|
+
peg$fail(peg$e21);
|
|
35259
36218
|
}
|
|
35260
36219
|
}
|
|
35261
36220
|
if (s1 !== peg$FAILED) {
|
|
@@ -35263,7 +36222,7 @@ function peg$parse2(input, options) {
|
|
|
35263
36222
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35264
36223
|
if (s3 !== peg$FAILED) {
|
|
35265
36224
|
peg$savedPos = s0;
|
|
35266
|
-
s0 = peg$
|
|
36225
|
+
s0 = peg$f42(s2);
|
|
35267
36226
|
} else {
|
|
35268
36227
|
peg$currPos = s0;
|
|
35269
36228
|
s0 = peg$FAILED;
|
|
@@ -35277,13 +36236,13 @@ function peg$parse2(input, options) {
|
|
|
35277
36236
|
function peg$parseReferenceTag() {
|
|
35278
36237
|
let s0, s1, s2, s3;
|
|
35279
36238
|
s0 = peg$currPos;
|
|
35280
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35281
|
-
s1 = peg$
|
|
36239
|
+
if (input.substr(peg$currPos, 2) === peg$c18) {
|
|
36240
|
+
s1 = peg$c18;
|
|
35282
36241
|
peg$currPos += 2;
|
|
35283
36242
|
} else {
|
|
35284
36243
|
s1 = peg$FAILED;
|
|
35285
36244
|
if (peg$silentFails === 0) {
|
|
35286
|
-
peg$fail(peg$
|
|
36245
|
+
peg$fail(peg$e22);
|
|
35287
36246
|
}
|
|
35288
36247
|
}
|
|
35289
36248
|
if (s1 !== peg$FAILED) {
|
|
@@ -35291,7 +36250,7 @@ function peg$parse2(input, options) {
|
|
|
35291
36250
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35292
36251
|
if (s3 !== peg$FAILED) {
|
|
35293
36252
|
peg$savedPos = s0;
|
|
35294
|
-
s0 = peg$
|
|
36253
|
+
s0 = peg$f43(s2);
|
|
35295
36254
|
} else {
|
|
35296
36255
|
peg$currPos = s0;
|
|
35297
36256
|
s0 = peg$FAILED;
|
|
@@ -35305,13 +36264,13 @@ function peg$parse2(input, options) {
|
|
|
35305
36264
|
function peg$parsePropertyTag() {
|
|
35306
36265
|
let s0, s1, s2, s3, s4;
|
|
35307
36266
|
s0 = peg$currPos;
|
|
35308
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35309
|
-
s1 = peg$
|
|
36267
|
+
if (input.substr(peg$currPos, 2) === peg$c19) {
|
|
36268
|
+
s1 = peg$c19;
|
|
35310
36269
|
peg$currPos += 2;
|
|
35311
36270
|
} else {
|
|
35312
36271
|
s1 = peg$FAILED;
|
|
35313
36272
|
if (peg$silentFails === 0) {
|
|
35314
|
-
peg$fail(peg$
|
|
36273
|
+
peg$fail(peg$e23);
|
|
35315
36274
|
}
|
|
35316
36275
|
}
|
|
35317
36276
|
if (s1 !== peg$FAILED) {
|
|
@@ -35322,7 +36281,7 @@ function peg$parse2(input, options) {
|
|
|
35322
36281
|
s4 = peg$parseTag_CloseOrEOF();
|
|
35323
36282
|
if (s4 !== peg$FAILED) {
|
|
35324
36283
|
peg$savedPos = s0;
|
|
35325
|
-
s0 = peg$
|
|
36284
|
+
s0 = peg$f44(s2, s3);
|
|
35326
36285
|
} else {
|
|
35327
36286
|
peg$currPos = s0;
|
|
35328
36287
|
s0 = peg$FAILED;
|
|
@@ -35344,13 +36303,13 @@ function peg$parse2(input, options) {
|
|
|
35344
36303
|
function peg$parseItemLeadTag() {
|
|
35345
36304
|
let s0, s1, s2, s3;
|
|
35346
36305
|
s0 = peg$currPos;
|
|
35347
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35348
|
-
s1 = peg$
|
|
36306
|
+
if (input.substr(peg$currPos, 2) === peg$c20) {
|
|
36307
|
+
s1 = peg$c20;
|
|
35349
36308
|
peg$currPos += 2;
|
|
35350
36309
|
} else {
|
|
35351
36310
|
s1 = peg$FAILED;
|
|
35352
36311
|
if (peg$silentFails === 0) {
|
|
35353
|
-
peg$fail(peg$
|
|
36312
|
+
peg$fail(peg$e24);
|
|
35354
36313
|
}
|
|
35355
36314
|
}
|
|
35356
36315
|
if (s1 !== peg$FAILED) {
|
|
@@ -35358,7 +36317,7 @@ function peg$parse2(input, options) {
|
|
|
35358
36317
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35359
36318
|
if (s3 !== peg$FAILED) {
|
|
35360
36319
|
peg$savedPos = s0;
|
|
35361
|
-
s0 = peg$
|
|
36320
|
+
s0 = peg$f45(s2);
|
|
35362
36321
|
} else {
|
|
35363
36322
|
peg$currPos = s0;
|
|
35364
36323
|
s0 = peg$FAILED;
|
|
@@ -35372,13 +36331,13 @@ function peg$parse2(input, options) {
|
|
|
35372
36331
|
function peg$parseInstructionTag() {
|
|
35373
36332
|
let s0, s1, s2, s3;
|
|
35374
36333
|
s0 = peg$currPos;
|
|
35375
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35376
|
-
s1 = peg$
|
|
36334
|
+
if (input.substr(peg$currPos, 2) === peg$c21) {
|
|
36335
|
+
s1 = peg$c21;
|
|
35377
36336
|
peg$currPos += 2;
|
|
35378
36337
|
} else {
|
|
35379
36338
|
s1 = peg$FAILED;
|
|
35380
36339
|
if (peg$silentFails === 0) {
|
|
35381
|
-
peg$fail(peg$
|
|
36340
|
+
peg$fail(peg$e25);
|
|
35382
36341
|
}
|
|
35383
36342
|
}
|
|
35384
36343
|
if (s1 !== peg$FAILED) {
|
|
@@ -35386,7 +36345,7 @@ function peg$parse2(input, options) {
|
|
|
35386
36345
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35387
36346
|
if (s3 !== peg$FAILED) {
|
|
35388
36347
|
peg$savedPos = s0;
|
|
35389
|
-
s0 = peg$
|
|
36348
|
+
s0 = peg$f46(s2);
|
|
35390
36349
|
} else {
|
|
35391
36350
|
peg$currPos = s0;
|
|
35392
36351
|
s0 = peg$FAILED;
|
|
@@ -35400,13 +36359,13 @@ function peg$parse2(input, options) {
|
|
|
35400
36359
|
function peg$parseHintTag() {
|
|
35401
36360
|
let s0, s1, s2, s3;
|
|
35402
36361
|
s0 = peg$currPos;
|
|
35403
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35404
|
-
s1 = peg$
|
|
36362
|
+
if (input.substr(peg$currPos, 2) === peg$c22) {
|
|
36363
|
+
s1 = peg$c22;
|
|
35405
36364
|
peg$currPos += 2;
|
|
35406
36365
|
} else {
|
|
35407
36366
|
s1 = peg$FAILED;
|
|
35408
36367
|
if (peg$silentFails === 0) {
|
|
35409
|
-
peg$fail(peg$
|
|
36368
|
+
peg$fail(peg$e26);
|
|
35410
36369
|
}
|
|
35411
36370
|
}
|
|
35412
36371
|
if (s1 !== peg$FAILED) {
|
|
@@ -35414,7 +36373,7 @@ function peg$parse2(input, options) {
|
|
|
35414
36373
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35415
36374
|
if (s3 !== peg$FAILED) {
|
|
35416
36375
|
peg$savedPos = s0;
|
|
35417
|
-
s0 = peg$
|
|
36376
|
+
s0 = peg$f47(s2);
|
|
35418
36377
|
} else {
|
|
35419
36378
|
peg$currPos = s0;
|
|
35420
36379
|
s0 = peg$FAILED;
|
|
@@ -35428,13 +36387,13 @@ function peg$parse2(input, options) {
|
|
|
35428
36387
|
function peg$parseTrueTag() {
|
|
35429
36388
|
let s0, s1, s2, s3;
|
|
35430
36389
|
s0 = peg$currPos;
|
|
35431
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35432
|
-
s1 = peg$
|
|
36390
|
+
if (input.substr(peg$currPos, 2) === peg$c23) {
|
|
36391
|
+
s1 = peg$c23;
|
|
35433
36392
|
peg$currPos += 2;
|
|
35434
36393
|
} else {
|
|
35435
36394
|
s1 = peg$FAILED;
|
|
35436
36395
|
if (peg$silentFails === 0) {
|
|
35437
|
-
peg$fail(peg$
|
|
36396
|
+
peg$fail(peg$e27);
|
|
35438
36397
|
}
|
|
35439
36398
|
}
|
|
35440
36399
|
if (s1 !== peg$FAILED) {
|
|
@@ -35442,7 +36401,7 @@ function peg$parse2(input, options) {
|
|
|
35442
36401
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35443
36402
|
if (s3 !== peg$FAILED) {
|
|
35444
36403
|
peg$savedPos = s0;
|
|
35445
|
-
s0 = peg$
|
|
36404
|
+
s0 = peg$f48(s2);
|
|
35446
36405
|
} else {
|
|
35447
36406
|
peg$currPos = s0;
|
|
35448
36407
|
s0 = peg$FAILED;
|
|
@@ -35456,13 +36415,13 @@ function peg$parse2(input, options) {
|
|
|
35456
36415
|
function peg$parseFalseTag() {
|
|
35457
36416
|
let s0, s1, s2, s3;
|
|
35458
36417
|
s0 = peg$currPos;
|
|
35459
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35460
|
-
s1 = peg$
|
|
36418
|
+
if (input.substr(peg$currPos, 2) === peg$c24) {
|
|
36419
|
+
s1 = peg$c24;
|
|
35461
36420
|
peg$currPos += 2;
|
|
35462
36421
|
} else {
|
|
35463
36422
|
s1 = peg$FAILED;
|
|
35464
36423
|
if (peg$silentFails === 0) {
|
|
35465
|
-
peg$fail(peg$
|
|
36424
|
+
peg$fail(peg$e28);
|
|
35466
36425
|
}
|
|
35467
36426
|
}
|
|
35468
36427
|
if (s1 !== peg$FAILED) {
|
|
@@ -35470,7 +36429,7 @@ function peg$parse2(input, options) {
|
|
|
35470
36429
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35471
36430
|
if (s3 !== peg$FAILED) {
|
|
35472
36431
|
peg$savedPos = s0;
|
|
35473
|
-
s0 = peg$
|
|
36432
|
+
s0 = peg$f49(s2);
|
|
35474
36433
|
} else {
|
|
35475
36434
|
peg$currPos = s0;
|
|
35476
36435
|
s0 = peg$FAILED;
|
|
@@ -35484,13 +36443,13 @@ function peg$parse2(input, options) {
|
|
|
35484
36443
|
function peg$parseSampleSolutionTag() {
|
|
35485
36444
|
let s0, s1, s2, s3;
|
|
35486
36445
|
s0 = peg$currPos;
|
|
35487
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35488
|
-
s1 = peg$
|
|
36446
|
+
if (input.substr(peg$currPos, 2) === peg$c25) {
|
|
36447
|
+
s1 = peg$c25;
|
|
35489
36448
|
peg$currPos += 2;
|
|
35490
36449
|
} else {
|
|
35491
36450
|
s1 = peg$FAILED;
|
|
35492
36451
|
if (peg$silentFails === 0) {
|
|
35493
|
-
peg$fail(peg$
|
|
36452
|
+
peg$fail(peg$e29);
|
|
35494
36453
|
}
|
|
35495
36454
|
}
|
|
35496
36455
|
if (s1 !== peg$FAILED) {
|
|
@@ -35498,7 +36457,7 @@ function peg$parse2(input, options) {
|
|
|
35498
36457
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35499
36458
|
if (s3 !== peg$FAILED) {
|
|
35500
36459
|
peg$savedPos = s0;
|
|
35501
|
-
s0 = peg$
|
|
36460
|
+
s0 = peg$f50(s2);
|
|
35502
36461
|
} else {
|
|
35503
36462
|
peg$currPos = s0;
|
|
35504
36463
|
s0 = peg$FAILED;
|
|
@@ -35512,13 +36471,13 @@ function peg$parse2(input, options) {
|
|
|
35512
36471
|
function peg$parseGapTag() {
|
|
35513
36472
|
let s0, s1, s2, s3;
|
|
35514
36473
|
s0 = peg$currPos;
|
|
35515
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35516
|
-
s1 = peg$
|
|
36474
|
+
if (input.substr(peg$currPos, 2) === peg$c26) {
|
|
36475
|
+
s1 = peg$c26;
|
|
35517
36476
|
peg$currPos += 2;
|
|
35518
36477
|
} else {
|
|
35519
36478
|
s1 = peg$FAILED;
|
|
35520
36479
|
if (peg$silentFails === 0) {
|
|
35521
|
-
peg$fail(peg$
|
|
36480
|
+
peg$fail(peg$e30);
|
|
35522
36481
|
}
|
|
35523
36482
|
}
|
|
35524
36483
|
if (s1 !== peg$FAILED) {
|
|
@@ -35526,7 +36485,7 @@ function peg$parse2(input, options) {
|
|
|
35526
36485
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35527
36486
|
if (s3 !== peg$FAILED) {
|
|
35528
36487
|
peg$savedPos = s0;
|
|
35529
|
-
s0 = peg$
|
|
36488
|
+
s0 = peg$f51(s2);
|
|
35530
36489
|
} else {
|
|
35531
36490
|
peg$currPos = s0;
|
|
35532
36491
|
s0 = peg$FAILED;
|
|
@@ -35540,13 +36499,13 @@ function peg$parse2(input, options) {
|
|
|
35540
36499
|
function peg$parseMarkTag() {
|
|
35541
36500
|
let s0, s1, s2, s3;
|
|
35542
36501
|
s0 = peg$currPos;
|
|
35543
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35544
|
-
s1 = peg$
|
|
36502
|
+
if (input.substr(peg$currPos, 2) === peg$c27) {
|
|
36503
|
+
s1 = peg$c27;
|
|
35545
36504
|
peg$currPos += 2;
|
|
35546
36505
|
} else {
|
|
35547
36506
|
s1 = peg$FAILED;
|
|
35548
36507
|
if (peg$silentFails === 0) {
|
|
35549
|
-
peg$fail(peg$
|
|
36508
|
+
peg$fail(peg$e31);
|
|
35550
36509
|
}
|
|
35551
36510
|
}
|
|
35552
36511
|
if (s1 !== peg$FAILED) {
|
|
@@ -35554,7 +36513,7 @@ function peg$parse2(input, options) {
|
|
|
35554
36513
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35555
36514
|
if (s3 !== peg$FAILED) {
|
|
35556
36515
|
peg$savedPos = s0;
|
|
35557
|
-
s0 = peg$
|
|
36516
|
+
s0 = peg$f52(s2);
|
|
35558
36517
|
} else {
|
|
35559
36518
|
peg$currPos = s0;
|
|
35560
36519
|
s0 = peg$FAILED;
|
|
@@ -35568,13 +36527,13 @@ function peg$parse2(input, options) {
|
|
|
35568
36527
|
function peg$parseResourceTag() {
|
|
35569
36528
|
let s0, s1, s2, s3, s4;
|
|
35570
36529
|
s0 = peg$currPos;
|
|
35571
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35572
|
-
s1 = peg$
|
|
36530
|
+
if (input.substr(peg$currPos, 2) === peg$c28) {
|
|
36531
|
+
s1 = peg$c28;
|
|
35573
36532
|
peg$currPos += 2;
|
|
35574
36533
|
} else {
|
|
35575
36534
|
s1 = peg$FAILED;
|
|
35576
36535
|
if (peg$silentFails === 0) {
|
|
35577
|
-
peg$fail(peg$
|
|
36536
|
+
peg$fail(peg$e32);
|
|
35578
36537
|
}
|
|
35579
36538
|
}
|
|
35580
36539
|
if (s1 !== peg$FAILED) {
|
|
@@ -35585,7 +36544,7 @@ function peg$parse2(input, options) {
|
|
|
35585
36544
|
s4 = peg$parseTag_CloseOrEOF();
|
|
35586
36545
|
if (s4 !== peg$FAILED) {
|
|
35587
36546
|
peg$savedPos = s0;
|
|
35588
|
-
s0 = peg$
|
|
36547
|
+
s0 = peg$f53(s2, s3);
|
|
35589
36548
|
} else {
|
|
35590
36549
|
peg$currPos = s0;
|
|
35591
36550
|
s0 = peg$FAILED;
|
|
@@ -35609,13 +36568,13 @@ function peg$parse2(input, options) {
|
|
|
35609
36568
|
s0 = peg$currPos;
|
|
35610
36569
|
s1 = peg$currPos;
|
|
35611
36570
|
s2 = [];
|
|
35612
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35613
|
-
s3 = peg$
|
|
36571
|
+
if (input.substr(peg$currPos, 2) === peg$c29) {
|
|
36572
|
+
s3 = peg$c29;
|
|
35614
36573
|
peg$currPos += 2;
|
|
35615
36574
|
} else {
|
|
35616
36575
|
s3 = peg$FAILED;
|
|
35617
36576
|
if (peg$silentFails === 0) {
|
|
35618
|
-
peg$fail(peg$
|
|
36577
|
+
peg$fail(peg$e33);
|
|
35619
36578
|
}
|
|
35620
36579
|
}
|
|
35621
36580
|
if (s3 === peg$FAILED) {
|
|
@@ -35631,13 +36590,13 @@ function peg$parse2(input, options) {
|
|
|
35631
36590
|
}
|
|
35632
36591
|
while (s3 !== peg$FAILED) {
|
|
35633
36592
|
s2.push(s3);
|
|
35634
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35635
|
-
s3 = peg$
|
|
36593
|
+
if (input.substr(peg$currPos, 2) === peg$c29) {
|
|
36594
|
+
s3 = peg$c29;
|
|
35636
36595
|
peg$currPos += 2;
|
|
35637
36596
|
} else {
|
|
35638
36597
|
s3 = peg$FAILED;
|
|
35639
36598
|
if (peg$silentFails === 0) {
|
|
35640
|
-
peg$fail(peg$
|
|
36599
|
+
peg$fail(peg$e33);
|
|
35641
36600
|
}
|
|
35642
36601
|
}
|
|
35643
36602
|
if (s3 === peg$FAILED) {
|
|
@@ -35654,7 +36613,7 @@ function peg$parse2(input, options) {
|
|
|
35654
36613
|
}
|
|
35655
36614
|
s1 = input.substring(s1, peg$currPos);
|
|
35656
36615
|
peg$savedPos = s0;
|
|
35657
|
-
s1 = peg$
|
|
36616
|
+
s1 = peg$f54(s1);
|
|
35658
36617
|
s0 = s1;
|
|
35659
36618
|
return s0;
|
|
35660
36619
|
}
|
|
@@ -35663,13 +36622,13 @@ function peg$parse2(input, options) {
|
|
|
35663
36622
|
s0 = peg$currPos;
|
|
35664
36623
|
s1 = peg$currPos;
|
|
35665
36624
|
peg$silentFails++;
|
|
35666
|
-
if (input.substr(peg$currPos, 3) === peg$
|
|
35667
|
-
s2 = peg$
|
|
36625
|
+
if (input.substr(peg$currPos, 3) === peg$c30) {
|
|
36626
|
+
s2 = peg$c30;
|
|
35668
36627
|
peg$currPos += 3;
|
|
35669
36628
|
} else {
|
|
35670
36629
|
s2 = peg$FAILED;
|
|
35671
36630
|
if (peg$silentFails === 0) {
|
|
35672
|
-
peg$fail(peg$
|
|
36631
|
+
peg$fail(peg$e34);
|
|
35673
36632
|
}
|
|
35674
36633
|
}
|
|
35675
36634
|
peg$silentFails--;
|
|
@@ -35683,29 +36642,29 @@ function peg$parse2(input, options) {
|
|
|
35683
36642
|
s2 = peg$currPos;
|
|
35684
36643
|
s3 = [];
|
|
35685
36644
|
s4 = input.charAt(peg$currPos);
|
|
35686
|
-
if (peg$
|
|
36645
|
+
if (peg$r3.test(s4)) {
|
|
35687
36646
|
peg$currPos++;
|
|
35688
36647
|
} else {
|
|
35689
36648
|
s4 = peg$FAILED;
|
|
35690
36649
|
if (peg$silentFails === 0) {
|
|
35691
|
-
peg$fail(peg$
|
|
36650
|
+
peg$fail(peg$e35);
|
|
35692
36651
|
}
|
|
35693
36652
|
}
|
|
35694
36653
|
while (s4 !== peg$FAILED) {
|
|
35695
36654
|
s3.push(s4);
|
|
35696
36655
|
s4 = input.charAt(peg$currPos);
|
|
35697
|
-
if (peg$
|
|
36656
|
+
if (peg$r3.test(s4)) {
|
|
35698
36657
|
peg$currPos++;
|
|
35699
36658
|
} else {
|
|
35700
36659
|
s4 = peg$FAILED;
|
|
35701
36660
|
if (peg$silentFails === 0) {
|
|
35702
|
-
peg$fail(peg$
|
|
36661
|
+
peg$fail(peg$e35);
|
|
35703
36662
|
}
|
|
35704
36663
|
}
|
|
35705
36664
|
}
|
|
35706
36665
|
s2 = input.substring(s2, peg$currPos);
|
|
35707
36666
|
peg$savedPos = s0;
|
|
35708
|
-
s0 = peg$
|
|
36667
|
+
s0 = peg$f55(s2);
|
|
35709
36668
|
} else {
|
|
35710
36669
|
peg$currPos = s0;
|
|
35711
36670
|
s0 = peg$FAILED;
|
|
@@ -35760,24 +36719,24 @@ function peg$parse2(input, options) {
|
|
|
35760
36719
|
s0 = peg$currPos;
|
|
35761
36720
|
s1 = [];
|
|
35762
36721
|
if (input.charCodeAt(peg$currPos) === 46) {
|
|
35763
|
-
s2 = peg$
|
|
36722
|
+
s2 = peg$c31;
|
|
35764
36723
|
peg$currPos++;
|
|
35765
36724
|
} else {
|
|
35766
36725
|
s2 = peg$FAILED;
|
|
35767
36726
|
if (peg$silentFails === 0) {
|
|
35768
|
-
peg$fail(peg$
|
|
36727
|
+
peg$fail(peg$e36);
|
|
35769
36728
|
}
|
|
35770
36729
|
}
|
|
35771
36730
|
if (s2 !== peg$FAILED) {
|
|
35772
36731
|
while (s2 !== peg$FAILED) {
|
|
35773
36732
|
s1.push(s2);
|
|
35774
36733
|
if (input.charCodeAt(peg$currPos) === 46) {
|
|
35775
|
-
s2 = peg$
|
|
36734
|
+
s2 = peg$c31;
|
|
35776
36735
|
peg$currPos++;
|
|
35777
36736
|
} else {
|
|
35778
36737
|
s2 = peg$FAILED;
|
|
35779
36738
|
if (peg$silentFails === 0) {
|
|
35780
|
-
peg$fail(peg$
|
|
36739
|
+
peg$fail(peg$e36);
|
|
35781
36740
|
}
|
|
35782
36741
|
}
|
|
35783
36742
|
}
|
|
@@ -35786,7 +36745,7 @@ function peg$parse2(input, options) {
|
|
|
35786
36745
|
}
|
|
35787
36746
|
if (s1 !== peg$FAILED) {
|
|
35788
36747
|
peg$savedPos = s0;
|
|
35789
|
-
s1 = peg$
|
|
36748
|
+
s1 = peg$f56(s1);
|
|
35790
36749
|
}
|
|
35791
36750
|
s0 = s1;
|
|
35792
36751
|
return s0;
|
|
@@ -35797,29 +36756,29 @@ function peg$parse2(input, options) {
|
|
|
35797
36756
|
s1 = peg$currPos;
|
|
35798
36757
|
s2 = [];
|
|
35799
36758
|
s3 = input.charAt(peg$currPos);
|
|
35800
|
-
if (peg$
|
|
36759
|
+
if (peg$r4.test(s3)) {
|
|
35801
36760
|
peg$currPos++;
|
|
35802
36761
|
} else {
|
|
35803
36762
|
s3 = peg$FAILED;
|
|
35804
36763
|
if (peg$silentFails === 0) {
|
|
35805
|
-
peg$fail(peg$
|
|
36764
|
+
peg$fail(peg$e37);
|
|
35806
36765
|
}
|
|
35807
36766
|
}
|
|
35808
36767
|
while (s3 !== peg$FAILED) {
|
|
35809
36768
|
s2.push(s3);
|
|
35810
36769
|
s3 = input.charAt(peg$currPos);
|
|
35811
|
-
if (peg$
|
|
36770
|
+
if (peg$r4.test(s3)) {
|
|
35812
36771
|
peg$currPos++;
|
|
35813
36772
|
} else {
|
|
35814
36773
|
s3 = peg$FAILED;
|
|
35815
36774
|
if (peg$silentFails === 0) {
|
|
35816
|
-
peg$fail(peg$
|
|
36775
|
+
peg$fail(peg$e37);
|
|
35817
36776
|
}
|
|
35818
36777
|
}
|
|
35819
36778
|
}
|
|
35820
36779
|
s1 = input.substring(s1, peg$currPos);
|
|
35821
36780
|
peg$savedPos = s0;
|
|
35822
|
-
s1 = peg$
|
|
36781
|
+
s1 = peg$f57(s1);
|
|
35823
36782
|
s0 = s1;
|
|
35824
36783
|
return s0;
|
|
35825
36784
|
}
|
|
@@ -35838,7 +36797,7 @@ function peg$parse2(input, options) {
|
|
|
35838
36797
|
if (s1 !== peg$FAILED) {
|
|
35839
36798
|
s2 = peg$parseTag_Value();
|
|
35840
36799
|
peg$savedPos = s0;
|
|
35841
|
-
s0 = peg$
|
|
36800
|
+
s0 = peg$f58(s2);
|
|
35842
36801
|
} else {
|
|
35843
36802
|
peg$currPos = s0;
|
|
35844
36803
|
s0 = peg$FAILED;
|
|
@@ -35847,7 +36806,7 @@ function peg$parse2(input, options) {
|
|
|
35847
36806
|
s0 = peg$currPos;
|
|
35848
36807
|
s1 = "";
|
|
35849
36808
|
peg$savedPos = s0;
|
|
35850
|
-
s1 = peg$
|
|
36809
|
+
s1 = peg$f59();
|
|
35851
36810
|
s0 = s1;
|
|
35852
36811
|
}
|
|
35853
36812
|
return s0;
|
|
@@ -35884,19 +36843,19 @@ function peg$parse2(input, options) {
|
|
|
35884
36843
|
let s0, s1;
|
|
35885
36844
|
peg$silentFails++;
|
|
35886
36845
|
s0 = input.charAt(peg$currPos);
|
|
35887
|
-
if (peg$
|
|
36846
|
+
if (peg$r5.test(s0)) {
|
|
35888
36847
|
peg$currPos++;
|
|
35889
36848
|
} else {
|
|
35890
36849
|
s0 = peg$FAILED;
|
|
35891
36850
|
if (peg$silentFails === 0) {
|
|
35892
|
-
peg$fail(peg$
|
|
36851
|
+
peg$fail(peg$e39);
|
|
35893
36852
|
}
|
|
35894
36853
|
}
|
|
35895
36854
|
peg$silentFails--;
|
|
35896
36855
|
if (s0 === peg$FAILED) {
|
|
35897
36856
|
s1 = peg$FAILED;
|
|
35898
36857
|
if (peg$silentFails === 0) {
|
|
35899
|
-
peg$fail(peg$
|
|
36858
|
+
peg$fail(peg$e38);
|
|
35900
36859
|
}
|
|
35901
36860
|
}
|
|
35902
36861
|
return s0;
|
|
@@ -35919,23 +36878,23 @@ function peg$parse2(input, options) {
|
|
|
35919
36878
|
s0 = peg$currPos;
|
|
35920
36879
|
s1 = [];
|
|
35921
36880
|
s2 = input.charAt(peg$currPos);
|
|
35922
|
-
if (peg$
|
|
36881
|
+
if (peg$r6.test(s2)) {
|
|
35923
36882
|
peg$currPos++;
|
|
35924
36883
|
} else {
|
|
35925
36884
|
s2 = peg$FAILED;
|
|
35926
36885
|
if (peg$silentFails === 0) {
|
|
35927
|
-
peg$fail(peg$
|
|
36886
|
+
peg$fail(peg$e41);
|
|
35928
36887
|
}
|
|
35929
36888
|
}
|
|
35930
36889
|
while (s2 !== peg$FAILED) {
|
|
35931
36890
|
s1.push(s2);
|
|
35932
36891
|
s2 = input.charAt(peg$currPos);
|
|
35933
|
-
if (peg$
|
|
36892
|
+
if (peg$r6.test(s2)) {
|
|
35934
36893
|
peg$currPos++;
|
|
35935
36894
|
} else {
|
|
35936
36895
|
s2 = peg$FAILED;
|
|
35937
36896
|
if (peg$silentFails === 0) {
|
|
35938
|
-
peg$fail(peg$
|
|
36897
|
+
peg$fail(peg$e41);
|
|
35939
36898
|
}
|
|
35940
36899
|
}
|
|
35941
36900
|
}
|
|
@@ -35951,7 +36910,7 @@ function peg$parse2(input, options) {
|
|
|
35951
36910
|
if (s0 === peg$FAILED) {
|
|
35952
36911
|
s1 = peg$FAILED;
|
|
35953
36912
|
if (peg$silentFails === 0) {
|
|
35954
|
-
peg$fail(peg$
|
|
36913
|
+
peg$fail(peg$e40);
|
|
35955
36914
|
}
|
|
35956
36915
|
}
|
|
35957
36916
|
return s0;
|
|
@@ -35960,32 +36919,32 @@ function peg$parse2(input, options) {
|
|
|
35960
36919
|
let s0, s1;
|
|
35961
36920
|
peg$silentFails++;
|
|
35962
36921
|
if (input.charCodeAt(peg$currPos) === 10) {
|
|
35963
|
-
s0 = peg$
|
|
36922
|
+
s0 = peg$c32;
|
|
35964
36923
|
peg$currPos++;
|
|
35965
36924
|
} else {
|
|
35966
36925
|
s0 = peg$FAILED;
|
|
35967
36926
|
if (peg$silentFails === 0) {
|
|
35968
|
-
peg$fail(peg$
|
|
36927
|
+
peg$fail(peg$e43);
|
|
35969
36928
|
}
|
|
35970
36929
|
}
|
|
35971
36930
|
if (s0 === peg$FAILED) {
|
|
35972
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35973
|
-
s0 = peg$
|
|
36931
|
+
if (input.substr(peg$currPos, 2) === peg$c33) {
|
|
36932
|
+
s0 = peg$c33;
|
|
35974
36933
|
peg$currPos += 2;
|
|
35975
36934
|
} else {
|
|
35976
36935
|
s0 = peg$FAILED;
|
|
35977
36936
|
if (peg$silentFails === 0) {
|
|
35978
|
-
peg$fail(peg$
|
|
36937
|
+
peg$fail(peg$e44);
|
|
35979
36938
|
}
|
|
35980
36939
|
}
|
|
35981
36940
|
if (s0 === peg$FAILED) {
|
|
35982
36941
|
s0 = input.charAt(peg$currPos);
|
|
35983
|
-
if (peg$
|
|
36942
|
+
if (peg$r7.test(s0)) {
|
|
35984
36943
|
peg$currPos++;
|
|
35985
36944
|
} else {
|
|
35986
36945
|
s0 = peg$FAILED;
|
|
35987
36946
|
if (peg$silentFails === 0) {
|
|
35988
|
-
peg$fail(peg$
|
|
36947
|
+
peg$fail(peg$e45);
|
|
35989
36948
|
}
|
|
35990
36949
|
}
|
|
35991
36950
|
}
|
|
@@ -35994,7 +36953,7 @@ function peg$parse2(input, options) {
|
|
|
35994
36953
|
if (s0 === peg$FAILED) {
|
|
35995
36954
|
s1 = peg$FAILED;
|
|
35996
36955
|
if (peg$silentFails === 0) {
|
|
35997
|
-
peg$fail(peg$
|
|
36956
|
+
peg$fail(peg$e42);
|
|
35998
36957
|
}
|
|
35999
36958
|
}
|
|
36000
36959
|
return s0;
|
|
@@ -36005,23 +36964,23 @@ function peg$parse2(input, options) {
|
|
|
36005
36964
|
s0 = peg$currPos;
|
|
36006
36965
|
s1 = [];
|
|
36007
36966
|
s2 = input.charAt(peg$currPos);
|
|
36008
|
-
if (peg$
|
|
36967
|
+
if (peg$r6.test(s2)) {
|
|
36009
36968
|
peg$currPos++;
|
|
36010
36969
|
} else {
|
|
36011
36970
|
s2 = peg$FAILED;
|
|
36012
36971
|
if (peg$silentFails === 0) {
|
|
36013
|
-
peg$fail(peg$
|
|
36972
|
+
peg$fail(peg$e41);
|
|
36014
36973
|
}
|
|
36015
36974
|
}
|
|
36016
36975
|
while (s2 !== peg$FAILED) {
|
|
36017
36976
|
s1.push(s2);
|
|
36018
36977
|
s2 = input.charAt(peg$currPos);
|
|
36019
|
-
if (peg$
|
|
36978
|
+
if (peg$r6.test(s2)) {
|
|
36020
36979
|
peg$currPos++;
|
|
36021
36980
|
} else {
|
|
36022
36981
|
s2 = peg$FAILED;
|
|
36023
36982
|
if (peg$silentFails === 0) {
|
|
36024
|
-
peg$fail(peg$
|
|
36983
|
+
peg$fail(peg$e41);
|
|
36025
36984
|
}
|
|
36026
36985
|
}
|
|
36027
36986
|
}
|
|
@@ -36037,7 +36996,7 @@ function peg$parse2(input, options) {
|
|
|
36037
36996
|
if (s0 === peg$FAILED) {
|
|
36038
36997
|
s1 = peg$FAILED;
|
|
36039
36998
|
if (peg$silentFails === 0) {
|
|
36040
|
-
peg$fail(peg$
|
|
36999
|
+
peg$fail(peg$e46);
|
|
36041
37000
|
}
|
|
36042
37001
|
}
|
|
36043
37002
|
return s0;
|
|
@@ -36046,19 +37005,19 @@ function peg$parse2(input, options) {
|
|
|
36046
37005
|
let s0, s1;
|
|
36047
37006
|
peg$silentFails++;
|
|
36048
37007
|
s0 = input.charAt(peg$currPos);
|
|
36049
|
-
if (peg$
|
|
37008
|
+
if (peg$r8.test(s0)) {
|
|
36050
37009
|
peg$currPos++;
|
|
36051
37010
|
} else {
|
|
36052
37011
|
s0 = peg$FAILED;
|
|
36053
37012
|
if (peg$silentFails === 0) {
|
|
36054
|
-
peg$fail(peg$
|
|
37013
|
+
peg$fail(peg$e48);
|
|
36055
37014
|
}
|
|
36056
37015
|
}
|
|
36057
37016
|
peg$silentFails--;
|
|
36058
37017
|
if (s0 === peg$FAILED) {
|
|
36059
37018
|
s1 = peg$FAILED;
|
|
36060
37019
|
if (peg$silentFails === 0) {
|
|
36061
|
-
peg$fail(peg$
|
|
37020
|
+
peg$fail(peg$e47);
|
|
36062
37021
|
}
|
|
36063
37022
|
}
|
|
36064
37023
|
return s0;
|