@gmb/bitmark-parser-generator 4.13.0 → 4.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/bitmark-parser-generator.min.js +1 -1
- package/dist/browser/bundle-report.html +2 -2
- package/dist/browser/cjs/index.cjs +1336 -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 +1336 -379
- package/dist/browser/esm/index.js.map +1 -1
- package/dist/index.cjs +1336 -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 +1336 -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.0",
|
|
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,8 +27203,8 @@ 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);
|
|
@@ -27000,10 +27287,19 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
27000
27287
|
}
|
|
27001
27288
|
}
|
|
27002
27289
|
// bitmarkAst -> bits -> bitsValue -> questions -> questionsValue -> question
|
|
27290
|
+
// bitmarkAst -> bits -> bitsValue -> cardNode -> questions -> questionsValue -> question
|
|
27291
|
+
enter_question(node, route) {
|
|
27292
|
+
const parent = this.getParentNode(route);
|
|
27293
|
+
if (parent?.key !== NodeType.questionsValue) return;
|
|
27294
|
+
if (node.value) {
|
|
27295
|
+
this.writeNL();
|
|
27296
|
+
this.writeTextOrValue(node.value, this.textFormat, TextLocation.body);
|
|
27297
|
+
}
|
|
27298
|
+
}
|
|
27003
27299
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> flashcards -> flashcardsValue -> question
|
|
27004
27300
|
leaf_question(node, route) {
|
|
27005
27301
|
const parent = this.getParentNode(route);
|
|
27006
|
-
if (parent?.key !== NodeType.
|
|
27302
|
+
if (parent?.key !== NodeType.flashcardsValue) return;
|
|
27007
27303
|
if (node.value) {
|
|
27008
27304
|
this.writeNL();
|
|
27009
27305
|
this.writeTextOrValue(node.value, this.textFormat, TextLocation.body);
|
|
@@ -27479,12 +27775,12 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
27479
27775
|
} else {
|
|
27480
27776
|
}
|
|
27481
27777
|
}
|
|
27482
|
-
writeCardSetCardDivider() {
|
|
27778
|
+
writeCardSetCardDivider(qualifier) {
|
|
27483
27779
|
this.writeNL();
|
|
27484
|
-
|
|
27485
|
-
|
|
27486
|
-
|
|
27487
|
-
this.
|
|
27780
|
+
const divider = this.getCardDividerMarker();
|
|
27781
|
+
this.write(divider);
|
|
27782
|
+
if (qualifier) {
|
|
27783
|
+
this.appendCardDividerQualifier(qualifier);
|
|
27488
27784
|
}
|
|
27489
27785
|
}
|
|
27490
27786
|
writeCardSetSideDivider() {
|
|
@@ -27503,6 +27799,20 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
27503
27799
|
this.write("++");
|
|
27504
27800
|
}
|
|
27505
27801
|
}
|
|
27802
|
+
getCardDividerMarker() {
|
|
27803
|
+
return this.options.cardSetVersion === CardSetVersion.v1 ? "===" : "====";
|
|
27804
|
+
}
|
|
27805
|
+
appendCardDividerQualifier(qualifier) {
|
|
27806
|
+
const marker = this.getCardDividerMarker();
|
|
27807
|
+
const normalizedQualifier = instance3.breakscape(qualifier, {
|
|
27808
|
+
format: TextFormat.plainText,
|
|
27809
|
+
location: TextLocation.tag
|
|
27810
|
+
});
|
|
27811
|
+
this.write(" ");
|
|
27812
|
+
this.write(normalizedQualifier);
|
|
27813
|
+
this.write(" ");
|
|
27814
|
+
this.write(marker);
|
|
27815
|
+
}
|
|
27506
27816
|
writeNL_IfNotChain(route) {
|
|
27507
27817
|
if (!this.isChain(route)) {
|
|
27508
27818
|
this.writeNL();
|
|
@@ -27607,7 +27917,10 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
27607
27917
|
return !!writeFormat;
|
|
27608
27918
|
}
|
|
27609
27919
|
calculateIsCardAllowed() {
|
|
27610
|
-
return this.isBodyBitmarkText && !this.isOfBitType1();
|
|
27920
|
+
return this.isBodyBitmarkText && !this.isOfBitType1() && !this.isTableBitType();
|
|
27921
|
+
}
|
|
27922
|
+
isTableBitType() {
|
|
27923
|
+
return this.isOfBitType([BitType.table]);
|
|
27611
27924
|
}
|
|
27612
27925
|
isOfBitType1() {
|
|
27613
27926
|
return this.isOfBitType([
|
|
@@ -28124,7 +28437,7 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
28124
28437
|
const parent = this.getParentNode(route);
|
|
28125
28438
|
if (parent?.key !== NodeType.cardNode) return;
|
|
28126
28439
|
if (statement) {
|
|
28127
|
-
this.bitJson.statement = statement.statement ??
|
|
28440
|
+
this.bitJson.statement = statement.statement ?? [];
|
|
28128
28441
|
this.bitJson.isCorrect = statement.isCorrect ?? false;
|
|
28129
28442
|
this.bitJson.example = statement.example;
|
|
28130
28443
|
this.bitJson.isExample = statement.isExample;
|
|
@@ -28746,6 +29059,9 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
28746
29059
|
if (bitJson.footer == null) bitJson.footer = this.textDefault;
|
|
28747
29060
|
if (bitJson.questions == null) bitJson.questions = [];
|
|
28748
29061
|
}
|
|
29062
|
+
if (instance2.isOfBitType(bitType, BitType.sequence)) {
|
|
29063
|
+
if (bitJson.elements == null) bitJson.elements = [];
|
|
29064
|
+
}
|
|
28749
29065
|
if (bitType === BitType.matchMatrix) {
|
|
28750
29066
|
isTopLevelExample = true;
|
|
28751
29067
|
}
|
|
@@ -28806,6 +29122,7 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
28806
29122
|
}
|
|
28807
29123
|
if (instance2.isOfBitType(bitType, BitType.book)) {
|
|
28808
29124
|
if (bitJson.maxTocChapterLevel == null) bitJson.maxTocChapterLevel = -1;
|
|
29125
|
+
if (bitJson.hasPrintRestriction == null) bitJson.hasPrintRestriction = true;
|
|
28809
29126
|
if (bitJson.hasMarkAsDone == null) bitJson.hasMarkAsDone = false;
|
|
28810
29127
|
if (bitJson.processHandIn == null) bitJson.processHandIn = false;
|
|
28811
29128
|
if (bitJson.isPublic == null) bitJson.isPublic = false;
|
|
@@ -29463,6 +29780,9 @@ var BitmarkPegParserHelper = class {
|
|
|
29463
29780
|
__publicField(this, "cardIndex", 0);
|
|
29464
29781
|
__publicField(this, "cardSideIndex", 0);
|
|
29465
29782
|
__publicField(this, "cardVariantIndex", 0);
|
|
29783
|
+
__publicField(this, "currentCardQualifier");
|
|
29784
|
+
__publicField(this, "currentSideQualifier");
|
|
29785
|
+
__publicField(this, "currentVariantQualifier");
|
|
29466
29786
|
__publicField(this, "parse");
|
|
29467
29787
|
__publicField(this, "parserText");
|
|
29468
29788
|
__publicField(this, "parserLocation");
|
|
@@ -29631,30 +29951,43 @@ var BitmarkPegParserHelper = class {
|
|
|
29631
29951
|
cardIndex,
|
|
29632
29952
|
cardSideIndex,
|
|
29633
29953
|
cardVariantIndex: cardContentIndex,
|
|
29634
|
-
value: value2
|
|
29954
|
+
value: value2,
|
|
29955
|
+
cardQualifier,
|
|
29956
|
+
cardSideQualifier,
|
|
29957
|
+
cardVariantQualifier
|
|
29635
29958
|
} = cardData;
|
|
29636
29959
|
let card = unparsedCardSet.cards[cardIndex];
|
|
29637
29960
|
if (!card) {
|
|
29638
29961
|
card = {
|
|
29639
|
-
sides: []
|
|
29962
|
+
sides: [],
|
|
29963
|
+
qualifier: cardQualifier
|
|
29640
29964
|
};
|
|
29641
29965
|
unparsedCardSet.cards[cardIndex] = card;
|
|
29966
|
+
} else if (cardQualifier && !card.qualifier) {
|
|
29967
|
+
card.qualifier = cardQualifier;
|
|
29642
29968
|
}
|
|
29643
29969
|
let side = card.sides[cardSideIndex];
|
|
29644
29970
|
if (!side) {
|
|
29645
29971
|
side = {
|
|
29646
|
-
variants: []
|
|
29972
|
+
variants: [],
|
|
29973
|
+
qualifier: cardSideQualifier
|
|
29647
29974
|
};
|
|
29648
29975
|
card.sides[cardSideIndex] = side;
|
|
29976
|
+
} else if (cardSideQualifier && !side.qualifier) {
|
|
29977
|
+
side.qualifier = cardSideQualifier;
|
|
29649
29978
|
}
|
|
29650
29979
|
const variant = side.variants[cardContentIndex];
|
|
29651
29980
|
if (!variant) {
|
|
29652
29981
|
side.variants[cardContentIndex] = {
|
|
29653
29982
|
value: value2,
|
|
29654
|
-
parser: parser3
|
|
29983
|
+
parser: parser3,
|
|
29984
|
+
qualifier: cardVariantQualifier
|
|
29655
29985
|
};
|
|
29656
29986
|
} else {
|
|
29657
29987
|
side.variants[cardContentIndex].value += value2;
|
|
29988
|
+
if (cardVariantQualifier && !variant.qualifier) {
|
|
29989
|
+
variant.qualifier = cardVariantQualifier;
|
|
29990
|
+
}
|
|
29658
29991
|
}
|
|
29659
29992
|
}
|
|
29660
29993
|
unparsedCardSet.cards = unparsedCardSet.cards.filter((card) => {
|
|
@@ -29667,12 +30000,14 @@ var BitmarkPegParserHelper = class {
|
|
|
29667
30000
|
});
|
|
29668
30001
|
for (const unparsedCard of unparsedCardSet.cards) {
|
|
29669
30002
|
const card = {
|
|
29670
|
-
sides: []
|
|
30003
|
+
sides: [],
|
|
30004
|
+
qualifier: unparsedCard.qualifier
|
|
29671
30005
|
};
|
|
29672
30006
|
cardSet.cards.push(card);
|
|
29673
30007
|
for (const unparsedSide of unparsedCard.sides) {
|
|
29674
30008
|
const side = {
|
|
29675
|
-
variants: []
|
|
30009
|
+
variants: [],
|
|
30010
|
+
qualifier: unparsedSide.qualifier
|
|
29676
30011
|
};
|
|
29677
30012
|
card.sides.push(side);
|
|
29678
30013
|
for (const unparsedContent of unparsedSide.variants) {
|
|
@@ -29697,7 +30032,8 @@ var BitmarkPegParserHelper = class {
|
|
|
29697
30032
|
if (DEBUG_TRACE_CARD_PARSED) this.debugPrint("parsedCardContent", content);
|
|
29698
30033
|
side.variants.push({
|
|
29699
30034
|
parser: parser2,
|
|
29700
|
-
content
|
|
30035
|
+
content,
|
|
30036
|
+
qualifier: unparsedContent.qualifier
|
|
29701
30037
|
});
|
|
29702
30038
|
}
|
|
29703
30039
|
}
|
|
@@ -29717,12 +30053,18 @@ var BitmarkPegParserHelper = class {
|
|
|
29717
30053
|
this.cardIndex = -1;
|
|
29718
30054
|
this.cardSideIndex = 0;
|
|
29719
30055
|
this.cardVariantIndex = 0;
|
|
30056
|
+
this.currentCardQualifier = void 0;
|
|
30057
|
+
this.currentSideQualifier = void 0;
|
|
30058
|
+
this.currentVariantQualifier = void 0;
|
|
29720
30059
|
}
|
|
29721
30060
|
handleCardSetEnd() {
|
|
29722
30061
|
if (DEBUG_TRACE_CARD_SET_END) this.debugPrint("CardSetEnd");
|
|
29723
30062
|
this.cardIndex = 0;
|
|
29724
30063
|
this.cardSideIndex = 0;
|
|
29725
30064
|
this.cardVariantIndex = 0;
|
|
30065
|
+
this.currentCardQualifier = void 0;
|
|
30066
|
+
this.currentSideQualifier = void 0;
|
|
30067
|
+
this.currentVariantQualifier = void 0;
|
|
29726
30068
|
}
|
|
29727
30069
|
handleCards(value) {
|
|
29728
30070
|
return value;
|
|
@@ -29732,27 +30074,45 @@ var BitmarkPegParserHelper = class {
|
|
|
29732
30074
|
let isCardDivider = false;
|
|
29733
30075
|
let isSideDivider = false;
|
|
29734
30076
|
let isVariantDivider = false;
|
|
30077
|
+
let qualifier;
|
|
29735
30078
|
if (Array.isArray(value) && value.length === 2) {
|
|
29736
|
-
|
|
29737
|
-
if (
|
|
29738
|
-
|
|
29739
|
-
|
|
29740
|
-
|
|
30079
|
+
const [divider, maybeQualifier] = value;
|
|
30080
|
+
if (typeof divider === "string") {
|
|
30081
|
+
value = divider;
|
|
30082
|
+
if (typeof maybeQualifier === "string" && maybeQualifier.trim() === maybeQualifier && maybeQualifier.length > 0) {
|
|
30083
|
+
qualifier = maybeQualifier;
|
|
30084
|
+
}
|
|
29741
30085
|
} else {
|
|
29742
|
-
|
|
29743
|
-
isSideDivider = value === CARD_SIDE_DIVIDER_V2;
|
|
29744
|
-
isVariantDivider = value === CARD_VARIANT_DIVIDER_V2;
|
|
30086
|
+
value = divider;
|
|
29745
30087
|
}
|
|
30088
|
+
} else if (Array.isArray(value) && value.length === 1) {
|
|
30089
|
+
const [divider] = value;
|
|
30090
|
+
value = divider;
|
|
30091
|
+
}
|
|
30092
|
+
if (version === CardSetVersion.v1) {
|
|
30093
|
+
isCardDivider = value === CARD_DIVIDER_V1;
|
|
30094
|
+
isSideDivider = value === CARD_SIDE_DIVIDER_V1;
|
|
30095
|
+
isVariantDivider = value === CARD_VARIANT_DIVIDER_V1;
|
|
30096
|
+
} else {
|
|
30097
|
+
isCardDivider = value === CARD_DIVIDER_V2;
|
|
30098
|
+
isSideDivider = value === CARD_SIDE_DIVIDER_V2;
|
|
30099
|
+
isVariantDivider = value === CARD_VARIANT_DIVIDER_V2;
|
|
29746
30100
|
}
|
|
29747
30101
|
if (isCardDivider) {
|
|
29748
30102
|
this.cardIndex++;
|
|
29749
30103
|
this.cardSideIndex = 0;
|
|
29750
30104
|
this.cardVariantIndex = 0;
|
|
30105
|
+
this.currentCardQualifier = qualifier;
|
|
30106
|
+
this.currentSideQualifier = void 0;
|
|
30107
|
+
this.currentVariantQualifier = void 0;
|
|
29751
30108
|
} else if (isSideDivider) {
|
|
29752
30109
|
this.cardSideIndex++;
|
|
29753
30110
|
this.cardVariantIndex = 0;
|
|
30111
|
+
this.currentSideQualifier = qualifier;
|
|
30112
|
+
this.currentVariantQualifier = void 0;
|
|
29754
30113
|
} else if (isVariantDivider) {
|
|
29755
30114
|
this.cardVariantIndex++;
|
|
30115
|
+
this.currentVariantQualifier = qualifier;
|
|
29756
30116
|
}
|
|
29757
30117
|
if (this.isType(value, TypeKey.Card)) return value;
|
|
29758
30118
|
return {
|
|
@@ -29761,7 +30121,10 @@ var BitmarkPegParserHelper = class {
|
|
|
29761
30121
|
cardIndex: this.cardIndex,
|
|
29762
30122
|
cardSideIndex: this.cardSideIndex,
|
|
29763
30123
|
cardVariantIndex: this.cardVariantIndex,
|
|
29764
|
-
value: ""
|
|
30124
|
+
value: "",
|
|
30125
|
+
cardQualifier: this.currentCardQualifier,
|
|
30126
|
+
cardSideQualifier: this.currentSideQualifier,
|
|
30127
|
+
cardVariantQualifier: this.currentVariantQualifier
|
|
29765
30128
|
},
|
|
29766
30129
|
parser: {
|
|
29767
30130
|
text: this.parserText(),
|
|
@@ -29782,7 +30145,10 @@ var BitmarkPegParserHelper = class {
|
|
|
29782
30145
|
cardIndex: this.cardIndex,
|
|
29783
30146
|
cardSideIndex: this.cardSideIndex,
|
|
29784
30147
|
cardVariantIndex: this.cardVariantIndex,
|
|
29785
|
-
value
|
|
30148
|
+
value,
|
|
30149
|
+
cardQualifier: this.currentCardQualifier,
|
|
30150
|
+
cardSideQualifier: this.currentSideQualifier,
|
|
30151
|
+
cardVariantQualifier: this.currentVariantQualifier
|
|
29786
30152
|
},
|
|
29787
30153
|
parser: {
|
|
29788
30154
|
text: this.parserText(),
|
|
@@ -30879,6 +31245,7 @@ function buildCards(context, bitType, textFormat, parsedCardSet, statementV1, st
|
|
|
30879
31245
|
result = parsePronunciationTable(context, bitType, processedCardSet);
|
|
30880
31246
|
break;
|
|
30881
31247
|
case CardSetConfigKey.table:
|
|
31248
|
+
case CardSetConfigKey.tableExtended:
|
|
30882
31249
|
result = parseTable(context, bitType, processedCardSet);
|
|
30883
31250
|
break;
|
|
30884
31251
|
case CardSetConfigKey.botActionResponses:
|
|
@@ -30915,20 +31282,23 @@ function processCardSet(context, parsedCardSet) {
|
|
|
30915
31282
|
for (const card of parsedCardSet.cards) {
|
|
30916
31283
|
const processedCard = {
|
|
30917
31284
|
no: cardNo++,
|
|
30918
|
-
sides: []
|
|
31285
|
+
sides: [],
|
|
31286
|
+
qualifier: card.qualifier
|
|
30919
31287
|
};
|
|
30920
31288
|
processedCardSet.cards.push(processedCard);
|
|
30921
31289
|
for (const side of card.sides) {
|
|
30922
31290
|
const processedSide = {
|
|
30923
31291
|
no: sideNo++,
|
|
30924
|
-
variants: []
|
|
31292
|
+
variants: [],
|
|
31293
|
+
qualifier: side.qualifier
|
|
30925
31294
|
};
|
|
30926
31295
|
processedCard.sides.push(processedSide);
|
|
30927
31296
|
for (const variant of side.variants) {
|
|
30928
31297
|
const { parser: parser2, content } = variant;
|
|
30929
31298
|
const processedVariant = {
|
|
30930
31299
|
parser: parser2,
|
|
30931
|
-
no: variantNo
|
|
31300
|
+
no: variantNo++,
|
|
31301
|
+
qualifier: variant.qualifier
|
|
30932
31302
|
};
|
|
30933
31303
|
processedSide.variants.push(processedVariant);
|
|
30934
31304
|
const tagsConfig = instance2.getTagsConfigForCardSet(bitType, sideNo, variantNo);
|
|
@@ -31042,7 +31412,8 @@ function parseElements(_context, _bitType, cardSet) {
|
|
|
31042
31412
|
for (const side of card.sides) {
|
|
31043
31413
|
for (const content of side.variants) {
|
|
31044
31414
|
const tags2 = content.data;
|
|
31045
|
-
|
|
31415
|
+
const element = tags2.cardBody?.body ?? tags2.cardBodyStr ?? instance3.EMPTY_STRING;
|
|
31416
|
+
elements.push(element);
|
|
31046
31417
|
}
|
|
31047
31418
|
}
|
|
31048
31419
|
}
|
|
@@ -31059,7 +31430,7 @@ function parseStatements(_context, _bitType, cardSet, statementV1, statementsV1)
|
|
|
31059
31430
|
if (Array.isArray(chainedStatements)) {
|
|
31060
31431
|
for (const s of chainedStatements) {
|
|
31061
31432
|
const statement = {
|
|
31062
|
-
statement: s.statement ??
|
|
31433
|
+
statement: s.statement ?? [],
|
|
31063
31434
|
isCorrect: s.isCorrect,
|
|
31064
31435
|
item: s.item,
|
|
31065
31436
|
lead: s.lead,
|
|
@@ -31201,7 +31572,7 @@ function parseQuestions(_context, _bitType, cardSet) {
|
|
|
31201
31572
|
for (const content of side.variants) {
|
|
31202
31573
|
const tags2 = content.data;
|
|
31203
31574
|
const q = {
|
|
31204
|
-
question: tags2.cardBodyStr ??
|
|
31575
|
+
question: tags2.cardBody?.body ?? tags2.cardBodyStr ?? instance3.EMPTY_STRING,
|
|
31205
31576
|
...tags2
|
|
31206
31577
|
};
|
|
31207
31578
|
if (q) questions.push(q);
|
|
@@ -31405,37 +31776,158 @@ function parsePronunciationTable(_context, _bitType, cardSet) {
|
|
|
31405
31776
|
};
|
|
31406
31777
|
return { pronunciationTable: table };
|
|
31407
31778
|
}
|
|
31408
|
-
function parseTable(
|
|
31409
|
-
|
|
31410
|
-
|
|
31411
|
-
|
|
31412
|
-
|
|
31779
|
+
function parseTable(context, _bitType, cardSet) {
|
|
31780
|
+
const sectionRows = {
|
|
31781
|
+
thead: [],
|
|
31782
|
+
tbody: [],
|
|
31783
|
+
tfoot: []
|
|
31784
|
+
};
|
|
31785
|
+
const getNormalizedQualifier = (rawQualifier) => {
|
|
31786
|
+
if (!rawQualifier) return void 0;
|
|
31787
|
+
const normalized = rawQualifier.trim().toLowerCase();
|
|
31788
|
+
if (normalized === "thead" || normalized === "tbody" || normalized === "tfoot") {
|
|
31789
|
+
return normalized;
|
|
31790
|
+
}
|
|
31791
|
+
context.addWarning(`Unknown table section qualifier '${rawQualifier}', defaulting to tbody.`);
|
|
31792
|
+
return void 0;
|
|
31793
|
+
};
|
|
31794
|
+
const isLegacyHeadingRow = (card, cardIndex) => {
|
|
31795
|
+
if (cardIndex !== 0) return false;
|
|
31796
|
+
return card.sides.some(
|
|
31797
|
+
(side) => side.variants.some((variant) => {
|
|
31798
|
+
const titles = variant.data.title;
|
|
31799
|
+
return Array.isArray(titles) && titles[1]?.titleAst;
|
|
31800
|
+
})
|
|
31801
|
+
);
|
|
31802
|
+
};
|
|
31803
|
+
const readExtraProperty = (extra, key) => {
|
|
31804
|
+
if (!extra) return void 0;
|
|
31805
|
+
const value = extra[key];
|
|
31806
|
+
return Array.isArray(value) ? value[0] : value;
|
|
31807
|
+
};
|
|
31808
|
+
const cleanupExtraProperties = (tags2, keys) => {
|
|
31809
|
+
const extra = tags2.extraProperties;
|
|
31810
|
+
if (!extra) return;
|
|
31811
|
+
for (const key of keys) {
|
|
31812
|
+
if (Object.prototype.hasOwnProperty.call(extra, key)) delete extra[key];
|
|
31813
|
+
}
|
|
31814
|
+
if (Object.keys(extra).length === 0) {
|
|
31815
|
+
delete tags2.extraProperties;
|
|
31816
|
+
}
|
|
31817
|
+
};
|
|
31818
|
+
const normalizeCellType = (raw, section) => {
|
|
31819
|
+
if (typeof raw === "string") {
|
|
31820
|
+
const normalized = raw.trim().toLowerCase();
|
|
31821
|
+
if (normalized === "th" || normalized === "td") {
|
|
31822
|
+
return normalized;
|
|
31823
|
+
}
|
|
31824
|
+
context.addWarning(
|
|
31825
|
+
`Invalid table cell type '${raw}', using default for section '${section}'.`
|
|
31826
|
+
);
|
|
31827
|
+
}
|
|
31828
|
+
return section === "tbody" ? "td" : "th";
|
|
31829
|
+
};
|
|
31830
|
+
const normalizeSpan = (raw, kind) => {
|
|
31831
|
+
if (raw == null) return 1;
|
|
31832
|
+
const numeric = instance6.asNumber(raw);
|
|
31833
|
+
if (numeric == null || !Number.isInteger(numeric) || numeric < 1) {
|
|
31834
|
+
context.addWarning(`Invalid table ${kind} '${raw}', defaulting to 1.`);
|
|
31835
|
+
return 1;
|
|
31836
|
+
}
|
|
31837
|
+
return numeric;
|
|
31838
|
+
};
|
|
31839
|
+
const normalizeScope = (raw) => {
|
|
31840
|
+
if (raw == null) return void 0;
|
|
31841
|
+
if (typeof raw !== "string") {
|
|
31842
|
+
context.addWarning(`Invalid table scope '${raw}', ignoring.`);
|
|
31843
|
+
return void 0;
|
|
31844
|
+
}
|
|
31845
|
+
const normalized = raw.trim().toLowerCase();
|
|
31846
|
+
switch (normalized) {
|
|
31847
|
+
case "row":
|
|
31848
|
+
case "col":
|
|
31849
|
+
case "rowgroup":
|
|
31850
|
+
case "colgroup":
|
|
31851
|
+
return normalized;
|
|
31852
|
+
default:
|
|
31853
|
+
context.addWarning(`Invalid table scope '${raw}', ignoring.`);
|
|
31854
|
+
return void 0;
|
|
31855
|
+
}
|
|
31856
|
+
};
|
|
31857
|
+
const buildCell = (variant, section) => {
|
|
31858
|
+
const tags2 = variant.data;
|
|
31859
|
+
const heading = tags2.title && tags2.title[1]?.titleAst;
|
|
31860
|
+
const bodyContent = tags2.cardBody?.body ?? tags2.cardBodyStr ?? instance3.EMPTY_STRING;
|
|
31861
|
+
const content = heading ?? bodyContent;
|
|
31862
|
+
const cellTypeRaw = tags2.tableCellType ?? readExtraProperty(tags2.extraProperties, "tableCellType");
|
|
31863
|
+
const rowSpanRaw = tags2.tableRowSpan ?? readExtraProperty(tags2.extraProperties, "tableRowSpan");
|
|
31864
|
+
const colSpanRaw = tags2.tableColSpan ?? readExtraProperty(tags2.extraProperties, "tableColSpan");
|
|
31865
|
+
const scopeRaw = tags2.tableScope ?? readExtraProperty(tags2.extraProperties, "tableScope");
|
|
31866
|
+
cleanupExtraProperties(tags2, ["tableCellType", "tableRowSpan", "tableColSpan", "tableScope"]);
|
|
31867
|
+
const cellType = normalizeCellType(cellTypeRaw, section);
|
|
31868
|
+
const rowspan = normalizeSpan(rowSpanRaw, "rowspan");
|
|
31869
|
+
const colspan = normalizeSpan(colSpanRaw, "colspan");
|
|
31870
|
+
const scope = normalizeScope(scopeRaw);
|
|
31871
|
+
const cell = {
|
|
31872
|
+
content
|
|
31873
|
+
};
|
|
31874
|
+
if (cellType === "th") cell.title = true;
|
|
31875
|
+
if (rowspan > 1) cell.rowspan = rowspan;
|
|
31876
|
+
if (colspan > 1) cell.colspan = colspan;
|
|
31877
|
+
if (scope) cell.scope = scope;
|
|
31878
|
+
return cell;
|
|
31879
|
+
};
|
|
31880
|
+
const resolveSectionQualifier = (card) => {
|
|
31881
|
+
const cardQualifier = getNormalizedQualifier(card.qualifier);
|
|
31882
|
+
if (cardQualifier) return cardQualifier;
|
|
31883
|
+
for (const side of card.sides) {
|
|
31884
|
+
const sideQualifier = getNormalizedQualifier(side.qualifier);
|
|
31885
|
+
if (sideQualifier) return sideQualifier;
|
|
31886
|
+
for (const variant of side.variants) {
|
|
31887
|
+
const variantQualifier = getNormalizedQualifier(variant.qualifier);
|
|
31888
|
+
if (variantQualifier) return variantQualifier;
|
|
31889
|
+
}
|
|
31890
|
+
}
|
|
31891
|
+
return void 0;
|
|
31892
|
+
};
|
|
31413
31893
|
for (let cardIdx = 0; cardIdx < cardSet.cards.length; cardIdx++) {
|
|
31414
31894
|
const card = cardSet.cards[cardIdx];
|
|
31415
|
-
|
|
31416
|
-
|
|
31895
|
+
const qualifier = resolveSectionQualifier(card);
|
|
31896
|
+
const section = qualifier ? qualifier : isLegacyHeadingRow(card, cardIdx) ? "thead" : "tbody";
|
|
31897
|
+
const cells = [];
|
|
31417
31898
|
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
|
-
}
|
|
31899
|
+
for (const variant of side.variants) {
|
|
31900
|
+
cells.push(buildCell(variant, section));
|
|
31429
31901
|
}
|
|
31430
31902
|
}
|
|
31431
|
-
|
|
31432
|
-
|
|
31433
|
-
}
|
|
31903
|
+
sectionRows[section].push({
|
|
31904
|
+
cells
|
|
31905
|
+
});
|
|
31906
|
+
}
|
|
31907
|
+
const table = {};
|
|
31908
|
+
const hasHeadRows = sectionRows.thead.length > 0;
|
|
31909
|
+
const hasBodyRows = sectionRows.tbody.length > 0;
|
|
31910
|
+
const hasFootRows = sectionRows.tfoot.length > 0;
|
|
31911
|
+
if (hasHeadRows) {
|
|
31912
|
+
table.head = {
|
|
31913
|
+
rows: sectionRows.thead
|
|
31914
|
+
};
|
|
31915
|
+
}
|
|
31916
|
+
if (hasBodyRows) {
|
|
31917
|
+
table.body = {
|
|
31918
|
+
rows: sectionRows.tbody
|
|
31919
|
+
};
|
|
31920
|
+
}
|
|
31921
|
+
if (hasFootRows) {
|
|
31922
|
+
table.foot = {
|
|
31923
|
+
rows: sectionRows.tfoot
|
|
31924
|
+
};
|
|
31925
|
+
}
|
|
31926
|
+
if (!hasHeadRows && !hasBodyRows && !hasFootRows) {
|
|
31927
|
+
table.head = { rows: [] };
|
|
31928
|
+
table.body = { rows: [] };
|
|
31929
|
+
table.foot = { rows: [] };
|
|
31434
31930
|
}
|
|
31435
|
-
const table = {
|
|
31436
|
-
columns,
|
|
31437
|
-
data: rows
|
|
31438
|
-
};
|
|
31439
31931
|
return { table };
|
|
31440
31932
|
}
|
|
31441
31933
|
function parseBotActionResponses(_context, _bitType, cardSet) {
|
|
@@ -31586,11 +32078,11 @@ function extractHeadingCard(cardSet, valuesIsArray = false) {
|
|
|
31586
32078
|
function defaultTagContentProcessor(context, _contentDepth, _tagsConfig, content, target) {
|
|
31587
32079
|
const { type, value } = content;
|
|
31588
32080
|
const { textFormat } = context;
|
|
31589
|
-
const
|
|
32081
|
+
const textParser10 = new TextParser();
|
|
31590
32082
|
const trimmedStringValue = stringUtils.trimmedString(value);
|
|
31591
32083
|
switch (type) {
|
|
31592
32084
|
case TypeKey.Instruction: {
|
|
31593
|
-
target.instruction =
|
|
32085
|
+
target.instruction = textParser10.toAst(trimmedStringValue, {
|
|
31594
32086
|
format: textFormat,
|
|
31595
32087
|
location: TextLocation.tag
|
|
31596
32088
|
});
|
|
@@ -31601,7 +32093,7 @@ function defaultTagContentProcessor(context, _contentDepth, _tagsConfig, content
|
|
|
31601
32093
|
break;
|
|
31602
32094
|
}
|
|
31603
32095
|
case TypeKey.Hint: {
|
|
31604
|
-
target.hint =
|
|
32096
|
+
target.hint = textParser10.toAst(trimmedStringValue, {
|
|
31605
32097
|
format: textFormat,
|
|
31606
32098
|
location: TextLocation.tag
|
|
31607
32099
|
});
|
|
@@ -31631,7 +32123,7 @@ function defaultTagContentProcessor(context, _contentDepth, _tagsConfig, content
|
|
|
31631
32123
|
format: TextFormat.bitmarkText,
|
|
31632
32124
|
location: TextLocation.tag
|
|
31633
32125
|
});
|
|
31634
|
-
target.__sampleSolutionAst =
|
|
32126
|
+
target.__sampleSolutionAst = textParser10.toAst(trimmedStringValue, {
|
|
31635
32127
|
format: textFormat,
|
|
31636
32128
|
location: TextLocation.tag
|
|
31637
32129
|
});
|
|
@@ -31738,10 +32230,10 @@ function buildGap(context, _contentDepth, tagsConfig, content) {
|
|
|
31738
32230
|
function itemLeadTagContentProcessor(context, _contentDepth, _tagsConfig, content, target) {
|
|
31739
32231
|
const { textFormat } = context;
|
|
31740
32232
|
const { value } = content;
|
|
31741
|
-
const
|
|
32233
|
+
const textParser10 = new TextParser();
|
|
31742
32234
|
const trimmedStringValue = stringUtils.trimmedString(value);
|
|
31743
32235
|
if (!target.itemLead) target.itemLead = [];
|
|
31744
|
-
const text =
|
|
32236
|
+
const text = textParser10.toAst(trimmedStringValue, {
|
|
31745
32237
|
format: textFormat,
|
|
31746
32238
|
location: TextLocation.tag
|
|
31747
32239
|
});
|
|
@@ -32492,7 +32984,9 @@ function buildTitles(_context, bitType, title) {
|
|
|
32492
32984
|
}
|
|
32493
32985
|
|
|
32494
32986
|
// src/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.ts
|
|
32495
|
-
|
|
32987
|
+
var textParser9 = new TextParser();
|
|
32988
|
+
function trueFalseTagContentProcessor(context, _contentDepth, content, target) {
|
|
32989
|
+
const { textFormat } = context;
|
|
32496
32990
|
const { type, value } = content;
|
|
32497
32991
|
const trueFalse = target.trueFalse;
|
|
32498
32992
|
if (!trueFalse) return;
|
|
@@ -32503,8 +32997,13 @@ function trueFalseTagContentProcessor(_context, _contentDepth, content, target)
|
|
|
32503
32997
|
location: TextLocation.tag
|
|
32504
32998
|
}
|
|
32505
32999
|
);
|
|
33000
|
+
const textAst = textParser9.toAst(trimmedStringValue ?? "", {
|
|
33001
|
+
format: textFormat,
|
|
33002
|
+
location: TextLocation.tag
|
|
33003
|
+
});
|
|
32506
33004
|
trueFalse.push({
|
|
32507
33005
|
text: trimmedStringValue,
|
|
33006
|
+
textAst,
|
|
32508
33007
|
isCorrect: type === TypeKey.True,
|
|
32509
33008
|
__isDefaultExample: false
|
|
32510
33009
|
});
|
|
@@ -32608,7 +33107,7 @@ function buildStatementsChoicesResponses(context, tagsConfig, trueFalseContent)
|
|
|
32608
33107
|
const { statement: _ignore, ...tagsRest } = tags2;
|
|
32609
33108
|
const statement = {
|
|
32610
33109
|
...firstTrueFalse,
|
|
32611
|
-
statement: firstTrueFalse.
|
|
33110
|
+
statement: firstTrueFalse.textAst ?? [],
|
|
32612
33111
|
...tagsRest
|
|
32613
33112
|
};
|
|
32614
33113
|
if (statement) statements.push(statement);
|
|
@@ -33393,36 +33892,39 @@ function peg$parse2(input, options) {
|
|
|
33393
33892
|
const peg$c7 = "text";
|
|
33394
33893
|
const peg$c8 = "~~~~";
|
|
33395
33894
|
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 = "\
|
|
33895
|
+
const peg$c10 = " ";
|
|
33896
|
+
const peg$c11 = "--";
|
|
33897
|
+
const peg$c12 = "++";
|
|
33898
|
+
const peg$c13 = "===";
|
|
33899
|
+
const peg$c14 = "==";
|
|
33900
|
+
const peg$c15 = "[@id";
|
|
33901
|
+
const peg$c16 = "#";
|
|
33902
|
+
const peg$c17 = "[\u25BC";
|
|
33903
|
+
const peg$c18 = "[\u25BA";
|
|
33904
|
+
const peg$c19 = "[@";
|
|
33905
|
+
const peg$c20 = "[%";
|
|
33906
|
+
const peg$c21 = "[!";
|
|
33907
|
+
const peg$c22 = "[?";
|
|
33908
|
+
const peg$c23 = "[+";
|
|
33909
|
+
const peg$c24 = "[-";
|
|
33910
|
+
const peg$c25 = "[$";
|
|
33911
|
+
const peg$c26 = "[_";
|
|
33912
|
+
const peg$c27 = "[=";
|
|
33913
|
+
const peg$c28 = "[&";
|
|
33914
|
+
const peg$c29 = "^]";
|
|
33915
|
+
const peg$c30 = "id:";
|
|
33916
|
+
const peg$c31 = ".";
|
|
33917
|
+
const peg$c32 = "\n";
|
|
33918
|
+
const peg$c33 = "\r\n";
|
|
33419
33919
|
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
|
|
33920
|
+
const peg$r1 = /^[a-z]/;
|
|
33921
|
+
const peg$r2 = /^[a-z0-9\-]/;
|
|
33922
|
+
const peg$r3 = /^[^:\]]/;
|
|
33923
|
+
const peg$r4 = /^[^&:\]]/;
|
|
33924
|
+
const peg$r5 = /^[^\n\r\u2028\u2029]/;
|
|
33925
|
+
const peg$r6 = /^[ \t]/;
|
|
33926
|
+
const peg$r7 = /^[\r\u2028-\u2029]/;
|
|
33927
|
+
const peg$r8 = /^[ \t\n\r\u2028\u2029]/;
|
|
33426
33928
|
const peg$e0 = peg$literalExpectation("[.", false);
|
|
33427
33929
|
const peg$e1 = peg$classExpectation(["]"], true, false, false);
|
|
33428
33930
|
const peg$e2 = peg$literalExpectation("]", false);
|
|
@@ -33435,40 +33937,43 @@ function peg$parse2(input, options) {
|
|
|
33435
33937
|
const peg$e9 = peg$literalExpectation("text", false);
|
|
33436
33938
|
const peg$e10 = peg$literalExpectation("~~~~", false);
|
|
33437
33939
|
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(["
|
|
33940
|
+
const peg$e12 = peg$literalExpectation(" ", false);
|
|
33941
|
+
const peg$e13 = peg$literalExpectation("--", false);
|
|
33942
|
+
const peg$e14 = peg$literalExpectation("++", false);
|
|
33943
|
+
const peg$e15 = peg$literalExpectation("===", false);
|
|
33944
|
+
const peg$e16 = peg$literalExpectation("==", false);
|
|
33945
|
+
const peg$e17 = peg$classExpectation([["a", "z"]], false, false, false);
|
|
33946
|
+
const peg$e18 = peg$classExpectation([["a", "z"], ["0", "9"], "-"], false, false, false);
|
|
33947
|
+
const peg$e19 = peg$literalExpectation("[@id", false);
|
|
33948
|
+
const peg$e20 = peg$literalExpectation("#", false);
|
|
33949
|
+
const peg$e21 = peg$literalExpectation("[\u25BC", false);
|
|
33950
|
+
const peg$e22 = peg$literalExpectation("[\u25BA", false);
|
|
33951
|
+
const peg$e23 = peg$literalExpectation("[@", false);
|
|
33952
|
+
const peg$e24 = peg$literalExpectation("[%", false);
|
|
33953
|
+
const peg$e25 = peg$literalExpectation("[!", false);
|
|
33954
|
+
const peg$e26 = peg$literalExpectation("[?", false);
|
|
33955
|
+
const peg$e27 = peg$literalExpectation("[+", false);
|
|
33956
|
+
const peg$e28 = peg$literalExpectation("[-", false);
|
|
33957
|
+
const peg$e29 = peg$literalExpectation("[$", false);
|
|
33958
|
+
const peg$e30 = peg$literalExpectation("[_", false);
|
|
33959
|
+
const peg$e31 = peg$literalExpectation("[=", false);
|
|
33960
|
+
const peg$e32 = peg$literalExpectation("[&", false);
|
|
33961
|
+
const peg$e33 = peg$literalExpectation("^]", false);
|
|
33962
|
+
const peg$e34 = peg$literalExpectation("id:", false);
|
|
33963
|
+
const peg$e35 = peg$classExpectation([":", "]"], true, false, false);
|
|
33964
|
+
const peg$e36 = peg$literalExpectation(".", false);
|
|
33965
|
+
const peg$e37 = peg$classExpectation(["&", ":", "]"], true, false, false);
|
|
33966
|
+
const peg$e38 = peg$otherExpectation("Character");
|
|
33967
|
+
const peg$e39 = peg$classExpectation(["\n", "\r", "\u2028", "\u2029"], true, false, false);
|
|
33968
|
+
const peg$e40 = peg$otherExpectation("Blank Line");
|
|
33969
|
+
const peg$e41 = peg$classExpectation([" ", " "], false, false, false);
|
|
33970
|
+
const peg$e42 = peg$otherExpectation("Line Terminator");
|
|
33971
|
+
const peg$e43 = peg$literalExpectation("\n", false);
|
|
33972
|
+
const peg$e44 = peg$literalExpectation("\r\n", false);
|
|
33973
|
+
const peg$e45 = peg$classExpectation(["\r", ["\u2028", "\u2029"]], false, false, false);
|
|
33974
|
+
const peg$e46 = peg$otherExpectation("Whitespace, then Line Terminator");
|
|
33975
|
+
const peg$e47 = peg$otherExpectation("whitespace");
|
|
33976
|
+
const peg$e48 = peg$classExpectation([" ", " ", "\n", "\r", "\u2028", "\u2029"], false, false, false);
|
|
33472
33977
|
function peg$f0(firstBit, bits) {
|
|
33473
33978
|
return processor.buildBits([firstBit, ...bits]);
|
|
33474
33979
|
}
|
|
@@ -33541,91 +34046,112 @@ function peg$parse2(input, options) {
|
|
|
33541
34046
|
function peg$f23(value) {
|
|
33542
34047
|
return helper.handleCardLineOrDivider(value, 2);
|
|
33543
34048
|
}
|
|
33544
|
-
function peg$f24(
|
|
34049
|
+
function peg$f24(qualifier) {
|
|
34050
|
+
return ["====", qualifier];
|
|
34051
|
+
}
|
|
34052
|
+
function peg$f25() {
|
|
34053
|
+
return ["===="];
|
|
34054
|
+
}
|
|
34055
|
+
function peg$f26(qualifier) {
|
|
34056
|
+
return ["--", qualifier];
|
|
34057
|
+
}
|
|
34058
|
+
function peg$f27() {
|
|
34059
|
+
return ["--"];
|
|
34060
|
+
}
|
|
34061
|
+
function peg$f28(qualifier) {
|
|
34062
|
+
return ["++", qualifier];
|
|
34063
|
+
}
|
|
34064
|
+
function peg$f29() {
|
|
34065
|
+
return ["++"];
|
|
34066
|
+
}
|
|
34067
|
+
function peg$f30(value) {
|
|
33545
34068
|
return helper.handleCardLine(value);
|
|
33546
34069
|
}
|
|
33547
|
-
function peg$
|
|
34070
|
+
function peg$f31(value) {
|
|
33548
34071
|
return helper.handleCardSet(value[1].flat());
|
|
33549
34072
|
}
|
|
33550
|
-
function peg$
|
|
34073
|
+
function peg$f32() {
|
|
33551
34074
|
helper.handleCardSetStart();
|
|
33552
34075
|
}
|
|
33553
|
-
function peg$
|
|
34076
|
+
function peg$f33() {
|
|
33554
34077
|
helper.handleCardSetEnd();
|
|
33555
34078
|
}
|
|
33556
|
-
function peg$
|
|
34079
|
+
function peg$f34(value) {
|
|
33557
34080
|
return helper.handleCards(value);
|
|
33558
34081
|
}
|
|
33559
|
-
function peg$
|
|
34082
|
+
function peg$f35(value) {
|
|
33560
34083
|
return helper.handleCardLineOrDivider(value, 1);
|
|
33561
34084
|
}
|
|
33562
|
-
function peg$
|
|
34085
|
+
function peg$f36(value) {
|
|
33563
34086
|
return helper.handleCardLine(value);
|
|
33564
34087
|
}
|
|
33565
|
-
function peg$
|
|
34088
|
+
function peg$f37(value) {
|
|
34089
|
+
return value;
|
|
34090
|
+
}
|
|
34091
|
+
function peg$f38(value) {
|
|
33566
34092
|
return helper.handleCardContent(value);
|
|
33567
34093
|
}
|
|
33568
|
-
function peg$
|
|
34094
|
+
function peg$f39(value) {
|
|
33569
34095
|
return { type: TypeKey.CardChar, value };
|
|
33570
34096
|
}
|
|
33571
|
-
function peg$
|
|
34097
|
+
function peg$f40(value) {
|
|
33572
34098
|
return helper.handlePropertyTag("id", value);
|
|
33573
34099
|
}
|
|
33574
|
-
function peg$
|
|
34100
|
+
function peg$f41(level, title) {
|
|
33575
34101
|
return helper.handleTag(TypeKey.Title, { level, title });
|
|
33576
34102
|
}
|
|
33577
|
-
function peg$
|
|
34103
|
+
function peg$f42(value) {
|
|
33578
34104
|
return helper.handleTag(TypeKey.Anchor, value);
|
|
33579
34105
|
}
|
|
33580
|
-
function peg$
|
|
34106
|
+
function peg$f43(value) {
|
|
33581
34107
|
return helper.handleTag(TypeKey.Reference, value);
|
|
33582
34108
|
}
|
|
33583
|
-
function peg$
|
|
34109
|
+
function peg$f44(key, value) {
|
|
33584
34110
|
return helper.handlePropertyTag(key, value);
|
|
33585
34111
|
}
|
|
33586
|
-
function peg$
|
|
34112
|
+
function peg$f45(value) {
|
|
33587
34113
|
return helper.handleTag(TypeKey.ItemLead, value);
|
|
33588
34114
|
}
|
|
33589
|
-
function peg$
|
|
34115
|
+
function peg$f46(value) {
|
|
33590
34116
|
return helper.handleTag(TypeKey.Instruction, value);
|
|
33591
34117
|
}
|
|
33592
|
-
function peg$
|
|
34118
|
+
function peg$f47(value) {
|
|
33593
34119
|
return helper.handleTag(TypeKey.Hint, value);
|
|
33594
34120
|
}
|
|
33595
|
-
function peg$
|
|
34121
|
+
function peg$f48(value) {
|
|
33596
34122
|
return helper.handleTag(TypeKey.True, value);
|
|
33597
34123
|
}
|
|
33598
|
-
function peg$
|
|
34124
|
+
function peg$f49(value) {
|
|
33599
34125
|
return helper.handleTag(TypeKey.False, value);
|
|
33600
34126
|
}
|
|
33601
|
-
function peg$
|
|
34127
|
+
function peg$f50(value) {
|
|
33602
34128
|
return helper.handleTag(TypeKey.SampleSolution, value);
|
|
33603
34129
|
}
|
|
33604
|
-
function peg$
|
|
34130
|
+
function peg$f51(value) {
|
|
33605
34131
|
return helper.handleTag(TypeKey.Gap, value);
|
|
33606
34132
|
}
|
|
33607
|
-
function peg$
|
|
34133
|
+
function peg$f52(value) {
|
|
33608
34134
|
return helper.handleTag(TypeKey.Mark, value);
|
|
33609
34135
|
}
|
|
33610
|
-
function peg$
|
|
34136
|
+
function peg$f53(key, value) {
|
|
33611
34137
|
return helper.handleResourceTag(key, value);
|
|
33612
34138
|
}
|
|
33613
|
-
function peg$
|
|
34139
|
+
function peg$f54(value) {
|
|
33614
34140
|
return value;
|
|
33615
34141
|
}
|
|
33616
|
-
function peg$
|
|
34142
|
+
function peg$f55(value) {
|
|
33617
34143
|
return value ? value.trim() : "";
|
|
33618
34144
|
}
|
|
33619
|
-
function peg$
|
|
34145
|
+
function peg$f56(value) {
|
|
33620
34146
|
return value.length;
|
|
33621
34147
|
}
|
|
33622
|
-
function peg$
|
|
34148
|
+
function peg$f57(value) {
|
|
33623
34149
|
return value ? value.trim() : null;
|
|
33624
34150
|
}
|
|
33625
|
-
function peg$
|
|
34151
|
+
function peg$f58(value) {
|
|
33626
34152
|
return value ? value.trim() : "";
|
|
33627
34153
|
}
|
|
33628
|
-
function peg$
|
|
34154
|
+
function peg$f59() {
|
|
33629
34155
|
return true;
|
|
33630
34156
|
}
|
|
33631
34157
|
let peg$currPos = options.peg$currPos | 0;
|
|
@@ -34543,35 +35069,28 @@ function peg$parse2(input, options) {
|
|
|
34543
35069
|
return s0;
|
|
34544
35070
|
}
|
|
34545
35071
|
function peg$parseCardSetStart_V2() {
|
|
34546
|
-
let s0, s1, s2, s3
|
|
35072
|
+
let s0, s1, s2, s3;
|
|
34547
35073
|
s0 = peg$currPos;
|
|
34548
|
-
s1 =
|
|
35074
|
+
s1 = [];
|
|
35075
|
+
s2 = peg$parseWNL();
|
|
35076
|
+
if (s2 === peg$FAILED) {
|
|
35077
|
+
s2 = peg$parseNL();
|
|
35078
|
+
}
|
|
35079
|
+
if (s2 !== peg$FAILED) {
|
|
35080
|
+
while (s2 !== peg$FAILED) {
|
|
35081
|
+
s1.push(s2);
|
|
35082
|
+
s2 = peg$parseWNL();
|
|
35083
|
+
if (s2 === peg$FAILED) {
|
|
35084
|
+
s2 = peg$parseNL();
|
|
35085
|
+
}
|
|
35086
|
+
}
|
|
35087
|
+
} else {
|
|
35088
|
+
s1 = peg$FAILED;
|
|
35089
|
+
}
|
|
34549
35090
|
if (s1 !== peg$FAILED) {
|
|
34550
35091
|
s2 = peg$currPos;
|
|
34551
35092
|
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
|
-
}
|
|
35093
|
+
s3 = peg$parseCardDividerLookahead_V2();
|
|
34575
35094
|
peg$silentFails--;
|
|
34576
35095
|
if (s3 !== peg$FAILED) {
|
|
34577
35096
|
peg$currPos = s2;
|
|
@@ -34636,39 +35155,147 @@ function peg$parse2(input, options) {
|
|
|
34636
35155
|
return s0;
|
|
34637
35156
|
}
|
|
34638
35157
|
function peg$parseCardLineOrDivider_V2() {
|
|
34639
|
-
let s0, s1
|
|
35158
|
+
let s0, s1;
|
|
35159
|
+
s0 = peg$currPos;
|
|
35160
|
+
s1 = peg$parseCardDividerToken_V2();
|
|
35161
|
+
if (s1 === peg$FAILED) {
|
|
35162
|
+
s1 = peg$parseCardSideDividerToken_V2();
|
|
35163
|
+
if (s1 === peg$FAILED) {
|
|
35164
|
+
s1 = peg$parseCardVariantDividerToken_V2();
|
|
35165
|
+
if (s1 === peg$FAILED) {
|
|
35166
|
+
s1 = peg$parseCardLine_V2();
|
|
35167
|
+
}
|
|
35168
|
+
}
|
|
35169
|
+
}
|
|
35170
|
+
if (s1 !== peg$FAILED) {
|
|
35171
|
+
peg$savedPos = s0;
|
|
35172
|
+
s1 = peg$f23(s1);
|
|
35173
|
+
}
|
|
35174
|
+
s0 = s1;
|
|
35175
|
+
return s0;
|
|
35176
|
+
}
|
|
35177
|
+
function peg$parseCardDividerToken_V2() {
|
|
35178
|
+
let s0, s1, s2, s3, s4, s5, s6;
|
|
34640
35179
|
s0 = peg$currPos;
|
|
34641
|
-
s1 = peg$currPos;
|
|
34642
35180
|
if (input.substr(peg$currPos, 4) === peg$c6) {
|
|
34643
|
-
|
|
35181
|
+
s1 = peg$c6;
|
|
34644
35182
|
peg$currPos += 4;
|
|
34645
35183
|
} else {
|
|
34646
|
-
|
|
35184
|
+
s1 = peg$FAILED;
|
|
34647
35185
|
if (peg$silentFails === 0) {
|
|
34648
35186
|
peg$fail(peg$e8);
|
|
34649
35187
|
}
|
|
34650
35188
|
}
|
|
34651
|
-
if (
|
|
34652
|
-
|
|
34653
|
-
|
|
34654
|
-
|
|
35189
|
+
if (s1 !== peg$FAILED) {
|
|
35190
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35191
|
+
s2 = peg$c10;
|
|
35192
|
+
peg$currPos++;
|
|
35193
|
+
} else {
|
|
35194
|
+
s2 = peg$FAILED;
|
|
35195
|
+
if (peg$silentFails === 0) {
|
|
35196
|
+
peg$fail(peg$e12);
|
|
35197
|
+
}
|
|
34655
35198
|
}
|
|
34656
|
-
if (
|
|
34657
|
-
|
|
34658
|
-
|
|
35199
|
+
if (s2 !== peg$FAILED) {
|
|
35200
|
+
s3 = peg$parseQualifier();
|
|
35201
|
+
if (s3 !== peg$FAILED) {
|
|
35202
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35203
|
+
s4 = peg$c10;
|
|
35204
|
+
peg$currPos++;
|
|
35205
|
+
} else {
|
|
35206
|
+
s4 = peg$FAILED;
|
|
35207
|
+
if (peg$silentFails === 0) {
|
|
35208
|
+
peg$fail(peg$e12);
|
|
35209
|
+
}
|
|
35210
|
+
}
|
|
35211
|
+
if (s4 !== peg$FAILED) {
|
|
35212
|
+
if (input.substr(peg$currPos, 4) === peg$c6) {
|
|
35213
|
+
s5 = peg$c6;
|
|
35214
|
+
peg$currPos += 4;
|
|
35215
|
+
} else {
|
|
35216
|
+
s5 = peg$FAILED;
|
|
35217
|
+
if (peg$silentFails === 0) {
|
|
35218
|
+
peg$fail(peg$e8);
|
|
35219
|
+
}
|
|
35220
|
+
}
|
|
35221
|
+
if (s5 !== peg$FAILED) {
|
|
35222
|
+
s6 = peg$parseWNL();
|
|
35223
|
+
if (s6 === peg$FAILED) {
|
|
35224
|
+
s6 = peg$parseWEOL();
|
|
35225
|
+
}
|
|
35226
|
+
if (s6 !== peg$FAILED) {
|
|
35227
|
+
peg$savedPos = s0;
|
|
35228
|
+
s0 = peg$f24(s3);
|
|
35229
|
+
} else {
|
|
35230
|
+
peg$currPos = s0;
|
|
35231
|
+
s0 = peg$FAILED;
|
|
35232
|
+
}
|
|
35233
|
+
} else {
|
|
35234
|
+
peg$currPos = s0;
|
|
35235
|
+
s0 = peg$FAILED;
|
|
35236
|
+
}
|
|
35237
|
+
} else {
|
|
35238
|
+
peg$currPos = s0;
|
|
35239
|
+
s0 = peg$FAILED;
|
|
35240
|
+
}
|
|
35241
|
+
} else {
|
|
35242
|
+
peg$currPos = s0;
|
|
35243
|
+
s0 = peg$FAILED;
|
|
35244
|
+
}
|
|
35245
|
+
} else {
|
|
35246
|
+
peg$currPos = s0;
|
|
35247
|
+
s0 = peg$FAILED;
|
|
35248
|
+
}
|
|
35249
|
+
} else {
|
|
35250
|
+
peg$currPos = s0;
|
|
35251
|
+
s0 = peg$FAILED;
|
|
35252
|
+
}
|
|
35253
|
+
if (s0 === peg$FAILED) {
|
|
35254
|
+
s0 = peg$currPos;
|
|
35255
|
+
if (input.substr(peg$currPos, 4) === peg$c6) {
|
|
35256
|
+
s1 = peg$c6;
|
|
35257
|
+
peg$currPos += 4;
|
|
34659
35258
|
} else {
|
|
34660
|
-
peg$currPos = s1;
|
|
34661
35259
|
s1 = peg$FAILED;
|
|
35260
|
+
if (peg$silentFails === 0) {
|
|
35261
|
+
peg$fail(peg$e8);
|
|
35262
|
+
}
|
|
34662
35263
|
}
|
|
35264
|
+
if (s1 !== peg$FAILED) {
|
|
35265
|
+
s2 = peg$parseWNL();
|
|
35266
|
+
if (s2 === peg$FAILED) {
|
|
35267
|
+
s2 = peg$parseWEOL();
|
|
35268
|
+
}
|
|
35269
|
+
if (s2 !== peg$FAILED) {
|
|
35270
|
+
peg$savedPos = s0;
|
|
35271
|
+
s0 = peg$f25();
|
|
35272
|
+
} else {
|
|
35273
|
+
peg$currPos = s0;
|
|
35274
|
+
s0 = peg$FAILED;
|
|
35275
|
+
}
|
|
35276
|
+
} else {
|
|
35277
|
+
peg$currPos = s0;
|
|
35278
|
+
s0 = peg$FAILED;
|
|
35279
|
+
}
|
|
35280
|
+
}
|
|
35281
|
+
return s0;
|
|
35282
|
+
}
|
|
35283
|
+
function peg$parseCardSideDividerToken_V2() {
|
|
35284
|
+
let s0, s1, s2, s3, s4, s5, s6;
|
|
35285
|
+
s0 = peg$currPos;
|
|
35286
|
+
if (input.substr(peg$currPos, 2) === peg$c11) {
|
|
35287
|
+
s1 = peg$c11;
|
|
35288
|
+
peg$currPos += 2;
|
|
34663
35289
|
} else {
|
|
34664
|
-
peg$currPos = s1;
|
|
34665
35290
|
s1 = peg$FAILED;
|
|
35291
|
+
if (peg$silentFails === 0) {
|
|
35292
|
+
peg$fail(peg$e13);
|
|
35293
|
+
}
|
|
34666
35294
|
}
|
|
34667
|
-
if (s1
|
|
34668
|
-
|
|
34669
|
-
if (input.substr(peg$currPos, 2) === peg$c10) {
|
|
35295
|
+
if (s1 !== peg$FAILED) {
|
|
35296
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
34670
35297
|
s2 = peg$c10;
|
|
34671
|
-
peg$currPos
|
|
35298
|
+
peg$currPos++;
|
|
34672
35299
|
} else {
|
|
34673
35300
|
s2 = peg$FAILED;
|
|
34674
35301
|
if (peg$silentFails === 0) {
|
|
@@ -34676,58 +35303,277 @@ function peg$parse2(input, options) {
|
|
|
34676
35303
|
}
|
|
34677
35304
|
}
|
|
34678
35305
|
if (s2 !== peg$FAILED) {
|
|
34679
|
-
s3 = peg$
|
|
34680
|
-
if (s3 === peg$FAILED) {
|
|
34681
|
-
s3 = peg$parseWEOL();
|
|
34682
|
-
}
|
|
35306
|
+
s3 = peg$parseQualifier();
|
|
34683
35307
|
if (s3 !== peg$FAILED) {
|
|
34684
|
-
|
|
34685
|
-
|
|
35308
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35309
|
+
s4 = peg$c10;
|
|
35310
|
+
peg$currPos++;
|
|
35311
|
+
} else {
|
|
35312
|
+
s4 = peg$FAILED;
|
|
35313
|
+
if (peg$silentFails === 0) {
|
|
35314
|
+
peg$fail(peg$e12);
|
|
35315
|
+
}
|
|
35316
|
+
}
|
|
35317
|
+
if (s4 !== peg$FAILED) {
|
|
35318
|
+
if (input.substr(peg$currPos, 2) === peg$c11) {
|
|
35319
|
+
s5 = peg$c11;
|
|
35320
|
+
peg$currPos += 2;
|
|
35321
|
+
} else {
|
|
35322
|
+
s5 = peg$FAILED;
|
|
35323
|
+
if (peg$silentFails === 0) {
|
|
35324
|
+
peg$fail(peg$e13);
|
|
35325
|
+
}
|
|
35326
|
+
}
|
|
35327
|
+
if (s5 !== peg$FAILED) {
|
|
35328
|
+
s6 = peg$parseWNL();
|
|
35329
|
+
if (s6 === peg$FAILED) {
|
|
35330
|
+
s6 = peg$parseWEOL();
|
|
35331
|
+
}
|
|
35332
|
+
if (s6 !== peg$FAILED) {
|
|
35333
|
+
peg$savedPos = s0;
|
|
35334
|
+
s0 = peg$f26(s3);
|
|
35335
|
+
} else {
|
|
35336
|
+
peg$currPos = s0;
|
|
35337
|
+
s0 = peg$FAILED;
|
|
35338
|
+
}
|
|
35339
|
+
} else {
|
|
35340
|
+
peg$currPos = s0;
|
|
35341
|
+
s0 = peg$FAILED;
|
|
35342
|
+
}
|
|
35343
|
+
} else {
|
|
35344
|
+
peg$currPos = s0;
|
|
35345
|
+
s0 = peg$FAILED;
|
|
35346
|
+
}
|
|
34686
35347
|
} else {
|
|
34687
|
-
peg$currPos =
|
|
34688
|
-
|
|
35348
|
+
peg$currPos = s0;
|
|
35349
|
+
s0 = peg$FAILED;
|
|
34689
35350
|
}
|
|
34690
35351
|
} else {
|
|
34691
|
-
peg$currPos =
|
|
35352
|
+
peg$currPos = s0;
|
|
35353
|
+
s0 = peg$FAILED;
|
|
35354
|
+
}
|
|
35355
|
+
} else {
|
|
35356
|
+
peg$currPos = s0;
|
|
35357
|
+
s0 = peg$FAILED;
|
|
35358
|
+
}
|
|
35359
|
+
if (s0 === peg$FAILED) {
|
|
35360
|
+
s0 = peg$currPos;
|
|
35361
|
+
if (input.substr(peg$currPos, 2) === peg$c11) {
|
|
35362
|
+
s1 = peg$c11;
|
|
35363
|
+
peg$currPos += 2;
|
|
35364
|
+
} else {
|
|
34692
35365
|
s1 = peg$FAILED;
|
|
35366
|
+
if (peg$silentFails === 0) {
|
|
35367
|
+
peg$fail(peg$e13);
|
|
35368
|
+
}
|
|
34693
35369
|
}
|
|
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
|
-
}
|
|
35370
|
+
if (s1 !== peg$FAILED) {
|
|
35371
|
+
s2 = peg$parseWNL();
|
|
35372
|
+
if (s2 === peg$FAILED) {
|
|
35373
|
+
s2 = peg$parseWEOL();
|
|
34704
35374
|
}
|
|
34705
35375
|
if (s2 !== peg$FAILED) {
|
|
34706
|
-
|
|
34707
|
-
|
|
34708
|
-
|
|
35376
|
+
peg$savedPos = s0;
|
|
35377
|
+
s0 = peg$f27();
|
|
35378
|
+
} else {
|
|
35379
|
+
peg$currPos = s0;
|
|
35380
|
+
s0 = peg$FAILED;
|
|
35381
|
+
}
|
|
35382
|
+
} else {
|
|
35383
|
+
peg$currPos = s0;
|
|
35384
|
+
s0 = peg$FAILED;
|
|
35385
|
+
}
|
|
35386
|
+
}
|
|
35387
|
+
return s0;
|
|
35388
|
+
}
|
|
35389
|
+
function peg$parseCardVariantDividerToken_V2() {
|
|
35390
|
+
let s0, s1, s2, s3, s4, s5, s6;
|
|
35391
|
+
s0 = peg$currPos;
|
|
35392
|
+
if (input.substr(peg$currPos, 2) === peg$c12) {
|
|
35393
|
+
s1 = peg$c12;
|
|
35394
|
+
peg$currPos += 2;
|
|
35395
|
+
} else {
|
|
35396
|
+
s1 = peg$FAILED;
|
|
35397
|
+
if (peg$silentFails === 0) {
|
|
35398
|
+
peg$fail(peg$e14);
|
|
35399
|
+
}
|
|
35400
|
+
}
|
|
35401
|
+
if (s1 !== peg$FAILED) {
|
|
35402
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35403
|
+
s2 = peg$c10;
|
|
35404
|
+
peg$currPos++;
|
|
35405
|
+
} else {
|
|
35406
|
+
s2 = peg$FAILED;
|
|
35407
|
+
if (peg$silentFails === 0) {
|
|
35408
|
+
peg$fail(peg$e12);
|
|
35409
|
+
}
|
|
35410
|
+
}
|
|
35411
|
+
if (s2 !== peg$FAILED) {
|
|
35412
|
+
s3 = peg$parseQualifier();
|
|
35413
|
+
if (s3 !== peg$FAILED) {
|
|
35414
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35415
|
+
s4 = peg$c10;
|
|
35416
|
+
peg$currPos++;
|
|
35417
|
+
} else {
|
|
35418
|
+
s4 = peg$FAILED;
|
|
35419
|
+
if (peg$silentFails === 0) {
|
|
35420
|
+
peg$fail(peg$e12);
|
|
35421
|
+
}
|
|
34709
35422
|
}
|
|
34710
|
-
if (
|
|
34711
|
-
|
|
34712
|
-
|
|
35423
|
+
if (s4 !== peg$FAILED) {
|
|
35424
|
+
if (input.substr(peg$currPos, 2) === peg$c12) {
|
|
35425
|
+
s5 = peg$c12;
|
|
35426
|
+
peg$currPos += 2;
|
|
35427
|
+
} else {
|
|
35428
|
+
s5 = peg$FAILED;
|
|
35429
|
+
if (peg$silentFails === 0) {
|
|
35430
|
+
peg$fail(peg$e14);
|
|
35431
|
+
}
|
|
35432
|
+
}
|
|
35433
|
+
if (s5 !== peg$FAILED) {
|
|
35434
|
+
s6 = peg$parseWNL();
|
|
35435
|
+
if (s6 === peg$FAILED) {
|
|
35436
|
+
s6 = peg$parseWEOL();
|
|
35437
|
+
}
|
|
35438
|
+
if (s6 !== peg$FAILED) {
|
|
35439
|
+
peg$savedPos = s0;
|
|
35440
|
+
s0 = peg$f28(s3);
|
|
35441
|
+
} else {
|
|
35442
|
+
peg$currPos = s0;
|
|
35443
|
+
s0 = peg$FAILED;
|
|
35444
|
+
}
|
|
35445
|
+
} else {
|
|
35446
|
+
peg$currPos = s0;
|
|
35447
|
+
s0 = peg$FAILED;
|
|
35448
|
+
}
|
|
34713
35449
|
} else {
|
|
34714
|
-
peg$currPos =
|
|
34715
|
-
|
|
35450
|
+
peg$currPos = s0;
|
|
35451
|
+
s0 = peg$FAILED;
|
|
34716
35452
|
}
|
|
34717
35453
|
} else {
|
|
34718
|
-
peg$currPos =
|
|
34719
|
-
|
|
35454
|
+
peg$currPos = s0;
|
|
35455
|
+
s0 = peg$FAILED;
|
|
34720
35456
|
}
|
|
34721
|
-
|
|
34722
|
-
|
|
35457
|
+
} else {
|
|
35458
|
+
peg$currPos = s0;
|
|
35459
|
+
s0 = peg$FAILED;
|
|
35460
|
+
}
|
|
35461
|
+
} else {
|
|
35462
|
+
peg$currPos = s0;
|
|
35463
|
+
s0 = peg$FAILED;
|
|
35464
|
+
}
|
|
35465
|
+
if (s0 === peg$FAILED) {
|
|
35466
|
+
s0 = peg$currPos;
|
|
35467
|
+
if (input.substr(peg$currPos, 2) === peg$c12) {
|
|
35468
|
+
s1 = peg$c12;
|
|
35469
|
+
peg$currPos += 2;
|
|
35470
|
+
} else {
|
|
35471
|
+
s1 = peg$FAILED;
|
|
35472
|
+
if (peg$silentFails === 0) {
|
|
35473
|
+
peg$fail(peg$e14);
|
|
34723
35474
|
}
|
|
34724
35475
|
}
|
|
35476
|
+
if (s1 !== peg$FAILED) {
|
|
35477
|
+
s2 = peg$parseWNL();
|
|
35478
|
+
if (s2 === peg$FAILED) {
|
|
35479
|
+
s2 = peg$parseWEOL();
|
|
35480
|
+
}
|
|
35481
|
+
if (s2 !== peg$FAILED) {
|
|
35482
|
+
peg$savedPos = s0;
|
|
35483
|
+
s0 = peg$f29();
|
|
35484
|
+
} else {
|
|
35485
|
+
peg$currPos = s0;
|
|
35486
|
+
s0 = peg$FAILED;
|
|
35487
|
+
}
|
|
35488
|
+
} else {
|
|
35489
|
+
peg$currPos = s0;
|
|
35490
|
+
s0 = peg$FAILED;
|
|
35491
|
+
}
|
|
35492
|
+
}
|
|
35493
|
+
return s0;
|
|
35494
|
+
}
|
|
35495
|
+
function peg$parseCardDividerLookahead_V2() {
|
|
35496
|
+
let s0, s1, s2, s3, s4, s5, s6;
|
|
35497
|
+
s0 = peg$currPos;
|
|
35498
|
+
if (input.substr(peg$currPos, 4) === peg$c6) {
|
|
35499
|
+
s1 = peg$c6;
|
|
35500
|
+
peg$currPos += 4;
|
|
35501
|
+
} else {
|
|
35502
|
+
s1 = peg$FAILED;
|
|
35503
|
+
if (peg$silentFails === 0) {
|
|
35504
|
+
peg$fail(peg$e8);
|
|
35505
|
+
}
|
|
34725
35506
|
}
|
|
34726
35507
|
if (s1 !== peg$FAILED) {
|
|
34727
|
-
|
|
34728
|
-
|
|
35508
|
+
s2 = peg$currPos;
|
|
35509
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35510
|
+
s3 = peg$c10;
|
|
35511
|
+
peg$currPos++;
|
|
35512
|
+
} else {
|
|
35513
|
+
s3 = peg$FAILED;
|
|
35514
|
+
if (peg$silentFails === 0) {
|
|
35515
|
+
peg$fail(peg$e12);
|
|
35516
|
+
}
|
|
35517
|
+
}
|
|
35518
|
+
if (s3 !== peg$FAILED) {
|
|
35519
|
+
s4 = peg$parseQualifier();
|
|
35520
|
+
if (s4 !== peg$FAILED) {
|
|
35521
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35522
|
+
s5 = peg$c10;
|
|
35523
|
+
peg$currPos++;
|
|
35524
|
+
} else {
|
|
35525
|
+
s5 = peg$FAILED;
|
|
35526
|
+
if (peg$silentFails === 0) {
|
|
35527
|
+
peg$fail(peg$e12);
|
|
35528
|
+
}
|
|
35529
|
+
}
|
|
35530
|
+
if (s5 !== peg$FAILED) {
|
|
35531
|
+
if (input.substr(peg$currPos, 4) === peg$c6) {
|
|
35532
|
+
s6 = peg$c6;
|
|
35533
|
+
peg$currPos += 4;
|
|
35534
|
+
} else {
|
|
35535
|
+
s6 = peg$FAILED;
|
|
35536
|
+
if (peg$silentFails === 0) {
|
|
35537
|
+
peg$fail(peg$e8);
|
|
35538
|
+
}
|
|
35539
|
+
}
|
|
35540
|
+
if (s6 !== peg$FAILED) {
|
|
35541
|
+
s3 = [s3, s4, s5, s6];
|
|
35542
|
+
s2 = s3;
|
|
35543
|
+
} else {
|
|
35544
|
+
peg$currPos = s2;
|
|
35545
|
+
s2 = peg$FAILED;
|
|
35546
|
+
}
|
|
35547
|
+
} else {
|
|
35548
|
+
peg$currPos = s2;
|
|
35549
|
+
s2 = peg$FAILED;
|
|
35550
|
+
}
|
|
35551
|
+
} else {
|
|
35552
|
+
peg$currPos = s2;
|
|
35553
|
+
s2 = peg$FAILED;
|
|
35554
|
+
}
|
|
35555
|
+
} else {
|
|
35556
|
+
peg$currPos = s2;
|
|
35557
|
+
s2 = peg$FAILED;
|
|
35558
|
+
}
|
|
35559
|
+
if (s2 === peg$FAILED) {
|
|
35560
|
+
s2 = null;
|
|
35561
|
+
}
|
|
35562
|
+
s3 = peg$parseWNL();
|
|
35563
|
+
if (s3 === peg$FAILED) {
|
|
35564
|
+
s3 = peg$parseWEOL();
|
|
35565
|
+
}
|
|
35566
|
+
if (s3 !== peg$FAILED) {
|
|
35567
|
+
s1 = [s1, s2, s3];
|
|
35568
|
+
s0 = s1;
|
|
35569
|
+
} else {
|
|
35570
|
+
peg$currPos = s0;
|
|
35571
|
+
s0 = peg$FAILED;
|
|
35572
|
+
}
|
|
35573
|
+
} else {
|
|
35574
|
+
peg$currPos = s0;
|
|
35575
|
+
s0 = peg$FAILED;
|
|
34729
35576
|
}
|
|
34730
|
-
s0 = s1;
|
|
34731
35577
|
return s0;
|
|
34732
35578
|
}
|
|
34733
35579
|
function peg$parseCardLine_V2() {
|
|
@@ -34802,7 +35648,7 @@ function peg$parse2(input, options) {
|
|
|
34802
35648
|
}
|
|
34803
35649
|
if (s2 !== peg$FAILED) {
|
|
34804
35650
|
peg$savedPos = s0;
|
|
34805
|
-
s0 = peg$
|
|
35651
|
+
s0 = peg$f30(s2);
|
|
34806
35652
|
} else {
|
|
34807
35653
|
peg$currPos = s0;
|
|
34808
35654
|
s0 = peg$FAILED;
|
|
@@ -34839,7 +35685,7 @@ function peg$parse2(input, options) {
|
|
|
34839
35685
|
}
|
|
34840
35686
|
if (s1 !== peg$FAILED) {
|
|
34841
35687
|
peg$savedPos = s0;
|
|
34842
|
-
s1 = peg$
|
|
35688
|
+
s1 = peg$f31(s1);
|
|
34843
35689
|
}
|
|
34844
35690
|
s0 = s1;
|
|
34845
35691
|
return s0;
|
|
@@ -34847,18 +35693,33 @@ function peg$parse2(input, options) {
|
|
|
34847
35693
|
function peg$parseCardSetStart_V1() {
|
|
34848
35694
|
let s0, s1, s2, s3, s4, s5;
|
|
34849
35695
|
s0 = peg$currPos;
|
|
34850
|
-
s1 =
|
|
35696
|
+
s1 = [];
|
|
35697
|
+
s2 = peg$parseWNL();
|
|
35698
|
+
if (s2 === peg$FAILED) {
|
|
35699
|
+
s2 = peg$parseNL();
|
|
35700
|
+
}
|
|
35701
|
+
if (s2 !== peg$FAILED) {
|
|
35702
|
+
while (s2 !== peg$FAILED) {
|
|
35703
|
+
s1.push(s2);
|
|
35704
|
+
s2 = peg$parseWNL();
|
|
35705
|
+
if (s2 === peg$FAILED) {
|
|
35706
|
+
s2 = peg$parseNL();
|
|
35707
|
+
}
|
|
35708
|
+
}
|
|
35709
|
+
} else {
|
|
35710
|
+
s1 = peg$FAILED;
|
|
35711
|
+
}
|
|
34851
35712
|
if (s1 !== peg$FAILED) {
|
|
34852
35713
|
s2 = peg$currPos;
|
|
34853
35714
|
peg$silentFails++;
|
|
34854
35715
|
s3 = peg$currPos;
|
|
34855
|
-
if (input.substr(peg$currPos, 3) === peg$
|
|
34856
|
-
s4 = peg$
|
|
35716
|
+
if (input.substr(peg$currPos, 3) === peg$c13) {
|
|
35717
|
+
s4 = peg$c13;
|
|
34857
35718
|
peg$currPos += 3;
|
|
34858
35719
|
} else {
|
|
34859
35720
|
s4 = peg$FAILED;
|
|
34860
35721
|
if (peg$silentFails === 0) {
|
|
34861
|
-
peg$fail(peg$
|
|
35722
|
+
peg$fail(peg$e15);
|
|
34862
35723
|
}
|
|
34863
35724
|
}
|
|
34864
35725
|
if (s4 !== peg$FAILED) {
|
|
@@ -34883,7 +35744,7 @@ function peg$parse2(input, options) {
|
|
|
34883
35744
|
}
|
|
34884
35745
|
if (s2 !== peg$FAILED) {
|
|
34885
35746
|
peg$savedPos = s0;
|
|
34886
|
-
s0 = peg$
|
|
35747
|
+
s0 = peg$f32();
|
|
34887
35748
|
} else {
|
|
34888
35749
|
peg$currPos = s0;
|
|
34889
35750
|
s0 = peg$FAILED;
|
|
@@ -34921,7 +35782,7 @@ function peg$parse2(input, options) {
|
|
|
34921
35782
|
}
|
|
34922
35783
|
if (s1 !== peg$FAILED) {
|
|
34923
35784
|
peg$savedPos = s0;
|
|
34924
|
-
s1 = peg$
|
|
35785
|
+
s1 = peg$f33();
|
|
34925
35786
|
}
|
|
34926
35787
|
s0 = s1;
|
|
34927
35788
|
return s0;
|
|
@@ -34932,7 +35793,7 @@ function peg$parse2(input, options) {
|
|
|
34932
35793
|
s1 = peg$parseCardLineOrDivider_V1();
|
|
34933
35794
|
if (s1 !== peg$FAILED) {
|
|
34934
35795
|
peg$savedPos = s0;
|
|
34935
|
-
s1 = peg$
|
|
35796
|
+
s1 = peg$f34(s1);
|
|
34936
35797
|
}
|
|
34937
35798
|
s0 = s1;
|
|
34938
35799
|
return s0;
|
|
@@ -34941,13 +35802,13 @@ function peg$parse2(input, options) {
|
|
|
34941
35802
|
let s0, s1, s2, s3;
|
|
34942
35803
|
s0 = peg$currPos;
|
|
34943
35804
|
s1 = peg$currPos;
|
|
34944
|
-
if (input.substr(peg$currPos, 3) === peg$
|
|
34945
|
-
s2 = peg$
|
|
35805
|
+
if (input.substr(peg$currPos, 3) === peg$c13) {
|
|
35806
|
+
s2 = peg$c13;
|
|
34946
35807
|
peg$currPos += 3;
|
|
34947
35808
|
} else {
|
|
34948
35809
|
s2 = peg$FAILED;
|
|
34949
35810
|
if (peg$silentFails === 0) {
|
|
34950
|
-
peg$fail(peg$
|
|
35811
|
+
peg$fail(peg$e15);
|
|
34951
35812
|
}
|
|
34952
35813
|
}
|
|
34953
35814
|
if (s2 !== peg$FAILED) {
|
|
@@ -34968,13 +35829,13 @@ function peg$parse2(input, options) {
|
|
|
34968
35829
|
}
|
|
34969
35830
|
if (s1 === peg$FAILED) {
|
|
34970
35831
|
s1 = peg$currPos;
|
|
34971
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
34972
|
-
s2 = peg$
|
|
35832
|
+
if (input.substr(peg$currPos, 2) === peg$c14) {
|
|
35833
|
+
s2 = peg$c14;
|
|
34973
35834
|
peg$currPos += 2;
|
|
34974
35835
|
} else {
|
|
34975
35836
|
s2 = peg$FAILED;
|
|
34976
35837
|
if (peg$silentFails === 0) {
|
|
34977
|
-
peg$fail(peg$
|
|
35838
|
+
peg$fail(peg$e16);
|
|
34978
35839
|
}
|
|
34979
35840
|
}
|
|
34980
35841
|
if (s2 !== peg$FAILED) {
|
|
@@ -34995,13 +35856,13 @@ function peg$parse2(input, options) {
|
|
|
34995
35856
|
}
|
|
34996
35857
|
if (s1 === peg$FAILED) {
|
|
34997
35858
|
s1 = peg$currPos;
|
|
34998
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
34999
|
-
s2 = peg$
|
|
35859
|
+
if (input.substr(peg$currPos, 2) === peg$c11) {
|
|
35860
|
+
s2 = peg$c11;
|
|
35000
35861
|
peg$currPos += 2;
|
|
35001
35862
|
} else {
|
|
35002
35863
|
s2 = peg$FAILED;
|
|
35003
35864
|
if (peg$silentFails === 0) {
|
|
35004
|
-
peg$fail(peg$
|
|
35865
|
+
peg$fail(peg$e13);
|
|
35005
35866
|
}
|
|
35006
35867
|
}
|
|
35007
35868
|
if (s2 !== peg$FAILED) {
|
|
@@ -35027,7 +35888,7 @@ function peg$parse2(input, options) {
|
|
|
35027
35888
|
}
|
|
35028
35889
|
if (s1 !== peg$FAILED) {
|
|
35029
35890
|
peg$savedPos = s0;
|
|
35030
|
-
s1 = peg$
|
|
35891
|
+
s1 = peg$f35(s1);
|
|
35031
35892
|
}
|
|
35032
35893
|
s0 = s1;
|
|
35033
35894
|
return s0;
|
|
@@ -35104,7 +35965,7 @@ function peg$parse2(input, options) {
|
|
|
35104
35965
|
}
|
|
35105
35966
|
if (s2 !== peg$FAILED) {
|
|
35106
35967
|
peg$savedPos = s0;
|
|
35107
|
-
s0 = peg$
|
|
35968
|
+
s0 = peg$f36(s2);
|
|
35108
35969
|
} else {
|
|
35109
35970
|
peg$currPos = s0;
|
|
35110
35971
|
s0 = peg$FAILED;
|
|
@@ -35115,6 +35976,102 @@ function peg$parse2(input, options) {
|
|
|
35115
35976
|
}
|
|
35116
35977
|
return s0;
|
|
35117
35978
|
}
|
|
35979
|
+
function peg$parseQualifier() {
|
|
35980
|
+
let s0, s1, s2;
|
|
35981
|
+
s0 = peg$currPos;
|
|
35982
|
+
s1 = peg$currPos;
|
|
35983
|
+
peg$silentFails++;
|
|
35984
|
+
if (input.substr(peg$currPos, 6) === peg$c9) {
|
|
35985
|
+
s2 = peg$c9;
|
|
35986
|
+
peg$currPos += 6;
|
|
35987
|
+
} else {
|
|
35988
|
+
s2 = peg$FAILED;
|
|
35989
|
+
if (peg$silentFails === 0) {
|
|
35990
|
+
peg$fail(peg$e11);
|
|
35991
|
+
}
|
|
35992
|
+
}
|
|
35993
|
+
if (s2 === peg$FAILED) {
|
|
35994
|
+
if (input.substr(peg$currPos, 4) === peg$c7) {
|
|
35995
|
+
s2 = peg$c7;
|
|
35996
|
+
peg$currPos += 4;
|
|
35997
|
+
} else {
|
|
35998
|
+
s2 = peg$FAILED;
|
|
35999
|
+
if (peg$silentFails === 0) {
|
|
36000
|
+
peg$fail(peg$e9);
|
|
36001
|
+
}
|
|
36002
|
+
}
|
|
36003
|
+
}
|
|
36004
|
+
peg$silentFails--;
|
|
36005
|
+
if (s2 === peg$FAILED) {
|
|
36006
|
+
s1 = void 0;
|
|
36007
|
+
} else {
|
|
36008
|
+
peg$currPos = s1;
|
|
36009
|
+
s1 = peg$FAILED;
|
|
36010
|
+
}
|
|
36011
|
+
if (s1 !== peg$FAILED) {
|
|
36012
|
+
s2 = peg$parseQualifierName();
|
|
36013
|
+
if (s2 !== peg$FAILED) {
|
|
36014
|
+
peg$savedPos = s0;
|
|
36015
|
+
s0 = peg$f37(s2);
|
|
36016
|
+
} else {
|
|
36017
|
+
peg$currPos = s0;
|
|
36018
|
+
s0 = peg$FAILED;
|
|
36019
|
+
}
|
|
36020
|
+
} else {
|
|
36021
|
+
peg$currPos = s0;
|
|
36022
|
+
s0 = peg$FAILED;
|
|
36023
|
+
}
|
|
36024
|
+
return s0;
|
|
36025
|
+
}
|
|
36026
|
+
function peg$parseQualifierName() {
|
|
36027
|
+
let s0, s1, s2, s3, s4;
|
|
36028
|
+
s0 = peg$currPos;
|
|
36029
|
+
s1 = peg$currPos;
|
|
36030
|
+
s2 = input.charAt(peg$currPos);
|
|
36031
|
+
if (peg$r1.test(s2)) {
|
|
36032
|
+
peg$currPos++;
|
|
36033
|
+
} else {
|
|
36034
|
+
s2 = peg$FAILED;
|
|
36035
|
+
if (peg$silentFails === 0) {
|
|
36036
|
+
peg$fail(peg$e17);
|
|
36037
|
+
}
|
|
36038
|
+
}
|
|
36039
|
+
if (s2 !== peg$FAILED) {
|
|
36040
|
+
s3 = [];
|
|
36041
|
+
s4 = input.charAt(peg$currPos);
|
|
36042
|
+
if (peg$r2.test(s4)) {
|
|
36043
|
+
peg$currPos++;
|
|
36044
|
+
} else {
|
|
36045
|
+
s4 = peg$FAILED;
|
|
36046
|
+
if (peg$silentFails === 0) {
|
|
36047
|
+
peg$fail(peg$e18);
|
|
36048
|
+
}
|
|
36049
|
+
}
|
|
36050
|
+
while (s4 !== peg$FAILED) {
|
|
36051
|
+
s3.push(s4);
|
|
36052
|
+
s4 = input.charAt(peg$currPos);
|
|
36053
|
+
if (peg$r2.test(s4)) {
|
|
36054
|
+
peg$currPos++;
|
|
36055
|
+
} else {
|
|
36056
|
+
s4 = peg$FAILED;
|
|
36057
|
+
if (peg$silentFails === 0) {
|
|
36058
|
+
peg$fail(peg$e18);
|
|
36059
|
+
}
|
|
36060
|
+
}
|
|
36061
|
+
}
|
|
36062
|
+
s2 = [s2, s3];
|
|
36063
|
+
s1 = s2;
|
|
36064
|
+
} else {
|
|
36065
|
+
peg$currPos = s1;
|
|
36066
|
+
s1 = peg$FAILED;
|
|
36067
|
+
}
|
|
36068
|
+
if (s1 !== peg$FAILED) {
|
|
36069
|
+
s0 = input.substring(s0, peg$currPos);
|
|
36070
|
+
} else {
|
|
36071
|
+
s0 = s1;
|
|
36072
|
+
}
|
|
36073
|
+
return s0;
|
|
36074
|
+
}
|
|
35118
36075
|
function peg$parsecardContent() {
|
|
35119
36076
|
let s0, s1, s2;
|
|
35120
36077
|
s0 = peg$currPos;
|
|
@@ -35131,7 +36088,7 @@ function peg$parse2(input, options) {
|
|
|
35131
36088
|
}
|
|
35132
36089
|
}
|
|
35133
36090
|
peg$savedPos = s0;
|
|
35134
|
-
s1 = peg$
|
|
36091
|
+
s1 = peg$f38(s1);
|
|
35135
36092
|
s0 = s1;
|
|
35136
36093
|
return s0;
|
|
35137
36094
|
}
|
|
@@ -35149,7 +36106,7 @@ function peg$parse2(input, options) {
|
|
|
35149
36106
|
}
|
|
35150
36107
|
if (s1 !== peg$FAILED) {
|
|
35151
36108
|
peg$savedPos = s0;
|
|
35152
|
-
s1 = peg$
|
|
36109
|
+
s1 = peg$f39(s1);
|
|
35153
36110
|
}
|
|
35154
36111
|
s0 = s1;
|
|
35155
36112
|
return s0;
|
|
@@ -35157,13 +36114,13 @@ function peg$parse2(input, options) {
|
|
|
35157
36114
|
function peg$parseIDTag() {
|
|
35158
36115
|
let s0, s1, s2, s3;
|
|
35159
36116
|
s0 = peg$currPos;
|
|
35160
|
-
if (input.substr(peg$currPos, 4) === peg$
|
|
35161
|
-
s1 = peg$
|
|
36117
|
+
if (input.substr(peg$currPos, 4) === peg$c15) {
|
|
36118
|
+
s1 = peg$c15;
|
|
35162
36119
|
peg$currPos += 4;
|
|
35163
36120
|
} else {
|
|
35164
36121
|
s1 = peg$FAILED;
|
|
35165
36122
|
if (peg$silentFails === 0) {
|
|
35166
|
-
peg$fail(peg$
|
|
36123
|
+
peg$fail(peg$e19);
|
|
35167
36124
|
}
|
|
35168
36125
|
}
|
|
35169
36126
|
if (s1 !== peg$FAILED) {
|
|
@@ -35172,7 +36129,7 @@ function peg$parse2(input, options) {
|
|
|
35172
36129
|
s3 = peg$parseTag_Close();
|
|
35173
36130
|
if (s3 !== peg$FAILED) {
|
|
35174
36131
|
peg$savedPos = s0;
|
|
35175
|
-
s0 = peg$
|
|
36132
|
+
s0 = peg$f40(s2);
|
|
35176
36133
|
} else {
|
|
35177
36134
|
peg$currPos = s0;
|
|
35178
36135
|
s0 = peg$FAILED;
|
|
@@ -35202,24 +36159,24 @@ function peg$parse2(input, options) {
|
|
|
35202
36159
|
if (s1 !== peg$FAILED) {
|
|
35203
36160
|
s2 = [];
|
|
35204
36161
|
if (input.charCodeAt(peg$currPos) === 35) {
|
|
35205
|
-
s3 = peg$
|
|
36162
|
+
s3 = peg$c16;
|
|
35206
36163
|
peg$currPos++;
|
|
35207
36164
|
} else {
|
|
35208
36165
|
s3 = peg$FAILED;
|
|
35209
36166
|
if (peg$silentFails === 0) {
|
|
35210
|
-
peg$fail(peg$
|
|
36167
|
+
peg$fail(peg$e20);
|
|
35211
36168
|
}
|
|
35212
36169
|
}
|
|
35213
36170
|
if (s3 !== peg$FAILED) {
|
|
35214
36171
|
while (s3 !== peg$FAILED) {
|
|
35215
36172
|
s2.push(s3);
|
|
35216
36173
|
if (input.charCodeAt(peg$currPos) === 35) {
|
|
35217
|
-
s3 = peg$
|
|
36174
|
+
s3 = peg$c16;
|
|
35218
36175
|
peg$currPos++;
|
|
35219
36176
|
} else {
|
|
35220
36177
|
s3 = peg$FAILED;
|
|
35221
36178
|
if (peg$silentFails === 0) {
|
|
35222
|
-
peg$fail(peg$
|
|
36179
|
+
peg$fail(peg$e20);
|
|
35223
36180
|
}
|
|
35224
36181
|
}
|
|
35225
36182
|
}
|
|
@@ -35231,7 +36188,7 @@ function peg$parse2(input, options) {
|
|
|
35231
36188
|
s4 = peg$parseTag_CloseOrEOF();
|
|
35232
36189
|
if (s4 !== peg$FAILED) {
|
|
35233
36190
|
peg$savedPos = s0;
|
|
35234
|
-
s0 = peg$
|
|
36191
|
+
s0 = peg$f41(s2, s3);
|
|
35235
36192
|
} else {
|
|
35236
36193
|
peg$currPos = s0;
|
|
35237
36194
|
s0 = peg$FAILED;
|
|
@@ -35249,13 +36206,13 @@ function peg$parse2(input, options) {
|
|
|
35249
36206
|
function peg$parseAnchorTag() {
|
|
35250
36207
|
let s0, s1, s2, s3;
|
|
35251
36208
|
s0 = peg$currPos;
|
|
35252
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35253
|
-
s1 = peg$
|
|
36209
|
+
if (input.substr(peg$currPos, 2) === peg$c17) {
|
|
36210
|
+
s1 = peg$c17;
|
|
35254
36211
|
peg$currPos += 2;
|
|
35255
36212
|
} else {
|
|
35256
36213
|
s1 = peg$FAILED;
|
|
35257
36214
|
if (peg$silentFails === 0) {
|
|
35258
|
-
peg$fail(peg$
|
|
36215
|
+
peg$fail(peg$e21);
|
|
35259
36216
|
}
|
|
35260
36217
|
}
|
|
35261
36218
|
if (s1 !== peg$FAILED) {
|
|
@@ -35263,7 +36220,7 @@ function peg$parse2(input, options) {
|
|
|
35263
36220
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35264
36221
|
if (s3 !== peg$FAILED) {
|
|
35265
36222
|
peg$savedPos = s0;
|
|
35266
|
-
s0 = peg$
|
|
36223
|
+
s0 = peg$f42(s2);
|
|
35267
36224
|
} else {
|
|
35268
36225
|
peg$currPos = s0;
|
|
35269
36226
|
s0 = peg$FAILED;
|
|
@@ -35277,13 +36234,13 @@ function peg$parse2(input, options) {
|
|
|
35277
36234
|
function peg$parseReferenceTag() {
|
|
35278
36235
|
let s0, s1, s2, s3;
|
|
35279
36236
|
s0 = peg$currPos;
|
|
35280
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35281
|
-
s1 = peg$
|
|
36237
|
+
if (input.substr(peg$currPos, 2) === peg$c18) {
|
|
36238
|
+
s1 = peg$c18;
|
|
35282
36239
|
peg$currPos += 2;
|
|
35283
36240
|
} else {
|
|
35284
36241
|
s1 = peg$FAILED;
|
|
35285
36242
|
if (peg$silentFails === 0) {
|
|
35286
|
-
peg$fail(peg$
|
|
36243
|
+
peg$fail(peg$e22);
|
|
35287
36244
|
}
|
|
35288
36245
|
}
|
|
35289
36246
|
if (s1 !== peg$FAILED) {
|
|
@@ -35291,7 +36248,7 @@ function peg$parse2(input, options) {
|
|
|
35291
36248
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35292
36249
|
if (s3 !== peg$FAILED) {
|
|
35293
36250
|
peg$savedPos = s0;
|
|
35294
|
-
s0 = peg$
|
|
36251
|
+
s0 = peg$f43(s2);
|
|
35295
36252
|
} else {
|
|
35296
36253
|
peg$currPos = s0;
|
|
35297
36254
|
s0 = peg$FAILED;
|
|
@@ -35305,13 +36262,13 @@ function peg$parse2(input, options) {
|
|
|
35305
36262
|
function peg$parsePropertyTag() {
|
|
35306
36263
|
let s0, s1, s2, s3, s4;
|
|
35307
36264
|
s0 = peg$currPos;
|
|
35308
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35309
|
-
s1 = peg$
|
|
36265
|
+
if (input.substr(peg$currPos, 2) === peg$c19) {
|
|
36266
|
+
s1 = peg$c19;
|
|
35310
36267
|
peg$currPos += 2;
|
|
35311
36268
|
} else {
|
|
35312
36269
|
s1 = peg$FAILED;
|
|
35313
36270
|
if (peg$silentFails === 0) {
|
|
35314
|
-
peg$fail(peg$
|
|
36271
|
+
peg$fail(peg$e23);
|
|
35315
36272
|
}
|
|
35316
36273
|
}
|
|
35317
36274
|
if (s1 !== peg$FAILED) {
|
|
@@ -35322,7 +36279,7 @@ function peg$parse2(input, options) {
|
|
|
35322
36279
|
s4 = peg$parseTag_CloseOrEOF();
|
|
35323
36280
|
if (s4 !== peg$FAILED) {
|
|
35324
36281
|
peg$savedPos = s0;
|
|
35325
|
-
s0 = peg$
|
|
36282
|
+
s0 = peg$f44(s2, s3);
|
|
35326
36283
|
} else {
|
|
35327
36284
|
peg$currPos = s0;
|
|
35328
36285
|
s0 = peg$FAILED;
|
|
@@ -35344,13 +36301,13 @@ function peg$parse2(input, options) {
|
|
|
35344
36301
|
function peg$parseItemLeadTag() {
|
|
35345
36302
|
let s0, s1, s2, s3;
|
|
35346
36303
|
s0 = peg$currPos;
|
|
35347
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35348
|
-
s1 = peg$
|
|
36304
|
+
if (input.substr(peg$currPos, 2) === peg$c20) {
|
|
36305
|
+
s1 = peg$c20;
|
|
35349
36306
|
peg$currPos += 2;
|
|
35350
36307
|
} else {
|
|
35351
36308
|
s1 = peg$FAILED;
|
|
35352
36309
|
if (peg$silentFails === 0) {
|
|
35353
|
-
peg$fail(peg$
|
|
36310
|
+
peg$fail(peg$e24);
|
|
35354
36311
|
}
|
|
35355
36312
|
}
|
|
35356
36313
|
if (s1 !== peg$FAILED) {
|
|
@@ -35358,7 +36315,7 @@ function peg$parse2(input, options) {
|
|
|
35358
36315
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35359
36316
|
if (s3 !== peg$FAILED) {
|
|
35360
36317
|
peg$savedPos = s0;
|
|
35361
|
-
s0 = peg$
|
|
36318
|
+
s0 = peg$f45(s2);
|
|
35362
36319
|
} else {
|
|
35363
36320
|
peg$currPos = s0;
|
|
35364
36321
|
s0 = peg$FAILED;
|
|
@@ -35372,13 +36329,13 @@ function peg$parse2(input, options) {
|
|
|
35372
36329
|
function peg$parseInstructionTag() {
|
|
35373
36330
|
let s0, s1, s2, s3;
|
|
35374
36331
|
s0 = peg$currPos;
|
|
35375
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35376
|
-
s1 = peg$
|
|
36332
|
+
if (input.substr(peg$currPos, 2) === peg$c21) {
|
|
36333
|
+
s1 = peg$c21;
|
|
35377
36334
|
peg$currPos += 2;
|
|
35378
36335
|
} else {
|
|
35379
36336
|
s1 = peg$FAILED;
|
|
35380
36337
|
if (peg$silentFails === 0) {
|
|
35381
|
-
peg$fail(peg$
|
|
36338
|
+
peg$fail(peg$e25);
|
|
35382
36339
|
}
|
|
35383
36340
|
}
|
|
35384
36341
|
if (s1 !== peg$FAILED) {
|
|
@@ -35386,7 +36343,7 @@ function peg$parse2(input, options) {
|
|
|
35386
36343
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35387
36344
|
if (s3 !== peg$FAILED) {
|
|
35388
36345
|
peg$savedPos = s0;
|
|
35389
|
-
s0 = peg$
|
|
36346
|
+
s0 = peg$f46(s2);
|
|
35390
36347
|
} else {
|
|
35391
36348
|
peg$currPos = s0;
|
|
35392
36349
|
s0 = peg$FAILED;
|
|
@@ -35400,13 +36357,13 @@ function peg$parse2(input, options) {
|
|
|
35400
36357
|
function peg$parseHintTag() {
|
|
35401
36358
|
let s0, s1, s2, s3;
|
|
35402
36359
|
s0 = peg$currPos;
|
|
35403
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35404
|
-
s1 = peg$
|
|
36360
|
+
if (input.substr(peg$currPos, 2) === peg$c22) {
|
|
36361
|
+
s1 = peg$c22;
|
|
35405
36362
|
peg$currPos += 2;
|
|
35406
36363
|
} else {
|
|
35407
36364
|
s1 = peg$FAILED;
|
|
35408
36365
|
if (peg$silentFails === 0) {
|
|
35409
|
-
peg$fail(peg$
|
|
36366
|
+
peg$fail(peg$e26);
|
|
35410
36367
|
}
|
|
35411
36368
|
}
|
|
35412
36369
|
if (s1 !== peg$FAILED) {
|
|
@@ -35414,7 +36371,7 @@ function peg$parse2(input, options) {
|
|
|
35414
36371
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35415
36372
|
if (s3 !== peg$FAILED) {
|
|
35416
36373
|
peg$savedPos = s0;
|
|
35417
|
-
s0 = peg$
|
|
36374
|
+
s0 = peg$f47(s2);
|
|
35418
36375
|
} else {
|
|
35419
36376
|
peg$currPos = s0;
|
|
35420
36377
|
s0 = peg$FAILED;
|
|
@@ -35428,13 +36385,13 @@ function peg$parse2(input, options) {
|
|
|
35428
36385
|
function peg$parseTrueTag() {
|
|
35429
36386
|
let s0, s1, s2, s3;
|
|
35430
36387
|
s0 = peg$currPos;
|
|
35431
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35432
|
-
s1 = peg$
|
|
36388
|
+
if (input.substr(peg$currPos, 2) === peg$c23) {
|
|
36389
|
+
s1 = peg$c23;
|
|
35433
36390
|
peg$currPos += 2;
|
|
35434
36391
|
} else {
|
|
35435
36392
|
s1 = peg$FAILED;
|
|
35436
36393
|
if (peg$silentFails === 0) {
|
|
35437
|
-
peg$fail(peg$
|
|
36394
|
+
peg$fail(peg$e27);
|
|
35438
36395
|
}
|
|
35439
36396
|
}
|
|
35440
36397
|
if (s1 !== peg$FAILED) {
|
|
@@ -35442,7 +36399,7 @@ function peg$parse2(input, options) {
|
|
|
35442
36399
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35443
36400
|
if (s3 !== peg$FAILED) {
|
|
35444
36401
|
peg$savedPos = s0;
|
|
35445
|
-
s0 = peg$
|
|
36402
|
+
s0 = peg$f48(s2);
|
|
35446
36403
|
} else {
|
|
35447
36404
|
peg$currPos = s0;
|
|
35448
36405
|
s0 = peg$FAILED;
|
|
@@ -35456,13 +36413,13 @@ function peg$parse2(input, options) {
|
|
|
35456
36413
|
function peg$parseFalseTag() {
|
|
35457
36414
|
let s0, s1, s2, s3;
|
|
35458
36415
|
s0 = peg$currPos;
|
|
35459
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35460
|
-
s1 = peg$
|
|
36416
|
+
if (input.substr(peg$currPos, 2) === peg$c24) {
|
|
36417
|
+
s1 = peg$c24;
|
|
35461
36418
|
peg$currPos += 2;
|
|
35462
36419
|
} else {
|
|
35463
36420
|
s1 = peg$FAILED;
|
|
35464
36421
|
if (peg$silentFails === 0) {
|
|
35465
|
-
peg$fail(peg$
|
|
36422
|
+
peg$fail(peg$e28);
|
|
35466
36423
|
}
|
|
35467
36424
|
}
|
|
35468
36425
|
if (s1 !== peg$FAILED) {
|
|
@@ -35470,7 +36427,7 @@ function peg$parse2(input, options) {
|
|
|
35470
36427
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35471
36428
|
if (s3 !== peg$FAILED) {
|
|
35472
36429
|
peg$savedPos = s0;
|
|
35473
|
-
s0 = peg$
|
|
36430
|
+
s0 = peg$f49(s2);
|
|
35474
36431
|
} else {
|
|
35475
36432
|
peg$currPos = s0;
|
|
35476
36433
|
s0 = peg$FAILED;
|
|
@@ -35484,13 +36441,13 @@ function peg$parse2(input, options) {
|
|
|
35484
36441
|
function peg$parseSampleSolutionTag() {
|
|
35485
36442
|
let s0, s1, s2, s3;
|
|
35486
36443
|
s0 = peg$currPos;
|
|
35487
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35488
|
-
s1 = peg$
|
|
36444
|
+
if (input.substr(peg$currPos, 2) === peg$c25) {
|
|
36445
|
+
s1 = peg$c25;
|
|
35489
36446
|
peg$currPos += 2;
|
|
35490
36447
|
} else {
|
|
35491
36448
|
s1 = peg$FAILED;
|
|
35492
36449
|
if (peg$silentFails === 0) {
|
|
35493
|
-
peg$fail(peg$
|
|
36450
|
+
peg$fail(peg$e29);
|
|
35494
36451
|
}
|
|
35495
36452
|
}
|
|
35496
36453
|
if (s1 !== peg$FAILED) {
|
|
@@ -35498,7 +36455,7 @@ function peg$parse2(input, options) {
|
|
|
35498
36455
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35499
36456
|
if (s3 !== peg$FAILED) {
|
|
35500
36457
|
peg$savedPos = s0;
|
|
35501
|
-
s0 = peg$
|
|
36458
|
+
s0 = peg$f50(s2);
|
|
35502
36459
|
} else {
|
|
35503
36460
|
peg$currPos = s0;
|
|
35504
36461
|
s0 = peg$FAILED;
|
|
@@ -35512,13 +36469,13 @@ function peg$parse2(input, options) {
|
|
|
35512
36469
|
function peg$parseGapTag() {
|
|
35513
36470
|
let s0, s1, s2, s3;
|
|
35514
36471
|
s0 = peg$currPos;
|
|
35515
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35516
|
-
s1 = peg$
|
|
36472
|
+
if (input.substr(peg$currPos, 2) === peg$c26) {
|
|
36473
|
+
s1 = peg$c26;
|
|
35517
36474
|
peg$currPos += 2;
|
|
35518
36475
|
} else {
|
|
35519
36476
|
s1 = peg$FAILED;
|
|
35520
36477
|
if (peg$silentFails === 0) {
|
|
35521
|
-
peg$fail(peg$
|
|
36478
|
+
peg$fail(peg$e30);
|
|
35522
36479
|
}
|
|
35523
36480
|
}
|
|
35524
36481
|
if (s1 !== peg$FAILED) {
|
|
@@ -35526,7 +36483,7 @@ function peg$parse2(input, options) {
|
|
|
35526
36483
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35527
36484
|
if (s3 !== peg$FAILED) {
|
|
35528
36485
|
peg$savedPos = s0;
|
|
35529
|
-
s0 = peg$
|
|
36486
|
+
s0 = peg$f51(s2);
|
|
35530
36487
|
} else {
|
|
35531
36488
|
peg$currPos = s0;
|
|
35532
36489
|
s0 = peg$FAILED;
|
|
@@ -35540,13 +36497,13 @@ function peg$parse2(input, options) {
|
|
|
35540
36497
|
function peg$parseMarkTag() {
|
|
35541
36498
|
let s0, s1, s2, s3;
|
|
35542
36499
|
s0 = peg$currPos;
|
|
35543
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35544
|
-
s1 = peg$
|
|
36500
|
+
if (input.substr(peg$currPos, 2) === peg$c27) {
|
|
36501
|
+
s1 = peg$c27;
|
|
35545
36502
|
peg$currPos += 2;
|
|
35546
36503
|
} else {
|
|
35547
36504
|
s1 = peg$FAILED;
|
|
35548
36505
|
if (peg$silentFails === 0) {
|
|
35549
|
-
peg$fail(peg$
|
|
36506
|
+
peg$fail(peg$e31);
|
|
35550
36507
|
}
|
|
35551
36508
|
}
|
|
35552
36509
|
if (s1 !== peg$FAILED) {
|
|
@@ -35554,7 +36511,7 @@ function peg$parse2(input, options) {
|
|
|
35554
36511
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35555
36512
|
if (s3 !== peg$FAILED) {
|
|
35556
36513
|
peg$savedPos = s0;
|
|
35557
|
-
s0 = peg$
|
|
36514
|
+
s0 = peg$f52(s2);
|
|
35558
36515
|
} else {
|
|
35559
36516
|
peg$currPos = s0;
|
|
35560
36517
|
s0 = peg$FAILED;
|
|
@@ -35568,13 +36525,13 @@ function peg$parse2(input, options) {
|
|
|
35568
36525
|
function peg$parseResourceTag() {
|
|
35569
36526
|
let s0, s1, s2, s3, s4;
|
|
35570
36527
|
s0 = peg$currPos;
|
|
35571
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35572
|
-
s1 = peg$
|
|
36528
|
+
if (input.substr(peg$currPos, 2) === peg$c28) {
|
|
36529
|
+
s1 = peg$c28;
|
|
35573
36530
|
peg$currPos += 2;
|
|
35574
36531
|
} else {
|
|
35575
36532
|
s1 = peg$FAILED;
|
|
35576
36533
|
if (peg$silentFails === 0) {
|
|
35577
|
-
peg$fail(peg$
|
|
36534
|
+
peg$fail(peg$e32);
|
|
35578
36535
|
}
|
|
35579
36536
|
}
|
|
35580
36537
|
if (s1 !== peg$FAILED) {
|
|
@@ -35585,7 +36542,7 @@ function peg$parse2(input, options) {
|
|
|
35585
36542
|
s4 = peg$parseTag_CloseOrEOF();
|
|
35586
36543
|
if (s4 !== peg$FAILED) {
|
|
35587
36544
|
peg$savedPos = s0;
|
|
35588
|
-
s0 = peg$
|
|
36545
|
+
s0 = peg$f53(s2, s3);
|
|
35589
36546
|
} else {
|
|
35590
36547
|
peg$currPos = s0;
|
|
35591
36548
|
s0 = peg$FAILED;
|
|
@@ -35609,13 +36566,13 @@ function peg$parse2(input, options) {
|
|
|
35609
36566
|
s0 = peg$currPos;
|
|
35610
36567
|
s1 = peg$currPos;
|
|
35611
36568
|
s2 = [];
|
|
35612
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35613
|
-
s3 = peg$
|
|
36569
|
+
if (input.substr(peg$currPos, 2) === peg$c29) {
|
|
36570
|
+
s3 = peg$c29;
|
|
35614
36571
|
peg$currPos += 2;
|
|
35615
36572
|
} else {
|
|
35616
36573
|
s3 = peg$FAILED;
|
|
35617
36574
|
if (peg$silentFails === 0) {
|
|
35618
|
-
peg$fail(peg$
|
|
36575
|
+
peg$fail(peg$e33);
|
|
35619
36576
|
}
|
|
35620
36577
|
}
|
|
35621
36578
|
if (s3 === peg$FAILED) {
|
|
@@ -35631,13 +36588,13 @@ function peg$parse2(input, options) {
|
|
|
35631
36588
|
}
|
|
35632
36589
|
while (s3 !== peg$FAILED) {
|
|
35633
36590
|
s2.push(s3);
|
|
35634
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35635
|
-
s3 = peg$
|
|
36591
|
+
if (input.substr(peg$currPos, 2) === peg$c29) {
|
|
36592
|
+
s3 = peg$c29;
|
|
35636
36593
|
peg$currPos += 2;
|
|
35637
36594
|
} else {
|
|
35638
36595
|
s3 = peg$FAILED;
|
|
35639
36596
|
if (peg$silentFails === 0) {
|
|
35640
|
-
peg$fail(peg$
|
|
36597
|
+
peg$fail(peg$e33);
|
|
35641
36598
|
}
|
|
35642
36599
|
}
|
|
35643
36600
|
if (s3 === peg$FAILED) {
|
|
@@ -35654,7 +36611,7 @@ function peg$parse2(input, options) {
|
|
|
35654
36611
|
}
|
|
35655
36612
|
s1 = input.substring(s1, peg$currPos);
|
|
35656
36613
|
peg$savedPos = s0;
|
|
35657
|
-
s1 = peg$
|
|
36614
|
+
s1 = peg$f54(s1);
|
|
35658
36615
|
s0 = s1;
|
|
35659
36616
|
return s0;
|
|
35660
36617
|
}
|
|
@@ -35663,13 +36620,13 @@ function peg$parse2(input, options) {
|
|
|
35663
36620
|
s0 = peg$currPos;
|
|
35664
36621
|
s1 = peg$currPos;
|
|
35665
36622
|
peg$silentFails++;
|
|
35666
|
-
if (input.substr(peg$currPos, 3) === peg$
|
|
35667
|
-
s2 = peg$
|
|
36623
|
+
if (input.substr(peg$currPos, 3) === peg$c30) {
|
|
36624
|
+
s2 = peg$c30;
|
|
35668
36625
|
peg$currPos += 3;
|
|
35669
36626
|
} else {
|
|
35670
36627
|
s2 = peg$FAILED;
|
|
35671
36628
|
if (peg$silentFails === 0) {
|
|
35672
|
-
peg$fail(peg$
|
|
36629
|
+
peg$fail(peg$e34);
|
|
35673
36630
|
}
|
|
35674
36631
|
}
|
|
35675
36632
|
peg$silentFails--;
|
|
@@ -35683,29 +36640,29 @@ function peg$parse2(input, options) {
|
|
|
35683
36640
|
s2 = peg$currPos;
|
|
35684
36641
|
s3 = [];
|
|
35685
36642
|
s4 = input.charAt(peg$currPos);
|
|
35686
|
-
if (peg$
|
|
36643
|
+
if (peg$r3.test(s4)) {
|
|
35687
36644
|
peg$currPos++;
|
|
35688
36645
|
} else {
|
|
35689
36646
|
s4 = peg$FAILED;
|
|
35690
36647
|
if (peg$silentFails === 0) {
|
|
35691
|
-
peg$fail(peg$
|
|
36648
|
+
peg$fail(peg$e35);
|
|
35692
36649
|
}
|
|
35693
36650
|
}
|
|
35694
36651
|
while (s4 !== peg$FAILED) {
|
|
35695
36652
|
s3.push(s4);
|
|
35696
36653
|
s4 = input.charAt(peg$currPos);
|
|
35697
|
-
if (peg$
|
|
36654
|
+
if (peg$r3.test(s4)) {
|
|
35698
36655
|
peg$currPos++;
|
|
35699
36656
|
} else {
|
|
35700
36657
|
s4 = peg$FAILED;
|
|
35701
36658
|
if (peg$silentFails === 0) {
|
|
35702
|
-
peg$fail(peg$
|
|
36659
|
+
peg$fail(peg$e35);
|
|
35703
36660
|
}
|
|
35704
36661
|
}
|
|
35705
36662
|
}
|
|
35706
36663
|
s2 = input.substring(s2, peg$currPos);
|
|
35707
36664
|
peg$savedPos = s0;
|
|
35708
|
-
s0 = peg$
|
|
36665
|
+
s0 = peg$f55(s2);
|
|
35709
36666
|
} else {
|
|
35710
36667
|
peg$currPos = s0;
|
|
35711
36668
|
s0 = peg$FAILED;
|
|
@@ -35760,24 +36717,24 @@ function peg$parse2(input, options) {
|
|
|
35760
36717
|
s0 = peg$currPos;
|
|
35761
36718
|
s1 = [];
|
|
35762
36719
|
if (input.charCodeAt(peg$currPos) === 46) {
|
|
35763
|
-
s2 = peg$
|
|
36720
|
+
s2 = peg$c31;
|
|
35764
36721
|
peg$currPos++;
|
|
35765
36722
|
} else {
|
|
35766
36723
|
s2 = peg$FAILED;
|
|
35767
36724
|
if (peg$silentFails === 0) {
|
|
35768
|
-
peg$fail(peg$
|
|
36725
|
+
peg$fail(peg$e36);
|
|
35769
36726
|
}
|
|
35770
36727
|
}
|
|
35771
36728
|
if (s2 !== peg$FAILED) {
|
|
35772
36729
|
while (s2 !== peg$FAILED) {
|
|
35773
36730
|
s1.push(s2);
|
|
35774
36731
|
if (input.charCodeAt(peg$currPos) === 46) {
|
|
35775
|
-
s2 = peg$
|
|
36732
|
+
s2 = peg$c31;
|
|
35776
36733
|
peg$currPos++;
|
|
35777
36734
|
} else {
|
|
35778
36735
|
s2 = peg$FAILED;
|
|
35779
36736
|
if (peg$silentFails === 0) {
|
|
35780
|
-
peg$fail(peg$
|
|
36737
|
+
peg$fail(peg$e36);
|
|
35781
36738
|
}
|
|
35782
36739
|
}
|
|
35783
36740
|
}
|
|
@@ -35786,7 +36743,7 @@ function peg$parse2(input, options) {
|
|
|
35786
36743
|
}
|
|
35787
36744
|
if (s1 !== peg$FAILED) {
|
|
35788
36745
|
peg$savedPos = s0;
|
|
35789
|
-
s1 = peg$
|
|
36746
|
+
s1 = peg$f56(s1);
|
|
35790
36747
|
}
|
|
35791
36748
|
s0 = s1;
|
|
35792
36749
|
return s0;
|
|
@@ -35797,29 +36754,29 @@ function peg$parse2(input, options) {
|
|
|
35797
36754
|
s1 = peg$currPos;
|
|
35798
36755
|
s2 = [];
|
|
35799
36756
|
s3 = input.charAt(peg$currPos);
|
|
35800
|
-
if (peg$
|
|
36757
|
+
if (peg$r4.test(s3)) {
|
|
35801
36758
|
peg$currPos++;
|
|
35802
36759
|
} else {
|
|
35803
36760
|
s3 = peg$FAILED;
|
|
35804
36761
|
if (peg$silentFails === 0) {
|
|
35805
|
-
peg$fail(peg$
|
|
36762
|
+
peg$fail(peg$e37);
|
|
35806
36763
|
}
|
|
35807
36764
|
}
|
|
35808
36765
|
while (s3 !== peg$FAILED) {
|
|
35809
36766
|
s2.push(s3);
|
|
35810
36767
|
s3 = input.charAt(peg$currPos);
|
|
35811
|
-
if (peg$
|
|
36768
|
+
if (peg$r4.test(s3)) {
|
|
35812
36769
|
peg$currPos++;
|
|
35813
36770
|
} else {
|
|
35814
36771
|
s3 = peg$FAILED;
|
|
35815
36772
|
if (peg$silentFails === 0) {
|
|
35816
|
-
peg$fail(peg$
|
|
36773
|
+
peg$fail(peg$e37);
|
|
35817
36774
|
}
|
|
35818
36775
|
}
|
|
35819
36776
|
}
|
|
35820
36777
|
s1 = input.substring(s1, peg$currPos);
|
|
35821
36778
|
peg$savedPos = s0;
|
|
35822
|
-
s1 = peg$
|
|
36779
|
+
s1 = peg$f57(s1);
|
|
35823
36780
|
s0 = s1;
|
|
35824
36781
|
return s0;
|
|
35825
36782
|
}
|
|
@@ -35838,7 +36795,7 @@ function peg$parse2(input, options) {
|
|
|
35838
36795
|
if (s1 !== peg$FAILED) {
|
|
35839
36796
|
s2 = peg$parseTag_Value();
|
|
35840
36797
|
peg$savedPos = s0;
|
|
35841
|
-
s0 = peg$
|
|
36798
|
+
s0 = peg$f58(s2);
|
|
35842
36799
|
} else {
|
|
35843
36800
|
peg$currPos = s0;
|
|
35844
36801
|
s0 = peg$FAILED;
|
|
@@ -35847,7 +36804,7 @@ function peg$parse2(input, options) {
|
|
|
35847
36804
|
s0 = peg$currPos;
|
|
35848
36805
|
s1 = "";
|
|
35849
36806
|
peg$savedPos = s0;
|
|
35850
|
-
s1 = peg$
|
|
36807
|
+
s1 = peg$f59();
|
|
35851
36808
|
s0 = s1;
|
|
35852
36809
|
}
|
|
35853
36810
|
return s0;
|
|
@@ -35884,19 +36841,19 @@ function peg$parse2(input, options) {
|
|
|
35884
36841
|
let s0, s1;
|
|
35885
36842
|
peg$silentFails++;
|
|
35886
36843
|
s0 = input.charAt(peg$currPos);
|
|
35887
|
-
if (peg$
|
|
36844
|
+
if (peg$r5.test(s0)) {
|
|
35888
36845
|
peg$currPos++;
|
|
35889
36846
|
} else {
|
|
35890
36847
|
s0 = peg$FAILED;
|
|
35891
36848
|
if (peg$silentFails === 0) {
|
|
35892
|
-
peg$fail(peg$
|
|
36849
|
+
peg$fail(peg$e39);
|
|
35893
36850
|
}
|
|
35894
36851
|
}
|
|
35895
36852
|
peg$silentFails--;
|
|
35896
36853
|
if (s0 === peg$FAILED) {
|
|
35897
36854
|
s1 = peg$FAILED;
|
|
35898
36855
|
if (peg$silentFails === 0) {
|
|
35899
|
-
peg$fail(peg$
|
|
36856
|
+
peg$fail(peg$e38);
|
|
35900
36857
|
}
|
|
35901
36858
|
}
|
|
35902
36859
|
return s0;
|
|
@@ -35919,23 +36876,23 @@ function peg$parse2(input, options) {
|
|
|
35919
36876
|
s0 = peg$currPos;
|
|
35920
36877
|
s1 = [];
|
|
35921
36878
|
s2 = input.charAt(peg$currPos);
|
|
35922
|
-
if (peg$
|
|
36879
|
+
if (peg$r6.test(s2)) {
|
|
35923
36880
|
peg$currPos++;
|
|
35924
36881
|
} else {
|
|
35925
36882
|
s2 = peg$FAILED;
|
|
35926
36883
|
if (peg$silentFails === 0) {
|
|
35927
|
-
peg$fail(peg$
|
|
36884
|
+
peg$fail(peg$e41);
|
|
35928
36885
|
}
|
|
35929
36886
|
}
|
|
35930
36887
|
while (s2 !== peg$FAILED) {
|
|
35931
36888
|
s1.push(s2);
|
|
35932
36889
|
s2 = input.charAt(peg$currPos);
|
|
35933
|
-
if (peg$
|
|
36890
|
+
if (peg$r6.test(s2)) {
|
|
35934
36891
|
peg$currPos++;
|
|
35935
36892
|
} else {
|
|
35936
36893
|
s2 = peg$FAILED;
|
|
35937
36894
|
if (peg$silentFails === 0) {
|
|
35938
|
-
peg$fail(peg$
|
|
36895
|
+
peg$fail(peg$e41);
|
|
35939
36896
|
}
|
|
35940
36897
|
}
|
|
35941
36898
|
}
|
|
@@ -35951,7 +36908,7 @@ function peg$parse2(input, options) {
|
|
|
35951
36908
|
if (s0 === peg$FAILED) {
|
|
35952
36909
|
s1 = peg$FAILED;
|
|
35953
36910
|
if (peg$silentFails === 0) {
|
|
35954
|
-
peg$fail(peg$
|
|
36911
|
+
peg$fail(peg$e40);
|
|
35955
36912
|
}
|
|
35956
36913
|
}
|
|
35957
36914
|
return s0;
|
|
@@ -35960,32 +36917,32 @@ function peg$parse2(input, options) {
|
|
|
35960
36917
|
let s0, s1;
|
|
35961
36918
|
peg$silentFails++;
|
|
35962
36919
|
if (input.charCodeAt(peg$currPos) === 10) {
|
|
35963
|
-
s0 = peg$
|
|
36920
|
+
s0 = peg$c32;
|
|
35964
36921
|
peg$currPos++;
|
|
35965
36922
|
} else {
|
|
35966
36923
|
s0 = peg$FAILED;
|
|
35967
36924
|
if (peg$silentFails === 0) {
|
|
35968
|
-
peg$fail(peg$
|
|
36925
|
+
peg$fail(peg$e43);
|
|
35969
36926
|
}
|
|
35970
36927
|
}
|
|
35971
36928
|
if (s0 === peg$FAILED) {
|
|
35972
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35973
|
-
s0 = peg$
|
|
36929
|
+
if (input.substr(peg$currPos, 2) === peg$c33) {
|
|
36930
|
+
s0 = peg$c33;
|
|
35974
36931
|
peg$currPos += 2;
|
|
35975
36932
|
} else {
|
|
35976
36933
|
s0 = peg$FAILED;
|
|
35977
36934
|
if (peg$silentFails === 0) {
|
|
35978
|
-
peg$fail(peg$
|
|
36935
|
+
peg$fail(peg$e44);
|
|
35979
36936
|
}
|
|
35980
36937
|
}
|
|
35981
36938
|
if (s0 === peg$FAILED) {
|
|
35982
36939
|
s0 = input.charAt(peg$currPos);
|
|
35983
|
-
if (peg$
|
|
36940
|
+
if (peg$r7.test(s0)) {
|
|
35984
36941
|
peg$currPos++;
|
|
35985
36942
|
} else {
|
|
35986
36943
|
s0 = peg$FAILED;
|
|
35987
36944
|
if (peg$silentFails === 0) {
|
|
35988
|
-
peg$fail(peg$
|
|
36945
|
+
peg$fail(peg$e45);
|
|
35989
36946
|
}
|
|
35990
36947
|
}
|
|
35991
36948
|
}
|
|
@@ -35994,7 +36951,7 @@ function peg$parse2(input, options) {
|
|
|
35994
36951
|
if (s0 === peg$FAILED) {
|
|
35995
36952
|
s1 = peg$FAILED;
|
|
35996
36953
|
if (peg$silentFails === 0) {
|
|
35997
|
-
peg$fail(peg$
|
|
36954
|
+
peg$fail(peg$e42);
|
|
35998
36955
|
}
|
|
35999
36956
|
}
|
|
36000
36957
|
return s0;
|
|
@@ -36005,23 +36962,23 @@ function peg$parse2(input, options) {
|
|
|
36005
36962
|
s0 = peg$currPos;
|
|
36006
36963
|
s1 = [];
|
|
36007
36964
|
s2 = input.charAt(peg$currPos);
|
|
36008
|
-
if (peg$
|
|
36965
|
+
if (peg$r6.test(s2)) {
|
|
36009
36966
|
peg$currPos++;
|
|
36010
36967
|
} else {
|
|
36011
36968
|
s2 = peg$FAILED;
|
|
36012
36969
|
if (peg$silentFails === 0) {
|
|
36013
|
-
peg$fail(peg$
|
|
36970
|
+
peg$fail(peg$e41);
|
|
36014
36971
|
}
|
|
36015
36972
|
}
|
|
36016
36973
|
while (s2 !== peg$FAILED) {
|
|
36017
36974
|
s1.push(s2);
|
|
36018
36975
|
s2 = input.charAt(peg$currPos);
|
|
36019
|
-
if (peg$
|
|
36976
|
+
if (peg$r6.test(s2)) {
|
|
36020
36977
|
peg$currPos++;
|
|
36021
36978
|
} else {
|
|
36022
36979
|
s2 = peg$FAILED;
|
|
36023
36980
|
if (peg$silentFails === 0) {
|
|
36024
|
-
peg$fail(peg$
|
|
36981
|
+
peg$fail(peg$e41);
|
|
36025
36982
|
}
|
|
36026
36983
|
}
|
|
36027
36984
|
}
|
|
@@ -36037,7 +36994,7 @@ function peg$parse2(input, options) {
|
|
|
36037
36994
|
if (s0 === peg$FAILED) {
|
|
36038
36995
|
s1 = peg$FAILED;
|
|
36039
36996
|
if (peg$silentFails === 0) {
|
|
36040
|
-
peg$fail(peg$
|
|
36997
|
+
peg$fail(peg$e46);
|
|
36041
36998
|
}
|
|
36042
36999
|
}
|
|
36043
37000
|
return s0;
|
|
@@ -36046,19 +37003,19 @@ function peg$parse2(input, options) {
|
|
|
36046
37003
|
let s0, s1;
|
|
36047
37004
|
peg$silentFails++;
|
|
36048
37005
|
s0 = input.charAt(peg$currPos);
|
|
36049
|
-
if (peg$
|
|
37006
|
+
if (peg$r8.test(s0)) {
|
|
36050
37007
|
peg$currPos++;
|
|
36051
37008
|
} else {
|
|
36052
37009
|
s0 = peg$FAILED;
|
|
36053
37010
|
if (peg$silentFails === 0) {
|
|
36054
|
-
peg$fail(peg$
|
|
37011
|
+
peg$fail(peg$e48);
|
|
36055
37012
|
}
|
|
36056
37013
|
}
|
|
36057
37014
|
peg$silentFails--;
|
|
36058
37015
|
if (s0 === peg$FAILED) {
|
|
36059
37016
|
s1 = peg$FAILED;
|
|
36060
37017
|
if (peg$silentFails === 0) {
|
|
36061
|
-
peg$fail(peg$
|
|
37018
|
+
peg$fail(peg$e47);
|
|
36062
37019
|
}
|
|
36063
37020
|
}
|
|
36064
37021
|
return s0;
|