@gmb/bitmark-parser-generator 4.13.0 → 4.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/bitmark-parser-generator.min.js +1 -1
- package/dist/browser/bundle-report.html +2 -2
- package/dist/browser/cjs/index.cjs +1338 -379
- package/dist/browser/cjs/index.cjs.map +1 -1
- package/dist/browser/cjs/index.d.cts +92 -10
- package/dist/browser/esm/index.d.ts +92 -10
- package/dist/browser/esm/index.js +1338 -379
- package/dist/browser/esm/index.js.map +1 -1
- package/dist/index.cjs +1338 -379
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +92 -10
- package/dist/index.d.ts +92 -10
- package/dist/index.js +1338 -379
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -573,6 +573,7 @@ var BitType = superenum({
|
|
|
573
573
|
surveyRatingOnce: "survey-rating-once",
|
|
574
574
|
table: "table",
|
|
575
575
|
tableAlt: "table-alt",
|
|
576
|
+
tableExtended: "table-extended",
|
|
576
577
|
tableImage: "table-image",
|
|
577
578
|
tableImageAlt: "table-image-alt",
|
|
578
579
|
takePicture: "take-picture",
|
|
@@ -703,6 +704,7 @@ var CardSetConfigKey = superenum7({
|
|
|
703
704
|
matchImagePairs: "matchImagePairs",
|
|
704
705
|
matchMatrix: "matchMatrix",
|
|
705
706
|
table: "table",
|
|
707
|
+
tableExtended: "tableExtended",
|
|
706
708
|
pronunciationTable: "pronunciationTable",
|
|
707
709
|
botActionResponses: "botActionResponses",
|
|
708
710
|
exampleBitList: "exampleBitList",
|
|
@@ -1193,6 +1195,7 @@ var propertyKeys = {
|
|
|
1193
1195
|
property_index: "@index",
|
|
1194
1196
|
property_internalComment: "@internalComment",
|
|
1195
1197
|
property_internalPrintPdf: "@internalPrintPdf",
|
|
1198
|
+
property_hasPrintRestriction: "@hasPrintRestriction",
|
|
1196
1199
|
property_isCaseSensitive: "@isCaseSensitive",
|
|
1197
1200
|
property_isInfoOnly: "@isInfoOnly",
|
|
1198
1201
|
property_isPublic: "@isPublic",
|
|
@@ -1316,6 +1319,10 @@ var propertyKeys = {
|
|
|
1316
1319
|
property_tableSearch: "@tableSearch",
|
|
1317
1320
|
property_tableSort: "@tableSort",
|
|
1318
1321
|
property_tableWhitespaceNoWrap: "@tableWhitespaceNoWrap",
|
|
1322
|
+
property_tableCellType: "@tableCellType",
|
|
1323
|
+
property_tableRowSpan: "@tableRowSpan",
|
|
1324
|
+
property_tableColSpan: "@tableColSpan",
|
|
1325
|
+
property_tableScope: "@tableScope",
|
|
1319
1326
|
property_tag: "@tag",
|
|
1320
1327
|
property_target: "@target",
|
|
1321
1328
|
property_technicalTerm: "@technicalTerm",
|
|
@@ -2398,6 +2405,47 @@ var CARDSETS = {
|
|
|
2398
2405
|
]
|
|
2399
2406
|
]
|
|
2400
2407
|
},
|
|
2408
|
+
[CardSetConfigKey.tableExtended]: {
|
|
2409
|
+
variants: [
|
|
2410
|
+
// Side 1
|
|
2411
|
+
[
|
|
2412
|
+
// Variant 1..N
|
|
2413
|
+
{
|
|
2414
|
+
tags: [
|
|
2415
|
+
{
|
|
2416
|
+
key: ConfigKey.group_standardItemLeadInstructionHint,
|
|
2417
|
+
description: "Standard tags for lead, instruction, and hint."
|
|
2418
|
+
},
|
|
2419
|
+
{
|
|
2420
|
+
key: ConfigKey.tag_title,
|
|
2421
|
+
description: "Title of the table."
|
|
2422
|
+
},
|
|
2423
|
+
{
|
|
2424
|
+
key: ConfigKey.property_tableCellType,
|
|
2425
|
+
description: "Table cell type (th/td).",
|
|
2426
|
+
format: TagFormat.plainText
|
|
2427
|
+
},
|
|
2428
|
+
{
|
|
2429
|
+
key: ConfigKey.property_tableRowSpan,
|
|
2430
|
+
description: "Number of rows the cell spans.",
|
|
2431
|
+
format: TagFormat.number
|
|
2432
|
+
},
|
|
2433
|
+
{
|
|
2434
|
+
key: ConfigKey.property_tableColSpan,
|
|
2435
|
+
description: "Number of columns the cell spans.",
|
|
2436
|
+
format: TagFormat.number
|
|
2437
|
+
},
|
|
2438
|
+
{
|
|
2439
|
+
key: ConfigKey.property_tableScope,
|
|
2440
|
+
description: "Scope attribute for header cells.",
|
|
2441
|
+
format: TagFormat.plainText
|
|
2442
|
+
}
|
|
2443
|
+
],
|
|
2444
|
+
repeatCount: Count.infinity
|
|
2445
|
+
}
|
|
2446
|
+
]
|
|
2447
|
+
]
|
|
2448
|
+
},
|
|
2401
2449
|
[CardSetConfigKey.pronunciationTable]: {
|
|
2402
2450
|
variants: [
|
|
2403
2451
|
// Side 1
|
|
@@ -3272,6 +3320,12 @@ var GROUPS = {
|
|
|
3272
3320
|
key: ConfigKey.property_internalPrintPdf,
|
|
3273
3321
|
description: "Url of the internal print PDF for the book",
|
|
3274
3322
|
format: TagFormat.plainText
|
|
3323
|
+
},
|
|
3324
|
+
{
|
|
3325
|
+
key: ConfigKey.property_hasPrintRestriction,
|
|
3326
|
+
description: "If true, the book has print restrictions",
|
|
3327
|
+
format: TagFormat.boolean,
|
|
3328
|
+
defaultValue: "true"
|
|
3275
3329
|
}
|
|
3276
3330
|
]
|
|
3277
3331
|
},
|
|
@@ -8519,6 +8573,12 @@ var BITS = {
|
|
|
8519
8573
|
],
|
|
8520
8574
|
cardSet: CardSetConfigKey.table
|
|
8521
8575
|
},
|
|
8576
|
+
[BitType.tableExtended]: {
|
|
8577
|
+
since: "4.14.0",
|
|
8578
|
+
baseBitType: BitType.table,
|
|
8579
|
+
description: "Extended table bit, used to create complex tables with all HTML table features",
|
|
8580
|
+
cardSet: CardSetConfigKey.tableExtended
|
|
8581
|
+
},
|
|
8522
8582
|
[BitType.tableAlt]: {
|
|
8523
8583
|
since: "1.16.0",
|
|
8524
8584
|
baseBitType: BitType.table,
|
|
@@ -9500,7 +9560,7 @@ var instance2 = new Config();
|
|
|
9500
9560
|
// src/generated/package_info.ts
|
|
9501
9561
|
var PACKAGE_INFO = {
|
|
9502
9562
|
"name": "@gmb/bitmark-parser-generator",
|
|
9503
|
-
"version": "4.
|
|
9563
|
+
"version": "4.14.1",
|
|
9504
9564
|
"author": "Get More Brain Ltd",
|
|
9505
9565
|
"license": "ISC",
|
|
9506
9566
|
"description": "A bitmark parser and generator using Peggy.js"
|
|
@@ -10001,6 +10061,7 @@ var NodeType = superenum20({
|
|
|
10001
10061
|
durationValue: "durationValue",
|
|
10002
10062
|
elements: "elements",
|
|
10003
10063
|
elementsValue: "elementsValue",
|
|
10064
|
+
elementsValueValue: "elementsValueValue",
|
|
10004
10065
|
emphasis: "emphasis",
|
|
10005
10066
|
end: "end",
|
|
10006
10067
|
errors: "errors",
|
|
@@ -10029,6 +10090,7 @@ var NodeType = superenum20({
|
|
|
10029
10090
|
focusY: "focusY",
|
|
10030
10091
|
focusYValue: "focusYValue",
|
|
10031
10092
|
footer: "footer",
|
|
10093
|
+
footerValue: "footerValue",
|
|
10032
10094
|
footerText: "footerText",
|
|
10033
10095
|
forKeys: "forKeys",
|
|
10034
10096
|
format: "format",
|
|
@@ -10051,11 +10113,13 @@ var NodeType = superenum20({
|
|
|
10051
10113
|
hasBookNavigationValue: "hasBookNavigationValue",
|
|
10052
10114
|
hasMarkAsDone: "hasMarkAsDone",
|
|
10053
10115
|
hasMarkAsDoneValue: "hasMarkAsDoneValue",
|
|
10116
|
+
head: "head",
|
|
10054
10117
|
heading: "heading",
|
|
10055
10118
|
height: "height",
|
|
10056
10119
|
heightValue: "heightValue",
|
|
10057
10120
|
highlight: "highlight",
|
|
10058
10121
|
hint: "hint",
|
|
10122
|
+
hintValue: "hintValue",
|
|
10059
10123
|
href: "href",
|
|
10060
10124
|
icon: "icon",
|
|
10061
10125
|
iconTag: "iconTag",
|
|
@@ -10077,10 +10141,13 @@ var NodeType = superenum20({
|
|
|
10077
10141
|
ingredients: "ingredients",
|
|
10078
10142
|
ingredientsValue: "ingredientsValue",
|
|
10079
10143
|
instruction: "instruction",
|
|
10144
|
+
instructionValue: "instructionValue",
|
|
10080
10145
|
internalComment: "internalComment",
|
|
10081
10146
|
internalCommentValue: "internalCommentValue",
|
|
10082
10147
|
internalPrintPdf: "internalPrintPdf",
|
|
10083
10148
|
internalPrintPdfValue: "internalPrintPdfValue",
|
|
10149
|
+
hasPrintRestriction: "hasPrintRestriction",
|
|
10150
|
+
hasPrintRestrictionValue: "hasPrintRestrictionValue",
|
|
10084
10151
|
isCaseSensitive: "isCaseSensitive",
|
|
10085
10152
|
isCommented: "isCommented",
|
|
10086
10153
|
isCorrect: "isCorrect",
|
|
@@ -10099,6 +10166,7 @@ var NodeType = superenum20({
|
|
|
10099
10166
|
isTracked: "isTracked",
|
|
10100
10167
|
isTrackedValue: "isTrackedValue",
|
|
10101
10168
|
item: "item",
|
|
10169
|
+
itemValue: "itemValue",
|
|
10102
10170
|
itemLead: "itemLead",
|
|
10103
10171
|
jobTitle: "jobTitle",
|
|
10104
10172
|
jobTitleValue: "jobTitleValue",
|
|
@@ -10125,6 +10193,7 @@ var NodeType = superenum20({
|
|
|
10125
10193
|
layerRoleValue: "layerRoleValue",
|
|
10126
10194
|
layerValue: "layerValue",
|
|
10127
10195
|
lead: "lead",
|
|
10196
|
+
leadValue: "leadValue",
|
|
10128
10197
|
level: "level",
|
|
10129
10198
|
levelACTFL: "levelACTFL",
|
|
10130
10199
|
levelACTFLValue: "levelACTFLValue",
|
|
@@ -10146,6 +10215,7 @@ var NodeType = superenum20({
|
|
|
10146
10215
|
machineTranslatedValue: "machineTranslatedValue",
|
|
10147
10216
|
mailingList: "mailingList",
|
|
10148
10217
|
marginNumber: "marginNumber",
|
|
10218
|
+
marginNumberValue: "marginNumberValue",
|
|
10149
10219
|
mark: "mark",
|
|
10150
10220
|
markConfig: "markConfig",
|
|
10151
10221
|
markConfigValue: "markConfigValue",
|
|
@@ -10174,6 +10244,7 @@ var NodeType = superenum20({
|
|
|
10174
10244
|
pageNo: "pageNo",
|
|
10175
10245
|
pageNoValue: "pageNoValue",
|
|
10176
10246
|
pageNumber: "pageNumber",
|
|
10247
|
+
pageNumberValue: "pageNumberValue",
|
|
10177
10248
|
pageValue: "pageValue",
|
|
10178
10249
|
pairs: "pairs",
|
|
10179
10250
|
pairsValue: "pairsValue",
|
|
@@ -10257,6 +10328,7 @@ var NodeType = superenum20({
|
|
|
10257
10328
|
publisherValue: "publisherValue",
|
|
10258
10329
|
quantity: "quantity",
|
|
10259
10330
|
question: "question",
|
|
10331
|
+
questionValue: "questionValue",
|
|
10260
10332
|
questions: "questions",
|
|
10261
10333
|
questionsValue: "questionsValue",
|
|
10262
10334
|
quizCountItems: "quizCountItems",
|
|
@@ -10309,6 +10381,10 @@ var NodeType = superenum20({
|
|
|
10309
10381
|
revealSolutions: "revealSolutions",
|
|
10310
10382
|
root: "root",
|
|
10311
10383
|
// bit type (root)
|
|
10384
|
+
rows: "rows",
|
|
10385
|
+
rowsValue: "rowsValue",
|
|
10386
|
+
rubric: "rubric",
|
|
10387
|
+
rubricValue: "rubricValue",
|
|
10312
10388
|
sampleSolution: "sampleSolution",
|
|
10313
10389
|
sampleSolutionValue: "sampleSolutionValue",
|
|
10314
10390
|
scormSource: "scormSource",
|
|
@@ -10914,6 +10990,103 @@ var DeprecatedTextFormat = superenum23({
|
|
|
10914
10990
|
// bitmark-- text format, deprecated
|
|
10915
10991
|
});
|
|
10916
10992
|
|
|
10993
|
+
// src/parser/json/TableUtils.ts
|
|
10994
|
+
function isTableBasicFormat(table) {
|
|
10995
|
+
const t = table;
|
|
10996
|
+
return !!(t.columns || t.data) && !(t.head || t.body || t.foot);
|
|
10997
|
+
}
|
|
10998
|
+
function isTableExtendedFormat(table) {
|
|
10999
|
+
const t = table;
|
|
11000
|
+
return !!(t.head || t.body || t.foot);
|
|
11001
|
+
}
|
|
11002
|
+
function isMixedTableFormat(table) {
|
|
11003
|
+
const t = table;
|
|
11004
|
+
const hasOld = !!(t.columns || t.data);
|
|
11005
|
+
const hasNew = !!(t.head || t.body || t.foot);
|
|
11006
|
+
return hasOld && hasNew;
|
|
11007
|
+
}
|
|
11008
|
+
function convertBasicToExtendedTableFormat(table) {
|
|
11009
|
+
const tableExtended = {};
|
|
11010
|
+
if (table.columns && table.columns.length > 0) {
|
|
11011
|
+
tableExtended.head = {
|
|
11012
|
+
rows: [
|
|
11013
|
+
{
|
|
11014
|
+
cells: table.columns.map((col) => ({
|
|
11015
|
+
content: col,
|
|
11016
|
+
title: true
|
|
11017
|
+
}))
|
|
11018
|
+
}
|
|
11019
|
+
]
|
|
11020
|
+
};
|
|
11021
|
+
}
|
|
11022
|
+
if (table.data && table.data.length > 0) {
|
|
11023
|
+
tableExtended.body = {
|
|
11024
|
+
rows: table.data.map((row) => ({
|
|
11025
|
+
cells: row.map((cell) => ({
|
|
11026
|
+
content: cell
|
|
11027
|
+
}))
|
|
11028
|
+
}))
|
|
11029
|
+
};
|
|
11030
|
+
}
|
|
11031
|
+
return tableExtended;
|
|
11032
|
+
}
|
|
11033
|
+
function convertExtendedToBasicTableFormat(tableExtended) {
|
|
11034
|
+
const table = {};
|
|
11035
|
+
const extractRowCells = (row) => {
|
|
11036
|
+
if (!row || !Array.isArray(row.cells)) {
|
|
11037
|
+
return [];
|
|
11038
|
+
}
|
|
11039
|
+
return row.cells.map((cell) => cell?.content).filter((content) => content !== void 0);
|
|
11040
|
+
};
|
|
11041
|
+
const dataRows = [];
|
|
11042
|
+
const headRows = tableExtended.head?.rows ?? [];
|
|
11043
|
+
if (headRows.length > 0) {
|
|
11044
|
+
const primaryHeader = extractRowCells(headRows[0]);
|
|
11045
|
+
if (primaryHeader.length > 0) {
|
|
11046
|
+
table.columns = primaryHeader;
|
|
11047
|
+
}
|
|
11048
|
+
const remainingHeadRows = headRows.slice(1);
|
|
11049
|
+
remainingHeadRows.forEach((row) => {
|
|
11050
|
+
const cells = extractRowCells(row);
|
|
11051
|
+
if (cells.length > 0) {
|
|
11052
|
+
dataRows.push(cells);
|
|
11053
|
+
}
|
|
11054
|
+
});
|
|
11055
|
+
}
|
|
11056
|
+
const appendSectionRows = (section) => {
|
|
11057
|
+
if (!section || !Array.isArray(section.rows)) {
|
|
11058
|
+
return;
|
|
11059
|
+
}
|
|
11060
|
+
section.rows.forEach((row) => {
|
|
11061
|
+
const cells = extractRowCells(row);
|
|
11062
|
+
if (cells.length > 0) {
|
|
11063
|
+
dataRows.push(cells);
|
|
11064
|
+
}
|
|
11065
|
+
});
|
|
11066
|
+
};
|
|
11067
|
+
appendSectionRows(tableExtended.body);
|
|
11068
|
+
appendSectionRows(tableExtended.foot);
|
|
11069
|
+
if (dataRows.length > 0) {
|
|
11070
|
+
table.data = dataRows;
|
|
11071
|
+
}
|
|
11072
|
+
return table;
|
|
11073
|
+
}
|
|
11074
|
+
function normalizeTableFormat(bitType, table) {
|
|
11075
|
+
if (isMixedTableFormat(table)) {
|
|
11076
|
+
const t = table;
|
|
11077
|
+
delete t.columns;
|
|
11078
|
+
delete t.data;
|
|
11079
|
+
}
|
|
11080
|
+
const isExtended = instance2.isOfBitType(bitType, BitType.tableExtended);
|
|
11081
|
+
if (isExtended && isTableBasicFormat(table)) {
|
|
11082
|
+
return convertBasicToExtendedTableFormat(table);
|
|
11083
|
+
}
|
|
11084
|
+
if (!isExtended && isTableExtendedFormat(table)) {
|
|
11085
|
+
return convertExtendedToBasicTableFormat(table);
|
|
11086
|
+
}
|
|
11087
|
+
return table;
|
|
11088
|
+
}
|
|
11089
|
+
|
|
10917
11090
|
// src/utils/ArrayUtils.ts
|
|
10918
11091
|
var ArrayUtils = class {
|
|
10919
11092
|
/**
|
|
@@ -22707,6 +22880,7 @@ var Builder = class extends BaseBuilder {
|
|
|
22707
22880
|
* @returns
|
|
22708
22881
|
*/
|
|
22709
22882
|
buildBit(data, options) {
|
|
22883
|
+
data = structuredClone(data);
|
|
22710
22884
|
const bitType = data.bitType;
|
|
22711
22885
|
const bitConfig = instance2.getBitConfig(bitType);
|
|
22712
22886
|
const deprecatedTextFormat = DeprecatedTextFormat.fromValue(data.textFormat);
|
|
@@ -23375,6 +23549,12 @@ var Builder = class extends BaseBuilder {
|
|
|
23375
23549
|
data.internalPrintPdf,
|
|
23376
23550
|
options
|
|
23377
23551
|
),
|
|
23552
|
+
hasPrintRestriction: this.toAstProperty(
|
|
23553
|
+
bitType,
|
|
23554
|
+
ConfigKey.property_hasPrintRestriction,
|
|
23555
|
+
data.hasPrintRestriction,
|
|
23556
|
+
options
|
|
23557
|
+
),
|
|
23378
23558
|
tocResource: this.toAstProperty(
|
|
23379
23559
|
bitType,
|
|
23380
23560
|
ConfigKey.property_tocResource,
|
|
@@ -24144,21 +24324,53 @@ var Builder = class extends BaseBuilder {
|
|
|
24144
24324
|
return node;
|
|
24145
24325
|
}
|
|
24146
24326
|
/**
|
|
24147
|
-
* Build table node
|
|
24327
|
+
* Build table / table extended node
|
|
24148
24328
|
*
|
|
24149
24329
|
* @param data - data for the node
|
|
24150
24330
|
* @returns
|
|
24151
24331
|
*/
|
|
24152
24332
|
buildTable(context, dataIn) {
|
|
24153
24333
|
if (!dataIn) return void 0;
|
|
24154
|
-
const node =
|
|
24155
|
-
|
|
24334
|
+
const node = normalizeTableFormat(context.bitType, dataIn);
|
|
24335
|
+
const nodeTable = node;
|
|
24336
|
+
const nodeTableExtended = node;
|
|
24337
|
+
if (Array.isArray(nodeTable.columns) && nodeTable.columns.length > 0) {
|
|
24338
|
+
nodeTable.columns = nodeTable.columns.map(
|
|
24156
24339
|
(col) => this.handleJsonText(context, TextLocation.tag, col)
|
|
24157
|
-
)
|
|
24158
|
-
|
|
24340
|
+
);
|
|
24341
|
+
}
|
|
24342
|
+
if (Array.isArray(nodeTable.data) && nodeTable.data.length > 0) {
|
|
24343
|
+
nodeTable.data = nodeTable.data.map(
|
|
24159
24344
|
(row) => (row || []).map((cell) => this.handleJsonText(context, TextLocation.tag, cell))
|
|
24160
|
-
)
|
|
24345
|
+
);
|
|
24346
|
+
}
|
|
24347
|
+
const buildSection = (section) => {
|
|
24348
|
+
if (!section || !Array.isArray(section.rows)) return void 0;
|
|
24349
|
+
const rows = section.rows.map((row) => {
|
|
24350
|
+
const cells = (row.cells || []).map((cell) => {
|
|
24351
|
+
const tableCell = {
|
|
24352
|
+
content: this.handleJsonText(context, TextLocation.tag, cell.content)
|
|
24353
|
+
};
|
|
24354
|
+
if (cell.title != null) tableCell.title = cell.title;
|
|
24355
|
+
if (cell.rowspan != null) tableCell.rowspan = cell.rowspan;
|
|
24356
|
+
if (cell.colspan != null) tableCell.colspan = cell.colspan;
|
|
24357
|
+
if (cell.scope) tableCell.scope = cell.scope;
|
|
24358
|
+
return tableCell;
|
|
24359
|
+
});
|
|
24360
|
+
return {
|
|
24361
|
+
cells
|
|
24362
|
+
};
|
|
24363
|
+
});
|
|
24364
|
+
return {
|
|
24365
|
+
rows
|
|
24366
|
+
};
|
|
24161
24367
|
};
|
|
24368
|
+
const head = buildSection(nodeTableExtended.head);
|
|
24369
|
+
if (head && head.rows?.length > 0) nodeTableExtended.head = head;
|
|
24370
|
+
const body = buildSection(nodeTableExtended.body);
|
|
24371
|
+
if (body && body.rows?.length > 0) nodeTableExtended.body = body;
|
|
24372
|
+
const foot = buildSection(nodeTableExtended.foot);
|
|
24373
|
+
if (foot && foot.rows?.length > 0) nodeTableExtended.foot = foot;
|
|
24162
24374
|
return node;
|
|
24163
24375
|
}
|
|
24164
24376
|
/**
|
|
@@ -24182,7 +24394,7 @@ var Builder = class extends BaseBuilder {
|
|
|
24182
24394
|
if (!data) return void 0;
|
|
24183
24395
|
const defaultExample = data.__sampleSolutionAst;
|
|
24184
24396
|
const node = {
|
|
24185
|
-
question: data.question
|
|
24397
|
+
question: this.handleJsonText(context, TextLocation.body, data.question),
|
|
24186
24398
|
partialAnswer: data.partialAnswer ?? "",
|
|
24187
24399
|
sampleSolution: data.sampleSolution ?? "",
|
|
24188
24400
|
additionalSolutions: data.additionalSolutions ?? void 0,
|
|
@@ -24196,9 +24408,9 @@ var Builder = class extends BaseBuilder {
|
|
|
24196
24408
|
};
|
|
24197
24409
|
objectUtils.removeUnwantedProperties(node, {
|
|
24198
24410
|
ignoreAllFalse: true,
|
|
24199
|
-
ignoreEmptyArrays: ["item", "hint", "instruction"],
|
|
24411
|
+
ignoreEmptyArrays: ["question", "item", "hint", "instruction"],
|
|
24200
24412
|
ignoreUndefined: ["example"],
|
|
24201
|
-
ignoreEmptyString: ["
|
|
24413
|
+
ignoreEmptyString: ["partialAnswer", "sampleSolution"]
|
|
24202
24414
|
});
|
|
24203
24415
|
return node;
|
|
24204
24416
|
}
|
|
@@ -24736,7 +24948,7 @@ var Builder = class extends BaseBuilder {
|
|
|
24736
24948
|
buildStatement(context, data) {
|
|
24737
24949
|
if (!data) return void 0;
|
|
24738
24950
|
const node = {
|
|
24739
|
-
statement: data.statement
|
|
24951
|
+
statement: this.handleJsonText(context, TextLocation.tag, data.statement),
|
|
24740
24952
|
isCorrect: !!data.isCorrect,
|
|
24741
24953
|
item: this.handleJsonText(context, TextLocation.tag, data.item),
|
|
24742
24954
|
lead: this.handleJsonText(context, TextLocation.tag, data.lead),
|
|
@@ -24746,7 +24958,7 @@ var Builder = class extends BaseBuilder {
|
|
|
24746
24958
|
};
|
|
24747
24959
|
objectUtils.removeUnwantedProperties(node, {
|
|
24748
24960
|
ignoreAllFalse: true,
|
|
24749
|
-
|
|
24961
|
+
ignoreEmptyArrays: ["statement"],
|
|
24750
24962
|
ignoreUndefined: ["example"]
|
|
24751
24963
|
});
|
|
24752
24964
|
return node;
|
|
@@ -24958,7 +25170,7 @@ var Builder = class extends BaseBuilder {
|
|
|
24958
25170
|
const node = {
|
|
24959
25171
|
heading: this.buildHeading(context, data.heading),
|
|
24960
25172
|
questions: this.buildQuestions(context, data.questions),
|
|
24961
|
-
elements: data.elements,
|
|
25173
|
+
elements: this.handleJsonText(context, TextLocation.body, data.elements),
|
|
24962
25174
|
flashcards: this.buildFlashcards(context, data.flashcards),
|
|
24963
25175
|
definitions: this.buildDefinitionList(context, data.definitions ?? data.legend),
|
|
24964
25176
|
statement: this.buildStatement(context, data.statement),
|
|
@@ -24977,7 +25189,9 @@ var Builder = class extends BaseBuilder {
|
|
|
24977
25189
|
// captionDefinitionList: this.buildCaptionDefinitionList(context, data.captionDefinitionList),
|
|
24978
25190
|
cardBits: this.buildCardBits(context, data.cardBits)
|
|
24979
25191
|
};
|
|
24980
|
-
objectUtils.removeUnwantedProperties(node
|
|
25192
|
+
objectUtils.removeUnwantedProperties(node, {
|
|
25193
|
+
ignoreEmptyObjects: ["table"]
|
|
25194
|
+
});
|
|
24981
25195
|
return Object.keys(node).length > 0 ? node : void 0;
|
|
24982
25196
|
}
|
|
24983
25197
|
/**
|
|
@@ -25481,6 +25695,7 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
25481
25695
|
__publicField(this, "hasCardSet", false);
|
|
25482
25696
|
__publicField(this, "hasFooter", false);
|
|
25483
25697
|
__publicField(this, "inTag", true);
|
|
25698
|
+
__publicField(this, "skipTableTraversal", false);
|
|
25484
25699
|
this.enter = this.enter.bind(this);
|
|
25485
25700
|
this.between = this.between.bind(this);
|
|
25486
25701
|
this.exit = this.exit.bind(this);
|
|
@@ -26183,7 +26398,7 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
26183
26398
|
enter_elements(_node, _route) {
|
|
26184
26399
|
}
|
|
26185
26400
|
between_elements(_node, _left, _right, _route) {
|
|
26186
|
-
this.
|
|
26401
|
+
this.writeCardSetSideDivider();
|
|
26187
26402
|
}
|
|
26188
26403
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> flashcards
|
|
26189
26404
|
between_flashcards(_node, _left, _right, _route) {
|
|
@@ -26310,6 +26525,7 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
26310
26525
|
enter_matrix(_node, _route) {
|
|
26311
26526
|
}
|
|
26312
26527
|
between_matrix(_node, _left, _right, _route) {
|
|
26528
|
+
if (!this.isCardAllowed) return;
|
|
26313
26529
|
this.writeCardSetCardDivider();
|
|
26314
26530
|
}
|
|
26315
26531
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> pairs -> pairsValue -> values
|
|
@@ -26330,12 +26546,83 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
26330
26546
|
this.writeCardSetCardDivider();
|
|
26331
26547
|
}
|
|
26332
26548
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> table
|
|
26549
|
+
enter_table(node, route) {
|
|
26550
|
+
const parent = this.getParentNode(route);
|
|
26551
|
+
if (parent?.key !== NodeType.cardNode) return true;
|
|
26552
|
+
const table = node.value;
|
|
26553
|
+
if (!table) return true;
|
|
26554
|
+
if (this.writeAdvancedTable(table)) {
|
|
26555
|
+
return false;
|
|
26556
|
+
}
|
|
26557
|
+
return true;
|
|
26558
|
+
}
|
|
26333
26559
|
between_table(_node, _left, _right, route) {
|
|
26334
26560
|
const parent = this.getParentNode(route);
|
|
26335
26561
|
if (parent?.key !== NodeType.cardNode) return;
|
|
26336
26562
|
if (!this.isCardAllowed) return;
|
|
26337
26563
|
this.writeCardSetCardDivider();
|
|
26338
26564
|
}
|
|
26565
|
+
writeAdvancedTable(table) {
|
|
26566
|
+
const normalized = normalizeTableFormat(BitType.tableExtended, table);
|
|
26567
|
+
const sections = [
|
|
26568
|
+
{ key: "thead", qualifier: "thead", section: normalized.head },
|
|
26569
|
+
{ key: "tbody", qualifier: void 0, section: normalized.body },
|
|
26570
|
+
{ key: "tfoot", qualifier: "tfoot", section: normalized.foot }
|
|
26571
|
+
];
|
|
26572
|
+
let rowCount = 0;
|
|
26573
|
+
for (const { key, qualifier, section } of sections) {
|
|
26574
|
+
const rows = section?.rows ?? [];
|
|
26575
|
+
if (rows.length === 0) {
|
|
26576
|
+
continue;
|
|
26577
|
+
}
|
|
26578
|
+
for (const row of rows) {
|
|
26579
|
+
this.writeCardSetCardDivider(qualifier);
|
|
26580
|
+
this.writeTableRow(row, key);
|
|
26581
|
+
rowCount++;
|
|
26582
|
+
}
|
|
26583
|
+
}
|
|
26584
|
+
return rowCount > 0;
|
|
26585
|
+
}
|
|
26586
|
+
writeTableRow(row, section) {
|
|
26587
|
+
const cells = row?.cells ?? [];
|
|
26588
|
+
if (cells.length === 0) return;
|
|
26589
|
+
for (let index = 0; index < cells.length; index++) {
|
|
26590
|
+
if (index > 0) {
|
|
26591
|
+
this.writeCardSetSideDivider();
|
|
26592
|
+
}
|
|
26593
|
+
this.writeNL();
|
|
26594
|
+
this.writeTableCell(cells[index], section);
|
|
26595
|
+
}
|
|
26596
|
+
}
|
|
26597
|
+
writeTableCell(cell, section) {
|
|
26598
|
+
const defaultCellType = section === "tbody" ? "td" : "th";
|
|
26599
|
+
const cellType = cell.title ? "th" : "td";
|
|
26600
|
+
if (cellType !== defaultCellType) {
|
|
26601
|
+
this.writeTableCellProperty("tableCellType", cellType);
|
|
26602
|
+
this.writeNL();
|
|
26603
|
+
}
|
|
26604
|
+
if (cell.rowspan && cell.rowspan > 1) {
|
|
26605
|
+
this.writeTableCellProperty("tableRowSpan", cell.rowspan);
|
|
26606
|
+
this.writeNL();
|
|
26607
|
+
}
|
|
26608
|
+
if (cell.colspan && cell.colspan > 1) {
|
|
26609
|
+
this.writeTableCellProperty("tableColSpan", cell.colspan);
|
|
26610
|
+
this.writeNL();
|
|
26611
|
+
}
|
|
26612
|
+
if (cell.scope) {
|
|
26613
|
+
this.writeTableCellProperty("tableScope", cell.scope);
|
|
26614
|
+
this.writeNL();
|
|
26615
|
+
}
|
|
26616
|
+
const content = cell.content ?? instance3.EMPTY_STRING;
|
|
26617
|
+
this.writeTextOrValue(content, this.textFormat, TextLocation.body);
|
|
26618
|
+
}
|
|
26619
|
+
writeTableCellProperty(name, value) {
|
|
26620
|
+
this.writeOPA();
|
|
26621
|
+
this.writeTagKey(name);
|
|
26622
|
+
this.writeColon();
|
|
26623
|
+
this.writeTextOrValue(`${value}`, TextFormat.plainText, TextLocation.tag);
|
|
26624
|
+
this.writeCL();
|
|
26625
|
+
}
|
|
26339
26626
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> table -> data
|
|
26340
26627
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> pronunciationTable -> data
|
|
26341
26628
|
between_data(_node, _left, _right, route) {
|
|
@@ -26857,12 +27144,13 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
26857
27144
|
} else {
|
|
26858
27145
|
}
|
|
26859
27146
|
}
|
|
26860
|
-
// bitmarkAst -> bits -> bitsValue -> elements -> elementsValue
|
|
26861
|
-
|
|
27147
|
+
// bitmarkAst -> bits -> bitsValue -> cardNode -> elements -> elementsValue
|
|
27148
|
+
enter_elementsValue(node, _route) {
|
|
26862
27149
|
if (node.value) {
|
|
26863
27150
|
this.writeNL();
|
|
26864
27151
|
this.writeTextOrValue(node.value, this.textFormat, TextLocation.body);
|
|
26865
27152
|
}
|
|
27153
|
+
return false;
|
|
26866
27154
|
}
|
|
26867
27155
|
// bitmarkAst -> bits -> bitsValue -> body -> bodyValue -> gap -> solutions -> solution
|
|
26868
27156
|
// ? -> solutions -> solution
|
|
@@ -26941,10 +27229,20 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
26941
27229
|
}
|
|
26942
27230
|
}
|
|
26943
27231
|
// bitmarkAst -> bits -> bitsValue -> questions -> questionsValue -> question
|
|
27232
|
+
// bitmarkAst -> bits -> bitsValue -> cardNode -> questions -> questionsValue -> question
|
|
27233
|
+
enter_question(node, route) {
|
|
27234
|
+
const parent = this.getParentNode(route);
|
|
27235
|
+
if (parent?.key !== NodeType.questionsValue) return true;
|
|
27236
|
+
if (node.value) {
|
|
27237
|
+
this.writeNL();
|
|
27238
|
+
this.writeTextOrValue(node.value, this.textFormat, TextLocation.body);
|
|
27239
|
+
}
|
|
27240
|
+
return false;
|
|
27241
|
+
}
|
|
26944
27242
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> flashcards -> flashcardsValue -> question
|
|
26945
27243
|
leaf_question(node, route) {
|
|
26946
27244
|
const parent = this.getParentNode(route);
|
|
26947
|
-
if (parent?.key !== NodeType.
|
|
27245
|
+
if (parent?.key !== NodeType.flashcardsValue) return;
|
|
26948
27246
|
if (node.value) {
|
|
26949
27247
|
this.writeNL();
|
|
26950
27248
|
this.writeTextOrValue(node.value, this.textFormat, TextLocation.body);
|
|
@@ -27420,12 +27718,12 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
27420
27718
|
} else {
|
|
27421
27719
|
}
|
|
27422
27720
|
}
|
|
27423
|
-
writeCardSetCardDivider() {
|
|
27721
|
+
writeCardSetCardDivider(qualifier) {
|
|
27424
27722
|
this.writeNL();
|
|
27425
|
-
|
|
27426
|
-
|
|
27427
|
-
|
|
27428
|
-
this.
|
|
27723
|
+
const divider = this.getCardDividerMarker();
|
|
27724
|
+
this.write(divider);
|
|
27725
|
+
if (qualifier) {
|
|
27726
|
+
this.appendCardDividerQualifier(qualifier);
|
|
27429
27727
|
}
|
|
27430
27728
|
}
|
|
27431
27729
|
writeCardSetSideDivider() {
|
|
@@ -27444,6 +27742,20 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
27444
27742
|
this.write("++");
|
|
27445
27743
|
}
|
|
27446
27744
|
}
|
|
27745
|
+
getCardDividerMarker() {
|
|
27746
|
+
return this.options.cardSetVersion === CardSetVersion.v1 ? "===" : "====";
|
|
27747
|
+
}
|
|
27748
|
+
appendCardDividerQualifier(qualifier) {
|
|
27749
|
+
const marker = this.getCardDividerMarker();
|
|
27750
|
+
const normalizedQualifier = instance3.breakscape(qualifier, {
|
|
27751
|
+
format: TextFormat.plainText,
|
|
27752
|
+
location: TextLocation.tag
|
|
27753
|
+
});
|
|
27754
|
+
this.write(" ");
|
|
27755
|
+
this.write(normalizedQualifier);
|
|
27756
|
+
this.write(" ");
|
|
27757
|
+
this.write(marker);
|
|
27758
|
+
}
|
|
27447
27759
|
writeNL_IfNotChain(route) {
|
|
27448
27760
|
if (!this.isChain(route)) {
|
|
27449
27761
|
this.writeNL();
|
|
@@ -27548,7 +27860,10 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
27548
27860
|
return !!writeFormat;
|
|
27549
27861
|
}
|
|
27550
27862
|
calculateIsCardAllowed() {
|
|
27551
|
-
return this.isBodyBitmarkText && !this.isOfBitType1();
|
|
27863
|
+
return this.isBodyBitmarkText && !this.isOfBitType1() && !this.isTableBitType();
|
|
27864
|
+
}
|
|
27865
|
+
isTableBitType() {
|
|
27866
|
+
return this.isOfBitType([BitType.table]);
|
|
27552
27867
|
}
|
|
27553
27868
|
isOfBitType1() {
|
|
27554
27869
|
return this.isOfBitType([
|
|
@@ -28065,7 +28380,7 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
28065
28380
|
const parent = this.getParentNode(route);
|
|
28066
28381
|
if (parent?.key !== NodeType.cardNode) return;
|
|
28067
28382
|
if (statement) {
|
|
28068
|
-
this.bitJson.statement = statement.statement ??
|
|
28383
|
+
this.bitJson.statement = statement.statement ?? [];
|
|
28069
28384
|
this.bitJson.isCorrect = statement.isCorrect ?? false;
|
|
28070
28385
|
this.bitJson.example = statement.example;
|
|
28071
28386
|
this.bitJson.isExample = statement.isExample;
|
|
@@ -28687,6 +29002,9 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
28687
29002
|
if (bitJson.footer == null) bitJson.footer = this.textDefault;
|
|
28688
29003
|
if (bitJson.questions == null) bitJson.questions = [];
|
|
28689
29004
|
}
|
|
29005
|
+
if (instance2.isOfBitType(bitType, BitType.sequence)) {
|
|
29006
|
+
if (bitJson.elements == null) bitJson.elements = [];
|
|
29007
|
+
}
|
|
28690
29008
|
if (bitType === BitType.matchMatrix) {
|
|
28691
29009
|
isTopLevelExample = true;
|
|
28692
29010
|
}
|
|
@@ -28747,6 +29065,7 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
28747
29065
|
}
|
|
28748
29066
|
if (instance2.isOfBitType(bitType, BitType.book)) {
|
|
28749
29067
|
if (bitJson.maxTocChapterLevel == null) bitJson.maxTocChapterLevel = -1;
|
|
29068
|
+
if (bitJson.hasPrintRestriction == null) bitJson.hasPrintRestriction = true;
|
|
28750
29069
|
if (bitJson.hasMarkAsDone == null) bitJson.hasMarkAsDone = false;
|
|
28751
29070
|
if (bitJson.processHandIn == null) bitJson.processHandIn = false;
|
|
28752
29071
|
if (bitJson.isPublic == null) bitJson.isPublic = false;
|
|
@@ -29404,6 +29723,9 @@ var BitmarkPegParserHelper = class {
|
|
|
29404
29723
|
__publicField(this, "cardIndex", 0);
|
|
29405
29724
|
__publicField(this, "cardSideIndex", 0);
|
|
29406
29725
|
__publicField(this, "cardVariantIndex", 0);
|
|
29726
|
+
__publicField(this, "currentCardQualifier");
|
|
29727
|
+
__publicField(this, "currentSideQualifier");
|
|
29728
|
+
__publicField(this, "currentVariantQualifier");
|
|
29407
29729
|
__publicField(this, "parse");
|
|
29408
29730
|
__publicField(this, "parserText");
|
|
29409
29731
|
__publicField(this, "parserLocation");
|
|
@@ -29572,30 +29894,43 @@ var BitmarkPegParserHelper = class {
|
|
|
29572
29894
|
cardIndex,
|
|
29573
29895
|
cardSideIndex,
|
|
29574
29896
|
cardVariantIndex: cardContentIndex,
|
|
29575
|
-
value: value2
|
|
29897
|
+
value: value2,
|
|
29898
|
+
cardQualifier,
|
|
29899
|
+
cardSideQualifier,
|
|
29900
|
+
cardVariantQualifier
|
|
29576
29901
|
} = cardData;
|
|
29577
29902
|
let card = unparsedCardSet.cards[cardIndex];
|
|
29578
29903
|
if (!card) {
|
|
29579
29904
|
card = {
|
|
29580
|
-
sides: []
|
|
29905
|
+
sides: [],
|
|
29906
|
+
qualifier: cardQualifier
|
|
29581
29907
|
};
|
|
29582
29908
|
unparsedCardSet.cards[cardIndex] = card;
|
|
29909
|
+
} else if (cardQualifier && !card.qualifier) {
|
|
29910
|
+
card.qualifier = cardQualifier;
|
|
29583
29911
|
}
|
|
29584
29912
|
let side = card.sides[cardSideIndex];
|
|
29585
29913
|
if (!side) {
|
|
29586
29914
|
side = {
|
|
29587
|
-
variants: []
|
|
29915
|
+
variants: [],
|
|
29916
|
+
qualifier: cardSideQualifier
|
|
29588
29917
|
};
|
|
29589
29918
|
card.sides[cardSideIndex] = side;
|
|
29919
|
+
} else if (cardSideQualifier && !side.qualifier) {
|
|
29920
|
+
side.qualifier = cardSideQualifier;
|
|
29590
29921
|
}
|
|
29591
29922
|
const variant = side.variants[cardContentIndex];
|
|
29592
29923
|
if (!variant) {
|
|
29593
29924
|
side.variants[cardContentIndex] = {
|
|
29594
29925
|
value: value2,
|
|
29595
|
-
parser: parser3
|
|
29926
|
+
parser: parser3,
|
|
29927
|
+
qualifier: cardVariantQualifier
|
|
29596
29928
|
};
|
|
29597
29929
|
} else {
|
|
29598
29930
|
side.variants[cardContentIndex].value += value2;
|
|
29931
|
+
if (cardVariantQualifier && !variant.qualifier) {
|
|
29932
|
+
variant.qualifier = cardVariantQualifier;
|
|
29933
|
+
}
|
|
29599
29934
|
}
|
|
29600
29935
|
}
|
|
29601
29936
|
unparsedCardSet.cards = unparsedCardSet.cards.filter((card) => {
|
|
@@ -29608,12 +29943,14 @@ var BitmarkPegParserHelper = class {
|
|
|
29608
29943
|
});
|
|
29609
29944
|
for (const unparsedCard of unparsedCardSet.cards) {
|
|
29610
29945
|
const card = {
|
|
29611
|
-
sides: []
|
|
29946
|
+
sides: [],
|
|
29947
|
+
qualifier: unparsedCard.qualifier
|
|
29612
29948
|
};
|
|
29613
29949
|
cardSet.cards.push(card);
|
|
29614
29950
|
for (const unparsedSide of unparsedCard.sides) {
|
|
29615
29951
|
const side = {
|
|
29616
|
-
variants: []
|
|
29952
|
+
variants: [],
|
|
29953
|
+
qualifier: unparsedSide.qualifier
|
|
29617
29954
|
};
|
|
29618
29955
|
card.sides.push(side);
|
|
29619
29956
|
for (const unparsedContent of unparsedSide.variants) {
|
|
@@ -29638,7 +29975,8 @@ var BitmarkPegParserHelper = class {
|
|
|
29638
29975
|
if (DEBUG_TRACE_CARD_PARSED) this.debugPrint("parsedCardContent", content);
|
|
29639
29976
|
side.variants.push({
|
|
29640
29977
|
parser: parser2,
|
|
29641
|
-
content
|
|
29978
|
+
content,
|
|
29979
|
+
qualifier: unparsedContent.qualifier
|
|
29642
29980
|
});
|
|
29643
29981
|
}
|
|
29644
29982
|
}
|
|
@@ -29658,12 +29996,18 @@ var BitmarkPegParserHelper = class {
|
|
|
29658
29996
|
this.cardIndex = -1;
|
|
29659
29997
|
this.cardSideIndex = 0;
|
|
29660
29998
|
this.cardVariantIndex = 0;
|
|
29999
|
+
this.currentCardQualifier = void 0;
|
|
30000
|
+
this.currentSideQualifier = void 0;
|
|
30001
|
+
this.currentVariantQualifier = void 0;
|
|
29661
30002
|
}
|
|
29662
30003
|
handleCardSetEnd() {
|
|
29663
30004
|
if (DEBUG_TRACE_CARD_SET_END) this.debugPrint("CardSetEnd");
|
|
29664
30005
|
this.cardIndex = 0;
|
|
29665
30006
|
this.cardSideIndex = 0;
|
|
29666
30007
|
this.cardVariantIndex = 0;
|
|
30008
|
+
this.currentCardQualifier = void 0;
|
|
30009
|
+
this.currentSideQualifier = void 0;
|
|
30010
|
+
this.currentVariantQualifier = void 0;
|
|
29667
30011
|
}
|
|
29668
30012
|
handleCards(value) {
|
|
29669
30013
|
return value;
|
|
@@ -29673,27 +30017,45 @@ var BitmarkPegParserHelper = class {
|
|
|
29673
30017
|
let isCardDivider = false;
|
|
29674
30018
|
let isSideDivider = false;
|
|
29675
30019
|
let isVariantDivider = false;
|
|
30020
|
+
let qualifier;
|
|
29676
30021
|
if (Array.isArray(value) && value.length === 2) {
|
|
29677
|
-
|
|
29678
|
-
if (
|
|
29679
|
-
|
|
29680
|
-
|
|
29681
|
-
|
|
30022
|
+
const [divider, maybeQualifier] = value;
|
|
30023
|
+
if (typeof divider === "string") {
|
|
30024
|
+
value = divider;
|
|
30025
|
+
if (typeof maybeQualifier === "string" && maybeQualifier.trim() === maybeQualifier && maybeQualifier.length > 0) {
|
|
30026
|
+
qualifier = maybeQualifier;
|
|
30027
|
+
}
|
|
29682
30028
|
} else {
|
|
29683
|
-
|
|
29684
|
-
isSideDivider = value === CARD_SIDE_DIVIDER_V2;
|
|
29685
|
-
isVariantDivider = value === CARD_VARIANT_DIVIDER_V2;
|
|
30029
|
+
value = divider;
|
|
29686
30030
|
}
|
|
30031
|
+
} else if (Array.isArray(value) && value.length === 1) {
|
|
30032
|
+
const [divider] = value;
|
|
30033
|
+
value = divider;
|
|
30034
|
+
}
|
|
30035
|
+
if (version === CardSetVersion.v1) {
|
|
30036
|
+
isCardDivider = value === CARD_DIVIDER_V1;
|
|
30037
|
+
isSideDivider = value === CARD_SIDE_DIVIDER_V1;
|
|
30038
|
+
isVariantDivider = value === CARD_VARIANT_DIVIDER_V1;
|
|
30039
|
+
} else {
|
|
30040
|
+
isCardDivider = value === CARD_DIVIDER_V2;
|
|
30041
|
+
isSideDivider = value === CARD_SIDE_DIVIDER_V2;
|
|
30042
|
+
isVariantDivider = value === CARD_VARIANT_DIVIDER_V2;
|
|
29687
30043
|
}
|
|
29688
30044
|
if (isCardDivider) {
|
|
29689
30045
|
this.cardIndex++;
|
|
29690
30046
|
this.cardSideIndex = 0;
|
|
29691
30047
|
this.cardVariantIndex = 0;
|
|
30048
|
+
this.currentCardQualifier = qualifier;
|
|
30049
|
+
this.currentSideQualifier = void 0;
|
|
30050
|
+
this.currentVariantQualifier = void 0;
|
|
29692
30051
|
} else if (isSideDivider) {
|
|
29693
30052
|
this.cardSideIndex++;
|
|
29694
30053
|
this.cardVariantIndex = 0;
|
|
30054
|
+
this.currentSideQualifier = qualifier;
|
|
30055
|
+
this.currentVariantQualifier = void 0;
|
|
29695
30056
|
} else if (isVariantDivider) {
|
|
29696
30057
|
this.cardVariantIndex++;
|
|
30058
|
+
this.currentVariantQualifier = qualifier;
|
|
29697
30059
|
}
|
|
29698
30060
|
if (this.isType(value, TypeKey.Card)) return value;
|
|
29699
30061
|
return {
|
|
@@ -29702,7 +30064,10 @@ var BitmarkPegParserHelper = class {
|
|
|
29702
30064
|
cardIndex: this.cardIndex,
|
|
29703
30065
|
cardSideIndex: this.cardSideIndex,
|
|
29704
30066
|
cardVariantIndex: this.cardVariantIndex,
|
|
29705
|
-
value: ""
|
|
30067
|
+
value: "",
|
|
30068
|
+
cardQualifier: this.currentCardQualifier,
|
|
30069
|
+
cardSideQualifier: this.currentSideQualifier,
|
|
30070
|
+
cardVariantQualifier: this.currentVariantQualifier
|
|
29706
30071
|
},
|
|
29707
30072
|
parser: {
|
|
29708
30073
|
text: this.parserText(),
|
|
@@ -29723,7 +30088,10 @@ var BitmarkPegParserHelper = class {
|
|
|
29723
30088
|
cardIndex: this.cardIndex,
|
|
29724
30089
|
cardSideIndex: this.cardSideIndex,
|
|
29725
30090
|
cardVariantIndex: this.cardVariantIndex,
|
|
29726
|
-
value
|
|
30091
|
+
value,
|
|
30092
|
+
cardQualifier: this.currentCardQualifier,
|
|
30093
|
+
cardSideQualifier: this.currentSideQualifier,
|
|
30094
|
+
cardVariantQualifier: this.currentVariantQualifier
|
|
29727
30095
|
},
|
|
29728
30096
|
parser: {
|
|
29729
30097
|
text: this.parserText(),
|
|
@@ -30820,6 +31188,7 @@ function buildCards(context, bitType, textFormat, parsedCardSet, statementV1, st
|
|
|
30820
31188
|
result = parsePronunciationTable(context, bitType, processedCardSet);
|
|
30821
31189
|
break;
|
|
30822
31190
|
case CardSetConfigKey.table:
|
|
31191
|
+
case CardSetConfigKey.tableExtended:
|
|
30823
31192
|
result = parseTable(context, bitType, processedCardSet);
|
|
30824
31193
|
break;
|
|
30825
31194
|
case CardSetConfigKey.botActionResponses:
|
|
@@ -30856,20 +31225,23 @@ function processCardSet(context, parsedCardSet) {
|
|
|
30856
31225
|
for (const card of parsedCardSet.cards) {
|
|
30857
31226
|
const processedCard = {
|
|
30858
31227
|
no: cardNo++,
|
|
30859
|
-
sides: []
|
|
31228
|
+
sides: [],
|
|
31229
|
+
qualifier: card.qualifier
|
|
30860
31230
|
};
|
|
30861
31231
|
processedCardSet.cards.push(processedCard);
|
|
30862
31232
|
for (const side of card.sides) {
|
|
30863
31233
|
const processedSide = {
|
|
30864
31234
|
no: sideNo++,
|
|
30865
|
-
variants: []
|
|
31235
|
+
variants: [],
|
|
31236
|
+
qualifier: side.qualifier
|
|
30866
31237
|
};
|
|
30867
31238
|
processedCard.sides.push(processedSide);
|
|
30868
31239
|
for (const variant of side.variants) {
|
|
30869
31240
|
const { parser: parser2, content } = variant;
|
|
30870
31241
|
const processedVariant = {
|
|
30871
31242
|
parser: parser2,
|
|
30872
|
-
no: variantNo
|
|
31243
|
+
no: variantNo++,
|
|
31244
|
+
qualifier: variant.qualifier
|
|
30873
31245
|
};
|
|
30874
31246
|
processedSide.variants.push(processedVariant);
|
|
30875
31247
|
const tagsConfig = instance2.getTagsConfigForCardSet(bitType, sideNo, variantNo);
|
|
@@ -30983,7 +31355,8 @@ function parseElements(_context, _bitType, cardSet) {
|
|
|
30983
31355
|
for (const side of card.sides) {
|
|
30984
31356
|
for (const content of side.variants) {
|
|
30985
31357
|
const tags2 = content.data;
|
|
30986
|
-
|
|
31358
|
+
const element = tags2.cardBody?.body ?? tags2.cardBodyStr ?? instance3.EMPTY_STRING;
|
|
31359
|
+
elements.push(element);
|
|
30987
31360
|
}
|
|
30988
31361
|
}
|
|
30989
31362
|
}
|
|
@@ -31000,7 +31373,7 @@ function parseStatements(_context, _bitType, cardSet, statementV1, statementsV1)
|
|
|
31000
31373
|
if (Array.isArray(chainedStatements)) {
|
|
31001
31374
|
for (const s of chainedStatements) {
|
|
31002
31375
|
const statement = {
|
|
31003
|
-
statement: s.statement ??
|
|
31376
|
+
statement: s.statement ?? [],
|
|
31004
31377
|
isCorrect: s.isCorrect,
|
|
31005
31378
|
item: s.item,
|
|
31006
31379
|
lead: s.lead,
|
|
@@ -31142,7 +31515,7 @@ function parseQuestions(_context, _bitType, cardSet) {
|
|
|
31142
31515
|
for (const content of side.variants) {
|
|
31143
31516
|
const tags2 = content.data;
|
|
31144
31517
|
const q = {
|
|
31145
|
-
question: tags2.cardBodyStr ??
|
|
31518
|
+
question: tags2.cardBody?.body ?? tags2.cardBodyStr ?? instance3.EMPTY_STRING,
|
|
31146
31519
|
...tags2
|
|
31147
31520
|
};
|
|
31148
31521
|
if (q) questions.push(q);
|
|
@@ -31346,37 +31719,158 @@ function parsePronunciationTable(_context, _bitType, cardSet) {
|
|
|
31346
31719
|
};
|
|
31347
31720
|
return { pronunciationTable: table };
|
|
31348
31721
|
}
|
|
31349
|
-
function parseTable(
|
|
31350
|
-
|
|
31351
|
-
|
|
31352
|
-
|
|
31353
|
-
|
|
31722
|
+
function parseTable(context, _bitType, cardSet) {
|
|
31723
|
+
const sectionRows = {
|
|
31724
|
+
thead: [],
|
|
31725
|
+
tbody: [],
|
|
31726
|
+
tfoot: []
|
|
31727
|
+
};
|
|
31728
|
+
const getNormalizedQualifier = (rawQualifier) => {
|
|
31729
|
+
if (!rawQualifier) return void 0;
|
|
31730
|
+
const normalized = rawQualifier.trim().toLowerCase();
|
|
31731
|
+
if (normalized === "thead" || normalized === "tbody" || normalized === "tfoot") {
|
|
31732
|
+
return normalized;
|
|
31733
|
+
}
|
|
31734
|
+
context.addWarning(`Unknown table section qualifier '${rawQualifier}', defaulting to tbody.`);
|
|
31735
|
+
return void 0;
|
|
31736
|
+
};
|
|
31737
|
+
const isLegacyHeadingRow = (card, cardIndex) => {
|
|
31738
|
+
if (cardIndex !== 0) return false;
|
|
31739
|
+
return card.sides.some(
|
|
31740
|
+
(side) => side.variants.some((variant) => {
|
|
31741
|
+
const titles = variant.data.title;
|
|
31742
|
+
return Array.isArray(titles) && titles[1]?.titleAst;
|
|
31743
|
+
})
|
|
31744
|
+
);
|
|
31745
|
+
};
|
|
31746
|
+
const readExtraProperty = (extra, key) => {
|
|
31747
|
+
if (!extra) return void 0;
|
|
31748
|
+
const value = extra[key];
|
|
31749
|
+
return Array.isArray(value) ? value[0] : value;
|
|
31750
|
+
};
|
|
31751
|
+
const cleanupExtraProperties = (tags2, keys) => {
|
|
31752
|
+
const extra = tags2.extraProperties;
|
|
31753
|
+
if (!extra) return;
|
|
31754
|
+
for (const key of keys) {
|
|
31755
|
+
if (Object.prototype.hasOwnProperty.call(extra, key)) delete extra[key];
|
|
31756
|
+
}
|
|
31757
|
+
if (Object.keys(extra).length === 0) {
|
|
31758
|
+
delete tags2.extraProperties;
|
|
31759
|
+
}
|
|
31760
|
+
};
|
|
31761
|
+
const normalizeCellType = (raw, section) => {
|
|
31762
|
+
if (typeof raw === "string") {
|
|
31763
|
+
const normalized = raw.trim().toLowerCase();
|
|
31764
|
+
if (normalized === "th" || normalized === "td") {
|
|
31765
|
+
return normalized;
|
|
31766
|
+
}
|
|
31767
|
+
context.addWarning(
|
|
31768
|
+
`Invalid table cell type '${raw}', using default for section '${section}'.`
|
|
31769
|
+
);
|
|
31770
|
+
}
|
|
31771
|
+
return section === "tbody" ? "td" : "th";
|
|
31772
|
+
};
|
|
31773
|
+
const normalizeSpan = (raw, kind) => {
|
|
31774
|
+
if (raw == null) return 1;
|
|
31775
|
+
const numeric = instance6.asNumber(raw);
|
|
31776
|
+
if (numeric == null || !Number.isInteger(numeric) || numeric < 1) {
|
|
31777
|
+
context.addWarning(`Invalid table ${kind} '${raw}', defaulting to 1.`);
|
|
31778
|
+
return 1;
|
|
31779
|
+
}
|
|
31780
|
+
return numeric;
|
|
31781
|
+
};
|
|
31782
|
+
const normalizeScope = (raw) => {
|
|
31783
|
+
if (raw == null) return void 0;
|
|
31784
|
+
if (typeof raw !== "string") {
|
|
31785
|
+
context.addWarning(`Invalid table scope '${raw}', ignoring.`);
|
|
31786
|
+
return void 0;
|
|
31787
|
+
}
|
|
31788
|
+
const normalized = raw.trim().toLowerCase();
|
|
31789
|
+
switch (normalized) {
|
|
31790
|
+
case "row":
|
|
31791
|
+
case "col":
|
|
31792
|
+
case "rowgroup":
|
|
31793
|
+
case "colgroup":
|
|
31794
|
+
return normalized;
|
|
31795
|
+
default:
|
|
31796
|
+
context.addWarning(`Invalid table scope '${raw}', ignoring.`);
|
|
31797
|
+
return void 0;
|
|
31798
|
+
}
|
|
31799
|
+
};
|
|
31800
|
+
const buildCell = (variant, section) => {
|
|
31801
|
+
const tags2 = variant.data;
|
|
31802
|
+
const heading = tags2.title && tags2.title[1]?.titleAst;
|
|
31803
|
+
const bodyContent = tags2.cardBody?.body ?? tags2.cardBodyStr ?? instance3.EMPTY_STRING;
|
|
31804
|
+
const content = heading ?? bodyContent;
|
|
31805
|
+
const cellTypeRaw = tags2.tableCellType ?? readExtraProperty(tags2.extraProperties, "tableCellType");
|
|
31806
|
+
const rowSpanRaw = tags2.tableRowSpan ?? readExtraProperty(tags2.extraProperties, "tableRowSpan");
|
|
31807
|
+
const colSpanRaw = tags2.tableColSpan ?? readExtraProperty(tags2.extraProperties, "tableColSpan");
|
|
31808
|
+
const scopeRaw = tags2.tableScope ?? readExtraProperty(tags2.extraProperties, "tableScope");
|
|
31809
|
+
cleanupExtraProperties(tags2, ["tableCellType", "tableRowSpan", "tableColSpan", "tableScope"]);
|
|
31810
|
+
const cellType = normalizeCellType(cellTypeRaw, section);
|
|
31811
|
+
const rowspan = normalizeSpan(rowSpanRaw, "rowspan");
|
|
31812
|
+
const colspan = normalizeSpan(colSpanRaw, "colspan");
|
|
31813
|
+
const scope = normalizeScope(scopeRaw);
|
|
31814
|
+
const cell = {
|
|
31815
|
+
content
|
|
31816
|
+
};
|
|
31817
|
+
if (cellType === "th") cell.title = true;
|
|
31818
|
+
if (rowspan > 1) cell.rowspan = rowspan;
|
|
31819
|
+
if (colspan > 1) cell.colspan = colspan;
|
|
31820
|
+
if (scope) cell.scope = scope;
|
|
31821
|
+
return cell;
|
|
31822
|
+
};
|
|
31823
|
+
const resolveSectionQualifier = (card) => {
|
|
31824
|
+
const cardQualifier = getNormalizedQualifier(card.qualifier);
|
|
31825
|
+
if (cardQualifier) return cardQualifier;
|
|
31826
|
+
for (const side of card.sides) {
|
|
31827
|
+
const sideQualifier = getNormalizedQualifier(side.qualifier);
|
|
31828
|
+
if (sideQualifier) return sideQualifier;
|
|
31829
|
+
for (const variant of side.variants) {
|
|
31830
|
+
const variantQualifier = getNormalizedQualifier(variant.qualifier);
|
|
31831
|
+
if (variantQualifier) return variantQualifier;
|
|
31832
|
+
}
|
|
31833
|
+
}
|
|
31834
|
+
return void 0;
|
|
31835
|
+
};
|
|
31354
31836
|
for (let cardIdx = 0; cardIdx < cardSet.cards.length; cardIdx++) {
|
|
31355
31837
|
const card = cardSet.cards[cardIdx];
|
|
31356
|
-
|
|
31357
|
-
|
|
31838
|
+
const qualifier = resolveSectionQualifier(card);
|
|
31839
|
+
const section = qualifier ? qualifier : isLegacyHeadingRow(card, cardIdx) ? "thead" : "tbody";
|
|
31840
|
+
const cells = [];
|
|
31358
31841
|
for (const side of card.sides) {
|
|
31359
|
-
for (const
|
|
31360
|
-
|
|
31361
|
-
const { title, cardBody } = tags2;
|
|
31362
|
-
const heading = title && title[1].titleAst;
|
|
31363
|
-
if (cardIdx === 0 && heading != null) isHeading = true;
|
|
31364
|
-
if (isHeading) {
|
|
31365
|
-
columns.push(heading ?? []);
|
|
31366
|
-
} else {
|
|
31367
|
-
const value = cardBody?.body ?? [];
|
|
31368
|
-
rowValues.push(value);
|
|
31369
|
-
}
|
|
31842
|
+
for (const variant of side.variants) {
|
|
31843
|
+
cells.push(buildCell(variant, section));
|
|
31370
31844
|
}
|
|
31371
31845
|
}
|
|
31372
|
-
|
|
31373
|
-
|
|
31374
|
-
}
|
|
31846
|
+
sectionRows[section].push({
|
|
31847
|
+
cells
|
|
31848
|
+
});
|
|
31849
|
+
}
|
|
31850
|
+
const table = {};
|
|
31851
|
+
const hasHeadRows = sectionRows.thead.length > 0;
|
|
31852
|
+
const hasBodyRows = sectionRows.tbody.length > 0;
|
|
31853
|
+
const hasFootRows = sectionRows.tfoot.length > 0;
|
|
31854
|
+
if (hasHeadRows) {
|
|
31855
|
+
table.head = {
|
|
31856
|
+
rows: sectionRows.thead
|
|
31857
|
+
};
|
|
31858
|
+
}
|
|
31859
|
+
if (hasBodyRows) {
|
|
31860
|
+
table.body = {
|
|
31861
|
+
rows: sectionRows.tbody
|
|
31862
|
+
};
|
|
31863
|
+
}
|
|
31864
|
+
if (hasFootRows) {
|
|
31865
|
+
table.foot = {
|
|
31866
|
+
rows: sectionRows.tfoot
|
|
31867
|
+
};
|
|
31868
|
+
}
|
|
31869
|
+
if (!hasHeadRows && !hasBodyRows && !hasFootRows) {
|
|
31870
|
+
table.head = { rows: [] };
|
|
31871
|
+
table.body = { rows: [] };
|
|
31872
|
+
table.foot = { rows: [] };
|
|
31375
31873
|
}
|
|
31376
|
-
const table = {
|
|
31377
|
-
columns,
|
|
31378
|
-
data: rows
|
|
31379
|
-
};
|
|
31380
31874
|
return { table };
|
|
31381
31875
|
}
|
|
31382
31876
|
function parseBotActionResponses(_context, _bitType, cardSet) {
|
|
@@ -31527,11 +32021,11 @@ function extractHeadingCard(cardSet, valuesIsArray = false) {
|
|
|
31527
32021
|
function defaultTagContentProcessor(context, _contentDepth, _tagsConfig, content, target) {
|
|
31528
32022
|
const { type, value } = content;
|
|
31529
32023
|
const { textFormat } = context;
|
|
31530
|
-
const
|
|
32024
|
+
const textParser10 = new TextParser();
|
|
31531
32025
|
const trimmedStringValue = stringUtils.trimmedString(value);
|
|
31532
32026
|
switch (type) {
|
|
31533
32027
|
case TypeKey.Instruction: {
|
|
31534
|
-
target.instruction =
|
|
32028
|
+
target.instruction = textParser10.toAst(trimmedStringValue, {
|
|
31535
32029
|
format: textFormat,
|
|
31536
32030
|
location: TextLocation.tag
|
|
31537
32031
|
});
|
|
@@ -31542,7 +32036,7 @@ function defaultTagContentProcessor(context, _contentDepth, _tagsConfig, content
|
|
|
31542
32036
|
break;
|
|
31543
32037
|
}
|
|
31544
32038
|
case TypeKey.Hint: {
|
|
31545
|
-
target.hint =
|
|
32039
|
+
target.hint = textParser10.toAst(trimmedStringValue, {
|
|
31546
32040
|
format: textFormat,
|
|
31547
32041
|
location: TextLocation.tag
|
|
31548
32042
|
});
|
|
@@ -31572,7 +32066,7 @@ function defaultTagContentProcessor(context, _contentDepth, _tagsConfig, content
|
|
|
31572
32066
|
format: TextFormat.bitmarkText,
|
|
31573
32067
|
location: TextLocation.tag
|
|
31574
32068
|
});
|
|
31575
|
-
target.__sampleSolutionAst =
|
|
32069
|
+
target.__sampleSolutionAst = textParser10.toAst(trimmedStringValue, {
|
|
31576
32070
|
format: textFormat,
|
|
31577
32071
|
location: TextLocation.tag
|
|
31578
32072
|
});
|
|
@@ -31679,10 +32173,10 @@ function buildGap(context, _contentDepth, tagsConfig, content) {
|
|
|
31679
32173
|
function itemLeadTagContentProcessor(context, _contentDepth, _tagsConfig, content, target) {
|
|
31680
32174
|
const { textFormat } = context;
|
|
31681
32175
|
const { value } = content;
|
|
31682
|
-
const
|
|
32176
|
+
const textParser10 = new TextParser();
|
|
31683
32177
|
const trimmedStringValue = stringUtils.trimmedString(value);
|
|
31684
32178
|
if (!target.itemLead) target.itemLead = [];
|
|
31685
|
-
const text =
|
|
32179
|
+
const text = textParser10.toAst(trimmedStringValue, {
|
|
31686
32180
|
format: textFormat,
|
|
31687
32181
|
location: TextLocation.tag
|
|
31688
32182
|
});
|
|
@@ -32433,7 +32927,9 @@ function buildTitles(_context, bitType, title) {
|
|
|
32433
32927
|
}
|
|
32434
32928
|
|
|
32435
32929
|
// src/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.ts
|
|
32436
|
-
|
|
32930
|
+
var textParser9 = new TextParser();
|
|
32931
|
+
function trueFalseTagContentProcessor(context, _contentDepth, content, target) {
|
|
32932
|
+
const { textFormat } = context;
|
|
32437
32933
|
const { type, value } = content;
|
|
32438
32934
|
const trueFalse = target.trueFalse;
|
|
32439
32935
|
if (!trueFalse) return;
|
|
@@ -32444,8 +32940,13 @@ function trueFalseTagContentProcessor(_context, _contentDepth, content, target)
|
|
|
32444
32940
|
location: TextLocation.tag
|
|
32445
32941
|
}
|
|
32446
32942
|
);
|
|
32943
|
+
const textAst = textParser9.toAst(trimmedStringValue ?? "", {
|
|
32944
|
+
format: textFormat,
|
|
32945
|
+
location: TextLocation.tag
|
|
32946
|
+
});
|
|
32447
32947
|
trueFalse.push({
|
|
32448
32948
|
text: trimmedStringValue,
|
|
32949
|
+
textAst,
|
|
32449
32950
|
isCorrect: type === TypeKey.True,
|
|
32450
32951
|
__isDefaultExample: false
|
|
32451
32952
|
});
|
|
@@ -32549,7 +33050,7 @@ function buildStatementsChoicesResponses(context, tagsConfig, trueFalseContent)
|
|
|
32549
33050
|
const { statement: _ignore, ...tagsRest } = tags2;
|
|
32550
33051
|
const statement = {
|
|
32551
33052
|
...firstTrueFalse,
|
|
32552
|
-
statement: firstTrueFalse.
|
|
33053
|
+
statement: firstTrueFalse.textAst ?? [],
|
|
32553
33054
|
...tagsRest
|
|
32554
33055
|
};
|
|
32555
33056
|
if (statement) statements.push(statement);
|
|
@@ -33334,36 +33835,39 @@ function peg$parse2(input, options) {
|
|
|
33334
33835
|
const peg$c7 = "text";
|
|
33335
33836
|
const peg$c8 = "~~~~";
|
|
33336
33837
|
const peg$c9 = "footer";
|
|
33337
|
-
const peg$c10 = "
|
|
33338
|
-
const peg$c11 = "
|
|
33339
|
-
const peg$c12 = "
|
|
33340
|
-
const peg$c13 = "
|
|
33341
|
-
const peg$c14 = "
|
|
33342
|
-
const peg$c15 = "
|
|
33343
|
-
const peg$c16 = "
|
|
33344
|
-
const peg$c17 = "[\
|
|
33345
|
-
const peg$c18 = "[
|
|
33346
|
-
const peg$c19 = "[
|
|
33347
|
-
const peg$c20 = "[
|
|
33348
|
-
const peg$c21 = "[
|
|
33349
|
-
const peg$c22 = "[
|
|
33350
|
-
const peg$c23 = "[
|
|
33351
|
-
const peg$c24 = "[
|
|
33352
|
-
const peg$c25 = "[
|
|
33353
|
-
const peg$c26 = "[
|
|
33354
|
-
const peg$c27 = "[
|
|
33355
|
-
const peg$c28 = "
|
|
33356
|
-
const peg$c29 = "
|
|
33357
|
-
const peg$c30 = "
|
|
33358
|
-
const peg$c31 = "
|
|
33359
|
-
const peg$c32 = "\
|
|
33838
|
+
const peg$c10 = " ";
|
|
33839
|
+
const peg$c11 = "--";
|
|
33840
|
+
const peg$c12 = "++";
|
|
33841
|
+
const peg$c13 = "===";
|
|
33842
|
+
const peg$c14 = "==";
|
|
33843
|
+
const peg$c15 = "[@id";
|
|
33844
|
+
const peg$c16 = "#";
|
|
33845
|
+
const peg$c17 = "[\u25BC";
|
|
33846
|
+
const peg$c18 = "[\u25BA";
|
|
33847
|
+
const peg$c19 = "[@";
|
|
33848
|
+
const peg$c20 = "[%";
|
|
33849
|
+
const peg$c21 = "[!";
|
|
33850
|
+
const peg$c22 = "[?";
|
|
33851
|
+
const peg$c23 = "[+";
|
|
33852
|
+
const peg$c24 = "[-";
|
|
33853
|
+
const peg$c25 = "[$";
|
|
33854
|
+
const peg$c26 = "[_";
|
|
33855
|
+
const peg$c27 = "[=";
|
|
33856
|
+
const peg$c28 = "[&";
|
|
33857
|
+
const peg$c29 = "^]";
|
|
33858
|
+
const peg$c30 = "id:";
|
|
33859
|
+
const peg$c31 = ".";
|
|
33860
|
+
const peg$c32 = "\n";
|
|
33861
|
+
const peg$c33 = "\r\n";
|
|
33360
33862
|
const peg$r0 = /^[^\]]/;
|
|
33361
|
-
const peg$r1 = /^[
|
|
33362
|
-
const peg$r2 = /^[
|
|
33363
|
-
const peg$r3 = /^[
|
|
33364
|
-
const peg$r4 = /^[
|
|
33365
|
-
const peg$r5 = /^[\r\u2028
|
|
33366
|
-
const peg$r6 = /^[ \t
|
|
33863
|
+
const peg$r1 = /^[a-z]/;
|
|
33864
|
+
const peg$r2 = /^[a-z0-9\-]/;
|
|
33865
|
+
const peg$r3 = /^[^:\]]/;
|
|
33866
|
+
const peg$r4 = /^[^&:\]]/;
|
|
33867
|
+
const peg$r5 = /^[^\n\r\u2028\u2029]/;
|
|
33868
|
+
const peg$r6 = /^[ \t]/;
|
|
33869
|
+
const peg$r7 = /^[\r\u2028-\u2029]/;
|
|
33870
|
+
const peg$r8 = /^[ \t\n\r\u2028\u2029]/;
|
|
33367
33871
|
const peg$e0 = peg$literalExpectation("[.", false);
|
|
33368
33872
|
const peg$e1 = peg$classExpectation(["]"], true, false, false);
|
|
33369
33873
|
const peg$e2 = peg$literalExpectation("]", false);
|
|
@@ -33376,40 +33880,43 @@ function peg$parse2(input, options) {
|
|
|
33376
33880
|
const peg$e9 = peg$literalExpectation("text", false);
|
|
33377
33881
|
const peg$e10 = peg$literalExpectation("~~~~", false);
|
|
33378
33882
|
const peg$e11 = peg$literalExpectation("footer", false);
|
|
33379
|
-
const peg$e12 = peg$literalExpectation("
|
|
33380
|
-
const peg$e13 = peg$literalExpectation("
|
|
33381
|
-
const peg$e14 = peg$literalExpectation("
|
|
33382
|
-
const peg$e15 = peg$literalExpectation("
|
|
33383
|
-
const peg$e16 = peg$literalExpectation("
|
|
33384
|
-
const peg$e17 = peg$
|
|
33385
|
-
const peg$e18 = peg$
|
|
33386
|
-
const peg$e19 = peg$literalExpectation("[
|
|
33387
|
-
const peg$e20 = peg$literalExpectation("
|
|
33388
|
-
const peg$e21 = peg$literalExpectation("[
|
|
33389
|
-
const peg$e22 = peg$literalExpectation("[
|
|
33390
|
-
const peg$e23 = peg$literalExpectation("[
|
|
33391
|
-
const peg$e24 = peg$literalExpectation("[
|
|
33392
|
-
const peg$e25 = peg$literalExpectation("[
|
|
33393
|
-
const peg$e26 = peg$literalExpectation("[
|
|
33394
|
-
const peg$e27 = peg$literalExpectation("[
|
|
33395
|
-
const peg$e28 = peg$literalExpectation("[
|
|
33396
|
-
const peg$e29 = peg$literalExpectation("[
|
|
33397
|
-
const peg$e30 = peg$literalExpectation("
|
|
33398
|
-
const peg$e31 = peg$literalExpectation("
|
|
33399
|
-
const peg$e32 = peg$
|
|
33400
|
-
const peg$e33 = peg$literalExpectation("
|
|
33401
|
-
const peg$e34 = peg$
|
|
33402
|
-
const peg$e35 = peg$
|
|
33403
|
-
const peg$e36 = peg$
|
|
33404
|
-
const peg$e37 = peg$
|
|
33405
|
-
const peg$e38 = peg$
|
|
33406
|
-
const peg$e39 = peg$
|
|
33407
|
-
const peg$e40 = peg$
|
|
33408
|
-
const peg$e41 = peg$
|
|
33409
|
-
const peg$e42 = peg$
|
|
33410
|
-
const peg$e43 = peg$
|
|
33411
|
-
const peg$e44 = peg$
|
|
33412
|
-
const peg$e45 = peg$classExpectation(["
|
|
33883
|
+
const peg$e12 = peg$literalExpectation(" ", false);
|
|
33884
|
+
const peg$e13 = peg$literalExpectation("--", false);
|
|
33885
|
+
const peg$e14 = peg$literalExpectation("++", false);
|
|
33886
|
+
const peg$e15 = peg$literalExpectation("===", false);
|
|
33887
|
+
const peg$e16 = peg$literalExpectation("==", false);
|
|
33888
|
+
const peg$e17 = peg$classExpectation([["a", "z"]], false, false, false);
|
|
33889
|
+
const peg$e18 = peg$classExpectation([["a", "z"], ["0", "9"], "-"], false, false, false);
|
|
33890
|
+
const peg$e19 = peg$literalExpectation("[@id", false);
|
|
33891
|
+
const peg$e20 = peg$literalExpectation("#", false);
|
|
33892
|
+
const peg$e21 = peg$literalExpectation("[\u25BC", false);
|
|
33893
|
+
const peg$e22 = peg$literalExpectation("[\u25BA", false);
|
|
33894
|
+
const peg$e23 = peg$literalExpectation("[@", false);
|
|
33895
|
+
const peg$e24 = peg$literalExpectation("[%", false);
|
|
33896
|
+
const peg$e25 = peg$literalExpectation("[!", false);
|
|
33897
|
+
const peg$e26 = peg$literalExpectation("[?", false);
|
|
33898
|
+
const peg$e27 = peg$literalExpectation("[+", false);
|
|
33899
|
+
const peg$e28 = peg$literalExpectation("[-", false);
|
|
33900
|
+
const peg$e29 = peg$literalExpectation("[$", false);
|
|
33901
|
+
const peg$e30 = peg$literalExpectation("[_", false);
|
|
33902
|
+
const peg$e31 = peg$literalExpectation("[=", false);
|
|
33903
|
+
const peg$e32 = peg$literalExpectation("[&", false);
|
|
33904
|
+
const peg$e33 = peg$literalExpectation("^]", false);
|
|
33905
|
+
const peg$e34 = peg$literalExpectation("id:", false);
|
|
33906
|
+
const peg$e35 = peg$classExpectation([":", "]"], true, false, false);
|
|
33907
|
+
const peg$e36 = peg$literalExpectation(".", false);
|
|
33908
|
+
const peg$e37 = peg$classExpectation(["&", ":", "]"], true, false, false);
|
|
33909
|
+
const peg$e38 = peg$otherExpectation("Character");
|
|
33910
|
+
const peg$e39 = peg$classExpectation(["\n", "\r", "\u2028", "\u2029"], true, false, false);
|
|
33911
|
+
const peg$e40 = peg$otherExpectation("Blank Line");
|
|
33912
|
+
const peg$e41 = peg$classExpectation([" ", " "], false, false, false);
|
|
33913
|
+
const peg$e42 = peg$otherExpectation("Line Terminator");
|
|
33914
|
+
const peg$e43 = peg$literalExpectation("\n", false);
|
|
33915
|
+
const peg$e44 = peg$literalExpectation("\r\n", false);
|
|
33916
|
+
const peg$e45 = peg$classExpectation(["\r", ["\u2028", "\u2029"]], false, false, false);
|
|
33917
|
+
const peg$e46 = peg$otherExpectation("Whitespace, then Line Terminator");
|
|
33918
|
+
const peg$e47 = peg$otherExpectation("whitespace");
|
|
33919
|
+
const peg$e48 = peg$classExpectation([" ", " ", "\n", "\r", "\u2028", "\u2029"], false, false, false);
|
|
33413
33920
|
function peg$f0(firstBit, bits) {
|
|
33414
33921
|
return processor.buildBits([firstBit, ...bits]);
|
|
33415
33922
|
}
|
|
@@ -33482,91 +33989,112 @@ function peg$parse2(input, options) {
|
|
|
33482
33989
|
function peg$f23(value) {
|
|
33483
33990
|
return helper.handleCardLineOrDivider(value, 2);
|
|
33484
33991
|
}
|
|
33485
|
-
function peg$f24(
|
|
33992
|
+
function peg$f24(qualifier) {
|
|
33993
|
+
return ["====", qualifier];
|
|
33994
|
+
}
|
|
33995
|
+
function peg$f25() {
|
|
33996
|
+
return ["===="];
|
|
33997
|
+
}
|
|
33998
|
+
function peg$f26(qualifier) {
|
|
33999
|
+
return ["--", qualifier];
|
|
34000
|
+
}
|
|
34001
|
+
function peg$f27() {
|
|
34002
|
+
return ["--"];
|
|
34003
|
+
}
|
|
34004
|
+
function peg$f28(qualifier) {
|
|
34005
|
+
return ["++", qualifier];
|
|
34006
|
+
}
|
|
34007
|
+
function peg$f29() {
|
|
34008
|
+
return ["++"];
|
|
34009
|
+
}
|
|
34010
|
+
function peg$f30(value) {
|
|
33486
34011
|
return helper.handleCardLine(value);
|
|
33487
34012
|
}
|
|
33488
|
-
function peg$
|
|
34013
|
+
function peg$f31(value) {
|
|
33489
34014
|
return helper.handleCardSet(value[1].flat());
|
|
33490
34015
|
}
|
|
33491
|
-
function peg$
|
|
34016
|
+
function peg$f32() {
|
|
33492
34017
|
helper.handleCardSetStart();
|
|
33493
34018
|
}
|
|
33494
|
-
function peg$
|
|
34019
|
+
function peg$f33() {
|
|
33495
34020
|
helper.handleCardSetEnd();
|
|
33496
34021
|
}
|
|
33497
|
-
function peg$
|
|
34022
|
+
function peg$f34(value) {
|
|
33498
34023
|
return helper.handleCards(value);
|
|
33499
34024
|
}
|
|
33500
|
-
function peg$
|
|
34025
|
+
function peg$f35(value) {
|
|
33501
34026
|
return helper.handleCardLineOrDivider(value, 1);
|
|
33502
34027
|
}
|
|
33503
|
-
function peg$
|
|
34028
|
+
function peg$f36(value) {
|
|
33504
34029
|
return helper.handleCardLine(value);
|
|
33505
34030
|
}
|
|
33506
|
-
function peg$
|
|
34031
|
+
function peg$f37(value) {
|
|
34032
|
+
return value;
|
|
34033
|
+
}
|
|
34034
|
+
function peg$f38(value) {
|
|
33507
34035
|
return helper.handleCardContent(value);
|
|
33508
34036
|
}
|
|
33509
|
-
function peg$
|
|
34037
|
+
function peg$f39(value) {
|
|
33510
34038
|
return { type: TypeKey.CardChar, value };
|
|
33511
34039
|
}
|
|
33512
|
-
function peg$
|
|
34040
|
+
function peg$f40(value) {
|
|
33513
34041
|
return helper.handlePropertyTag("id", value);
|
|
33514
34042
|
}
|
|
33515
|
-
function peg$
|
|
34043
|
+
function peg$f41(level, title) {
|
|
33516
34044
|
return helper.handleTag(TypeKey.Title, { level, title });
|
|
33517
34045
|
}
|
|
33518
|
-
function peg$
|
|
34046
|
+
function peg$f42(value) {
|
|
33519
34047
|
return helper.handleTag(TypeKey.Anchor, value);
|
|
33520
34048
|
}
|
|
33521
|
-
function peg$
|
|
34049
|
+
function peg$f43(value) {
|
|
33522
34050
|
return helper.handleTag(TypeKey.Reference, value);
|
|
33523
34051
|
}
|
|
33524
|
-
function peg$
|
|
34052
|
+
function peg$f44(key, value) {
|
|
33525
34053
|
return helper.handlePropertyTag(key, value);
|
|
33526
34054
|
}
|
|
33527
|
-
function peg$
|
|
34055
|
+
function peg$f45(value) {
|
|
33528
34056
|
return helper.handleTag(TypeKey.ItemLead, value);
|
|
33529
34057
|
}
|
|
33530
|
-
function peg$
|
|
34058
|
+
function peg$f46(value) {
|
|
33531
34059
|
return helper.handleTag(TypeKey.Instruction, value);
|
|
33532
34060
|
}
|
|
33533
|
-
function peg$
|
|
34061
|
+
function peg$f47(value) {
|
|
33534
34062
|
return helper.handleTag(TypeKey.Hint, value);
|
|
33535
34063
|
}
|
|
33536
|
-
function peg$
|
|
34064
|
+
function peg$f48(value) {
|
|
33537
34065
|
return helper.handleTag(TypeKey.True, value);
|
|
33538
34066
|
}
|
|
33539
|
-
function peg$
|
|
34067
|
+
function peg$f49(value) {
|
|
33540
34068
|
return helper.handleTag(TypeKey.False, value);
|
|
33541
34069
|
}
|
|
33542
|
-
function peg$
|
|
34070
|
+
function peg$f50(value) {
|
|
33543
34071
|
return helper.handleTag(TypeKey.SampleSolution, value);
|
|
33544
34072
|
}
|
|
33545
|
-
function peg$
|
|
34073
|
+
function peg$f51(value) {
|
|
33546
34074
|
return helper.handleTag(TypeKey.Gap, value);
|
|
33547
34075
|
}
|
|
33548
|
-
function peg$
|
|
34076
|
+
function peg$f52(value) {
|
|
33549
34077
|
return helper.handleTag(TypeKey.Mark, value);
|
|
33550
34078
|
}
|
|
33551
|
-
function peg$
|
|
34079
|
+
function peg$f53(key, value) {
|
|
33552
34080
|
return helper.handleResourceTag(key, value);
|
|
33553
34081
|
}
|
|
33554
|
-
function peg$
|
|
34082
|
+
function peg$f54(value) {
|
|
33555
34083
|
return value;
|
|
33556
34084
|
}
|
|
33557
|
-
function peg$
|
|
34085
|
+
function peg$f55(value) {
|
|
33558
34086
|
return value ? value.trim() : "";
|
|
33559
34087
|
}
|
|
33560
|
-
function peg$
|
|
34088
|
+
function peg$f56(value) {
|
|
33561
34089
|
return value.length;
|
|
33562
34090
|
}
|
|
33563
|
-
function peg$
|
|
34091
|
+
function peg$f57(value) {
|
|
33564
34092
|
return value ? value.trim() : null;
|
|
33565
34093
|
}
|
|
33566
|
-
function peg$
|
|
34094
|
+
function peg$f58(value) {
|
|
33567
34095
|
return value ? value.trim() : "";
|
|
33568
34096
|
}
|
|
33569
|
-
function peg$
|
|
34097
|
+
function peg$f59() {
|
|
33570
34098
|
return true;
|
|
33571
34099
|
}
|
|
33572
34100
|
let peg$currPos = options.peg$currPos | 0;
|
|
@@ -34484,35 +35012,28 @@ function peg$parse2(input, options) {
|
|
|
34484
35012
|
return s0;
|
|
34485
35013
|
}
|
|
34486
35014
|
function peg$parseCardSetStart_V2() {
|
|
34487
|
-
let s0, s1, s2, s3
|
|
35015
|
+
let s0, s1, s2, s3;
|
|
34488
35016
|
s0 = peg$currPos;
|
|
34489
|
-
s1 =
|
|
35017
|
+
s1 = [];
|
|
35018
|
+
s2 = peg$parseWNL();
|
|
35019
|
+
if (s2 === peg$FAILED) {
|
|
35020
|
+
s2 = peg$parseNL();
|
|
35021
|
+
}
|
|
35022
|
+
if (s2 !== peg$FAILED) {
|
|
35023
|
+
while (s2 !== peg$FAILED) {
|
|
35024
|
+
s1.push(s2);
|
|
35025
|
+
s2 = peg$parseWNL();
|
|
35026
|
+
if (s2 === peg$FAILED) {
|
|
35027
|
+
s2 = peg$parseNL();
|
|
35028
|
+
}
|
|
35029
|
+
}
|
|
35030
|
+
} else {
|
|
35031
|
+
s1 = peg$FAILED;
|
|
35032
|
+
}
|
|
34490
35033
|
if (s1 !== peg$FAILED) {
|
|
34491
35034
|
s2 = peg$currPos;
|
|
34492
35035
|
peg$silentFails++;
|
|
34493
|
-
s3 = peg$
|
|
34494
|
-
if (input.substr(peg$currPos, 4) === peg$c6) {
|
|
34495
|
-
s4 = peg$c6;
|
|
34496
|
-
peg$currPos += 4;
|
|
34497
|
-
} else {
|
|
34498
|
-
s4 = peg$FAILED;
|
|
34499
|
-
if (peg$silentFails === 0) {
|
|
34500
|
-
peg$fail(peg$e8);
|
|
34501
|
-
}
|
|
34502
|
-
}
|
|
34503
|
-
if (s4 !== peg$FAILED) {
|
|
34504
|
-
s5 = peg$parseWNL();
|
|
34505
|
-
if (s5 !== peg$FAILED) {
|
|
34506
|
-
s4 = [s4, s5];
|
|
34507
|
-
s3 = s4;
|
|
34508
|
-
} else {
|
|
34509
|
-
peg$currPos = s3;
|
|
34510
|
-
s3 = peg$FAILED;
|
|
34511
|
-
}
|
|
34512
|
-
} else {
|
|
34513
|
-
peg$currPos = s3;
|
|
34514
|
-
s3 = peg$FAILED;
|
|
34515
|
-
}
|
|
35036
|
+
s3 = peg$parseCardDividerLookahead_V2();
|
|
34516
35037
|
peg$silentFails--;
|
|
34517
35038
|
if (s3 !== peg$FAILED) {
|
|
34518
35039
|
peg$currPos = s2;
|
|
@@ -34577,39 +35098,147 @@ function peg$parse2(input, options) {
|
|
|
34577
35098
|
return s0;
|
|
34578
35099
|
}
|
|
34579
35100
|
function peg$parseCardLineOrDivider_V2() {
|
|
34580
|
-
let s0, s1
|
|
35101
|
+
let s0, s1;
|
|
35102
|
+
s0 = peg$currPos;
|
|
35103
|
+
s1 = peg$parseCardDividerToken_V2();
|
|
35104
|
+
if (s1 === peg$FAILED) {
|
|
35105
|
+
s1 = peg$parseCardSideDividerToken_V2();
|
|
35106
|
+
if (s1 === peg$FAILED) {
|
|
35107
|
+
s1 = peg$parseCardVariantDividerToken_V2();
|
|
35108
|
+
if (s1 === peg$FAILED) {
|
|
35109
|
+
s1 = peg$parseCardLine_V2();
|
|
35110
|
+
}
|
|
35111
|
+
}
|
|
35112
|
+
}
|
|
35113
|
+
if (s1 !== peg$FAILED) {
|
|
35114
|
+
peg$savedPos = s0;
|
|
35115
|
+
s1 = peg$f23(s1);
|
|
35116
|
+
}
|
|
35117
|
+
s0 = s1;
|
|
35118
|
+
return s0;
|
|
35119
|
+
}
|
|
35120
|
+
function peg$parseCardDividerToken_V2() {
|
|
35121
|
+
let s0, s1, s2, s3, s4, s5, s6;
|
|
34581
35122
|
s0 = peg$currPos;
|
|
34582
|
-
s1 = peg$currPos;
|
|
34583
35123
|
if (input.substr(peg$currPos, 4) === peg$c6) {
|
|
34584
|
-
|
|
35124
|
+
s1 = peg$c6;
|
|
34585
35125
|
peg$currPos += 4;
|
|
34586
35126
|
} else {
|
|
34587
|
-
|
|
35127
|
+
s1 = peg$FAILED;
|
|
34588
35128
|
if (peg$silentFails === 0) {
|
|
34589
35129
|
peg$fail(peg$e8);
|
|
34590
35130
|
}
|
|
34591
35131
|
}
|
|
34592
|
-
if (
|
|
34593
|
-
|
|
34594
|
-
|
|
34595
|
-
|
|
35132
|
+
if (s1 !== peg$FAILED) {
|
|
35133
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35134
|
+
s2 = peg$c10;
|
|
35135
|
+
peg$currPos++;
|
|
35136
|
+
} else {
|
|
35137
|
+
s2 = peg$FAILED;
|
|
35138
|
+
if (peg$silentFails === 0) {
|
|
35139
|
+
peg$fail(peg$e12);
|
|
35140
|
+
}
|
|
34596
35141
|
}
|
|
34597
|
-
if (
|
|
34598
|
-
|
|
34599
|
-
|
|
35142
|
+
if (s2 !== peg$FAILED) {
|
|
35143
|
+
s3 = peg$parseQualifier();
|
|
35144
|
+
if (s3 !== peg$FAILED) {
|
|
35145
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35146
|
+
s4 = peg$c10;
|
|
35147
|
+
peg$currPos++;
|
|
35148
|
+
} else {
|
|
35149
|
+
s4 = peg$FAILED;
|
|
35150
|
+
if (peg$silentFails === 0) {
|
|
35151
|
+
peg$fail(peg$e12);
|
|
35152
|
+
}
|
|
35153
|
+
}
|
|
35154
|
+
if (s4 !== peg$FAILED) {
|
|
35155
|
+
if (input.substr(peg$currPos, 4) === peg$c6) {
|
|
35156
|
+
s5 = peg$c6;
|
|
35157
|
+
peg$currPos += 4;
|
|
35158
|
+
} else {
|
|
35159
|
+
s5 = peg$FAILED;
|
|
35160
|
+
if (peg$silentFails === 0) {
|
|
35161
|
+
peg$fail(peg$e8);
|
|
35162
|
+
}
|
|
35163
|
+
}
|
|
35164
|
+
if (s5 !== peg$FAILED) {
|
|
35165
|
+
s6 = peg$parseWNL();
|
|
35166
|
+
if (s6 === peg$FAILED) {
|
|
35167
|
+
s6 = peg$parseWEOL();
|
|
35168
|
+
}
|
|
35169
|
+
if (s6 !== peg$FAILED) {
|
|
35170
|
+
peg$savedPos = s0;
|
|
35171
|
+
s0 = peg$f24(s3);
|
|
35172
|
+
} else {
|
|
35173
|
+
peg$currPos = s0;
|
|
35174
|
+
s0 = peg$FAILED;
|
|
35175
|
+
}
|
|
35176
|
+
} else {
|
|
35177
|
+
peg$currPos = s0;
|
|
35178
|
+
s0 = peg$FAILED;
|
|
35179
|
+
}
|
|
35180
|
+
} else {
|
|
35181
|
+
peg$currPos = s0;
|
|
35182
|
+
s0 = peg$FAILED;
|
|
35183
|
+
}
|
|
35184
|
+
} else {
|
|
35185
|
+
peg$currPos = s0;
|
|
35186
|
+
s0 = peg$FAILED;
|
|
35187
|
+
}
|
|
35188
|
+
} else {
|
|
35189
|
+
peg$currPos = s0;
|
|
35190
|
+
s0 = peg$FAILED;
|
|
35191
|
+
}
|
|
35192
|
+
} else {
|
|
35193
|
+
peg$currPos = s0;
|
|
35194
|
+
s0 = peg$FAILED;
|
|
35195
|
+
}
|
|
35196
|
+
if (s0 === peg$FAILED) {
|
|
35197
|
+
s0 = peg$currPos;
|
|
35198
|
+
if (input.substr(peg$currPos, 4) === peg$c6) {
|
|
35199
|
+
s1 = peg$c6;
|
|
35200
|
+
peg$currPos += 4;
|
|
34600
35201
|
} else {
|
|
34601
|
-
peg$currPos = s1;
|
|
34602
35202
|
s1 = peg$FAILED;
|
|
35203
|
+
if (peg$silentFails === 0) {
|
|
35204
|
+
peg$fail(peg$e8);
|
|
35205
|
+
}
|
|
34603
35206
|
}
|
|
35207
|
+
if (s1 !== peg$FAILED) {
|
|
35208
|
+
s2 = peg$parseWNL();
|
|
35209
|
+
if (s2 === peg$FAILED) {
|
|
35210
|
+
s2 = peg$parseWEOL();
|
|
35211
|
+
}
|
|
35212
|
+
if (s2 !== peg$FAILED) {
|
|
35213
|
+
peg$savedPos = s0;
|
|
35214
|
+
s0 = peg$f25();
|
|
35215
|
+
} else {
|
|
35216
|
+
peg$currPos = s0;
|
|
35217
|
+
s0 = peg$FAILED;
|
|
35218
|
+
}
|
|
35219
|
+
} else {
|
|
35220
|
+
peg$currPos = s0;
|
|
35221
|
+
s0 = peg$FAILED;
|
|
35222
|
+
}
|
|
35223
|
+
}
|
|
35224
|
+
return s0;
|
|
35225
|
+
}
|
|
35226
|
+
function peg$parseCardSideDividerToken_V2() {
|
|
35227
|
+
let s0, s1, s2, s3, s4, s5, s6;
|
|
35228
|
+
s0 = peg$currPos;
|
|
35229
|
+
if (input.substr(peg$currPos, 2) === peg$c11) {
|
|
35230
|
+
s1 = peg$c11;
|
|
35231
|
+
peg$currPos += 2;
|
|
34604
35232
|
} else {
|
|
34605
|
-
peg$currPos = s1;
|
|
34606
35233
|
s1 = peg$FAILED;
|
|
35234
|
+
if (peg$silentFails === 0) {
|
|
35235
|
+
peg$fail(peg$e13);
|
|
35236
|
+
}
|
|
34607
35237
|
}
|
|
34608
|
-
if (s1
|
|
34609
|
-
|
|
34610
|
-
if (input.substr(peg$currPos, 2) === peg$c10) {
|
|
35238
|
+
if (s1 !== peg$FAILED) {
|
|
35239
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
34611
35240
|
s2 = peg$c10;
|
|
34612
|
-
peg$currPos
|
|
35241
|
+
peg$currPos++;
|
|
34613
35242
|
} else {
|
|
34614
35243
|
s2 = peg$FAILED;
|
|
34615
35244
|
if (peg$silentFails === 0) {
|
|
@@ -34617,58 +35246,277 @@ function peg$parse2(input, options) {
|
|
|
34617
35246
|
}
|
|
34618
35247
|
}
|
|
34619
35248
|
if (s2 !== peg$FAILED) {
|
|
34620
|
-
s3 = peg$
|
|
34621
|
-
if (s3 === peg$FAILED) {
|
|
34622
|
-
s3 = peg$parseWEOL();
|
|
34623
|
-
}
|
|
35249
|
+
s3 = peg$parseQualifier();
|
|
34624
35250
|
if (s3 !== peg$FAILED) {
|
|
34625
|
-
|
|
34626
|
-
|
|
35251
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35252
|
+
s4 = peg$c10;
|
|
35253
|
+
peg$currPos++;
|
|
35254
|
+
} else {
|
|
35255
|
+
s4 = peg$FAILED;
|
|
35256
|
+
if (peg$silentFails === 0) {
|
|
35257
|
+
peg$fail(peg$e12);
|
|
35258
|
+
}
|
|
35259
|
+
}
|
|
35260
|
+
if (s4 !== peg$FAILED) {
|
|
35261
|
+
if (input.substr(peg$currPos, 2) === peg$c11) {
|
|
35262
|
+
s5 = peg$c11;
|
|
35263
|
+
peg$currPos += 2;
|
|
35264
|
+
} else {
|
|
35265
|
+
s5 = peg$FAILED;
|
|
35266
|
+
if (peg$silentFails === 0) {
|
|
35267
|
+
peg$fail(peg$e13);
|
|
35268
|
+
}
|
|
35269
|
+
}
|
|
35270
|
+
if (s5 !== peg$FAILED) {
|
|
35271
|
+
s6 = peg$parseWNL();
|
|
35272
|
+
if (s6 === peg$FAILED) {
|
|
35273
|
+
s6 = peg$parseWEOL();
|
|
35274
|
+
}
|
|
35275
|
+
if (s6 !== peg$FAILED) {
|
|
35276
|
+
peg$savedPos = s0;
|
|
35277
|
+
s0 = peg$f26(s3);
|
|
35278
|
+
} else {
|
|
35279
|
+
peg$currPos = s0;
|
|
35280
|
+
s0 = peg$FAILED;
|
|
35281
|
+
}
|
|
35282
|
+
} else {
|
|
35283
|
+
peg$currPos = s0;
|
|
35284
|
+
s0 = peg$FAILED;
|
|
35285
|
+
}
|
|
35286
|
+
} else {
|
|
35287
|
+
peg$currPos = s0;
|
|
35288
|
+
s0 = peg$FAILED;
|
|
35289
|
+
}
|
|
34627
35290
|
} else {
|
|
34628
|
-
peg$currPos =
|
|
34629
|
-
|
|
35291
|
+
peg$currPos = s0;
|
|
35292
|
+
s0 = peg$FAILED;
|
|
34630
35293
|
}
|
|
34631
35294
|
} else {
|
|
34632
|
-
peg$currPos =
|
|
35295
|
+
peg$currPos = s0;
|
|
35296
|
+
s0 = peg$FAILED;
|
|
35297
|
+
}
|
|
35298
|
+
} else {
|
|
35299
|
+
peg$currPos = s0;
|
|
35300
|
+
s0 = peg$FAILED;
|
|
35301
|
+
}
|
|
35302
|
+
if (s0 === peg$FAILED) {
|
|
35303
|
+
s0 = peg$currPos;
|
|
35304
|
+
if (input.substr(peg$currPos, 2) === peg$c11) {
|
|
35305
|
+
s1 = peg$c11;
|
|
35306
|
+
peg$currPos += 2;
|
|
35307
|
+
} else {
|
|
34633
35308
|
s1 = peg$FAILED;
|
|
35309
|
+
if (peg$silentFails === 0) {
|
|
35310
|
+
peg$fail(peg$e13);
|
|
35311
|
+
}
|
|
34634
35312
|
}
|
|
34635
|
-
if (s1
|
|
34636
|
-
|
|
34637
|
-
if (
|
|
34638
|
-
s2 = peg$
|
|
34639
|
-
peg$currPos += 2;
|
|
34640
|
-
} else {
|
|
34641
|
-
s2 = peg$FAILED;
|
|
34642
|
-
if (peg$silentFails === 0) {
|
|
34643
|
-
peg$fail(peg$e13);
|
|
34644
|
-
}
|
|
35313
|
+
if (s1 !== peg$FAILED) {
|
|
35314
|
+
s2 = peg$parseWNL();
|
|
35315
|
+
if (s2 === peg$FAILED) {
|
|
35316
|
+
s2 = peg$parseWEOL();
|
|
34645
35317
|
}
|
|
34646
35318
|
if (s2 !== peg$FAILED) {
|
|
34647
|
-
|
|
34648
|
-
|
|
34649
|
-
|
|
35319
|
+
peg$savedPos = s0;
|
|
35320
|
+
s0 = peg$f27();
|
|
35321
|
+
} else {
|
|
35322
|
+
peg$currPos = s0;
|
|
35323
|
+
s0 = peg$FAILED;
|
|
35324
|
+
}
|
|
35325
|
+
} else {
|
|
35326
|
+
peg$currPos = s0;
|
|
35327
|
+
s0 = peg$FAILED;
|
|
35328
|
+
}
|
|
35329
|
+
}
|
|
35330
|
+
return s0;
|
|
35331
|
+
}
|
|
35332
|
+
function peg$parseCardVariantDividerToken_V2() {
|
|
35333
|
+
let s0, s1, s2, s3, s4, s5, s6;
|
|
35334
|
+
s0 = peg$currPos;
|
|
35335
|
+
if (input.substr(peg$currPos, 2) === peg$c12) {
|
|
35336
|
+
s1 = peg$c12;
|
|
35337
|
+
peg$currPos += 2;
|
|
35338
|
+
} else {
|
|
35339
|
+
s1 = peg$FAILED;
|
|
35340
|
+
if (peg$silentFails === 0) {
|
|
35341
|
+
peg$fail(peg$e14);
|
|
35342
|
+
}
|
|
35343
|
+
}
|
|
35344
|
+
if (s1 !== peg$FAILED) {
|
|
35345
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35346
|
+
s2 = peg$c10;
|
|
35347
|
+
peg$currPos++;
|
|
35348
|
+
} else {
|
|
35349
|
+
s2 = peg$FAILED;
|
|
35350
|
+
if (peg$silentFails === 0) {
|
|
35351
|
+
peg$fail(peg$e12);
|
|
35352
|
+
}
|
|
35353
|
+
}
|
|
35354
|
+
if (s2 !== peg$FAILED) {
|
|
35355
|
+
s3 = peg$parseQualifier();
|
|
35356
|
+
if (s3 !== peg$FAILED) {
|
|
35357
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35358
|
+
s4 = peg$c10;
|
|
35359
|
+
peg$currPos++;
|
|
35360
|
+
} else {
|
|
35361
|
+
s4 = peg$FAILED;
|
|
35362
|
+
if (peg$silentFails === 0) {
|
|
35363
|
+
peg$fail(peg$e12);
|
|
35364
|
+
}
|
|
34650
35365
|
}
|
|
34651
|
-
if (
|
|
34652
|
-
|
|
34653
|
-
|
|
35366
|
+
if (s4 !== peg$FAILED) {
|
|
35367
|
+
if (input.substr(peg$currPos, 2) === peg$c12) {
|
|
35368
|
+
s5 = peg$c12;
|
|
35369
|
+
peg$currPos += 2;
|
|
35370
|
+
} else {
|
|
35371
|
+
s5 = peg$FAILED;
|
|
35372
|
+
if (peg$silentFails === 0) {
|
|
35373
|
+
peg$fail(peg$e14);
|
|
35374
|
+
}
|
|
35375
|
+
}
|
|
35376
|
+
if (s5 !== peg$FAILED) {
|
|
35377
|
+
s6 = peg$parseWNL();
|
|
35378
|
+
if (s6 === peg$FAILED) {
|
|
35379
|
+
s6 = peg$parseWEOL();
|
|
35380
|
+
}
|
|
35381
|
+
if (s6 !== peg$FAILED) {
|
|
35382
|
+
peg$savedPos = s0;
|
|
35383
|
+
s0 = peg$f28(s3);
|
|
35384
|
+
} else {
|
|
35385
|
+
peg$currPos = s0;
|
|
35386
|
+
s0 = peg$FAILED;
|
|
35387
|
+
}
|
|
35388
|
+
} else {
|
|
35389
|
+
peg$currPos = s0;
|
|
35390
|
+
s0 = peg$FAILED;
|
|
35391
|
+
}
|
|
34654
35392
|
} else {
|
|
34655
|
-
peg$currPos =
|
|
34656
|
-
|
|
35393
|
+
peg$currPos = s0;
|
|
35394
|
+
s0 = peg$FAILED;
|
|
34657
35395
|
}
|
|
34658
35396
|
} else {
|
|
34659
|
-
peg$currPos =
|
|
34660
|
-
|
|
35397
|
+
peg$currPos = s0;
|
|
35398
|
+
s0 = peg$FAILED;
|
|
34661
35399
|
}
|
|
34662
|
-
|
|
34663
|
-
|
|
35400
|
+
} else {
|
|
35401
|
+
peg$currPos = s0;
|
|
35402
|
+
s0 = peg$FAILED;
|
|
35403
|
+
}
|
|
35404
|
+
} else {
|
|
35405
|
+
peg$currPos = s0;
|
|
35406
|
+
s0 = peg$FAILED;
|
|
35407
|
+
}
|
|
35408
|
+
if (s0 === peg$FAILED) {
|
|
35409
|
+
s0 = peg$currPos;
|
|
35410
|
+
if (input.substr(peg$currPos, 2) === peg$c12) {
|
|
35411
|
+
s1 = peg$c12;
|
|
35412
|
+
peg$currPos += 2;
|
|
35413
|
+
} else {
|
|
35414
|
+
s1 = peg$FAILED;
|
|
35415
|
+
if (peg$silentFails === 0) {
|
|
35416
|
+
peg$fail(peg$e14);
|
|
34664
35417
|
}
|
|
34665
35418
|
}
|
|
35419
|
+
if (s1 !== peg$FAILED) {
|
|
35420
|
+
s2 = peg$parseWNL();
|
|
35421
|
+
if (s2 === peg$FAILED) {
|
|
35422
|
+
s2 = peg$parseWEOL();
|
|
35423
|
+
}
|
|
35424
|
+
if (s2 !== peg$FAILED) {
|
|
35425
|
+
peg$savedPos = s0;
|
|
35426
|
+
s0 = peg$f29();
|
|
35427
|
+
} else {
|
|
35428
|
+
peg$currPos = s0;
|
|
35429
|
+
s0 = peg$FAILED;
|
|
35430
|
+
}
|
|
35431
|
+
} else {
|
|
35432
|
+
peg$currPos = s0;
|
|
35433
|
+
s0 = peg$FAILED;
|
|
35434
|
+
}
|
|
35435
|
+
}
|
|
35436
|
+
return s0;
|
|
35437
|
+
}
|
|
35438
|
+
function peg$parseCardDividerLookahead_V2() {
|
|
35439
|
+
let s0, s1, s2, s3, s4, s5, s6;
|
|
35440
|
+
s0 = peg$currPos;
|
|
35441
|
+
if (input.substr(peg$currPos, 4) === peg$c6) {
|
|
35442
|
+
s1 = peg$c6;
|
|
35443
|
+
peg$currPos += 4;
|
|
35444
|
+
} else {
|
|
35445
|
+
s1 = peg$FAILED;
|
|
35446
|
+
if (peg$silentFails === 0) {
|
|
35447
|
+
peg$fail(peg$e8);
|
|
35448
|
+
}
|
|
34666
35449
|
}
|
|
34667
35450
|
if (s1 !== peg$FAILED) {
|
|
34668
|
-
|
|
34669
|
-
|
|
35451
|
+
s2 = peg$currPos;
|
|
35452
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35453
|
+
s3 = peg$c10;
|
|
35454
|
+
peg$currPos++;
|
|
35455
|
+
} else {
|
|
35456
|
+
s3 = peg$FAILED;
|
|
35457
|
+
if (peg$silentFails === 0) {
|
|
35458
|
+
peg$fail(peg$e12);
|
|
35459
|
+
}
|
|
35460
|
+
}
|
|
35461
|
+
if (s3 !== peg$FAILED) {
|
|
35462
|
+
s4 = peg$parseQualifier();
|
|
35463
|
+
if (s4 !== peg$FAILED) {
|
|
35464
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35465
|
+
s5 = peg$c10;
|
|
35466
|
+
peg$currPos++;
|
|
35467
|
+
} else {
|
|
35468
|
+
s5 = peg$FAILED;
|
|
35469
|
+
if (peg$silentFails === 0) {
|
|
35470
|
+
peg$fail(peg$e12);
|
|
35471
|
+
}
|
|
35472
|
+
}
|
|
35473
|
+
if (s5 !== peg$FAILED) {
|
|
35474
|
+
if (input.substr(peg$currPos, 4) === peg$c6) {
|
|
35475
|
+
s6 = peg$c6;
|
|
35476
|
+
peg$currPos += 4;
|
|
35477
|
+
} else {
|
|
35478
|
+
s6 = peg$FAILED;
|
|
35479
|
+
if (peg$silentFails === 0) {
|
|
35480
|
+
peg$fail(peg$e8);
|
|
35481
|
+
}
|
|
35482
|
+
}
|
|
35483
|
+
if (s6 !== peg$FAILED) {
|
|
35484
|
+
s3 = [s3, s4, s5, s6];
|
|
35485
|
+
s2 = s3;
|
|
35486
|
+
} else {
|
|
35487
|
+
peg$currPos = s2;
|
|
35488
|
+
s2 = peg$FAILED;
|
|
35489
|
+
}
|
|
35490
|
+
} else {
|
|
35491
|
+
peg$currPos = s2;
|
|
35492
|
+
s2 = peg$FAILED;
|
|
35493
|
+
}
|
|
35494
|
+
} else {
|
|
35495
|
+
peg$currPos = s2;
|
|
35496
|
+
s2 = peg$FAILED;
|
|
35497
|
+
}
|
|
35498
|
+
} else {
|
|
35499
|
+
peg$currPos = s2;
|
|
35500
|
+
s2 = peg$FAILED;
|
|
35501
|
+
}
|
|
35502
|
+
if (s2 === peg$FAILED) {
|
|
35503
|
+
s2 = null;
|
|
35504
|
+
}
|
|
35505
|
+
s3 = peg$parseWNL();
|
|
35506
|
+
if (s3 === peg$FAILED) {
|
|
35507
|
+
s3 = peg$parseWEOL();
|
|
35508
|
+
}
|
|
35509
|
+
if (s3 !== peg$FAILED) {
|
|
35510
|
+
s1 = [s1, s2, s3];
|
|
35511
|
+
s0 = s1;
|
|
35512
|
+
} else {
|
|
35513
|
+
peg$currPos = s0;
|
|
35514
|
+
s0 = peg$FAILED;
|
|
35515
|
+
}
|
|
35516
|
+
} else {
|
|
35517
|
+
peg$currPos = s0;
|
|
35518
|
+
s0 = peg$FAILED;
|
|
34670
35519
|
}
|
|
34671
|
-
s0 = s1;
|
|
34672
35520
|
return s0;
|
|
34673
35521
|
}
|
|
34674
35522
|
function peg$parseCardLine_V2() {
|
|
@@ -34743,7 +35591,7 @@ function peg$parse2(input, options) {
|
|
|
34743
35591
|
}
|
|
34744
35592
|
if (s2 !== peg$FAILED) {
|
|
34745
35593
|
peg$savedPos = s0;
|
|
34746
|
-
s0 = peg$
|
|
35594
|
+
s0 = peg$f30(s2);
|
|
34747
35595
|
} else {
|
|
34748
35596
|
peg$currPos = s0;
|
|
34749
35597
|
s0 = peg$FAILED;
|
|
@@ -34780,7 +35628,7 @@ function peg$parse2(input, options) {
|
|
|
34780
35628
|
}
|
|
34781
35629
|
if (s1 !== peg$FAILED) {
|
|
34782
35630
|
peg$savedPos = s0;
|
|
34783
|
-
s1 = peg$
|
|
35631
|
+
s1 = peg$f31(s1);
|
|
34784
35632
|
}
|
|
34785
35633
|
s0 = s1;
|
|
34786
35634
|
return s0;
|
|
@@ -34788,18 +35636,33 @@ function peg$parse2(input, options) {
|
|
|
34788
35636
|
function peg$parseCardSetStart_V1() {
|
|
34789
35637
|
let s0, s1, s2, s3, s4, s5;
|
|
34790
35638
|
s0 = peg$currPos;
|
|
34791
|
-
s1 =
|
|
35639
|
+
s1 = [];
|
|
35640
|
+
s2 = peg$parseWNL();
|
|
35641
|
+
if (s2 === peg$FAILED) {
|
|
35642
|
+
s2 = peg$parseNL();
|
|
35643
|
+
}
|
|
35644
|
+
if (s2 !== peg$FAILED) {
|
|
35645
|
+
while (s2 !== peg$FAILED) {
|
|
35646
|
+
s1.push(s2);
|
|
35647
|
+
s2 = peg$parseWNL();
|
|
35648
|
+
if (s2 === peg$FAILED) {
|
|
35649
|
+
s2 = peg$parseNL();
|
|
35650
|
+
}
|
|
35651
|
+
}
|
|
35652
|
+
} else {
|
|
35653
|
+
s1 = peg$FAILED;
|
|
35654
|
+
}
|
|
34792
35655
|
if (s1 !== peg$FAILED) {
|
|
34793
35656
|
s2 = peg$currPos;
|
|
34794
35657
|
peg$silentFails++;
|
|
34795
35658
|
s3 = peg$currPos;
|
|
34796
|
-
if (input.substr(peg$currPos, 3) === peg$
|
|
34797
|
-
s4 = peg$
|
|
35659
|
+
if (input.substr(peg$currPos, 3) === peg$c13) {
|
|
35660
|
+
s4 = peg$c13;
|
|
34798
35661
|
peg$currPos += 3;
|
|
34799
35662
|
} else {
|
|
34800
35663
|
s4 = peg$FAILED;
|
|
34801
35664
|
if (peg$silentFails === 0) {
|
|
34802
|
-
peg$fail(peg$
|
|
35665
|
+
peg$fail(peg$e15);
|
|
34803
35666
|
}
|
|
34804
35667
|
}
|
|
34805
35668
|
if (s4 !== peg$FAILED) {
|
|
@@ -34824,7 +35687,7 @@ function peg$parse2(input, options) {
|
|
|
34824
35687
|
}
|
|
34825
35688
|
if (s2 !== peg$FAILED) {
|
|
34826
35689
|
peg$savedPos = s0;
|
|
34827
|
-
s0 = peg$
|
|
35690
|
+
s0 = peg$f32();
|
|
34828
35691
|
} else {
|
|
34829
35692
|
peg$currPos = s0;
|
|
34830
35693
|
s0 = peg$FAILED;
|
|
@@ -34862,7 +35725,7 @@ function peg$parse2(input, options) {
|
|
|
34862
35725
|
}
|
|
34863
35726
|
if (s1 !== peg$FAILED) {
|
|
34864
35727
|
peg$savedPos = s0;
|
|
34865
|
-
s1 = peg$
|
|
35728
|
+
s1 = peg$f33();
|
|
34866
35729
|
}
|
|
34867
35730
|
s0 = s1;
|
|
34868
35731
|
return s0;
|
|
@@ -34873,7 +35736,7 @@ function peg$parse2(input, options) {
|
|
|
34873
35736
|
s1 = peg$parseCardLineOrDivider_V1();
|
|
34874
35737
|
if (s1 !== peg$FAILED) {
|
|
34875
35738
|
peg$savedPos = s0;
|
|
34876
|
-
s1 = peg$
|
|
35739
|
+
s1 = peg$f34(s1);
|
|
34877
35740
|
}
|
|
34878
35741
|
s0 = s1;
|
|
34879
35742
|
return s0;
|
|
@@ -34882,13 +35745,13 @@ function peg$parse2(input, options) {
|
|
|
34882
35745
|
let s0, s1, s2, s3;
|
|
34883
35746
|
s0 = peg$currPos;
|
|
34884
35747
|
s1 = peg$currPos;
|
|
34885
|
-
if (input.substr(peg$currPos, 3) === peg$
|
|
34886
|
-
s2 = peg$
|
|
35748
|
+
if (input.substr(peg$currPos, 3) === peg$c13) {
|
|
35749
|
+
s2 = peg$c13;
|
|
34887
35750
|
peg$currPos += 3;
|
|
34888
35751
|
} else {
|
|
34889
35752
|
s2 = peg$FAILED;
|
|
34890
35753
|
if (peg$silentFails === 0) {
|
|
34891
|
-
peg$fail(peg$
|
|
35754
|
+
peg$fail(peg$e15);
|
|
34892
35755
|
}
|
|
34893
35756
|
}
|
|
34894
35757
|
if (s2 !== peg$FAILED) {
|
|
@@ -34909,13 +35772,13 @@ function peg$parse2(input, options) {
|
|
|
34909
35772
|
}
|
|
34910
35773
|
if (s1 === peg$FAILED) {
|
|
34911
35774
|
s1 = peg$currPos;
|
|
34912
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
34913
|
-
s2 = peg$
|
|
35775
|
+
if (input.substr(peg$currPos, 2) === peg$c14) {
|
|
35776
|
+
s2 = peg$c14;
|
|
34914
35777
|
peg$currPos += 2;
|
|
34915
35778
|
} else {
|
|
34916
35779
|
s2 = peg$FAILED;
|
|
34917
35780
|
if (peg$silentFails === 0) {
|
|
34918
|
-
peg$fail(peg$
|
|
35781
|
+
peg$fail(peg$e16);
|
|
34919
35782
|
}
|
|
34920
35783
|
}
|
|
34921
35784
|
if (s2 !== peg$FAILED) {
|
|
@@ -34936,13 +35799,13 @@ function peg$parse2(input, options) {
|
|
|
34936
35799
|
}
|
|
34937
35800
|
if (s1 === peg$FAILED) {
|
|
34938
35801
|
s1 = peg$currPos;
|
|
34939
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
34940
|
-
s2 = peg$
|
|
35802
|
+
if (input.substr(peg$currPos, 2) === peg$c11) {
|
|
35803
|
+
s2 = peg$c11;
|
|
34941
35804
|
peg$currPos += 2;
|
|
34942
35805
|
} else {
|
|
34943
35806
|
s2 = peg$FAILED;
|
|
34944
35807
|
if (peg$silentFails === 0) {
|
|
34945
|
-
peg$fail(peg$
|
|
35808
|
+
peg$fail(peg$e13);
|
|
34946
35809
|
}
|
|
34947
35810
|
}
|
|
34948
35811
|
if (s2 !== peg$FAILED) {
|
|
@@ -34968,7 +35831,7 @@ function peg$parse2(input, options) {
|
|
|
34968
35831
|
}
|
|
34969
35832
|
if (s1 !== peg$FAILED) {
|
|
34970
35833
|
peg$savedPos = s0;
|
|
34971
|
-
s1 = peg$
|
|
35834
|
+
s1 = peg$f35(s1);
|
|
34972
35835
|
}
|
|
34973
35836
|
s0 = s1;
|
|
34974
35837
|
return s0;
|
|
@@ -35045,7 +35908,7 @@ function peg$parse2(input, options) {
|
|
|
35045
35908
|
}
|
|
35046
35909
|
if (s2 !== peg$FAILED) {
|
|
35047
35910
|
peg$savedPos = s0;
|
|
35048
|
-
s0 = peg$
|
|
35911
|
+
s0 = peg$f36(s2);
|
|
35049
35912
|
} else {
|
|
35050
35913
|
peg$currPos = s0;
|
|
35051
35914
|
s0 = peg$FAILED;
|
|
@@ -35056,6 +35919,102 @@ function peg$parse2(input, options) {
|
|
|
35056
35919
|
}
|
|
35057
35920
|
return s0;
|
|
35058
35921
|
}
|
|
35922
|
+
function peg$parseQualifier() {
|
|
35923
|
+
let s0, s1, s2;
|
|
35924
|
+
s0 = peg$currPos;
|
|
35925
|
+
s1 = peg$currPos;
|
|
35926
|
+
peg$silentFails++;
|
|
35927
|
+
if (input.substr(peg$currPos, 6) === peg$c9) {
|
|
35928
|
+
s2 = peg$c9;
|
|
35929
|
+
peg$currPos += 6;
|
|
35930
|
+
} else {
|
|
35931
|
+
s2 = peg$FAILED;
|
|
35932
|
+
if (peg$silentFails === 0) {
|
|
35933
|
+
peg$fail(peg$e11);
|
|
35934
|
+
}
|
|
35935
|
+
}
|
|
35936
|
+
if (s2 === peg$FAILED) {
|
|
35937
|
+
if (input.substr(peg$currPos, 4) === peg$c7) {
|
|
35938
|
+
s2 = peg$c7;
|
|
35939
|
+
peg$currPos += 4;
|
|
35940
|
+
} else {
|
|
35941
|
+
s2 = peg$FAILED;
|
|
35942
|
+
if (peg$silentFails === 0) {
|
|
35943
|
+
peg$fail(peg$e9);
|
|
35944
|
+
}
|
|
35945
|
+
}
|
|
35946
|
+
}
|
|
35947
|
+
peg$silentFails--;
|
|
35948
|
+
if (s2 === peg$FAILED) {
|
|
35949
|
+
s1 = void 0;
|
|
35950
|
+
} else {
|
|
35951
|
+
peg$currPos = s1;
|
|
35952
|
+
s1 = peg$FAILED;
|
|
35953
|
+
}
|
|
35954
|
+
if (s1 !== peg$FAILED) {
|
|
35955
|
+
s2 = peg$parseQualifierName();
|
|
35956
|
+
if (s2 !== peg$FAILED) {
|
|
35957
|
+
peg$savedPos = s0;
|
|
35958
|
+
s0 = peg$f37(s2);
|
|
35959
|
+
} else {
|
|
35960
|
+
peg$currPos = s0;
|
|
35961
|
+
s0 = peg$FAILED;
|
|
35962
|
+
}
|
|
35963
|
+
} else {
|
|
35964
|
+
peg$currPos = s0;
|
|
35965
|
+
s0 = peg$FAILED;
|
|
35966
|
+
}
|
|
35967
|
+
return s0;
|
|
35968
|
+
}
|
|
35969
|
+
function peg$parseQualifierName() {
|
|
35970
|
+
let s0, s1, s2, s3, s4;
|
|
35971
|
+
s0 = peg$currPos;
|
|
35972
|
+
s1 = peg$currPos;
|
|
35973
|
+
s2 = input.charAt(peg$currPos);
|
|
35974
|
+
if (peg$r1.test(s2)) {
|
|
35975
|
+
peg$currPos++;
|
|
35976
|
+
} else {
|
|
35977
|
+
s2 = peg$FAILED;
|
|
35978
|
+
if (peg$silentFails === 0) {
|
|
35979
|
+
peg$fail(peg$e17);
|
|
35980
|
+
}
|
|
35981
|
+
}
|
|
35982
|
+
if (s2 !== peg$FAILED) {
|
|
35983
|
+
s3 = [];
|
|
35984
|
+
s4 = input.charAt(peg$currPos);
|
|
35985
|
+
if (peg$r2.test(s4)) {
|
|
35986
|
+
peg$currPos++;
|
|
35987
|
+
} else {
|
|
35988
|
+
s4 = peg$FAILED;
|
|
35989
|
+
if (peg$silentFails === 0) {
|
|
35990
|
+
peg$fail(peg$e18);
|
|
35991
|
+
}
|
|
35992
|
+
}
|
|
35993
|
+
while (s4 !== peg$FAILED) {
|
|
35994
|
+
s3.push(s4);
|
|
35995
|
+
s4 = input.charAt(peg$currPos);
|
|
35996
|
+
if (peg$r2.test(s4)) {
|
|
35997
|
+
peg$currPos++;
|
|
35998
|
+
} else {
|
|
35999
|
+
s4 = peg$FAILED;
|
|
36000
|
+
if (peg$silentFails === 0) {
|
|
36001
|
+
peg$fail(peg$e18);
|
|
36002
|
+
}
|
|
36003
|
+
}
|
|
36004
|
+
}
|
|
36005
|
+
s2 = [s2, s3];
|
|
36006
|
+
s1 = s2;
|
|
36007
|
+
} else {
|
|
36008
|
+
peg$currPos = s1;
|
|
36009
|
+
s1 = peg$FAILED;
|
|
36010
|
+
}
|
|
36011
|
+
if (s1 !== peg$FAILED) {
|
|
36012
|
+
s0 = input.substring(s0, peg$currPos);
|
|
36013
|
+
} else {
|
|
36014
|
+
s0 = s1;
|
|
36015
|
+
}
|
|
36016
|
+
return s0;
|
|
36017
|
+
}
|
|
35059
36018
|
function peg$parsecardContent() {
|
|
35060
36019
|
let s0, s1, s2;
|
|
35061
36020
|
s0 = peg$currPos;
|
|
@@ -35072,7 +36031,7 @@ function peg$parse2(input, options) {
|
|
|
35072
36031
|
}
|
|
35073
36032
|
}
|
|
35074
36033
|
peg$savedPos = s0;
|
|
35075
|
-
s1 = peg$
|
|
36034
|
+
s1 = peg$f38(s1);
|
|
35076
36035
|
s0 = s1;
|
|
35077
36036
|
return s0;
|
|
35078
36037
|
}
|
|
@@ -35090,7 +36049,7 @@ function peg$parse2(input, options) {
|
|
|
35090
36049
|
}
|
|
35091
36050
|
if (s1 !== peg$FAILED) {
|
|
35092
36051
|
peg$savedPos = s0;
|
|
35093
|
-
s1 = peg$
|
|
36052
|
+
s1 = peg$f39(s1);
|
|
35094
36053
|
}
|
|
35095
36054
|
s0 = s1;
|
|
35096
36055
|
return s0;
|
|
@@ -35098,13 +36057,13 @@ function peg$parse2(input, options) {
|
|
|
35098
36057
|
function peg$parseIDTag() {
|
|
35099
36058
|
let s0, s1, s2, s3;
|
|
35100
36059
|
s0 = peg$currPos;
|
|
35101
|
-
if (input.substr(peg$currPos, 4) === peg$
|
|
35102
|
-
s1 = peg$
|
|
36060
|
+
if (input.substr(peg$currPos, 4) === peg$c15) {
|
|
36061
|
+
s1 = peg$c15;
|
|
35103
36062
|
peg$currPos += 4;
|
|
35104
36063
|
} else {
|
|
35105
36064
|
s1 = peg$FAILED;
|
|
35106
36065
|
if (peg$silentFails === 0) {
|
|
35107
|
-
peg$fail(peg$
|
|
36066
|
+
peg$fail(peg$e19);
|
|
35108
36067
|
}
|
|
35109
36068
|
}
|
|
35110
36069
|
if (s1 !== peg$FAILED) {
|
|
@@ -35113,7 +36072,7 @@ function peg$parse2(input, options) {
|
|
|
35113
36072
|
s3 = peg$parseTag_Close();
|
|
35114
36073
|
if (s3 !== peg$FAILED) {
|
|
35115
36074
|
peg$savedPos = s0;
|
|
35116
|
-
s0 = peg$
|
|
36075
|
+
s0 = peg$f40(s2);
|
|
35117
36076
|
} else {
|
|
35118
36077
|
peg$currPos = s0;
|
|
35119
36078
|
s0 = peg$FAILED;
|
|
@@ -35143,24 +36102,24 @@ function peg$parse2(input, options) {
|
|
|
35143
36102
|
if (s1 !== peg$FAILED) {
|
|
35144
36103
|
s2 = [];
|
|
35145
36104
|
if (input.charCodeAt(peg$currPos) === 35) {
|
|
35146
|
-
s3 = peg$
|
|
36105
|
+
s3 = peg$c16;
|
|
35147
36106
|
peg$currPos++;
|
|
35148
36107
|
} else {
|
|
35149
36108
|
s3 = peg$FAILED;
|
|
35150
36109
|
if (peg$silentFails === 0) {
|
|
35151
|
-
peg$fail(peg$
|
|
36110
|
+
peg$fail(peg$e20);
|
|
35152
36111
|
}
|
|
35153
36112
|
}
|
|
35154
36113
|
if (s3 !== peg$FAILED) {
|
|
35155
36114
|
while (s3 !== peg$FAILED) {
|
|
35156
36115
|
s2.push(s3);
|
|
35157
36116
|
if (input.charCodeAt(peg$currPos) === 35) {
|
|
35158
|
-
s3 = peg$
|
|
36117
|
+
s3 = peg$c16;
|
|
35159
36118
|
peg$currPos++;
|
|
35160
36119
|
} else {
|
|
35161
36120
|
s3 = peg$FAILED;
|
|
35162
36121
|
if (peg$silentFails === 0) {
|
|
35163
|
-
peg$fail(peg$
|
|
36122
|
+
peg$fail(peg$e20);
|
|
35164
36123
|
}
|
|
35165
36124
|
}
|
|
35166
36125
|
}
|
|
@@ -35172,7 +36131,7 @@ function peg$parse2(input, options) {
|
|
|
35172
36131
|
s4 = peg$parseTag_CloseOrEOF();
|
|
35173
36132
|
if (s4 !== peg$FAILED) {
|
|
35174
36133
|
peg$savedPos = s0;
|
|
35175
|
-
s0 = peg$
|
|
36134
|
+
s0 = peg$f41(s2, s3);
|
|
35176
36135
|
} else {
|
|
35177
36136
|
peg$currPos = s0;
|
|
35178
36137
|
s0 = peg$FAILED;
|
|
@@ -35190,13 +36149,13 @@ function peg$parse2(input, options) {
|
|
|
35190
36149
|
function peg$parseAnchorTag() {
|
|
35191
36150
|
let s0, s1, s2, s3;
|
|
35192
36151
|
s0 = peg$currPos;
|
|
35193
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35194
|
-
s1 = peg$
|
|
36152
|
+
if (input.substr(peg$currPos, 2) === peg$c17) {
|
|
36153
|
+
s1 = peg$c17;
|
|
35195
36154
|
peg$currPos += 2;
|
|
35196
36155
|
} else {
|
|
35197
36156
|
s1 = peg$FAILED;
|
|
35198
36157
|
if (peg$silentFails === 0) {
|
|
35199
|
-
peg$fail(peg$
|
|
36158
|
+
peg$fail(peg$e21);
|
|
35200
36159
|
}
|
|
35201
36160
|
}
|
|
35202
36161
|
if (s1 !== peg$FAILED) {
|
|
@@ -35204,7 +36163,7 @@ function peg$parse2(input, options) {
|
|
|
35204
36163
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35205
36164
|
if (s3 !== peg$FAILED) {
|
|
35206
36165
|
peg$savedPos = s0;
|
|
35207
|
-
s0 = peg$
|
|
36166
|
+
s0 = peg$f42(s2);
|
|
35208
36167
|
} else {
|
|
35209
36168
|
peg$currPos = s0;
|
|
35210
36169
|
s0 = peg$FAILED;
|
|
@@ -35218,13 +36177,13 @@ function peg$parse2(input, options) {
|
|
|
35218
36177
|
function peg$parseReferenceTag() {
|
|
35219
36178
|
let s0, s1, s2, s3;
|
|
35220
36179
|
s0 = peg$currPos;
|
|
35221
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35222
|
-
s1 = peg$
|
|
36180
|
+
if (input.substr(peg$currPos, 2) === peg$c18) {
|
|
36181
|
+
s1 = peg$c18;
|
|
35223
36182
|
peg$currPos += 2;
|
|
35224
36183
|
} else {
|
|
35225
36184
|
s1 = peg$FAILED;
|
|
35226
36185
|
if (peg$silentFails === 0) {
|
|
35227
|
-
peg$fail(peg$
|
|
36186
|
+
peg$fail(peg$e22);
|
|
35228
36187
|
}
|
|
35229
36188
|
}
|
|
35230
36189
|
if (s1 !== peg$FAILED) {
|
|
@@ -35232,7 +36191,7 @@ function peg$parse2(input, options) {
|
|
|
35232
36191
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35233
36192
|
if (s3 !== peg$FAILED) {
|
|
35234
36193
|
peg$savedPos = s0;
|
|
35235
|
-
s0 = peg$
|
|
36194
|
+
s0 = peg$f43(s2);
|
|
35236
36195
|
} else {
|
|
35237
36196
|
peg$currPos = s0;
|
|
35238
36197
|
s0 = peg$FAILED;
|
|
@@ -35246,13 +36205,13 @@ function peg$parse2(input, options) {
|
|
|
35246
36205
|
function peg$parsePropertyTag() {
|
|
35247
36206
|
let s0, s1, s2, s3, s4;
|
|
35248
36207
|
s0 = peg$currPos;
|
|
35249
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35250
|
-
s1 = peg$
|
|
36208
|
+
if (input.substr(peg$currPos, 2) === peg$c19) {
|
|
36209
|
+
s1 = peg$c19;
|
|
35251
36210
|
peg$currPos += 2;
|
|
35252
36211
|
} else {
|
|
35253
36212
|
s1 = peg$FAILED;
|
|
35254
36213
|
if (peg$silentFails === 0) {
|
|
35255
|
-
peg$fail(peg$
|
|
36214
|
+
peg$fail(peg$e23);
|
|
35256
36215
|
}
|
|
35257
36216
|
}
|
|
35258
36217
|
if (s1 !== peg$FAILED) {
|
|
@@ -35263,7 +36222,7 @@ function peg$parse2(input, options) {
|
|
|
35263
36222
|
s4 = peg$parseTag_CloseOrEOF();
|
|
35264
36223
|
if (s4 !== peg$FAILED) {
|
|
35265
36224
|
peg$savedPos = s0;
|
|
35266
|
-
s0 = peg$
|
|
36225
|
+
s0 = peg$f44(s2, s3);
|
|
35267
36226
|
} else {
|
|
35268
36227
|
peg$currPos = s0;
|
|
35269
36228
|
s0 = peg$FAILED;
|
|
@@ -35285,13 +36244,13 @@ function peg$parse2(input, options) {
|
|
|
35285
36244
|
function peg$parseItemLeadTag() {
|
|
35286
36245
|
let s0, s1, s2, s3;
|
|
35287
36246
|
s0 = peg$currPos;
|
|
35288
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35289
|
-
s1 = peg$
|
|
36247
|
+
if (input.substr(peg$currPos, 2) === peg$c20) {
|
|
36248
|
+
s1 = peg$c20;
|
|
35290
36249
|
peg$currPos += 2;
|
|
35291
36250
|
} else {
|
|
35292
36251
|
s1 = peg$FAILED;
|
|
35293
36252
|
if (peg$silentFails === 0) {
|
|
35294
|
-
peg$fail(peg$
|
|
36253
|
+
peg$fail(peg$e24);
|
|
35295
36254
|
}
|
|
35296
36255
|
}
|
|
35297
36256
|
if (s1 !== peg$FAILED) {
|
|
@@ -35299,7 +36258,7 @@ function peg$parse2(input, options) {
|
|
|
35299
36258
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35300
36259
|
if (s3 !== peg$FAILED) {
|
|
35301
36260
|
peg$savedPos = s0;
|
|
35302
|
-
s0 = peg$
|
|
36261
|
+
s0 = peg$f45(s2);
|
|
35303
36262
|
} else {
|
|
35304
36263
|
peg$currPos = s0;
|
|
35305
36264
|
s0 = peg$FAILED;
|
|
@@ -35313,13 +36272,13 @@ function peg$parse2(input, options) {
|
|
|
35313
36272
|
function peg$parseInstructionTag() {
|
|
35314
36273
|
let s0, s1, s2, s3;
|
|
35315
36274
|
s0 = peg$currPos;
|
|
35316
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35317
|
-
s1 = peg$
|
|
36275
|
+
if (input.substr(peg$currPos, 2) === peg$c21) {
|
|
36276
|
+
s1 = peg$c21;
|
|
35318
36277
|
peg$currPos += 2;
|
|
35319
36278
|
} else {
|
|
35320
36279
|
s1 = peg$FAILED;
|
|
35321
36280
|
if (peg$silentFails === 0) {
|
|
35322
|
-
peg$fail(peg$
|
|
36281
|
+
peg$fail(peg$e25);
|
|
35323
36282
|
}
|
|
35324
36283
|
}
|
|
35325
36284
|
if (s1 !== peg$FAILED) {
|
|
@@ -35327,7 +36286,7 @@ function peg$parse2(input, options) {
|
|
|
35327
36286
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35328
36287
|
if (s3 !== peg$FAILED) {
|
|
35329
36288
|
peg$savedPos = s0;
|
|
35330
|
-
s0 = peg$
|
|
36289
|
+
s0 = peg$f46(s2);
|
|
35331
36290
|
} else {
|
|
35332
36291
|
peg$currPos = s0;
|
|
35333
36292
|
s0 = peg$FAILED;
|
|
@@ -35341,13 +36300,13 @@ function peg$parse2(input, options) {
|
|
|
35341
36300
|
function peg$parseHintTag() {
|
|
35342
36301
|
let s0, s1, s2, s3;
|
|
35343
36302
|
s0 = peg$currPos;
|
|
35344
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35345
|
-
s1 = peg$
|
|
36303
|
+
if (input.substr(peg$currPos, 2) === peg$c22) {
|
|
36304
|
+
s1 = peg$c22;
|
|
35346
36305
|
peg$currPos += 2;
|
|
35347
36306
|
} else {
|
|
35348
36307
|
s1 = peg$FAILED;
|
|
35349
36308
|
if (peg$silentFails === 0) {
|
|
35350
|
-
peg$fail(peg$
|
|
36309
|
+
peg$fail(peg$e26);
|
|
35351
36310
|
}
|
|
35352
36311
|
}
|
|
35353
36312
|
if (s1 !== peg$FAILED) {
|
|
@@ -35355,7 +36314,7 @@ function peg$parse2(input, options) {
|
|
|
35355
36314
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35356
36315
|
if (s3 !== peg$FAILED) {
|
|
35357
36316
|
peg$savedPos = s0;
|
|
35358
|
-
s0 = peg$
|
|
36317
|
+
s0 = peg$f47(s2);
|
|
35359
36318
|
} else {
|
|
35360
36319
|
peg$currPos = s0;
|
|
35361
36320
|
s0 = peg$FAILED;
|
|
@@ -35369,13 +36328,13 @@ function peg$parse2(input, options) {
|
|
|
35369
36328
|
function peg$parseTrueTag() {
|
|
35370
36329
|
let s0, s1, s2, s3;
|
|
35371
36330
|
s0 = peg$currPos;
|
|
35372
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35373
|
-
s1 = peg$
|
|
36331
|
+
if (input.substr(peg$currPos, 2) === peg$c23) {
|
|
36332
|
+
s1 = peg$c23;
|
|
35374
36333
|
peg$currPos += 2;
|
|
35375
36334
|
} else {
|
|
35376
36335
|
s1 = peg$FAILED;
|
|
35377
36336
|
if (peg$silentFails === 0) {
|
|
35378
|
-
peg$fail(peg$
|
|
36337
|
+
peg$fail(peg$e27);
|
|
35379
36338
|
}
|
|
35380
36339
|
}
|
|
35381
36340
|
if (s1 !== peg$FAILED) {
|
|
@@ -35383,7 +36342,7 @@ function peg$parse2(input, options) {
|
|
|
35383
36342
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35384
36343
|
if (s3 !== peg$FAILED) {
|
|
35385
36344
|
peg$savedPos = s0;
|
|
35386
|
-
s0 = peg$
|
|
36345
|
+
s0 = peg$f48(s2);
|
|
35387
36346
|
} else {
|
|
35388
36347
|
peg$currPos = s0;
|
|
35389
36348
|
s0 = peg$FAILED;
|
|
@@ -35397,13 +36356,13 @@ function peg$parse2(input, options) {
|
|
|
35397
36356
|
function peg$parseFalseTag() {
|
|
35398
36357
|
let s0, s1, s2, s3;
|
|
35399
36358
|
s0 = peg$currPos;
|
|
35400
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35401
|
-
s1 = peg$
|
|
36359
|
+
if (input.substr(peg$currPos, 2) === peg$c24) {
|
|
36360
|
+
s1 = peg$c24;
|
|
35402
36361
|
peg$currPos += 2;
|
|
35403
36362
|
} else {
|
|
35404
36363
|
s1 = peg$FAILED;
|
|
35405
36364
|
if (peg$silentFails === 0) {
|
|
35406
|
-
peg$fail(peg$
|
|
36365
|
+
peg$fail(peg$e28);
|
|
35407
36366
|
}
|
|
35408
36367
|
}
|
|
35409
36368
|
if (s1 !== peg$FAILED) {
|
|
@@ -35411,7 +36370,7 @@ function peg$parse2(input, options) {
|
|
|
35411
36370
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35412
36371
|
if (s3 !== peg$FAILED) {
|
|
35413
36372
|
peg$savedPos = s0;
|
|
35414
|
-
s0 = peg$
|
|
36373
|
+
s0 = peg$f49(s2);
|
|
35415
36374
|
} else {
|
|
35416
36375
|
peg$currPos = s0;
|
|
35417
36376
|
s0 = peg$FAILED;
|
|
@@ -35425,13 +36384,13 @@ function peg$parse2(input, options) {
|
|
|
35425
36384
|
function peg$parseSampleSolutionTag() {
|
|
35426
36385
|
let s0, s1, s2, s3;
|
|
35427
36386
|
s0 = peg$currPos;
|
|
35428
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35429
|
-
s1 = peg$
|
|
36387
|
+
if (input.substr(peg$currPos, 2) === peg$c25) {
|
|
36388
|
+
s1 = peg$c25;
|
|
35430
36389
|
peg$currPos += 2;
|
|
35431
36390
|
} else {
|
|
35432
36391
|
s1 = peg$FAILED;
|
|
35433
36392
|
if (peg$silentFails === 0) {
|
|
35434
|
-
peg$fail(peg$
|
|
36393
|
+
peg$fail(peg$e29);
|
|
35435
36394
|
}
|
|
35436
36395
|
}
|
|
35437
36396
|
if (s1 !== peg$FAILED) {
|
|
@@ -35439,7 +36398,7 @@ function peg$parse2(input, options) {
|
|
|
35439
36398
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35440
36399
|
if (s3 !== peg$FAILED) {
|
|
35441
36400
|
peg$savedPos = s0;
|
|
35442
|
-
s0 = peg$
|
|
36401
|
+
s0 = peg$f50(s2);
|
|
35443
36402
|
} else {
|
|
35444
36403
|
peg$currPos = s0;
|
|
35445
36404
|
s0 = peg$FAILED;
|
|
@@ -35453,13 +36412,13 @@ function peg$parse2(input, options) {
|
|
|
35453
36412
|
function peg$parseGapTag() {
|
|
35454
36413
|
let s0, s1, s2, s3;
|
|
35455
36414
|
s0 = peg$currPos;
|
|
35456
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35457
|
-
s1 = peg$
|
|
36415
|
+
if (input.substr(peg$currPos, 2) === peg$c26) {
|
|
36416
|
+
s1 = peg$c26;
|
|
35458
36417
|
peg$currPos += 2;
|
|
35459
36418
|
} else {
|
|
35460
36419
|
s1 = peg$FAILED;
|
|
35461
36420
|
if (peg$silentFails === 0) {
|
|
35462
|
-
peg$fail(peg$
|
|
36421
|
+
peg$fail(peg$e30);
|
|
35463
36422
|
}
|
|
35464
36423
|
}
|
|
35465
36424
|
if (s1 !== peg$FAILED) {
|
|
@@ -35467,7 +36426,7 @@ function peg$parse2(input, options) {
|
|
|
35467
36426
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35468
36427
|
if (s3 !== peg$FAILED) {
|
|
35469
36428
|
peg$savedPos = s0;
|
|
35470
|
-
s0 = peg$
|
|
36429
|
+
s0 = peg$f51(s2);
|
|
35471
36430
|
} else {
|
|
35472
36431
|
peg$currPos = s0;
|
|
35473
36432
|
s0 = peg$FAILED;
|
|
@@ -35481,13 +36440,13 @@ function peg$parse2(input, options) {
|
|
|
35481
36440
|
function peg$parseMarkTag() {
|
|
35482
36441
|
let s0, s1, s2, s3;
|
|
35483
36442
|
s0 = peg$currPos;
|
|
35484
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35485
|
-
s1 = peg$
|
|
36443
|
+
if (input.substr(peg$currPos, 2) === peg$c27) {
|
|
36444
|
+
s1 = peg$c27;
|
|
35486
36445
|
peg$currPos += 2;
|
|
35487
36446
|
} else {
|
|
35488
36447
|
s1 = peg$FAILED;
|
|
35489
36448
|
if (peg$silentFails === 0) {
|
|
35490
|
-
peg$fail(peg$
|
|
36449
|
+
peg$fail(peg$e31);
|
|
35491
36450
|
}
|
|
35492
36451
|
}
|
|
35493
36452
|
if (s1 !== peg$FAILED) {
|
|
@@ -35495,7 +36454,7 @@ function peg$parse2(input, options) {
|
|
|
35495
36454
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35496
36455
|
if (s3 !== peg$FAILED) {
|
|
35497
36456
|
peg$savedPos = s0;
|
|
35498
|
-
s0 = peg$
|
|
36457
|
+
s0 = peg$f52(s2);
|
|
35499
36458
|
} else {
|
|
35500
36459
|
peg$currPos = s0;
|
|
35501
36460
|
s0 = peg$FAILED;
|
|
@@ -35509,13 +36468,13 @@ function peg$parse2(input, options) {
|
|
|
35509
36468
|
function peg$parseResourceTag() {
|
|
35510
36469
|
let s0, s1, s2, s3, s4;
|
|
35511
36470
|
s0 = peg$currPos;
|
|
35512
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35513
|
-
s1 = peg$
|
|
36471
|
+
if (input.substr(peg$currPos, 2) === peg$c28) {
|
|
36472
|
+
s1 = peg$c28;
|
|
35514
36473
|
peg$currPos += 2;
|
|
35515
36474
|
} else {
|
|
35516
36475
|
s1 = peg$FAILED;
|
|
35517
36476
|
if (peg$silentFails === 0) {
|
|
35518
|
-
peg$fail(peg$
|
|
36477
|
+
peg$fail(peg$e32);
|
|
35519
36478
|
}
|
|
35520
36479
|
}
|
|
35521
36480
|
if (s1 !== peg$FAILED) {
|
|
@@ -35526,7 +36485,7 @@ function peg$parse2(input, options) {
|
|
|
35526
36485
|
s4 = peg$parseTag_CloseOrEOF();
|
|
35527
36486
|
if (s4 !== peg$FAILED) {
|
|
35528
36487
|
peg$savedPos = s0;
|
|
35529
|
-
s0 = peg$
|
|
36488
|
+
s0 = peg$f53(s2, s3);
|
|
35530
36489
|
} else {
|
|
35531
36490
|
peg$currPos = s0;
|
|
35532
36491
|
s0 = peg$FAILED;
|
|
@@ -35550,13 +36509,13 @@ function peg$parse2(input, options) {
|
|
|
35550
36509
|
s0 = peg$currPos;
|
|
35551
36510
|
s1 = peg$currPos;
|
|
35552
36511
|
s2 = [];
|
|
35553
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35554
|
-
s3 = peg$
|
|
36512
|
+
if (input.substr(peg$currPos, 2) === peg$c29) {
|
|
36513
|
+
s3 = peg$c29;
|
|
35555
36514
|
peg$currPos += 2;
|
|
35556
36515
|
} else {
|
|
35557
36516
|
s3 = peg$FAILED;
|
|
35558
36517
|
if (peg$silentFails === 0) {
|
|
35559
|
-
peg$fail(peg$
|
|
36518
|
+
peg$fail(peg$e33);
|
|
35560
36519
|
}
|
|
35561
36520
|
}
|
|
35562
36521
|
if (s3 === peg$FAILED) {
|
|
@@ -35572,13 +36531,13 @@ function peg$parse2(input, options) {
|
|
|
35572
36531
|
}
|
|
35573
36532
|
while (s3 !== peg$FAILED) {
|
|
35574
36533
|
s2.push(s3);
|
|
35575
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35576
|
-
s3 = peg$
|
|
36534
|
+
if (input.substr(peg$currPos, 2) === peg$c29) {
|
|
36535
|
+
s3 = peg$c29;
|
|
35577
36536
|
peg$currPos += 2;
|
|
35578
36537
|
} else {
|
|
35579
36538
|
s3 = peg$FAILED;
|
|
35580
36539
|
if (peg$silentFails === 0) {
|
|
35581
|
-
peg$fail(peg$
|
|
36540
|
+
peg$fail(peg$e33);
|
|
35582
36541
|
}
|
|
35583
36542
|
}
|
|
35584
36543
|
if (s3 === peg$FAILED) {
|
|
@@ -35595,7 +36554,7 @@ function peg$parse2(input, options) {
|
|
|
35595
36554
|
}
|
|
35596
36555
|
s1 = input.substring(s1, peg$currPos);
|
|
35597
36556
|
peg$savedPos = s0;
|
|
35598
|
-
s1 = peg$
|
|
36557
|
+
s1 = peg$f54(s1);
|
|
35599
36558
|
s0 = s1;
|
|
35600
36559
|
return s0;
|
|
35601
36560
|
}
|
|
@@ -35604,13 +36563,13 @@ function peg$parse2(input, options) {
|
|
|
35604
36563
|
s0 = peg$currPos;
|
|
35605
36564
|
s1 = peg$currPos;
|
|
35606
36565
|
peg$silentFails++;
|
|
35607
|
-
if (input.substr(peg$currPos, 3) === peg$
|
|
35608
|
-
s2 = peg$
|
|
36566
|
+
if (input.substr(peg$currPos, 3) === peg$c30) {
|
|
36567
|
+
s2 = peg$c30;
|
|
35609
36568
|
peg$currPos += 3;
|
|
35610
36569
|
} else {
|
|
35611
36570
|
s2 = peg$FAILED;
|
|
35612
36571
|
if (peg$silentFails === 0) {
|
|
35613
|
-
peg$fail(peg$
|
|
36572
|
+
peg$fail(peg$e34);
|
|
35614
36573
|
}
|
|
35615
36574
|
}
|
|
35616
36575
|
peg$silentFails--;
|
|
@@ -35624,29 +36583,29 @@ function peg$parse2(input, options) {
|
|
|
35624
36583
|
s2 = peg$currPos;
|
|
35625
36584
|
s3 = [];
|
|
35626
36585
|
s4 = input.charAt(peg$currPos);
|
|
35627
|
-
if (peg$
|
|
36586
|
+
if (peg$r3.test(s4)) {
|
|
35628
36587
|
peg$currPos++;
|
|
35629
36588
|
} else {
|
|
35630
36589
|
s4 = peg$FAILED;
|
|
35631
36590
|
if (peg$silentFails === 0) {
|
|
35632
|
-
peg$fail(peg$
|
|
36591
|
+
peg$fail(peg$e35);
|
|
35633
36592
|
}
|
|
35634
36593
|
}
|
|
35635
36594
|
while (s4 !== peg$FAILED) {
|
|
35636
36595
|
s3.push(s4);
|
|
35637
36596
|
s4 = input.charAt(peg$currPos);
|
|
35638
|
-
if (peg$
|
|
36597
|
+
if (peg$r3.test(s4)) {
|
|
35639
36598
|
peg$currPos++;
|
|
35640
36599
|
} else {
|
|
35641
36600
|
s4 = peg$FAILED;
|
|
35642
36601
|
if (peg$silentFails === 0) {
|
|
35643
|
-
peg$fail(peg$
|
|
36602
|
+
peg$fail(peg$e35);
|
|
35644
36603
|
}
|
|
35645
36604
|
}
|
|
35646
36605
|
}
|
|
35647
36606
|
s2 = input.substring(s2, peg$currPos);
|
|
35648
36607
|
peg$savedPos = s0;
|
|
35649
|
-
s0 = peg$
|
|
36608
|
+
s0 = peg$f55(s2);
|
|
35650
36609
|
} else {
|
|
35651
36610
|
peg$currPos = s0;
|
|
35652
36611
|
s0 = peg$FAILED;
|
|
@@ -35701,24 +36660,24 @@ function peg$parse2(input, options) {
|
|
|
35701
36660
|
s0 = peg$currPos;
|
|
35702
36661
|
s1 = [];
|
|
35703
36662
|
if (input.charCodeAt(peg$currPos) === 46) {
|
|
35704
|
-
s2 = peg$
|
|
36663
|
+
s2 = peg$c31;
|
|
35705
36664
|
peg$currPos++;
|
|
35706
36665
|
} else {
|
|
35707
36666
|
s2 = peg$FAILED;
|
|
35708
36667
|
if (peg$silentFails === 0) {
|
|
35709
|
-
peg$fail(peg$
|
|
36668
|
+
peg$fail(peg$e36);
|
|
35710
36669
|
}
|
|
35711
36670
|
}
|
|
35712
36671
|
if (s2 !== peg$FAILED) {
|
|
35713
36672
|
while (s2 !== peg$FAILED) {
|
|
35714
36673
|
s1.push(s2);
|
|
35715
36674
|
if (input.charCodeAt(peg$currPos) === 46) {
|
|
35716
|
-
s2 = peg$
|
|
36675
|
+
s2 = peg$c31;
|
|
35717
36676
|
peg$currPos++;
|
|
35718
36677
|
} else {
|
|
35719
36678
|
s2 = peg$FAILED;
|
|
35720
36679
|
if (peg$silentFails === 0) {
|
|
35721
|
-
peg$fail(peg$
|
|
36680
|
+
peg$fail(peg$e36);
|
|
35722
36681
|
}
|
|
35723
36682
|
}
|
|
35724
36683
|
}
|
|
@@ -35727,7 +36686,7 @@ function peg$parse2(input, options) {
|
|
|
35727
36686
|
}
|
|
35728
36687
|
if (s1 !== peg$FAILED) {
|
|
35729
36688
|
peg$savedPos = s0;
|
|
35730
|
-
s1 = peg$
|
|
36689
|
+
s1 = peg$f56(s1);
|
|
35731
36690
|
}
|
|
35732
36691
|
s0 = s1;
|
|
35733
36692
|
return s0;
|
|
@@ -35738,29 +36697,29 @@ function peg$parse2(input, options) {
|
|
|
35738
36697
|
s1 = peg$currPos;
|
|
35739
36698
|
s2 = [];
|
|
35740
36699
|
s3 = input.charAt(peg$currPos);
|
|
35741
|
-
if (peg$
|
|
36700
|
+
if (peg$r4.test(s3)) {
|
|
35742
36701
|
peg$currPos++;
|
|
35743
36702
|
} else {
|
|
35744
36703
|
s3 = peg$FAILED;
|
|
35745
36704
|
if (peg$silentFails === 0) {
|
|
35746
|
-
peg$fail(peg$
|
|
36705
|
+
peg$fail(peg$e37);
|
|
35747
36706
|
}
|
|
35748
36707
|
}
|
|
35749
36708
|
while (s3 !== peg$FAILED) {
|
|
35750
36709
|
s2.push(s3);
|
|
35751
36710
|
s3 = input.charAt(peg$currPos);
|
|
35752
|
-
if (peg$
|
|
36711
|
+
if (peg$r4.test(s3)) {
|
|
35753
36712
|
peg$currPos++;
|
|
35754
36713
|
} else {
|
|
35755
36714
|
s3 = peg$FAILED;
|
|
35756
36715
|
if (peg$silentFails === 0) {
|
|
35757
|
-
peg$fail(peg$
|
|
36716
|
+
peg$fail(peg$e37);
|
|
35758
36717
|
}
|
|
35759
36718
|
}
|
|
35760
36719
|
}
|
|
35761
36720
|
s1 = input.substring(s1, peg$currPos);
|
|
35762
36721
|
peg$savedPos = s0;
|
|
35763
|
-
s1 = peg$
|
|
36722
|
+
s1 = peg$f57(s1);
|
|
35764
36723
|
s0 = s1;
|
|
35765
36724
|
return s0;
|
|
35766
36725
|
}
|
|
@@ -35779,7 +36738,7 @@ function peg$parse2(input, options) {
|
|
|
35779
36738
|
if (s1 !== peg$FAILED) {
|
|
35780
36739
|
s2 = peg$parseTag_Value();
|
|
35781
36740
|
peg$savedPos = s0;
|
|
35782
|
-
s0 = peg$
|
|
36741
|
+
s0 = peg$f58(s2);
|
|
35783
36742
|
} else {
|
|
35784
36743
|
peg$currPos = s0;
|
|
35785
36744
|
s0 = peg$FAILED;
|
|
@@ -35788,7 +36747,7 @@ function peg$parse2(input, options) {
|
|
|
35788
36747
|
s0 = peg$currPos;
|
|
35789
36748
|
s1 = "";
|
|
35790
36749
|
peg$savedPos = s0;
|
|
35791
|
-
s1 = peg$
|
|
36750
|
+
s1 = peg$f59();
|
|
35792
36751
|
s0 = s1;
|
|
35793
36752
|
}
|
|
35794
36753
|
return s0;
|
|
@@ -35825,19 +36784,19 @@ function peg$parse2(input, options) {
|
|
|
35825
36784
|
let s0, s1;
|
|
35826
36785
|
peg$silentFails++;
|
|
35827
36786
|
s0 = input.charAt(peg$currPos);
|
|
35828
|
-
if (peg$
|
|
36787
|
+
if (peg$r5.test(s0)) {
|
|
35829
36788
|
peg$currPos++;
|
|
35830
36789
|
} else {
|
|
35831
36790
|
s0 = peg$FAILED;
|
|
35832
36791
|
if (peg$silentFails === 0) {
|
|
35833
|
-
peg$fail(peg$
|
|
36792
|
+
peg$fail(peg$e39);
|
|
35834
36793
|
}
|
|
35835
36794
|
}
|
|
35836
36795
|
peg$silentFails--;
|
|
35837
36796
|
if (s0 === peg$FAILED) {
|
|
35838
36797
|
s1 = peg$FAILED;
|
|
35839
36798
|
if (peg$silentFails === 0) {
|
|
35840
|
-
peg$fail(peg$
|
|
36799
|
+
peg$fail(peg$e38);
|
|
35841
36800
|
}
|
|
35842
36801
|
}
|
|
35843
36802
|
return s0;
|
|
@@ -35860,23 +36819,23 @@ function peg$parse2(input, options) {
|
|
|
35860
36819
|
s0 = peg$currPos;
|
|
35861
36820
|
s1 = [];
|
|
35862
36821
|
s2 = input.charAt(peg$currPos);
|
|
35863
|
-
if (peg$
|
|
36822
|
+
if (peg$r6.test(s2)) {
|
|
35864
36823
|
peg$currPos++;
|
|
35865
36824
|
} else {
|
|
35866
36825
|
s2 = peg$FAILED;
|
|
35867
36826
|
if (peg$silentFails === 0) {
|
|
35868
|
-
peg$fail(peg$
|
|
36827
|
+
peg$fail(peg$e41);
|
|
35869
36828
|
}
|
|
35870
36829
|
}
|
|
35871
36830
|
while (s2 !== peg$FAILED) {
|
|
35872
36831
|
s1.push(s2);
|
|
35873
36832
|
s2 = input.charAt(peg$currPos);
|
|
35874
|
-
if (peg$
|
|
36833
|
+
if (peg$r6.test(s2)) {
|
|
35875
36834
|
peg$currPos++;
|
|
35876
36835
|
} else {
|
|
35877
36836
|
s2 = peg$FAILED;
|
|
35878
36837
|
if (peg$silentFails === 0) {
|
|
35879
|
-
peg$fail(peg$
|
|
36838
|
+
peg$fail(peg$e41);
|
|
35880
36839
|
}
|
|
35881
36840
|
}
|
|
35882
36841
|
}
|
|
@@ -35892,7 +36851,7 @@ function peg$parse2(input, options) {
|
|
|
35892
36851
|
if (s0 === peg$FAILED) {
|
|
35893
36852
|
s1 = peg$FAILED;
|
|
35894
36853
|
if (peg$silentFails === 0) {
|
|
35895
|
-
peg$fail(peg$
|
|
36854
|
+
peg$fail(peg$e40);
|
|
35896
36855
|
}
|
|
35897
36856
|
}
|
|
35898
36857
|
return s0;
|
|
@@ -35901,32 +36860,32 @@ function peg$parse2(input, options) {
|
|
|
35901
36860
|
let s0, s1;
|
|
35902
36861
|
peg$silentFails++;
|
|
35903
36862
|
if (input.charCodeAt(peg$currPos) === 10) {
|
|
35904
|
-
s0 = peg$
|
|
36863
|
+
s0 = peg$c32;
|
|
35905
36864
|
peg$currPos++;
|
|
35906
36865
|
} else {
|
|
35907
36866
|
s0 = peg$FAILED;
|
|
35908
36867
|
if (peg$silentFails === 0) {
|
|
35909
|
-
peg$fail(peg$
|
|
36868
|
+
peg$fail(peg$e43);
|
|
35910
36869
|
}
|
|
35911
36870
|
}
|
|
35912
36871
|
if (s0 === peg$FAILED) {
|
|
35913
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35914
|
-
s0 = peg$
|
|
36872
|
+
if (input.substr(peg$currPos, 2) === peg$c33) {
|
|
36873
|
+
s0 = peg$c33;
|
|
35915
36874
|
peg$currPos += 2;
|
|
35916
36875
|
} else {
|
|
35917
36876
|
s0 = peg$FAILED;
|
|
35918
36877
|
if (peg$silentFails === 0) {
|
|
35919
|
-
peg$fail(peg$
|
|
36878
|
+
peg$fail(peg$e44);
|
|
35920
36879
|
}
|
|
35921
36880
|
}
|
|
35922
36881
|
if (s0 === peg$FAILED) {
|
|
35923
36882
|
s0 = input.charAt(peg$currPos);
|
|
35924
|
-
if (peg$
|
|
36883
|
+
if (peg$r7.test(s0)) {
|
|
35925
36884
|
peg$currPos++;
|
|
35926
36885
|
} else {
|
|
35927
36886
|
s0 = peg$FAILED;
|
|
35928
36887
|
if (peg$silentFails === 0) {
|
|
35929
|
-
peg$fail(peg$
|
|
36888
|
+
peg$fail(peg$e45);
|
|
35930
36889
|
}
|
|
35931
36890
|
}
|
|
35932
36891
|
}
|
|
@@ -35935,7 +36894,7 @@ function peg$parse2(input, options) {
|
|
|
35935
36894
|
if (s0 === peg$FAILED) {
|
|
35936
36895
|
s1 = peg$FAILED;
|
|
35937
36896
|
if (peg$silentFails === 0) {
|
|
35938
|
-
peg$fail(peg$
|
|
36897
|
+
peg$fail(peg$e42);
|
|
35939
36898
|
}
|
|
35940
36899
|
}
|
|
35941
36900
|
return s0;
|
|
@@ -35946,23 +36905,23 @@ function peg$parse2(input, options) {
|
|
|
35946
36905
|
s0 = peg$currPos;
|
|
35947
36906
|
s1 = [];
|
|
35948
36907
|
s2 = input.charAt(peg$currPos);
|
|
35949
|
-
if (peg$
|
|
36908
|
+
if (peg$r6.test(s2)) {
|
|
35950
36909
|
peg$currPos++;
|
|
35951
36910
|
} else {
|
|
35952
36911
|
s2 = peg$FAILED;
|
|
35953
36912
|
if (peg$silentFails === 0) {
|
|
35954
|
-
peg$fail(peg$
|
|
36913
|
+
peg$fail(peg$e41);
|
|
35955
36914
|
}
|
|
35956
36915
|
}
|
|
35957
36916
|
while (s2 !== peg$FAILED) {
|
|
35958
36917
|
s1.push(s2);
|
|
35959
36918
|
s2 = input.charAt(peg$currPos);
|
|
35960
|
-
if (peg$
|
|
36919
|
+
if (peg$r6.test(s2)) {
|
|
35961
36920
|
peg$currPos++;
|
|
35962
36921
|
} else {
|
|
35963
36922
|
s2 = peg$FAILED;
|
|
35964
36923
|
if (peg$silentFails === 0) {
|
|
35965
|
-
peg$fail(peg$
|
|
36924
|
+
peg$fail(peg$e41);
|
|
35966
36925
|
}
|
|
35967
36926
|
}
|
|
35968
36927
|
}
|
|
@@ -35978,7 +36937,7 @@ function peg$parse2(input, options) {
|
|
|
35978
36937
|
if (s0 === peg$FAILED) {
|
|
35979
36938
|
s1 = peg$FAILED;
|
|
35980
36939
|
if (peg$silentFails === 0) {
|
|
35981
|
-
peg$fail(peg$
|
|
36940
|
+
peg$fail(peg$e46);
|
|
35982
36941
|
}
|
|
35983
36942
|
}
|
|
35984
36943
|
return s0;
|
|
@@ -35987,19 +36946,19 @@ function peg$parse2(input, options) {
|
|
|
35987
36946
|
let s0, s1;
|
|
35988
36947
|
peg$silentFails++;
|
|
35989
36948
|
s0 = input.charAt(peg$currPos);
|
|
35990
|
-
if (peg$
|
|
36949
|
+
if (peg$r8.test(s0)) {
|
|
35991
36950
|
peg$currPos++;
|
|
35992
36951
|
} else {
|
|
35993
36952
|
s0 = peg$FAILED;
|
|
35994
36953
|
if (peg$silentFails === 0) {
|
|
35995
|
-
peg$fail(peg$
|
|
36954
|
+
peg$fail(peg$e48);
|
|
35996
36955
|
}
|
|
35997
36956
|
}
|
|
35998
36957
|
peg$silentFails--;
|
|
35999
36958
|
if (s0 === peg$FAILED) {
|
|
36000
36959
|
s1 = peg$FAILED;
|
|
36001
36960
|
if (peg$silentFails === 0) {
|
|
36002
|
-
peg$fail(peg$
|
|
36961
|
+
peg$fail(peg$e47);
|
|
36003
36962
|
}
|
|
36004
36963
|
}
|
|
36005
36964
|
return s0;
|