@dbml/core 2.3.0 → 2.4.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.
Files changed (52) hide show
  1. package/lib/export/DbmlExporter.js +17 -9
  2. package/lib/export/JsonExporter.js +1 -3
  3. package/lib/export/ModelExporter.js +1 -3
  4. package/lib/export/MysqlExporter.js +50 -42
  5. package/lib/export/PostgresExporter.js +64 -49
  6. package/lib/export/SqlServerExporter.js +52 -46
  7. package/lib/model_structure/database.js +73 -28
  8. package/lib/model_structure/dbState.js +1 -3
  9. package/lib/model_structure/element.js +13 -13
  10. package/lib/model_structure/endpoint.js +18 -14
  11. package/lib/model_structure/enum.js +18 -14
  12. package/lib/model_structure/enumValue.js +16 -12
  13. package/lib/model_structure/field.js +47 -13
  14. package/lib/model_structure/indexColumn.js +16 -12
  15. package/lib/model_structure/indexes.js +18 -14
  16. package/lib/model_structure/ref.js +19 -16
  17. package/lib/model_structure/schema.js +24 -36
  18. package/lib/model_structure/table.js +19 -15
  19. package/lib/model_structure/tableGroup.js +18 -14
  20. package/lib/model_structure/utils.js +5 -0
  21. package/lib/parse/Parser.js +2 -4
  22. package/lib/parse/buildParser.js +1 -3
  23. package/lib/parse/dbml/parser.pegjs +64 -20
  24. package/lib/parse/dbmlParser.js +1401 -899
  25. package/lib/parse/mssql/constraint_definition/actions.js +2 -2
  26. package/lib/parse/mssql/fk_definition/actions.js +10 -3
  27. package/lib/parse/mssql/keyword_parsers.js +12 -2
  28. package/lib/parse/mssql/statements/actions.js +37 -6
  29. package/lib/parse/mssql/statements/index.js +1 -1
  30. package/lib/parse/mssql/statements/statement_types/alter_table/actions.js +11 -5
  31. package/lib/parse/mssql/statements/statement_types/comments/actions.js +57 -0
  32. package/lib/parse/mssql/statements/statement_types/comments/index.js +97 -0
  33. package/lib/parse/mssql/statements/statement_types/create_index/actions.js +6 -1
  34. package/lib/parse/mssql/statements/statement_types/create_table/actions.js +12 -10
  35. package/lib/parse/mssql/statements/statement_types/index.js +4 -1
  36. package/lib/parse/mssql/utils.js +16 -1
  37. package/lib/parse/mysql/parser.pegjs +66 -40
  38. package/lib/parse/mysqlParser.js +534 -359
  39. package/lib/parse/postgresParser.js +15 -13
  40. package/lib/parse/postgresql/Base_rules.pegjs +45 -10
  41. package/lib/parse/postgresql/Commands/Alter_table/Alter_table.pegjs +49 -4
  42. package/lib/parse/postgresql/Commands/Comment.pegjs +18 -6
  43. package/lib/parse/postgresql/Commands/Create_table/Create_table_normal.pegjs +5 -3
  44. package/lib/parse/postgresql/Commands/Create_table/Create_table_of.pegjs +1 -1
  45. package/lib/parse/postgresql/Commands/Create_table/Create_table_partition_of.pegjs +1 -1
  46. package/lib/parse/postgresql/Commands/Create_type/Create_type_enum.pegjs +2 -2
  47. package/lib/parse/postgresql/Commands/Ignore_syntax.pegjs +10 -1
  48. package/lib/parse/postgresql/InitializerUtils.pegjs +14 -2
  49. package/lib/parse/postgresql/Keywords.pegjs +5 -1
  50. package/lib/parse/postgresql/parser.pegjs +22 -8
  51. package/lib/parse/schemarbParser.js +3 -3
  52. package/package.json +2 -2
@@ -5,17 +5,21 @@
5
5
  */
6
6
  "use strict";
7
7
 
8
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
8
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
9
9
 
10
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
10
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
11
11
 
12
- function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
12
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
13
13
 
14
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
14
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
15
+
16
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
17
+
18
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
15
19
 
16
20
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
17
21
 
18
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
22
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
19
23
 
20
24
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21
25
 
@@ -255,9 +259,10 @@ function peg$parse(input, options) {
255
259
  value: value.value
256
260
  };
257
261
  },
258
- peg$c21 = function peg$c21(name, body) {
262
+ peg$c21 = function peg$c21(schemaName, name, body) {
259
263
  return {
260
264
  name: name,
265
+ schemaName: schemaName,
261
266
  tables: body,
262
267
  token: location()
263
268
  };
@@ -265,12 +270,16 @@ function peg$parse(input, options) {
265
270
  peg$c22 = function peg$c22(tables) {
266
271
  return tables.map(function (t) {
267
272
  return {
268
- name: t[0]
273
+ name: t[1],
274
+ schemaName: t[0]
269
275
  };
270
276
  });
271
277
  },
272
278
  peg$c23 = function peg$c23(r) {
273
- return r;
279
+ var schemaName = r.endpoints[0].schemaName;
280
+ return _objectSpread(_objectSpread({}, r), {}, {
281
+ schemaName: schemaName
282
+ });
274
283
  },
275
284
  peg$c24 = function peg$c24(name, body) {
276
285
  var ref = {
@@ -281,17 +290,17 @@ function peg$parse(input, options) {
281
290
  Object.assign(ref, body.settings);
282
291
  return ref;
283
292
  },
284
- peg$c25 = ".",
285
- peg$c26 = peg$literalExpectation(".", false),
286
- peg$c27 = function peg$c27(table1, field1, relation, table2, field2, ref_settings) {
293
+ peg$c25 = function peg$c25(field1, relation, field2, ref_settings) {
287
294
  var endpoints = [{
288
- tableName: table1,
289
- fieldNames: field1,
295
+ schemaName: field1.schemaName,
296
+ tableName: field1.tableName,
297
+ fieldNames: field1.fieldNames,
290
298
  relation: relation === ">" ? "*" : "1",
291
299
  token: location()
292
300
  }, {
293
- tableName: table2,
294
- fieldNames: field2,
301
+ schemaName: field2.schemaName,
302
+ tableName: field2.tableName,
303
+ fieldNames: field2.fieldNames,
295
304
  relation: relation === "<" ? "*" : "1",
296
305
  token: location()
297
306
  }];
@@ -300,28 +309,28 @@ function peg$parse(input, options) {
300
309
  settings: ref_settings
301
310
  };
302
311
  },
303
- peg$c28 = function peg$c28(field) {
312
+ peg$c26 = function peg$c26(field) {
304
313
  if (typeof field === "string") field = [field];
305
314
  return field;
306
315
  },
307
- peg$c29 = function peg$c29(field) {
316
+ peg$c27 = function peg$c27(field) {
308
317
  return field;
309
318
  },
310
- peg$c30 = "(",
311
- peg$c31 = peg$literalExpectation("(", false),
312
- peg$c32 = ")",
313
- peg$c33 = peg$literalExpectation(")", false),
314
- peg$c34 = function peg$c34(first, rest) {
319
+ peg$c28 = "(",
320
+ peg$c29 = peg$literalExpectation("(", false),
321
+ peg$c30 = ")",
322
+ peg$c31 = peg$literalExpectation(")", false),
323
+ peg$c32 = function peg$c32(first, rest) {
315
324
  var arrField = [first].concat(rest.map(function (el) {
316
325
  return el[3];
317
326
  }));
318
327
  return arrField;
319
328
  },
320
- peg$c35 = "[",
321
- peg$c36 = peg$literalExpectation("[", false),
322
- peg$c37 = "]",
323
- peg$c38 = peg$literalExpectation("]", false),
324
- peg$c39 = function peg$c39(first, rest) {
329
+ peg$c33 = "[",
330
+ peg$c34 = peg$literalExpectation("[", false),
331
+ peg$c35 = "]",
332
+ peg$c36 = peg$literalExpectation("]", false),
333
+ peg$c37 = function peg$c37(first, rest) {
325
334
  var arrSettings = [first].concat(rest.map(function (el) {
326
335
  return el[1];
327
336
  }));
@@ -337,26 +346,26 @@ function peg$parse(input, options) {
337
346
  });
338
347
  return res;
339
348
  },
340
- peg$c40 = function peg$c40(v) {
349
+ peg$c38 = function peg$c38(v) {
341
350
  return {
342
351
  type: 'update',
343
352
  value: v
344
353
  };
345
354
  },
346
- peg$c41 = function peg$c41(v) {
355
+ peg$c39 = function peg$c39(v) {
347
356
  return {
348
357
  type: 'delete',
349
358
  value: v
350
359
  };
351
360
  },
352
- peg$c42 = "update:",
353
- peg$c43 = peg$literalExpectation("update:", true),
354
- peg$c44 = function peg$c44(val) {
361
+ peg$c40 = "update:",
362
+ peg$c41 = peg$literalExpectation("update:", true),
363
+ peg$c42 = function peg$c42(val) {
355
364
  return val;
356
365
  },
357
- peg$c45 = "delete:",
358
- peg$c46 = peg$literalExpectation("delete:", true),
359
- peg$c47 = function peg$c47(name, alias, table_settings, body) {
366
+ peg$c43 = "delete:",
367
+ peg$c44 = peg$literalExpectation("delete:", true),
368
+ peg$c45 = function peg$c45(schemaName, name, alias, table_settings, body) {
360
369
  var fields = body.fields || [];
361
370
  var indexes = body.indexes || []; // Handle list of partial inline_refs
362
371
 
@@ -364,17 +373,20 @@ function peg$parse(input, options) {
364
373
  fields.forEach(function (field) {
365
374
  (field.inline_refs || []).forEach(function (iref) {
366
375
  var endpoints = [{
376
+ schemaName: iref.schemaName,
367
377
  tableName: iref.tableName,
368
378
  fieldNames: iref.fieldNames,
369
379
  relation: iref.relation === "<" ? "*" : "1",
370
380
  token: iref.token
371
381
  }, {
382
+ schemaName: schemaName,
372
383
  tableName: name,
373
384
  fieldNames: [field.name],
374
385
  relation: iref.relation === ">" ? "*" : "1",
375
386
  token: iref.token
376
387
  }];
377
388
  var ref = {
389
+ schemaName: schemaName,
378
390
  name: null,
379
391
  // no name
380
392
  endpoints: endpoints,
@@ -384,8 +396,23 @@ function peg$parse(input, options) {
384
396
  });
385
397
  });
386
398
 
399
+ if (alias) {
400
+ if (data.aliases.find(function (a) {
401
+ return a.name === alias;
402
+ })) error("Alias \"".concat(alias, "\" is already defined"));
403
+ data.aliases.push({
404
+ name: alias,
405
+ kind: 'table',
406
+ value: {
407
+ tableName: name,
408
+ schemaName: schemaName
409
+ }
410
+ });
411
+ }
412
+
387
413
  var res = _objectSpread({
388
414
  name: name,
415
+ schemaName: schemaName,
389
416
  alias: alias,
390
417
  fields: fields,
391
418
  token: location(),
@@ -393,14 +420,14 @@ function peg$parse(input, options) {
393
420
  }, table_settings);
394
421
 
395
422
  if (body.note) {
396
- res = _objectSpread({}, res, {
423
+ res = _objectSpread(_objectSpread({}, res), {}, {
397
424
  note: body.note
398
425
  });
399
426
  }
400
427
 
401
428
  return res;
402
429
  },
403
- peg$c48 = function peg$c48(fields, elements) {
430
+ peg$c46 = function peg$c46(fields, elements) {
404
431
  // concat all indexes
405
432
  var indexes = _.flatMap(elements.filter(function (ele) {
406
433
  return ele.type === 'indexes';
@@ -444,16 +471,18 @@ function peg$parse(input, options) {
444
471
  note: note ? note.value : null
445
472
  };
446
473
  },
447
- peg$c49 = function peg$c49(indexes) {
474
+ peg$c47 = function peg$c47(indexes) {
448
475
  return {
449
476
  type: 'indexes',
450
477
  value: indexes
451
478
  };
452
479
  },
453
- peg$c50 = function peg$c50(name, type, constrains, field_settings) {
480
+ peg$c48 = function peg$c48(name, typeSchemaName, type, constrains, field_settings) {
454
481
  var field = {
455
482
  name: name,
456
- type: type,
483
+ type: _objectSpread({
484
+ schemaName: typeSchemaName
485
+ }, type),
457
486
  token: location(),
458
487
  inline_refs: []
459
488
  };
@@ -467,19 +496,20 @@ function peg$parse(input, options) {
467
496
 
468
497
  return field;
469
498
  },
470
- peg$c51 = function peg$c51(name, body) {
499
+ peg$c49 = function peg$c49(schemaName, name, body) {
471
500
  return {
472
501
  name: name,
502
+ schemaName: schemaName,
473
503
  token: location(),
474
504
  values: body.enum_values
475
505
  };
476
506
  },
477
- peg$c52 = function peg$c52(enum_values) {
507
+ peg$c50 = function peg$c50(enum_values) {
478
508
  return {
479
509
  enum_values: enum_values
480
510
  };
481
511
  },
482
- peg$c53 = function peg$c53(name, enum_setting) {
512
+ peg$c51 = function peg$c51(name, enum_setting) {
483
513
  var enum_value = {
484
514
  name: name,
485
515
  token: location()
@@ -487,12 +517,12 @@ function peg$parse(input, options) {
487
517
  Object.assign(enum_value, enum_setting);
488
518
  return enum_value;
489
519
  },
490
- peg$c54 = function peg$c54(v) {
520
+ peg$c52 = function peg$c52(v) {
491
521
  return {
492
522
  note: v
493
523
  };
494
524
  },
495
- peg$c55 = function peg$c55(first, rest) {
525
+ peg$c53 = function peg$c53(first, rest) {
496
526
  var arrSettings = [first].concat(rest.map(function (el) {
497
527
  return el[1];
498
528
  }));
@@ -536,7 +566,7 @@ function peg$parse(input, options) {
536
566
  });
537
567
  return res;
538
568
  },
539
- peg$c56 = function peg$c56(first, rest) {
569
+ peg$c54 = function peg$c54(first, rest) {
540
570
  var settings = [first].concat(_toConsumableArray(rest.map(function (el) {
541
571
  return el[1];
542
572
  })));
@@ -554,52 +584,52 @@ function peg$parse(input, options) {
554
584
  });
555
585
  return result;
556
586
  },
557
- peg$c57 = function peg$c57(v) {
587
+ peg$c55 = function peg$c55(v) {
558
588
  return {
559
589
  type: 'note',
560
590
  value: v
561
591
  };
562
592
  },
563
- peg$c58 = function peg$c58(c) {
593
+ peg$c56 = function peg$c56(c) {
564
594
  return c;
565
595
  },
566
- peg$c59 = "not null",
567
- peg$c60 = peg$literalExpectation("not null", true),
568
- peg$c61 = function peg$c61(a) {
596
+ peg$c57 = "not null",
597
+ peg$c58 = peg$literalExpectation("not null", true),
598
+ peg$c59 = function peg$c59(a) {
569
599
  return a;
570
600
  },
571
- peg$c62 = "null",
572
- peg$c63 = peg$literalExpectation("null", true),
573
- peg$c64 = "primary key",
574
- peg$c65 = peg$literalExpectation("primary key", true),
575
- peg$c66 = "pk",
576
- peg$c67 = peg$literalExpectation("pk", true),
577
- peg$c68 = "unique",
578
- peg$c69 = peg$literalExpectation("unique", true),
579
- peg$c70 = "increment",
580
- peg$c71 = peg$literalExpectation("increment", false),
581
- peg$c72 = function peg$c72(v) {
601
+ peg$c60 = "null",
602
+ peg$c61 = peg$literalExpectation("null", true),
603
+ peg$c62 = "primary key",
604
+ peg$c63 = peg$literalExpectation("primary key", true),
605
+ peg$c64 = "pk",
606
+ peg$c65 = peg$literalExpectation("pk", true),
607
+ peg$c66 = "unique",
608
+ peg$c67 = peg$literalExpectation("unique", true),
609
+ peg$c68 = "increment",
610
+ peg$c69 = peg$literalExpectation("increment", false),
611
+ peg$c70 = function peg$c70(v) {
582
612
  return {
583
613
  type: 'ref_inline',
584
614
  value: v
585
615
  };
586
616
  },
587
- peg$c73 = function peg$c73(v) {
617
+ peg$c71 = function peg$c71(v) {
588
618
  return {
589
619
  type: 'default',
590
620
  value: v
591
621
  };
592
622
  },
593
- peg$c74 = function peg$c74(body) {
623
+ peg$c72 = function peg$c72(body) {
594
624
  return body;
595
625
  },
596
- peg$c75 = function peg$c75(index) {
626
+ peg$c73 = function peg$c73(index) {
597
627
  return index;
598
628
  },
599
- peg$c76 = function peg$c76(index) {
629
+ peg$c74 = function peg$c74(index) {
600
630
  return index;
601
631
  },
602
- peg$c77 = function peg$c77(syntax, index_settings) {
632
+ peg$c75 = function peg$c75(syntax, index_settings) {
603
633
  var index = {
604
634
  columns: [syntax],
605
635
  token: location()
@@ -607,7 +637,7 @@ function peg$parse(input, options) {
607
637
  Object.assign(index, index_settings);
608
638
  return index;
609
639
  },
610
- peg$c78 = function peg$c78(syntax, index_settings) {
640
+ peg$c76 = function peg$c76(syntax, index_settings) {
611
641
  var index = {
612
642
  columns: syntax,
613
643
  token: location()
@@ -615,35 +645,35 @@ function peg$parse(input, options) {
615
645
  Object.assign(index, index_settings);
616
646
  return index;
617
647
  },
618
- peg$c79 = function peg$c79(column) {
648
+ peg$c77 = function peg$c77(column) {
619
649
  var singleIndex = {
620
650
  value: column,
621
651
  type: 'column'
622
652
  };
623
653
  return singleIndex;
624
654
  },
625
- peg$c80 = "`",
626
- peg$c81 = peg$literalExpectation("`", false),
627
- peg$c82 = /^[^`]/,
628
- peg$c83 = peg$classExpectation(["`"], true, false),
629
- peg$c84 = function peg$c84(text) {
655
+ peg$c78 = "`",
656
+ peg$c79 = peg$literalExpectation("`", false),
657
+ peg$c80 = /^[^`]/,
658
+ peg$c81 = peg$classExpectation(["`"], true, false),
659
+ peg$c82 = function peg$c82(text) {
630
660
  return {
631
661
  value: text.join(""),
632
662
  type: 'expression'
633
663
  };
634
664
  },
635
- peg$c85 = function peg$c85(first, rest) {
665
+ peg$c83 = function peg$c83(first, rest) {
636
666
  var arrIndex = [first].concat(rest.map(function (el) {
637
667
  return el[2];
638
668
  }));
639
669
  return arrIndex;
640
670
  },
641
- peg$c86 = function peg$c86() {
671
+ peg$c84 = function peg$c84() {
642
672
  return {
643
673
  pk: true
644
674
  };
645
675
  },
646
- peg$c87 = function peg$c87(first, rest) {
676
+ peg$c85 = function peg$c85(first, rest) {
647
677
  var arrSettings = [first].concat(rest.map(function (el) {
648
678
  return el[1];
649
679
  }));
@@ -657,120 +687,155 @@ function peg$parse(input, options) {
657
687
  });
658
688
  return res;
659
689
  },
660
- peg$c88 = function peg$c88(v) {
690
+ peg$c86 = function peg$c86(v) {
661
691
  return {
662
692
  type: 'name',
663
693
  value: v
664
694
  };
665
695
  },
666
- peg$c89 = function peg$c89(v) {
696
+ peg$c87 = function peg$c87(v) {
667
697
  return {
668
698
  type: 'type',
669
699
  value: v
670
700
  };
671
701
  },
672
- peg$c90 = "name:",
673
- peg$c91 = peg$literalExpectation("name:", true),
674
- peg$c92 = function peg$c92(val) {
702
+ peg$c88 = "name:",
703
+ peg$c89 = peg$literalExpectation("name:", true),
704
+ peg$c90 = function peg$c90(val) {
675
705
  return val.value;
676
706
  },
677
- peg$c93 = function peg$c93(note) {
707
+ peg$c91 = function peg$c91(note) {
678
708
  return note;
679
709
  },
680
- peg$c94 = "note",
681
- peg$c95 = peg$literalExpectation("note", true),
682
- peg$c96 = "note:",
683
- peg$c97 = peg$literalExpectation("note:", true),
684
- peg$c98 = "type:",
685
- peg$c99 = peg$literalExpectation("type:", true),
686
- peg$c100 = "ref:",
687
- peg$c101 = peg$literalExpectation("ref:", false),
688
- peg$c102 = function peg$c102(relation, table2, field2) {
710
+ peg$c92 = "note",
711
+ peg$c93 = peg$literalExpectation("note", true),
712
+ peg$c94 = "note:",
713
+ peg$c95 = peg$literalExpectation("note:", true),
714
+ peg$c96 = "type:",
715
+ peg$c97 = peg$literalExpectation("type:", true),
716
+ peg$c98 = "ref:",
717
+ peg$c99 = peg$literalExpectation("ref:", false),
718
+ peg$c100 = function peg$c100(relation, field) {
689
719
  return {
690
- tableName: table2,
691
- fieldNames: [field2],
720
+ schemaName: field.schemaName,
721
+ tableName: field.tableName,
722
+ fieldNames: [field.fieldName],
692
723
  relation: relation,
693
724
  token: location()
694
725
  };
695
726
  },
696
- peg$c103 = "default:",
697
- peg$c104 = peg$literalExpectation("default:", true),
698
- peg$c105 = function peg$c105(val) {
727
+ peg$c101 = "default:",
728
+ peg$c102 = peg$literalExpectation("default:", true),
729
+ peg$c103 = function peg$c103(val) {
699
730
  return val;
700
731
  },
701
- peg$c106 = "as",
702
- peg$c107 = peg$literalExpectation("as", false),
703
- peg$c108 = function peg$c108(alias) {
732
+ peg$c104 = "as",
733
+ peg$c105 = peg$literalExpectation("as", false),
734
+ peg$c106 = function peg$c106(alias) {
704
735
  return alias;
705
736
  },
706
- peg$c109 = function peg$c109(s, color) {
737
+ peg$c107 = function peg$c107(s, color) {
707
738
  return s + color.join('');
708
739
  },
709
- peg$c110 = peg$otherExpectation("project"),
710
- peg$c111 = "project",
711
- peg$c112 = peg$literalExpectation("project", true),
712
- peg$c113 = peg$otherExpectation("table"),
713
- peg$c114 = "table",
714
- peg$c115 = peg$literalExpectation("table", true),
715
- peg$c116 = peg$literalExpectation("as", true),
716
- peg$c117 = peg$otherExpectation("references"),
717
- peg$c118 = "ref",
718
- peg$c119 = peg$literalExpectation("ref", true),
719
- peg$c120 = peg$otherExpectation("unique"),
720
- peg$c121 = function peg$c121() {
740
+ peg$c108 = peg$otherExpectation("project"),
741
+ peg$c109 = "project",
742
+ peg$c110 = peg$literalExpectation("project", true),
743
+ peg$c111 = peg$otherExpectation("table"),
744
+ peg$c112 = "table",
745
+ peg$c113 = peg$literalExpectation("table", true),
746
+ peg$c114 = peg$literalExpectation("as", true),
747
+ peg$c115 = peg$otherExpectation("references"),
748
+ peg$c116 = "ref",
749
+ peg$c117 = peg$literalExpectation("ref", true),
750
+ peg$c118 = peg$otherExpectation("unique"),
751
+ peg$c119 = function peg$c119() {
721
752
  return {
722
753
  unique: true
723
754
  };
724
755
  },
725
- peg$c122 = peg$otherExpectation("PK"),
726
- peg$c123 = function peg$c123() {
756
+ peg$c120 = peg$otherExpectation("PK"),
757
+ peg$c121 = function peg$c121() {
727
758
  return {
728
759
  pk: true
729
760
  };
730
761
  },
731
- peg$c124 = peg$otherExpectation("indexes"),
732
- peg$c125 = "indexes",
733
- peg$c126 = peg$literalExpectation("indexes", true),
734
- peg$c127 = peg$otherExpectation("btree"),
735
- peg$c128 = "btree",
736
- peg$c129 = peg$literalExpectation("btree", true),
737
- peg$c130 = peg$otherExpectation("hash"),
738
- peg$c131 = "hash",
739
- peg$c132 = peg$literalExpectation("hash", true),
740
- peg$c133 = peg$otherExpectation("enum"),
741
- peg$c134 = "enum",
742
- peg$c135 = peg$literalExpectation("enum", true),
743
- peg$c136 = "headercolor",
744
- peg$c137 = peg$literalExpectation("headercolor", true),
745
- peg$c138 = peg$otherExpectation("Table Group"),
746
- peg$c139 = "tablegroup",
747
- peg$c140 = peg$literalExpectation("TableGroup", true),
748
- peg$c141 = peg$otherExpectation("no action"),
749
- peg$c142 = "no action",
750
- peg$c143 = peg$literalExpectation("no action", true),
751
- peg$c144 = peg$otherExpectation("restrict"),
752
- peg$c145 = "restrict",
753
- peg$c146 = peg$literalExpectation("restrict", true),
754
- peg$c147 = peg$otherExpectation("cascade"),
755
- peg$c148 = "cascade",
756
- peg$c149 = peg$literalExpectation("cascade", true),
757
- peg$c150 = peg$otherExpectation("set null"),
758
- peg$c151 = "set null",
759
- peg$c152 = peg$literalExpectation("set null", true),
760
- peg$c153 = peg$otherExpectation("set default"),
761
- peg$c154 = "set default",
762
- peg$c155 = peg$literalExpectation("set default", true),
763
- peg$c156 = peg$otherExpectation(">, - or <"),
764
- peg$c157 = /^[>\-<]/,
765
- peg$c158 = peg$classExpectation([">", "-", "<"], false, false),
766
- peg$c159 = peg$otherExpectation("valid name"),
767
- peg$c160 = function peg$c160(c) {
762
+ peg$c122 = peg$otherExpectation("indexes"),
763
+ peg$c123 = "indexes",
764
+ peg$c124 = peg$literalExpectation("indexes", true),
765
+ peg$c125 = peg$otherExpectation("btree"),
766
+ peg$c126 = "btree",
767
+ peg$c127 = peg$literalExpectation("btree", true),
768
+ peg$c128 = peg$otherExpectation("hash"),
769
+ peg$c129 = "hash",
770
+ peg$c130 = peg$literalExpectation("hash", true),
771
+ peg$c131 = peg$otherExpectation("enum"),
772
+ peg$c132 = "enum",
773
+ peg$c133 = peg$literalExpectation("enum", true),
774
+ peg$c134 = "headercolor",
775
+ peg$c135 = peg$literalExpectation("headercolor", true),
776
+ peg$c136 = peg$otherExpectation("Table Group"),
777
+ peg$c137 = "tablegroup",
778
+ peg$c138 = peg$literalExpectation("TableGroup", true),
779
+ peg$c139 = peg$otherExpectation("no action"),
780
+ peg$c140 = "no action",
781
+ peg$c141 = peg$literalExpectation("no action", true),
782
+ peg$c142 = peg$otherExpectation("restrict"),
783
+ peg$c143 = "restrict",
784
+ peg$c144 = peg$literalExpectation("restrict", true),
785
+ peg$c145 = peg$otherExpectation("cascade"),
786
+ peg$c146 = "cascade",
787
+ peg$c147 = peg$literalExpectation("cascade", true),
788
+ peg$c148 = peg$otherExpectation("set null"),
789
+ peg$c149 = "set null",
790
+ peg$c150 = peg$literalExpectation("set null", true),
791
+ peg$c151 = peg$otherExpectation("set default"),
792
+ peg$c152 = "set default",
793
+ peg$c153 = peg$literalExpectation("set default", true),
794
+ peg$c154 = peg$otherExpectation(">, - or <"),
795
+ peg$c155 = /^[>\-<]/,
796
+ peg$c156 = peg$classExpectation([">", "-", "<"], false, false),
797
+ peg$c157 = peg$otherExpectation("valid name"),
798
+ peg$c158 = function peg$c158(c) {
768
799
  return c.join("");
769
800
  },
770
- peg$c161 = /^[^"\n]/,
771
- peg$c162 = peg$classExpectation(["\"", "\n"], true, false),
772
- peg$c163 = peg$otherExpectation("type"),
773
- peg$c164 = function peg$c164(type_name, args) {
801
+ peg$c159 = /^[^"\n]/,
802
+ peg$c160 = peg$classExpectation(["\"", "\n"], true, false),
803
+ peg$c161 = peg$otherExpectation("schema name"),
804
+ peg$c162 = ".",
805
+ peg$c163 = peg$literalExpectation(".", false),
806
+ peg$c164 = function peg$c164(name) {
807
+ return name;
808
+ },
809
+ peg$c165 = function peg$c165(schemaName, tableName, fieldNames) {
810
+ return {
811
+ schemaName: schemaName,
812
+ tableName: tableName,
813
+ fieldNames: fieldNames
814
+ };
815
+ },
816
+ peg$c166 = function peg$c166(tableName, fieldNames) {
817
+ return {
818
+ schemaName: null,
819
+ tableName: tableName,
820
+ fieldNames: fieldNames
821
+ };
822
+ },
823
+ peg$c167 = function peg$c167(schemaName, tableName, fieldName) {
824
+ return {
825
+ schemaName: schemaName,
826
+ tableName: tableName,
827
+ fieldName: fieldName
828
+ };
829
+ },
830
+ peg$c168 = function peg$c168(tableName, fieldName) {
831
+ return {
832
+ schemaName: null,
833
+ tableName: tableName,
834
+ fieldName: fieldName
835
+ };
836
+ },
837
+ peg$c169 = peg$otherExpectation("type"),
838
+ peg$c170 = function peg$c170(type_name, args) {
774
839
  args = args ? args[3] : null;
775
840
 
776
841
  if (type_name.toLowerCase() !== 'enum') {
@@ -782,72 +847,76 @@ function peg$parse(input, options) {
782
847
  args: args
783
848
  };
784
849
  },
785
- peg$c165 = peg$otherExpectation("expression"),
786
- peg$c166 = function peg$c166(factors) {
850
+ peg$c171 = peg$otherExpectation("expression"),
851
+ peg$c172 = function peg$c172(factors) {
787
852
  return _.flattenDeep(factors).join("");
788
853
  },
789
- peg$c167 = ",",
790
- peg$c168 = peg$literalExpectation(",", false),
791
- peg$c169 = ");",
792
- peg$c170 = peg$literalExpectation(");", false),
793
- peg$c171 = peg$anyExpectation(),
794
- peg$c172 = function peg$c172(factors) {
854
+ peg$c173 = ",",
855
+ peg$c174 = peg$literalExpectation(",", false),
856
+ peg$c175 = ");",
857
+ peg$c176 = peg$literalExpectation(");", false),
858
+ peg$c177 = peg$anyExpectation(),
859
+ peg$c178 = function peg$c178(factors) {
795
860
  return _.flattenDeep(factors).join("");
796
861
  },
797
- peg$c173 = /^[',.a-z0-9_+-`]/i,
798
- peg$c174 = peg$classExpectation(["'", ",", ".", ["a", "z"], ["0", "9"], "_", ["+", "`"]], false, true),
799
- peg$c175 = /^['.a-z0-9_+\-]/i,
800
- peg$c176 = peg$classExpectation(["'", ".", ["a", "z"], ["0", "9"], "_", "+", "-"], false, true),
801
- peg$c177 = function peg$c177() {
862
+ peg$c179 = /^[',.a-z0-9_+-`]/i,
863
+ peg$c180 = peg$classExpectation(["'", ",", ".", ["a", "z"], ["0", "9"], "_", ["+", "`"]], false, true),
864
+ peg$c181 = /^['.a-z0-9_+\-]/i,
865
+ peg$c182 = peg$classExpectation(["'", ".", ["a", "z"], ["0", "9"], "_", "+", "-"], false, true),
866
+ peg$c183 = function peg$c183() {
802
867
  return text();
803
868
  },
804
- peg$c178 = /^[[\]]/,
805
- peg$c179 = peg$classExpectation(["[", "]"], false, false),
806
- peg$c180 = peg$otherExpectation("letter, number or underscore"),
807
- peg$c181 = /^[a-z0-9_]/i,
808
- peg$c182 = peg$classExpectation([["a", "z"], ["0", "9"], "_"], false, true),
809
- peg$c183 = /^[0-9a-fA-F]/,
810
- peg$c184 = peg$classExpectation([["0", "9"], ["a", "f"], ["A", "F"]], false, false),
811
- peg$c185 = function peg$c185(c) {
869
+ peg$c184 = /^[[\]]/,
870
+ peg$c185 = peg$classExpectation(["[", "]"], false, false),
871
+ peg$c186 = peg$otherExpectation("letter, number or underscore"),
872
+ peg$c187 = /^[a-z0-9_]/i,
873
+ peg$c188 = peg$classExpectation([["a", "z"], ["0", "9"], "_"], false, true),
874
+ peg$c189 = /^[0-9a-fA-F]/,
875
+ peg$c190 = peg$classExpectation([["0", "9"], ["a", "f"], ["A", "F"]], false, false),
876
+ peg$c191 = function peg$c191(c) {
812
877
  return c.toLowerCase();
813
878
  },
814
- peg$c186 = "\"",
815
- peg$c187 = peg$literalExpectation("\"", false),
816
- peg$c188 = peg$otherExpectation("endline"),
817
- peg$c189 = "\t",
818
- peg$c190 = peg$literalExpectation("\t", false),
819
- peg$c191 = peg$otherExpectation("comment"),
820
- peg$c192 = "//",
821
- peg$c193 = peg$literalExpectation("//", false),
822
- peg$c194 = /^[^\n]/,
823
- peg$c195 = peg$classExpectation(["\n"], true, false),
824
- peg$c196 = peg$otherExpectation("newline"),
825
- peg$c197 = "\r\n",
826
- peg$c198 = peg$literalExpectation("\r\n", false),
827
- peg$c199 = "\n",
828
- peg$c200 = peg$literalExpectation("\n", false),
829
- peg$c201 = peg$otherExpectation("whitespace"),
830
- peg$c202 = /^[ \t\r\n\r]/,
831
- peg$c203 = peg$classExpectation([" ", "\t", "\r", "\n", "\r"], false, false),
832
- peg$c204 = /^[ \t\r\n\r"]/,
833
- peg$c205 = peg$classExpectation([" ", "\t", "\r", "\n", "\r", "\""], false, false),
834
- peg$c206 = " ",
835
- peg$c207 = peg$literalExpectation(" ", false),
836
- peg$c208 = "#",
837
- peg$c209 = peg$literalExpectation("#", false),
838
- peg$c210 = function peg$c210() {
879
+ peg$c192 = "\"",
880
+ peg$c193 = peg$literalExpectation("\"", false),
881
+ peg$c194 = peg$otherExpectation("endline"),
882
+ peg$c195 = "\t",
883
+ peg$c196 = peg$literalExpectation("\t", false),
884
+ peg$c197 = "//",
885
+ peg$c198 = peg$literalExpectation("//", false),
886
+ peg$c199 = /^[^\n]/,
887
+ peg$c200 = peg$classExpectation(["\n"], true, false),
888
+ peg$c201 = "/*",
889
+ peg$c202 = peg$literalExpectation("/*", false),
890
+ peg$c203 = "*/",
891
+ peg$c204 = peg$literalExpectation("*/", false),
892
+ peg$c205 = peg$otherExpectation("comment"),
893
+ peg$c206 = peg$otherExpectation("newline"),
894
+ peg$c207 = "\r\n",
895
+ peg$c208 = peg$literalExpectation("\r\n", false),
896
+ peg$c209 = "\n",
897
+ peg$c210 = peg$literalExpectation("\n", false),
898
+ peg$c211 = peg$otherExpectation("whitespace"),
899
+ peg$c212 = /^[ \t\r\n\r]/,
900
+ peg$c213 = peg$classExpectation([" ", "\t", "\r", "\n", "\r"], false, false),
901
+ peg$c214 = /^[ \t\r\n\r"]/,
902
+ peg$c215 = peg$classExpectation([" ", "\t", "\r", "\n", "\r", "\""], false, false),
903
+ peg$c216 = " ",
904
+ peg$c217 = peg$literalExpectation(" ", false),
905
+ peg$c218 = "#",
906
+ peg$c219 = peg$literalExpectation("#", false),
907
+ peg$c220 = function peg$c220() {
839
908
  return "#";
840
909
  },
841
- peg$c211 = peg$otherExpectation("string"),
842
- peg$c212 = function peg$c212(chars) {
910
+ peg$c221 = peg$otherExpectation("string"),
911
+ peg$c222 = function peg$c222(chars) {
843
912
  return {
844
913
  value: chars.join(''),
845
914
  type: 'string'
846
915
  };
847
916
  },
848
- peg$c213 = "'''",
849
- peg$c214 = peg$literalExpectation("'''", false),
850
- peg$c215 = function peg$c215(chars) {
917
+ peg$c223 = "'''",
918
+ peg$c224 = peg$literalExpectation("'''", false),
919
+ peg$c225 = function peg$c225(chars) {
851
920
  var str = chars.join(''); // // replace line continuation using look around, but this is not compatible with firefox, safari.
852
921
  // str = str.replace(/(?<!\\)\\(?!\\)(?:\n|\r\n)?/g, '');
853
922
  // str = str.replace(/\\\\/, '\\');
@@ -891,53 +960,55 @@ function peg$parse(input, options) {
891
960
  type: 'string'
892
961
  };
893
962
  },
894
- peg$c216 = "'",
895
- peg$c217 = peg$literalExpectation("'", false),
896
- peg$c218 = "\\",
897
- peg$c219 = peg$literalExpectation("\\", false),
898
- peg$c220 = function peg$c220() {
963
+ peg$c226 = "'",
964
+ peg$c227 = peg$literalExpectation("'", false),
965
+ peg$c228 = "\\",
966
+ peg$c229 = peg$literalExpectation("\\", false),
967
+ peg$c230 = function peg$c230() {
899
968
  return '"';
900
969
  },
901
- peg$c221 = function peg$c221() {
970
+ peg$c231 = function peg$c231() {
902
971
  return text();
903
972
  },
904
- peg$c222 = "\\'",
905
- peg$c223 = peg$literalExpectation("\\'", false),
906
- peg$c224 = function peg$c224() {
973
+ peg$c232 = "\\'",
974
+ peg$c233 = peg$literalExpectation("\\'", false),
975
+ peg$c234 = function peg$c234() {
907
976
  return "'";
908
977
  },
909
- peg$c225 = function peg$c225(bl) {
978
+ peg$c235 = function peg$c235(bl) {
910
979
  // escape character \. \\n => \n. Remove one backslash in the result string.
911
980
  return bl.join('');
912
981
  },
913
- peg$c226 = function peg$c226() {
982
+ peg$c236 = function peg$c236() {
914
983
  // replace line continuation
915
984
  return '';
916
985
  },
917
- peg$c227 = /^[0-9]/,
918
- peg$c228 = peg$classExpectation([["0", "9"]], false, false),
919
- peg$c229 = "=",
920
- peg$c230 = peg$literalExpectation("=", false),
921
- peg$c231 = "true",
922
- peg$c232 = peg$literalExpectation("true", true),
923
- peg$c233 = "false",
924
- peg$c234 = peg$literalExpectation("false", true),
925
- peg$c235 = function peg$c235(_boolean) {
986
+ peg$c237 = /^[0-9]/,
987
+ peg$c238 = peg$classExpectation([["0", "9"]], false, false),
988
+ peg$c239 = "=",
989
+ peg$c240 = peg$literalExpectation("=", false),
990
+ peg$c241 = "true",
991
+ peg$c242 = peg$literalExpectation("true", true),
992
+ peg$c243 = "false",
993
+ peg$c244 = peg$literalExpectation("false", true),
994
+ peg$c245 = function peg$c245(_boolean) {
926
995
  return {
927
996
  type: 'boolean',
928
997
  value: _boolean
929
998
  };
930
999
  },
931
- peg$c236 = function peg$c236(number) {
1000
+ peg$c246 = "-",
1001
+ peg$c247 = peg$literalExpectation("-", false),
1002
+ peg$c248 = function peg$c248(minus, number) {
932
1003
  return {
933
1004
  type: 'number',
934
- value: number
1005
+ value: minus ? -number : number
935
1006
  };
936
1007
  },
937
- peg$c237 = function peg$c237(left, right) {
1008
+ peg$c249 = function peg$c249(left, right) {
938
1009
  return parseFloat(left.join("") + "." + right.join(""));
939
1010
  },
940
- peg$c238 = function peg$c238(digits) {
1011
+ peg$c250 = function peg$c250(digits) {
941
1012
  return parseInt(digits.join(""), 10);
942
1013
  },
943
1014
  peg$currPos = 0,
@@ -1533,7 +1604,7 @@ function peg$parse(input, options) {
1533
1604
  }
1534
1605
 
1535
1606
  function peg$parseTableGroupSyntax() {
1536
- var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;
1607
+ var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10;
1537
1608
  s0 = peg$currPos;
1538
1609
  s1 = peg$parsetable_group();
1539
1610
 
@@ -1551,48 +1622,59 @@ function peg$parse(input, options) {
1551
1622
  }
1552
1623
 
1553
1624
  if (s2 !== peg$FAILED) {
1554
- s3 = peg$parsename();
1625
+ s3 = peg$parseschema_name();
1626
+
1627
+ if (s3 === peg$FAILED) {
1628
+ s3 = null;
1629
+ }
1555
1630
 
1556
1631
  if (s3 !== peg$FAILED) {
1557
- s4 = peg$parse_();
1632
+ s4 = peg$parsename();
1558
1633
 
1559
1634
  if (s4 !== peg$FAILED) {
1560
- if (input.charCodeAt(peg$currPos) === 123) {
1561
- s5 = peg$c6;
1562
- peg$currPos++;
1563
- } else {
1564
- s5 = peg$FAILED;
1565
-
1566
- if (peg$silentFails === 0) {
1567
- peg$fail(peg$c7);
1568
- }
1569
- }
1635
+ s5 = peg$parse_();
1570
1636
 
1571
1637
  if (s5 !== peg$FAILED) {
1572
- s6 = peg$parse_();
1638
+ if (input.charCodeAt(peg$currPos) === 123) {
1639
+ s6 = peg$c6;
1640
+ peg$currPos++;
1641
+ } else {
1642
+ s6 = peg$FAILED;
1643
+
1644
+ if (peg$silentFails === 0) {
1645
+ peg$fail(peg$c7);
1646
+ }
1647
+ }
1573
1648
 
1574
1649
  if (s6 !== peg$FAILED) {
1575
- s7 = peg$parsetable_group_body();
1650
+ s7 = peg$parse_();
1576
1651
 
1577
1652
  if (s7 !== peg$FAILED) {
1578
- s8 = peg$parse_();
1653
+ s8 = peg$parsetable_group_body();
1579
1654
 
1580
1655
  if (s8 !== peg$FAILED) {
1581
- if (input.charCodeAt(peg$currPos) === 125) {
1582
- s9 = peg$c8;
1583
- peg$currPos++;
1584
- } else {
1585
- s9 = peg$FAILED;
1656
+ s9 = peg$parse_();
1586
1657
 
1587
- if (peg$silentFails === 0) {
1588
- peg$fail(peg$c9);
1658
+ if (s9 !== peg$FAILED) {
1659
+ if (input.charCodeAt(peg$currPos) === 125) {
1660
+ s10 = peg$c8;
1661
+ peg$currPos++;
1662
+ } else {
1663
+ s10 = peg$FAILED;
1664
+
1665
+ if (peg$silentFails === 0) {
1666
+ peg$fail(peg$c9);
1667
+ }
1589
1668
  }
1590
- }
1591
1669
 
1592
- if (s9 !== peg$FAILED) {
1593
- peg$savedPos = s0;
1594
- s1 = peg$c21(s3, s7);
1595
- s0 = s1;
1670
+ if (s10 !== peg$FAILED) {
1671
+ peg$savedPos = s0;
1672
+ s1 = peg$c21(s3, s4, s8);
1673
+ s0 = s1;
1674
+ } else {
1675
+ peg$currPos = s0;
1676
+ s0 = peg$FAILED;
1677
+ }
1596
1678
  } else {
1597
1679
  peg$currPos = s0;
1598
1680
  s0 = peg$FAILED;
@@ -1634,18 +1716,29 @@ function peg$parse(input, options) {
1634
1716
  }
1635
1717
 
1636
1718
  function peg$parsetable_group_body() {
1637
- var s0, s1, s2, s3, s4;
1719
+ var s0, s1, s2, s3, s4, s5;
1638
1720
  s0 = peg$currPos;
1639
1721
  s1 = [];
1640
1722
  s2 = peg$currPos;
1641
- s3 = peg$parsename();
1723
+ s3 = peg$parseschema_name();
1724
+
1725
+ if (s3 === peg$FAILED) {
1726
+ s3 = null;
1727
+ }
1642
1728
 
1643
1729
  if (s3 !== peg$FAILED) {
1644
- s4 = peg$parse__();
1730
+ s4 = peg$parsename();
1645
1731
 
1646
1732
  if (s4 !== peg$FAILED) {
1647
- s3 = [s3, s4];
1648
- s2 = s3;
1733
+ s5 = peg$parse__();
1734
+
1735
+ if (s5 !== peg$FAILED) {
1736
+ s3 = [s3, s4, s5];
1737
+ s2 = s3;
1738
+ } else {
1739
+ peg$currPos = s2;
1740
+ s2 = peg$FAILED;
1741
+ }
1649
1742
  } else {
1650
1743
  peg$currPos = s2;
1651
1744
  s2 = peg$FAILED;
@@ -1658,14 +1751,25 @@ function peg$parse(input, options) {
1658
1751
  while (s2 !== peg$FAILED) {
1659
1752
  s1.push(s2);
1660
1753
  s2 = peg$currPos;
1661
- s3 = peg$parsename();
1754
+ s3 = peg$parseschema_name();
1755
+
1756
+ if (s3 === peg$FAILED) {
1757
+ s3 = null;
1758
+ }
1662
1759
 
1663
1760
  if (s3 !== peg$FAILED) {
1664
- s4 = peg$parse__();
1761
+ s4 = peg$parsename();
1665
1762
 
1666
1763
  if (s4 !== peg$FAILED) {
1667
- s3 = [s3, s4];
1668
- s2 = s3;
1764
+ s5 = peg$parse__();
1765
+
1766
+ if (s5 !== peg$FAILED) {
1767
+ s3 = [s3, s4, s5];
1768
+ s2 = s3;
1769
+ } else {
1770
+ peg$currPos = s2;
1771
+ s2 = peg$FAILED;
1772
+ }
1669
1773
  } else {
1670
1774
  peg$currPos = s2;
1671
1775
  s2 = peg$FAILED;
@@ -1911,24 +2015,25 @@ function peg$parse(input, options) {
1911
2015
  }
1912
2016
 
1913
2017
  function peg$parseref_body() {
1914
- var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11;
2018
+ var s0, s1, s2, s3, s4, s5, s6, s7;
1915
2019
  s0 = peg$currPos;
1916
- s1 = peg$parsename();
2020
+ s1 = peg$parsefield_identifier();
1917
2021
 
1918
2022
  if (s1 !== peg$FAILED) {
1919
- if (input.charCodeAt(peg$currPos) === 46) {
1920
- s2 = peg$c25;
1921
- peg$currPos++;
1922
- } else {
1923
- s2 = peg$FAILED;
2023
+ s2 = [];
2024
+ s3 = peg$parsesp();
1924
2025
 
1925
- if (peg$silentFails === 0) {
1926
- peg$fail(peg$c26);
2026
+ if (s3 !== peg$FAILED) {
2027
+ while (s3 !== peg$FAILED) {
2028
+ s2.push(s3);
2029
+ s3 = peg$parsesp();
1927
2030
  }
2031
+ } else {
2032
+ s2 = peg$FAILED;
1928
2033
  }
1929
2034
 
1930
2035
  if (s2 !== peg$FAILED) {
1931
- s3 = peg$parseRefField();
2036
+ s3 = peg$parserelation();
1932
2037
 
1933
2038
  if (s3 !== peg$FAILED) {
1934
2039
  s4 = [];
@@ -1944,75 +2049,28 @@ function peg$parse(input, options) {
1944
2049
  }
1945
2050
 
1946
2051
  if (s4 !== peg$FAILED) {
1947
- s5 = peg$parserelation();
2052
+ s5 = peg$parsefield_identifier();
1948
2053
 
1949
2054
  if (s5 !== peg$FAILED) {
1950
2055
  s6 = [];
1951
2056
  s7 = peg$parsesp();
1952
2057
 
1953
- if (s7 !== peg$FAILED) {
1954
- while (s7 !== peg$FAILED) {
1955
- s6.push(s7);
1956
- s7 = peg$parsesp();
1957
- }
1958
- } else {
1959
- s6 = peg$FAILED;
2058
+ while (s7 !== peg$FAILED) {
2059
+ s6.push(s7);
2060
+ s7 = peg$parsesp();
1960
2061
  }
1961
2062
 
1962
2063
  if (s6 !== peg$FAILED) {
1963
- s7 = peg$parsename();
1964
-
1965
- if (s7 !== peg$FAILED) {
1966
- if (input.charCodeAt(peg$currPos) === 46) {
1967
- s8 = peg$c25;
1968
- peg$currPos++;
1969
- } else {
1970
- s8 = peg$FAILED;
1971
-
1972
- if (peg$silentFails === 0) {
1973
- peg$fail(peg$c26);
1974
- }
1975
- }
1976
-
1977
- if (s8 !== peg$FAILED) {
1978
- s9 = peg$parseRefField();
1979
-
1980
- if (s9 !== peg$FAILED) {
1981
- s10 = [];
1982
- s11 = peg$parsesp();
1983
-
1984
- while (s11 !== peg$FAILED) {
1985
- s10.push(s11);
1986
- s11 = peg$parsesp();
1987
- }
1988
-
1989
- if (s10 !== peg$FAILED) {
1990
- s11 = peg$parseRefSettings();
2064
+ s7 = peg$parseRefSettings();
1991
2065
 
1992
- if (s11 === peg$FAILED) {
1993
- s11 = null;
1994
- }
2066
+ if (s7 === peg$FAILED) {
2067
+ s7 = null;
2068
+ }
1995
2069
 
1996
- if (s11 !== peg$FAILED) {
1997
- peg$savedPos = s0;
1998
- s1 = peg$c27(s1, s3, s5, s7, s9, s11);
1999
- s0 = s1;
2000
- } else {
2001
- peg$currPos = s0;
2002
- s0 = peg$FAILED;
2003
- }
2004
- } else {
2005
- peg$currPos = s0;
2006
- s0 = peg$FAILED;
2007
- }
2008
- } else {
2009
- peg$currPos = s0;
2010
- s0 = peg$FAILED;
2011
- }
2012
- } else {
2013
- peg$currPos = s0;
2014
- s0 = peg$FAILED;
2015
- }
2070
+ if (s7 !== peg$FAILED) {
2071
+ peg$savedPos = s0;
2072
+ s1 = peg$c25(s1, s3, s5, s7);
2073
+ s0 = s1;
2016
2074
  } else {
2017
2075
  peg$currPos = s0;
2018
2076
  s0 = peg$FAILED;
@@ -2056,7 +2114,7 @@ function peg$parse(input, options) {
2056
2114
 
2057
2115
  if (s1 !== peg$FAILED) {
2058
2116
  peg$savedPos = s0;
2059
- s1 = peg$c28(s1);
2117
+ s1 = peg$c26(s1);
2060
2118
  }
2061
2119
 
2062
2120
  s0 = s1;
@@ -2070,7 +2128,7 @@ function peg$parse(input, options) {
2070
2128
 
2071
2129
  if (s1 !== peg$FAILED) {
2072
2130
  peg$savedPos = s0;
2073
- s1 = peg$c29(s1);
2131
+ s1 = peg$c27(s1);
2074
2132
  }
2075
2133
 
2076
2134
  s0 = s1;
@@ -2082,13 +2140,13 @@ function peg$parse(input, options) {
2082
2140
  s0 = peg$currPos;
2083
2141
 
2084
2142
  if (input.charCodeAt(peg$currPos) === 40) {
2085
- s1 = peg$c30;
2143
+ s1 = peg$c28;
2086
2144
  peg$currPos++;
2087
2145
  } else {
2088
2146
  s1 = peg$FAILED;
2089
2147
 
2090
2148
  if (peg$silentFails === 0) {
2091
- peg$fail(peg$c31);
2149
+ peg$fail(peg$c29);
2092
2150
  }
2093
2151
  }
2094
2152
 
@@ -2208,19 +2266,19 @@ function peg$parse(input, options) {
2208
2266
 
2209
2267
  if (s5 !== peg$FAILED) {
2210
2268
  if (input.charCodeAt(peg$currPos) === 41) {
2211
- s6 = peg$c32;
2269
+ s6 = peg$c30;
2212
2270
  peg$currPos++;
2213
2271
  } else {
2214
2272
  s6 = peg$FAILED;
2215
2273
 
2216
2274
  if (peg$silentFails === 0) {
2217
- peg$fail(peg$c33);
2275
+ peg$fail(peg$c31);
2218
2276
  }
2219
2277
  }
2220
2278
 
2221
2279
  if (s6 !== peg$FAILED) {
2222
2280
  peg$savedPos = s0;
2223
- s1 = peg$c34(s3, s4);
2281
+ s1 = peg$c32(s3, s4);
2224
2282
  s0 = s1;
2225
2283
  } else {
2226
2284
  peg$currPos = s0;
@@ -2255,13 +2313,13 @@ function peg$parse(input, options) {
2255
2313
  s0 = peg$currPos;
2256
2314
 
2257
2315
  if (input.charCodeAt(peg$currPos) === 91) {
2258
- s1 = peg$c35;
2316
+ s1 = peg$c33;
2259
2317
  peg$currPos++;
2260
2318
  } else {
2261
2319
  s1 = peg$FAILED;
2262
2320
 
2263
2321
  if (peg$silentFails === 0) {
2264
- peg$fail(peg$c36);
2322
+ peg$fail(peg$c34);
2265
2323
  }
2266
2324
  }
2267
2325
 
@@ -2311,19 +2369,19 @@ function peg$parse(input, options) {
2311
2369
 
2312
2370
  if (s3 !== peg$FAILED) {
2313
2371
  if (input.charCodeAt(peg$currPos) === 93) {
2314
- s4 = peg$c37;
2372
+ s4 = peg$c35;
2315
2373
  peg$currPos++;
2316
2374
  } else {
2317
2375
  s4 = peg$FAILED;
2318
2376
 
2319
2377
  if (peg$silentFails === 0) {
2320
- peg$fail(peg$c38);
2378
+ peg$fail(peg$c36);
2321
2379
  }
2322
2380
  }
2323
2381
 
2324
2382
  if (s4 !== peg$FAILED) {
2325
2383
  peg$savedPos = s0;
2326
- s1 = peg$c39(s2, s3);
2384
+ s1 = peg$c37(s2, s3);
2327
2385
  s0 = s1;
2328
2386
  } else {
2329
2387
  peg$currPos = s0;
@@ -2358,7 +2416,7 @@ function peg$parse(input, options) {
2358
2416
 
2359
2417
  if (s3 !== peg$FAILED) {
2360
2418
  peg$savedPos = s0;
2361
- s1 = peg$c40(s2);
2419
+ s1 = peg$c38(s2);
2362
2420
  s0 = s1;
2363
2421
  } else {
2364
2422
  peg$currPos = s0;
@@ -2385,7 +2443,7 @@ function peg$parse(input, options) {
2385
2443
 
2386
2444
  if (s3 !== peg$FAILED) {
2387
2445
  peg$savedPos = s0;
2388
- s1 = peg$c41(s2);
2446
+ s1 = peg$c39(s2);
2389
2447
  s0 = s1;
2390
2448
  } else {
2391
2449
  peg$currPos = s0;
@@ -2408,14 +2466,14 @@ function peg$parse(input, options) {
2408
2466
  var s0, s1, s2, s3;
2409
2467
  s0 = peg$currPos;
2410
2468
 
2411
- if (input.substr(peg$currPos, 7).toLowerCase() === peg$c42) {
2469
+ if (input.substr(peg$currPos, 7).toLowerCase() === peg$c40) {
2412
2470
  s1 = input.substr(peg$currPos, 7);
2413
2471
  peg$currPos += 7;
2414
2472
  } else {
2415
2473
  s1 = peg$FAILED;
2416
2474
 
2417
2475
  if (peg$silentFails === 0) {
2418
- peg$fail(peg$c43);
2476
+ peg$fail(peg$c41);
2419
2477
  }
2420
2478
  }
2421
2479
 
@@ -2443,7 +2501,7 @@ function peg$parse(input, options) {
2443
2501
 
2444
2502
  if (s3 !== peg$FAILED) {
2445
2503
  peg$savedPos = s0;
2446
- s1 = peg$c44(s3);
2504
+ s1 = peg$c42(s3);
2447
2505
  s0 = s1;
2448
2506
  } else {
2449
2507
  peg$currPos = s0;
@@ -2465,14 +2523,14 @@ function peg$parse(input, options) {
2465
2523
  var s0, s1, s2, s3;
2466
2524
  s0 = peg$currPos;
2467
2525
 
2468
- if (input.substr(peg$currPos, 7).toLowerCase() === peg$c45) {
2526
+ if (input.substr(peg$currPos, 7).toLowerCase() === peg$c43) {
2469
2527
  s1 = input.substr(peg$currPos, 7);
2470
2528
  peg$currPos += 7;
2471
2529
  } else {
2472
2530
  s1 = peg$FAILED;
2473
2531
 
2474
2532
  if (peg$silentFails === 0) {
2475
- peg$fail(peg$c46);
2533
+ peg$fail(peg$c44);
2476
2534
  }
2477
2535
  }
2478
2536
 
@@ -2500,7 +2558,7 @@ function peg$parse(input, options) {
2500
2558
 
2501
2559
  if (s3 !== peg$FAILED) {
2502
2560
  peg$savedPos = s0;
2503
- s1 = peg$c44(s3);
2561
+ s1 = peg$c42(s3);
2504
2562
  s0 = s1;
2505
2563
  } else {
2506
2564
  peg$currPos = s0;
@@ -2519,7 +2577,7 @@ function peg$parse(input, options) {
2519
2577
  }
2520
2578
 
2521
2579
  function peg$parseTableSyntax() {
2522
- var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10;
2580
+ var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11;
2523
2581
  s0 = peg$currPos;
2524
2582
  s1 = peg$parsetable();
2525
2583
 
@@ -2537,65 +2595,76 @@ function peg$parse(input, options) {
2537
2595
  }
2538
2596
 
2539
2597
  if (s2 !== peg$FAILED) {
2540
- s3 = peg$parsename();
2598
+ s3 = peg$parseschema_name();
2541
2599
 
2542
- if (s3 !== peg$FAILED) {
2543
- s4 = peg$parsealias_def();
2600
+ if (s3 === peg$FAILED) {
2601
+ s3 = null;
2602
+ }
2544
2603
 
2545
- if (s4 === peg$FAILED) {
2546
- s4 = null;
2547
- }
2604
+ if (s3 !== peg$FAILED) {
2605
+ s4 = peg$parsename();
2548
2606
 
2549
2607
  if (s4 !== peg$FAILED) {
2550
- s5 = [];
2551
- s6 = peg$parsesp();
2608
+ s5 = peg$parsealias_def();
2552
2609
 
2553
- while (s6 !== peg$FAILED) {
2554
- s5.push(s6);
2555
- s6 = peg$parsesp();
2610
+ if (s5 === peg$FAILED) {
2611
+ s5 = null;
2556
2612
  }
2557
2613
 
2558
2614
  if (s5 !== peg$FAILED) {
2559
- s6 = peg$parseTableSettings();
2615
+ s6 = [];
2616
+ s7 = peg$parsesp();
2560
2617
 
2561
- if (s6 === peg$FAILED) {
2562
- s6 = null;
2618
+ while (s7 !== peg$FAILED) {
2619
+ s6.push(s7);
2620
+ s7 = peg$parsesp();
2563
2621
  }
2564
2622
 
2565
2623
  if (s6 !== peg$FAILED) {
2566
- s7 = peg$parse_();
2624
+ s7 = peg$parseTableSettings();
2567
2625
 
2568
- if (s7 !== peg$FAILED) {
2569
- if (input.charCodeAt(peg$currPos) === 123) {
2570
- s8 = peg$c6;
2571
- peg$currPos++;
2572
- } else {
2573
- s8 = peg$FAILED;
2626
+ if (s7 === peg$FAILED) {
2627
+ s7 = null;
2628
+ }
2574
2629
 
2575
- if (peg$silentFails === 0) {
2576
- peg$fail(peg$c7);
2577
- }
2578
- }
2630
+ if (s7 !== peg$FAILED) {
2631
+ s8 = peg$parse_();
2579
2632
 
2580
2633
  if (s8 !== peg$FAILED) {
2581
- s9 = peg$parseTableBody();
2634
+ if (input.charCodeAt(peg$currPos) === 123) {
2635
+ s9 = peg$c6;
2636
+ peg$currPos++;
2637
+ } else {
2638
+ s9 = peg$FAILED;
2639
+
2640
+ if (peg$silentFails === 0) {
2641
+ peg$fail(peg$c7);
2642
+ }
2643
+ }
2582
2644
 
2583
2645
  if (s9 !== peg$FAILED) {
2584
- if (input.charCodeAt(peg$currPos) === 125) {
2585
- s10 = peg$c8;
2586
- peg$currPos++;
2587
- } else {
2588
- s10 = peg$FAILED;
2646
+ s10 = peg$parseTableBody();
2589
2647
 
2590
- if (peg$silentFails === 0) {
2591
- peg$fail(peg$c9);
2648
+ if (s10 !== peg$FAILED) {
2649
+ if (input.charCodeAt(peg$currPos) === 125) {
2650
+ s11 = peg$c8;
2651
+ peg$currPos++;
2652
+ } else {
2653
+ s11 = peg$FAILED;
2654
+
2655
+ if (peg$silentFails === 0) {
2656
+ peg$fail(peg$c9);
2657
+ }
2592
2658
  }
2593
- }
2594
2659
 
2595
- if (s10 !== peg$FAILED) {
2596
- peg$savedPos = s0;
2597
- s1 = peg$c47(s3, s4, s6, s9);
2598
- s0 = s1;
2660
+ if (s11 !== peg$FAILED) {
2661
+ peg$savedPos = s0;
2662
+ s1 = peg$c45(s3, s4, s5, s7, s10);
2663
+ s0 = s1;
2664
+ } else {
2665
+ peg$currPos = s0;
2666
+ s0 = peg$FAILED;
2667
+ }
2599
2668
  } else {
2600
2669
  peg$currPos = s0;
2601
2670
  s0 = peg$FAILED;
@@ -2675,7 +2744,7 @@ function peg$parse(input, options) {
2675
2744
 
2676
2745
  if (s5 !== peg$FAILED) {
2677
2746
  peg$savedPos = s0;
2678
- s1 = peg$c48(s2, s4);
2747
+ s1 = peg$c46(s2, s4);
2679
2748
  s0 = s1;
2680
2749
  } else {
2681
2750
  peg$currPos = s0;
@@ -2714,7 +2783,7 @@ function peg$parse(input, options) {
2714
2783
 
2715
2784
  if (s3 !== peg$FAILED) {
2716
2785
  peg$savedPos = s0;
2717
- s1 = peg$c49(s2);
2786
+ s1 = peg$c47(s2);
2718
2787
  s0 = s1;
2719
2788
  } else {
2720
2789
  peg$currPos = s0;
@@ -2761,7 +2830,7 @@ function peg$parse(input, options) {
2761
2830
  }
2762
2831
 
2763
2832
  function peg$parseField() {
2764
- var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;
2833
+ var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10;
2765
2834
  s0 = peg$currPos;
2766
2835
  s1 = peg$parse_();
2767
2836
 
@@ -2782,125 +2851,136 @@ function peg$parse(input, options) {
2782
2851
  }
2783
2852
 
2784
2853
  if (s3 !== peg$FAILED) {
2785
- s4 = peg$parsetype();
2854
+ s4 = peg$parseschema_name();
2855
+
2856
+ if (s4 === peg$FAILED) {
2857
+ s4 = null;
2858
+ }
2786
2859
 
2787
2860
  if (s4 !== peg$FAILED) {
2788
- s5 = [];
2789
- s6 = peg$currPos;
2790
- s7 = [];
2791
- s8 = peg$parsesp();
2861
+ s5 = peg$parsetype();
2792
2862
 
2793
- if (s8 !== peg$FAILED) {
2794
- while (s8 !== peg$FAILED) {
2795
- s7.push(s8);
2796
- s8 = peg$parsesp();
2797
- }
2798
- } else {
2799
- s7 = peg$FAILED;
2800
- }
2863
+ if (s5 !== peg$FAILED) {
2864
+ s6 = [];
2865
+ s7 = peg$currPos;
2866
+ s8 = [];
2867
+ s9 = peg$parsesp();
2801
2868
 
2802
- if (s7 !== peg$FAILED) {
2803
- s8 = peg$parseconstrain();
2869
+ if (s9 !== peg$FAILED) {
2870
+ while (s9 !== peg$FAILED) {
2871
+ s8.push(s9);
2872
+ s9 = peg$parsesp();
2873
+ }
2874
+ } else {
2875
+ s8 = peg$FAILED;
2876
+ }
2804
2877
 
2805
2878
  if (s8 !== peg$FAILED) {
2806
- s7 = [s7, s8];
2807
- s6 = s7;
2879
+ s9 = peg$parseconstrain();
2880
+
2881
+ if (s9 !== peg$FAILED) {
2882
+ s8 = [s8, s9];
2883
+ s7 = s8;
2884
+ } else {
2885
+ peg$currPos = s7;
2886
+ s7 = peg$FAILED;
2887
+ }
2808
2888
  } else {
2809
- peg$currPos = s6;
2810
- s6 = peg$FAILED;
2889
+ peg$currPos = s7;
2890
+ s7 = peg$FAILED;
2811
2891
  }
2812
- } else {
2813
- peg$currPos = s6;
2814
- s6 = peg$FAILED;
2815
- }
2816
2892
 
2817
- while (s6 !== peg$FAILED) {
2818
- s5.push(s6);
2819
- s6 = peg$currPos;
2820
- s7 = [];
2821
- s8 = peg$parsesp();
2893
+ while (s7 !== peg$FAILED) {
2894
+ s6.push(s7);
2895
+ s7 = peg$currPos;
2896
+ s8 = [];
2897
+ s9 = peg$parsesp();
2822
2898
 
2823
- if (s8 !== peg$FAILED) {
2824
- while (s8 !== peg$FAILED) {
2825
- s7.push(s8);
2826
- s8 = peg$parsesp();
2899
+ if (s9 !== peg$FAILED) {
2900
+ while (s9 !== peg$FAILED) {
2901
+ s8.push(s9);
2902
+ s9 = peg$parsesp();
2903
+ }
2904
+ } else {
2905
+ s8 = peg$FAILED;
2827
2906
  }
2828
- } else {
2829
- s7 = peg$FAILED;
2830
- }
2831
-
2832
- if (s7 !== peg$FAILED) {
2833
- s8 = peg$parseconstrain();
2834
2907
 
2835
2908
  if (s8 !== peg$FAILED) {
2836
- s7 = [s7, s8];
2837
- s6 = s7;
2909
+ s9 = peg$parseconstrain();
2910
+
2911
+ if (s9 !== peg$FAILED) {
2912
+ s8 = [s8, s9];
2913
+ s7 = s8;
2914
+ } else {
2915
+ peg$currPos = s7;
2916
+ s7 = peg$FAILED;
2917
+ }
2838
2918
  } else {
2839
- peg$currPos = s6;
2840
- s6 = peg$FAILED;
2919
+ peg$currPos = s7;
2920
+ s7 = peg$FAILED;
2841
2921
  }
2842
- } else {
2843
- peg$currPos = s6;
2844
- s6 = peg$FAILED;
2845
2922
  }
2846
- }
2847
2923
 
2848
- if (s5 !== peg$FAILED) {
2849
- s6 = peg$currPos;
2850
- s7 = [];
2851
- s8 = peg$parsesp();
2924
+ if (s6 !== peg$FAILED) {
2925
+ s7 = peg$currPos;
2926
+ s8 = [];
2927
+ s9 = peg$parsesp();
2852
2928
 
2853
- if (s8 !== peg$FAILED) {
2854
- while (s8 !== peg$FAILED) {
2855
- s7.push(s8);
2856
- s8 = peg$parsesp();
2929
+ if (s9 !== peg$FAILED) {
2930
+ while (s9 !== peg$FAILED) {
2931
+ s8.push(s9);
2932
+ s9 = peg$parsesp();
2933
+ }
2934
+ } else {
2935
+ s8 = peg$FAILED;
2857
2936
  }
2858
- } else {
2859
- s7 = peg$FAILED;
2860
- }
2861
-
2862
- if (s7 !== peg$FAILED) {
2863
- s8 = peg$parseFieldSettings();
2864
2937
 
2865
2938
  if (s8 !== peg$FAILED) {
2866
- s7 = [s7, s8];
2867
- s6 = s7;
2939
+ s9 = peg$parseFieldSettings();
2940
+
2941
+ if (s9 !== peg$FAILED) {
2942
+ s8 = [s8, s9];
2943
+ s7 = s8;
2944
+ } else {
2945
+ peg$currPos = s7;
2946
+ s7 = peg$FAILED;
2947
+ }
2868
2948
  } else {
2869
- peg$currPos = s6;
2870
- s6 = peg$FAILED;
2949
+ peg$currPos = s7;
2950
+ s7 = peg$FAILED;
2871
2951
  }
2872
- } else {
2873
- peg$currPos = s6;
2874
- s6 = peg$FAILED;
2875
- }
2876
-
2877
- if (s6 === peg$FAILED) {
2878
- s6 = null;
2879
- }
2880
2952
 
2881
- if (s6 !== peg$FAILED) {
2882
- s7 = [];
2883
- s8 = peg$parsesp();
2884
-
2885
- while (s8 !== peg$FAILED) {
2886
- s7.push(s8);
2887
- s8 = peg$parsesp();
2953
+ if (s7 === peg$FAILED) {
2954
+ s7 = null;
2888
2955
  }
2889
2956
 
2890
2957
  if (s7 !== peg$FAILED) {
2891
- s8 = peg$parsecomment();
2958
+ s8 = [];
2959
+ s9 = peg$parsesp();
2892
2960
 
2893
- if (s8 === peg$FAILED) {
2894
- s8 = null;
2961
+ while (s9 !== peg$FAILED) {
2962
+ s8.push(s9);
2963
+ s9 = peg$parsesp();
2895
2964
  }
2896
2965
 
2897
2966
  if (s8 !== peg$FAILED) {
2898
- s9 = peg$parsenewline();
2967
+ s9 = peg$parsecomment();
2968
+
2969
+ if (s9 === peg$FAILED) {
2970
+ s9 = null;
2971
+ }
2899
2972
 
2900
2973
  if (s9 !== peg$FAILED) {
2901
- peg$savedPos = s0;
2902
- s1 = peg$c50(s2, s4, s5, s6);
2903
- s0 = s1;
2974
+ s10 = peg$parsenewline();
2975
+
2976
+ if (s10 !== peg$FAILED) {
2977
+ peg$savedPos = s0;
2978
+ s1 = peg$c48(s2, s4, s5, s6, s7);
2979
+ s0 = s1;
2980
+ } else {
2981
+ peg$currPos = s0;
2982
+ s0 = peg$FAILED;
2983
+ }
2904
2984
  } else {
2905
2985
  peg$currPos = s0;
2906
2986
  s0 = peg$FAILED;
@@ -2942,7 +3022,7 @@ function peg$parse(input, options) {
2942
3022
  }
2943
3023
 
2944
3024
  function peg$parseEnumSyntax() {
2945
- var s0, s1, s2, s3, s4, s5, s6, s7;
3025
+ var s0, s1, s2, s3, s4, s5, s6, s7, s8;
2946
3026
  s0 = peg$currPos;
2947
3027
  s1 = peg$parseenum();
2948
3028
 
@@ -2960,42 +3040,53 @@ function peg$parse(input, options) {
2960
3040
  }
2961
3041
 
2962
3042
  if (s2 !== peg$FAILED) {
2963
- s3 = peg$parsename();
3043
+ s3 = peg$parseschema_name();
3044
+
3045
+ if (s3 === peg$FAILED) {
3046
+ s3 = null;
3047
+ }
2964
3048
 
2965
3049
  if (s3 !== peg$FAILED) {
2966
- s4 = peg$parse_();
3050
+ s4 = peg$parsename();
2967
3051
 
2968
3052
  if (s4 !== peg$FAILED) {
2969
- if (input.charCodeAt(peg$currPos) === 123) {
2970
- s5 = peg$c6;
2971
- peg$currPos++;
2972
- } else {
2973
- s5 = peg$FAILED;
2974
-
2975
- if (peg$silentFails === 0) {
2976
- peg$fail(peg$c7);
2977
- }
2978
- }
3053
+ s5 = peg$parse_();
2979
3054
 
2980
3055
  if (s5 !== peg$FAILED) {
2981
- s6 = peg$parseEnumBody();
3056
+ if (input.charCodeAt(peg$currPos) === 123) {
3057
+ s6 = peg$c6;
3058
+ peg$currPos++;
3059
+ } else {
3060
+ s6 = peg$FAILED;
3061
+
3062
+ if (peg$silentFails === 0) {
3063
+ peg$fail(peg$c7);
3064
+ }
3065
+ }
2982
3066
 
2983
3067
  if (s6 !== peg$FAILED) {
2984
- if (input.charCodeAt(peg$currPos) === 125) {
2985
- s7 = peg$c8;
2986
- peg$currPos++;
2987
- } else {
2988
- s7 = peg$FAILED;
3068
+ s7 = peg$parseEnumBody();
2989
3069
 
2990
- if (peg$silentFails === 0) {
2991
- peg$fail(peg$c9);
3070
+ if (s7 !== peg$FAILED) {
3071
+ if (input.charCodeAt(peg$currPos) === 125) {
3072
+ s8 = peg$c8;
3073
+ peg$currPos++;
3074
+ } else {
3075
+ s8 = peg$FAILED;
3076
+
3077
+ if (peg$silentFails === 0) {
3078
+ peg$fail(peg$c9);
3079
+ }
2992
3080
  }
2993
- }
2994
3081
 
2995
- if (s7 !== peg$FAILED) {
2996
- peg$savedPos = s0;
2997
- s1 = peg$c51(s3, s6);
2998
- s0 = s1;
3082
+ if (s8 !== peg$FAILED) {
3083
+ peg$savedPos = s0;
3084
+ s1 = peg$c49(s3, s4, s7);
3085
+ s0 = s1;
3086
+ } else {
3087
+ peg$currPos = s0;
3088
+ s0 = peg$FAILED;
3089
+ }
2999
3090
  } else {
3000
3091
  peg$currPos = s0;
3001
3092
  s0 = peg$FAILED;
@@ -3051,7 +3142,7 @@ function peg$parse(input, options) {
3051
3142
 
3052
3143
  if (s3 !== peg$FAILED) {
3053
3144
  peg$savedPos = s0;
3054
- s1 = peg$c52(s2);
3145
+ s1 = peg$c50(s2);
3055
3146
  s0 = s1;
3056
3147
  } else {
3057
3148
  peg$currPos = s0;
@@ -3114,7 +3205,7 @@ function peg$parse(input, options) {
3114
3205
 
3115
3206
  if (s7 !== peg$FAILED) {
3116
3207
  peg$savedPos = s0;
3117
- s1 = peg$c53(s2, s4);
3208
+ s1 = peg$c51(s2, s4);
3118
3209
  s0 = s1;
3119
3210
  } else {
3120
3211
  peg$currPos = s0;
@@ -3153,13 +3244,13 @@ function peg$parse(input, options) {
3153
3244
  s0 = peg$currPos;
3154
3245
 
3155
3246
  if (input.charCodeAt(peg$currPos) === 91) {
3156
- s1 = peg$c35;
3247
+ s1 = peg$c33;
3157
3248
  peg$currPos++;
3158
3249
  } else {
3159
3250
  s1 = peg$FAILED;
3160
3251
 
3161
3252
  if (peg$silentFails === 0) {
3162
- peg$fail(peg$c36);
3253
+ peg$fail(peg$c34);
3163
3254
  }
3164
3255
  }
3165
3256
 
@@ -3174,19 +3265,19 @@ function peg$parse(input, options) {
3174
3265
 
3175
3266
  if (s4 !== peg$FAILED) {
3176
3267
  if (input.charCodeAt(peg$currPos) === 93) {
3177
- s5 = peg$c37;
3268
+ s5 = peg$c35;
3178
3269
  peg$currPos++;
3179
3270
  } else {
3180
3271
  s5 = peg$FAILED;
3181
3272
 
3182
3273
  if (peg$silentFails === 0) {
3183
- peg$fail(peg$c38);
3274
+ peg$fail(peg$c36);
3184
3275
  }
3185
3276
  }
3186
3277
 
3187
3278
  if (s5 !== peg$FAILED) {
3188
3279
  peg$savedPos = s0;
3189
- s1 = peg$c54(s3);
3280
+ s1 = peg$c52(s3);
3190
3281
  s0 = s1;
3191
3282
  } else {
3192
3283
  peg$currPos = s0;
@@ -3217,13 +3308,13 @@ function peg$parse(input, options) {
3217
3308
  s0 = peg$currPos;
3218
3309
 
3219
3310
  if (input.charCodeAt(peg$currPos) === 91) {
3220
- s1 = peg$c35;
3311
+ s1 = peg$c33;
3221
3312
  peg$currPos++;
3222
3313
  } else {
3223
3314
  s1 = peg$FAILED;
3224
3315
 
3225
3316
  if (peg$silentFails === 0) {
3226
- peg$fail(peg$c36);
3317
+ peg$fail(peg$c34);
3227
3318
  }
3228
3319
  }
3229
3320
 
@@ -3273,19 +3364,19 @@ function peg$parse(input, options) {
3273
3364
 
3274
3365
  if (s3 !== peg$FAILED) {
3275
3366
  if (input.charCodeAt(peg$currPos) === 93) {
3276
- s4 = peg$c37;
3367
+ s4 = peg$c35;
3277
3368
  peg$currPos++;
3278
3369
  } else {
3279
3370
  s4 = peg$FAILED;
3280
3371
 
3281
3372
  if (peg$silentFails === 0) {
3282
- peg$fail(peg$c38);
3373
+ peg$fail(peg$c36);
3283
3374
  }
3284
3375
  }
3285
3376
 
3286
3377
  if (s4 !== peg$FAILED) {
3287
3378
  peg$savedPos = s0;
3288
- s1 = peg$c55(s2, s3);
3379
+ s1 = peg$c53(s2, s3);
3289
3380
  s0 = s1;
3290
3381
  } else {
3291
3382
  peg$currPos = s0;
@@ -3312,13 +3403,13 @@ function peg$parse(input, options) {
3312
3403
  s0 = peg$currPos;
3313
3404
 
3314
3405
  if (input.charCodeAt(peg$currPos) === 91) {
3315
- s1 = peg$c35;
3406
+ s1 = peg$c33;
3316
3407
  peg$currPos++;
3317
3408
  } else {
3318
3409
  s1 = peg$FAILED;
3319
3410
 
3320
3411
  if (peg$silentFails === 0) {
3321
- peg$fail(peg$c36);
3412
+ peg$fail(peg$c34);
3322
3413
  }
3323
3414
  }
3324
3415
 
@@ -3368,19 +3459,19 @@ function peg$parse(input, options) {
3368
3459
 
3369
3460
  if (s3 !== peg$FAILED) {
3370
3461
  if (input.charCodeAt(peg$currPos) === 93) {
3371
- s4 = peg$c37;
3462
+ s4 = peg$c35;
3372
3463
  peg$currPos++;
3373
3464
  } else {
3374
3465
  s4 = peg$FAILED;
3375
3466
 
3376
3467
  if (peg$silentFails === 0) {
3377
- peg$fail(peg$c38);
3468
+ peg$fail(peg$c36);
3378
3469
  }
3379
3470
  }
3380
3471
 
3381
3472
  if (s4 !== peg$FAILED) {
3382
3473
  peg$savedPos = s0;
3383
- s1 = peg$c56(s2, s3);
3474
+ s1 = peg$c54(s2, s3);
3384
3475
  s0 = s1;
3385
3476
  } else {
3386
3477
  peg$currPos = s0;
@@ -3415,7 +3506,7 @@ function peg$parse(input, options) {
3415
3506
 
3416
3507
  if (s3 !== peg$FAILED) {
3417
3508
  peg$savedPos = s0;
3418
- s1 = peg$c57(s2);
3509
+ s1 = peg$c55(s2);
3419
3510
  s0 = s1;
3420
3511
  } else {
3421
3512
  peg$currPos = s0;
@@ -3442,7 +3533,7 @@ function peg$parse(input, options) {
3442
3533
 
3443
3534
  if (s3 !== peg$FAILED) {
3444
3535
  peg$savedPos = s0;
3445
- s1 = peg$c58(s2);
3536
+ s1 = peg$c56(s2);
3446
3537
  s0 = s1;
3447
3538
  } else {
3448
3539
  peg$currPos = s0;
@@ -3467,14 +3558,14 @@ function peg$parse(input, options) {
3467
3558
  s1 = peg$parse_();
3468
3559
 
3469
3560
  if (s1 !== peg$FAILED) {
3470
- if (input.substr(peg$currPos, 8).toLowerCase() === peg$c59) {
3561
+ if (input.substr(peg$currPos, 8).toLowerCase() === peg$c57) {
3471
3562
  s2 = input.substr(peg$currPos, 8);
3472
3563
  peg$currPos += 8;
3473
3564
  } else {
3474
3565
  s2 = peg$FAILED;
3475
3566
 
3476
3567
  if (peg$silentFails === 0) {
3477
- peg$fail(peg$c60);
3568
+ peg$fail(peg$c58);
3478
3569
  }
3479
3570
  }
3480
3571
 
@@ -3483,7 +3574,7 @@ function peg$parse(input, options) {
3483
3574
 
3484
3575
  if (s3 !== peg$FAILED) {
3485
3576
  peg$savedPos = s0;
3486
- s1 = peg$c61(s2);
3577
+ s1 = peg$c59(s2);
3487
3578
  s0 = s1;
3488
3579
  } else {
3489
3580
  peg$currPos = s0;
@@ -3503,14 +3594,14 @@ function peg$parse(input, options) {
3503
3594
  s1 = peg$parse_();
3504
3595
 
3505
3596
  if (s1 !== peg$FAILED) {
3506
- if (input.substr(peg$currPos, 4).toLowerCase() === peg$c62) {
3597
+ if (input.substr(peg$currPos, 4).toLowerCase() === peg$c60) {
3507
3598
  s2 = input.substr(peg$currPos, 4);
3508
3599
  peg$currPos += 4;
3509
3600
  } else {
3510
3601
  s2 = peg$FAILED;
3511
3602
 
3512
3603
  if (peg$silentFails === 0) {
3513
- peg$fail(peg$c63);
3604
+ peg$fail(peg$c61);
3514
3605
  }
3515
3606
  }
3516
3607
 
@@ -3519,7 +3610,7 @@ function peg$parse(input, options) {
3519
3610
 
3520
3611
  if (s3 !== peg$FAILED) {
3521
3612
  peg$savedPos = s0;
3522
- s1 = peg$c61(s2);
3613
+ s1 = peg$c59(s2);
3523
3614
  s0 = s1;
3524
3615
  } else {
3525
3616
  peg$currPos = s0;
@@ -3539,14 +3630,14 @@ function peg$parse(input, options) {
3539
3630
  s1 = peg$parse_();
3540
3631
 
3541
3632
  if (s1 !== peg$FAILED) {
3542
- if (input.substr(peg$currPos, 11).toLowerCase() === peg$c64) {
3633
+ if (input.substr(peg$currPos, 11).toLowerCase() === peg$c62) {
3543
3634
  s2 = input.substr(peg$currPos, 11);
3544
3635
  peg$currPos += 11;
3545
3636
  } else {
3546
3637
  s2 = peg$FAILED;
3547
3638
 
3548
3639
  if (peg$silentFails === 0) {
3549
- peg$fail(peg$c65);
3640
+ peg$fail(peg$c63);
3550
3641
  }
3551
3642
  }
3552
3643
 
@@ -3555,7 +3646,7 @@ function peg$parse(input, options) {
3555
3646
 
3556
3647
  if (s3 !== peg$FAILED) {
3557
3648
  peg$savedPos = s0;
3558
- s1 = peg$c61(s2);
3649
+ s1 = peg$c59(s2);
3559
3650
  s0 = s1;
3560
3651
  } else {
3561
3652
  peg$currPos = s0;
@@ -3575,14 +3666,14 @@ function peg$parse(input, options) {
3575
3666
  s1 = peg$parse_();
3576
3667
 
3577
3668
  if (s1 !== peg$FAILED) {
3578
- if (input.substr(peg$currPos, 2).toLowerCase() === peg$c66) {
3669
+ if (input.substr(peg$currPos, 2).toLowerCase() === peg$c64) {
3579
3670
  s2 = input.substr(peg$currPos, 2);
3580
3671
  peg$currPos += 2;
3581
3672
  } else {
3582
3673
  s2 = peg$FAILED;
3583
3674
 
3584
3675
  if (peg$silentFails === 0) {
3585
- peg$fail(peg$c67);
3676
+ peg$fail(peg$c65);
3586
3677
  }
3587
3678
  }
3588
3679
 
@@ -3591,7 +3682,7 @@ function peg$parse(input, options) {
3591
3682
 
3592
3683
  if (s3 !== peg$FAILED) {
3593
3684
  peg$savedPos = s0;
3594
- s1 = peg$c61(s2);
3685
+ s1 = peg$c59(s2);
3595
3686
  s0 = s1;
3596
3687
  } else {
3597
3688
  peg$currPos = s0;
@@ -3611,14 +3702,14 @@ function peg$parse(input, options) {
3611
3702
  s1 = peg$parse_();
3612
3703
 
3613
3704
  if (s1 !== peg$FAILED) {
3614
- if (input.substr(peg$currPos, 6).toLowerCase() === peg$c68) {
3705
+ if (input.substr(peg$currPos, 6).toLowerCase() === peg$c66) {
3615
3706
  s2 = input.substr(peg$currPos, 6);
3616
3707
  peg$currPos += 6;
3617
3708
  } else {
3618
3709
  s2 = peg$FAILED;
3619
3710
 
3620
3711
  if (peg$silentFails === 0) {
3621
- peg$fail(peg$c69);
3712
+ peg$fail(peg$c67);
3622
3713
  }
3623
3714
  }
3624
3715
 
@@ -3627,7 +3718,7 @@ function peg$parse(input, options) {
3627
3718
 
3628
3719
  if (s3 !== peg$FAILED) {
3629
3720
  peg$savedPos = s0;
3630
- s1 = peg$c61(s2);
3721
+ s1 = peg$c59(s2);
3631
3722
  s0 = s1;
3632
3723
  } else {
3633
3724
  peg$currPos = s0;
@@ -3647,14 +3738,14 @@ function peg$parse(input, options) {
3647
3738
  s1 = peg$parse_();
3648
3739
 
3649
3740
  if (s1 !== peg$FAILED) {
3650
- if (input.substr(peg$currPos, 9) === peg$c70) {
3651
- s2 = peg$c70;
3741
+ if (input.substr(peg$currPos, 9) === peg$c68) {
3742
+ s2 = peg$c68;
3652
3743
  peg$currPos += 9;
3653
3744
  } else {
3654
3745
  s2 = peg$FAILED;
3655
3746
 
3656
3747
  if (peg$silentFails === 0) {
3657
- peg$fail(peg$c71);
3748
+ peg$fail(peg$c69);
3658
3749
  }
3659
3750
  }
3660
3751
 
@@ -3663,7 +3754,7 @@ function peg$parse(input, options) {
3663
3754
 
3664
3755
  if (s3 !== peg$FAILED) {
3665
3756
  peg$savedPos = s0;
3666
- s1 = peg$c61(s2);
3757
+ s1 = peg$c59(s2);
3667
3758
  s0 = s1;
3668
3759
  } else {
3669
3760
  peg$currPos = s0;
@@ -3690,7 +3781,7 @@ function peg$parse(input, options) {
3690
3781
 
3691
3782
  if (s3 !== peg$FAILED) {
3692
3783
  peg$savedPos = s0;
3693
- s1 = peg$c57(s2);
3784
+ s1 = peg$c55(s2);
3694
3785
  s0 = s1;
3695
3786
  } else {
3696
3787
  peg$currPos = s0;
@@ -3713,9 +3804,16 @@ function peg$parse(input, options) {
3713
3804
  s2 = peg$parseRefInline();
3714
3805
 
3715
3806
  if (s2 !== peg$FAILED) {
3716
- peg$savedPos = s0;
3717
- s1 = peg$c72(s2);
3718
- s0 = s1;
3807
+ s3 = peg$parse_();
3808
+
3809
+ if (s3 !== peg$FAILED) {
3810
+ peg$savedPos = s0;
3811
+ s1 = peg$c70(s2);
3812
+ s0 = s1;
3813
+ } else {
3814
+ peg$currPos = s0;
3815
+ s0 = peg$FAILED;
3816
+ }
3719
3817
  } else {
3720
3818
  peg$currPos = s0;
3721
3819
  s0 = peg$FAILED;
@@ -3737,7 +3835,7 @@ function peg$parse(input, options) {
3737
3835
 
3738
3836
  if (s3 !== peg$FAILED) {
3739
3837
  peg$savedPos = s0;
3740
- s1 = peg$c73(s2);
3838
+ s1 = peg$c71(s2);
3741
3839
  s0 = s1;
3742
3840
  } else {
3743
3841
  peg$currPos = s0;
@@ -3803,7 +3901,7 @@ function peg$parse(input, options) {
3803
3901
 
3804
3902
  if (s6 !== peg$FAILED) {
3805
3903
  peg$savedPos = s0;
3806
- s1 = peg$c74(s5);
3904
+ s1 = peg$c72(s5);
3807
3905
  s0 = s1;
3808
3906
  } else {
3809
3907
  peg$currPos = s0;
@@ -3856,7 +3954,7 @@ function peg$parse(input, options) {
3856
3954
 
3857
3955
  if (s3 !== peg$FAILED) {
3858
3956
  peg$savedPos = s0;
3859
- s1 = peg$c75(s2);
3957
+ s1 = peg$c73(s2);
3860
3958
  s0 = s1;
3861
3959
  } else {
3862
3960
  peg$currPos = s0;
@@ -3891,7 +3989,7 @@ function peg$parse(input, options) {
3891
3989
 
3892
3990
  if (s3 !== peg$FAILED) {
3893
3991
  peg$savedPos = s0;
3894
- s1 = peg$c76(s2);
3992
+ s1 = peg$c74(s2);
3895
3993
  s0 = s1;
3896
3994
  } else {
3897
3995
  peg$currPos = s0;
@@ -3935,7 +4033,7 @@ function peg$parse(input, options) {
3935
4033
 
3936
4034
  if (s4 !== peg$FAILED) {
3937
4035
  peg$savedPos = s0;
3938
- s1 = peg$c77(s2, s4);
4036
+ s1 = peg$c75(s2, s4);
3939
4037
  s0 = s1;
3940
4038
  } else {
3941
4039
  peg$currPos = s0;
@@ -3983,7 +4081,7 @@ function peg$parse(input, options) {
3983
4081
 
3984
4082
  if (s4 !== peg$FAILED) {
3985
4083
  peg$savedPos = s0;
3986
- s1 = peg$c78(s2, s4);
4084
+ s1 = peg$c76(s2, s4);
3987
4085
  s0 = s1;
3988
4086
  } else {
3989
4087
  peg$currPos = s0;
@@ -4021,7 +4119,7 @@ function peg$parse(input, options) {
4021
4119
 
4022
4120
  if (s2 !== peg$FAILED) {
4023
4121
  peg$savedPos = s0;
4024
- s1 = peg$c79(s1);
4122
+ s1 = peg$c77(s1);
4025
4123
  s0 = s1;
4026
4124
  } else {
4027
4125
  peg$currPos = s0;
@@ -4044,60 +4142,60 @@ function peg$parse(input, options) {
4044
4142
  s0 = peg$currPos;
4045
4143
 
4046
4144
  if (input.charCodeAt(peg$currPos) === 96) {
4047
- s1 = peg$c80;
4145
+ s1 = peg$c78;
4048
4146
  peg$currPos++;
4049
4147
  } else {
4050
4148
  s1 = peg$FAILED;
4051
4149
 
4052
4150
  if (peg$silentFails === 0) {
4053
- peg$fail(peg$c81);
4151
+ peg$fail(peg$c79);
4054
4152
  }
4055
4153
  }
4056
4154
 
4057
4155
  if (s1 !== peg$FAILED) {
4058
4156
  s2 = [];
4059
4157
 
4060
- if (peg$c82.test(input.charAt(peg$currPos))) {
4158
+ if (peg$c80.test(input.charAt(peg$currPos))) {
4061
4159
  s3 = input.charAt(peg$currPos);
4062
4160
  peg$currPos++;
4063
4161
  } else {
4064
4162
  s3 = peg$FAILED;
4065
4163
 
4066
4164
  if (peg$silentFails === 0) {
4067
- peg$fail(peg$c83);
4165
+ peg$fail(peg$c81);
4068
4166
  }
4069
4167
  }
4070
4168
 
4071
4169
  while (s3 !== peg$FAILED) {
4072
4170
  s2.push(s3);
4073
4171
 
4074
- if (peg$c82.test(input.charAt(peg$currPos))) {
4172
+ if (peg$c80.test(input.charAt(peg$currPos))) {
4075
4173
  s3 = input.charAt(peg$currPos);
4076
4174
  peg$currPos++;
4077
4175
  } else {
4078
4176
  s3 = peg$FAILED;
4079
4177
 
4080
4178
  if (peg$silentFails === 0) {
4081
- peg$fail(peg$c83);
4179
+ peg$fail(peg$c81);
4082
4180
  }
4083
4181
  }
4084
4182
  }
4085
4183
 
4086
4184
  if (s2 !== peg$FAILED) {
4087
4185
  if (input.charCodeAt(peg$currPos) === 96) {
4088
- s3 = peg$c80;
4186
+ s3 = peg$c78;
4089
4187
  peg$currPos++;
4090
4188
  } else {
4091
4189
  s3 = peg$FAILED;
4092
4190
 
4093
4191
  if (peg$silentFails === 0) {
4094
- peg$fail(peg$c81);
4192
+ peg$fail(peg$c79);
4095
4193
  }
4096
4194
  }
4097
4195
 
4098
4196
  if (s3 !== peg$FAILED) {
4099
4197
  peg$savedPos = s0;
4100
- s1 = peg$c84(s2);
4198
+ s1 = peg$c82(s2);
4101
4199
  s0 = s1;
4102
4200
  } else {
4103
4201
  peg$currPos = s0;
@@ -4120,13 +4218,13 @@ function peg$parse(input, options) {
4120
4218
  s0 = peg$currPos;
4121
4219
 
4122
4220
  if (input.charCodeAt(peg$currPos) === 40) {
4123
- s1 = peg$c30;
4221
+ s1 = peg$c28;
4124
4222
  peg$currPos++;
4125
4223
  } else {
4126
4224
  s1 = peg$FAILED;
4127
4225
 
4128
4226
  if (peg$silentFails === 0) {
4129
- peg$fail(peg$c31);
4227
+ peg$fail(peg$c29);
4130
4228
  }
4131
4229
  }
4132
4230
 
@@ -4211,19 +4309,19 @@ function peg$parse(input, options) {
4211
4309
 
4212
4310
  if (s4 !== peg$FAILED) {
4213
4311
  if (input.charCodeAt(peg$currPos) === 41) {
4214
- s5 = peg$c32;
4312
+ s5 = peg$c30;
4215
4313
  peg$currPos++;
4216
4314
  } else {
4217
4315
  s5 = peg$FAILED;
4218
4316
 
4219
4317
  if (peg$silentFails === 0) {
4220
- peg$fail(peg$c33);
4318
+ peg$fail(peg$c31);
4221
4319
  }
4222
4320
  }
4223
4321
 
4224
4322
  if (s5 !== peg$FAILED) {
4225
4323
  peg$savedPos = s0;
4226
- s1 = peg$c85(s3, s4);
4324
+ s1 = peg$c83(s3, s4);
4227
4325
  s0 = s1;
4228
4326
  } else {
4229
4327
  peg$currPos = s0;
@@ -4254,13 +4352,13 @@ function peg$parse(input, options) {
4254
4352
  s0 = peg$currPos;
4255
4353
 
4256
4354
  if (input.charCodeAt(peg$currPos) === 91) {
4257
- s1 = peg$c35;
4355
+ s1 = peg$c33;
4258
4356
  peg$currPos++;
4259
4357
  } else {
4260
4358
  s1 = peg$FAILED;
4261
4359
 
4262
4360
  if (peg$silentFails === 0) {
4263
- peg$fail(peg$c36);
4361
+ peg$fail(peg$c34);
4264
4362
  }
4265
4363
  }
4266
4364
 
@@ -4287,19 +4385,19 @@ function peg$parse(input, options) {
4287
4385
 
4288
4386
  if (s4 !== peg$FAILED) {
4289
4387
  if (input.charCodeAt(peg$currPos) === 93) {
4290
- s5 = peg$c37;
4388
+ s5 = peg$c35;
4291
4389
  peg$currPos++;
4292
4390
  } else {
4293
4391
  s5 = peg$FAILED;
4294
4392
 
4295
4393
  if (peg$silentFails === 0) {
4296
- peg$fail(peg$c38);
4394
+ peg$fail(peg$c36);
4297
4395
  }
4298
4396
  }
4299
4397
 
4300
4398
  if (s5 !== peg$FAILED) {
4301
4399
  peg$savedPos = s0;
4302
- s1 = peg$c86();
4400
+ s1 = peg$c84();
4303
4401
  s0 = s1;
4304
4402
  } else {
4305
4403
  peg$currPos = s0;
@@ -4326,13 +4424,13 @@ function peg$parse(input, options) {
4326
4424
  s0 = peg$currPos;
4327
4425
 
4328
4426
  if (input.charCodeAt(peg$currPos) === 91) {
4329
- s1 = peg$c35;
4427
+ s1 = peg$c33;
4330
4428
  peg$currPos++;
4331
4429
  } else {
4332
4430
  s1 = peg$FAILED;
4333
4431
 
4334
4432
  if (peg$silentFails === 0) {
4335
- peg$fail(peg$c36);
4433
+ peg$fail(peg$c34);
4336
4434
  }
4337
4435
  }
4338
4436
 
@@ -4382,19 +4480,19 @@ function peg$parse(input, options) {
4382
4480
 
4383
4481
  if (s3 !== peg$FAILED) {
4384
4482
  if (input.charCodeAt(peg$currPos) === 93) {
4385
- s4 = peg$c37;
4483
+ s4 = peg$c35;
4386
4484
  peg$currPos++;
4387
4485
  } else {
4388
4486
  s4 = peg$FAILED;
4389
4487
 
4390
4488
  if (peg$silentFails === 0) {
4391
- peg$fail(peg$c38);
4489
+ peg$fail(peg$c36);
4392
4490
  }
4393
4491
  }
4394
4492
 
4395
4493
  if (s4 !== peg$FAILED) {
4396
4494
  peg$savedPos = s0;
4397
- s1 = peg$c87(s2, s3);
4495
+ s1 = peg$c85(s2, s3);
4398
4496
  s0 = s1;
4399
4497
  } else {
4400
4498
  peg$currPos = s0;
@@ -4423,14 +4521,14 @@ function peg$parse(input, options) {
4423
4521
  s1 = peg$parse_();
4424
4522
 
4425
4523
  if (s1 !== peg$FAILED) {
4426
- if (input.substr(peg$currPos, 6).toLowerCase() === peg$c68) {
4524
+ if (input.substr(peg$currPos, 6).toLowerCase() === peg$c66) {
4427
4525
  s2 = input.substr(peg$currPos, 6);
4428
4526
  peg$currPos += 6;
4429
4527
  } else {
4430
4528
  s2 = peg$FAILED;
4431
4529
 
4432
4530
  if (peg$silentFails === 0) {
4433
- peg$fail(peg$c69);
4531
+ peg$fail(peg$c67);
4434
4532
  }
4435
4533
  }
4436
4534
 
@@ -4439,7 +4537,7 @@ function peg$parse(input, options) {
4439
4537
 
4440
4538
  if (s3 !== peg$FAILED) {
4441
4539
  peg$savedPos = s0;
4442
- s1 = peg$c61(s2);
4540
+ s1 = peg$c59(s2);
4443
4541
  s0 = s1;
4444
4542
  } else {
4445
4543
  peg$currPos = s0;
@@ -4466,7 +4564,7 @@ function peg$parse(input, options) {
4466
4564
 
4467
4565
  if (s3 !== peg$FAILED) {
4468
4566
  peg$savedPos = s0;
4469
- s1 = peg$c88(s2);
4567
+ s1 = peg$c86(s2);
4470
4568
  s0 = s1;
4471
4569
  } else {
4472
4570
  peg$currPos = s0;
@@ -4493,7 +4591,7 @@ function peg$parse(input, options) {
4493
4591
 
4494
4592
  if (s3 !== peg$FAILED) {
4495
4593
  peg$savedPos = s0;
4496
- s1 = peg$c89(s2);
4594
+ s1 = peg$c87(s2);
4497
4595
  s0 = s1;
4498
4596
  } else {
4499
4597
  peg$currPos = s0;
@@ -4520,7 +4618,7 @@ function peg$parse(input, options) {
4520
4618
 
4521
4619
  if (s3 !== peg$FAILED) {
4522
4620
  peg$savedPos = s0;
4523
- s1 = peg$c57(s2);
4621
+ s1 = peg$c55(s2);
4524
4622
  s0 = s1;
4525
4623
  } else {
4526
4624
  peg$currPos = s0;
@@ -4545,14 +4643,14 @@ function peg$parse(input, options) {
4545
4643
  var s0, s1, s2, s3;
4546
4644
  s0 = peg$currPos;
4547
4645
 
4548
- if (input.substr(peg$currPos, 5).toLowerCase() === peg$c90) {
4646
+ if (input.substr(peg$currPos, 5).toLowerCase() === peg$c88) {
4549
4647
  s1 = input.substr(peg$currPos, 5);
4550
4648
  peg$currPos += 5;
4551
4649
  } else {
4552
4650
  s1 = peg$FAILED;
4553
4651
 
4554
4652
  if (peg$silentFails === 0) {
4555
- peg$fail(peg$c91);
4653
+ peg$fail(peg$c89);
4556
4654
  }
4557
4655
  }
4558
4656
 
@@ -4564,7 +4662,7 @@ function peg$parse(input, options) {
4564
4662
 
4565
4663
  if (s3 !== peg$FAILED) {
4566
4664
  peg$savedPos = s0;
4567
- s1 = peg$c92(s3);
4665
+ s1 = peg$c90(s3);
4568
4666
  s0 = s1;
4569
4667
  } else {
4570
4668
  peg$currPos = s0;
@@ -4589,7 +4687,7 @@ function peg$parse(input, options) {
4589
4687
 
4590
4688
  if (s1 !== peg$FAILED) {
4591
4689
  peg$savedPos = s0;
4592
- s1 = peg$c93(s1);
4690
+ s1 = peg$c91(s1);
4593
4691
  }
4594
4692
 
4595
4693
  s0 = s1;
@@ -4597,14 +4695,14 @@ function peg$parse(input, options) {
4597
4695
  if (s0 === peg$FAILED) {
4598
4696
  s0 = peg$currPos;
4599
4697
 
4600
- if (input.substr(peg$currPos, 4).toLowerCase() === peg$c94) {
4698
+ if (input.substr(peg$currPos, 4).toLowerCase() === peg$c92) {
4601
4699
  s1 = input.substr(peg$currPos, 4);
4602
4700
  peg$currPos += 4;
4603
4701
  } else {
4604
4702
  s1 = peg$FAILED;
4605
4703
 
4606
4704
  if (peg$silentFails === 0) {
4607
- peg$fail(peg$c95);
4705
+ peg$fail(peg$c93);
4608
4706
  }
4609
4707
  }
4610
4708
 
@@ -4646,7 +4744,7 @@ function peg$parse(input, options) {
4646
4744
 
4647
4745
  if (s7 !== peg$FAILED) {
4648
4746
  peg$savedPos = s0;
4649
- s1 = peg$c92(s5);
4747
+ s1 = peg$c90(s5);
4650
4748
  s0 = s1;
4651
4749
  } else {
4652
4750
  peg$currPos = s0;
@@ -4685,14 +4783,14 @@ function peg$parse(input, options) {
4685
4783
  var s0, s1, s2, s3;
4686
4784
  s0 = peg$currPos;
4687
4785
 
4688
- if (input.substr(peg$currPos, 5).toLowerCase() === peg$c96) {
4786
+ if (input.substr(peg$currPos, 5).toLowerCase() === peg$c94) {
4689
4787
  s1 = input.substr(peg$currPos, 5);
4690
4788
  peg$currPos += 5;
4691
4789
  } else {
4692
4790
  s1 = peg$FAILED;
4693
4791
 
4694
4792
  if (peg$silentFails === 0) {
4695
- peg$fail(peg$c97);
4793
+ peg$fail(peg$c95);
4696
4794
  }
4697
4795
  }
4698
4796
 
@@ -4704,7 +4802,7 @@ function peg$parse(input, options) {
4704
4802
 
4705
4803
  if (s3 !== peg$FAILED) {
4706
4804
  peg$savedPos = s0;
4707
- s1 = peg$c92(s3);
4805
+ s1 = peg$c90(s3);
4708
4806
  s0 = s1;
4709
4807
  } else {
4710
4808
  peg$currPos = s0;
@@ -4726,14 +4824,14 @@ function peg$parse(input, options) {
4726
4824
  var s0, s1, s2, s3;
4727
4825
  s0 = peg$currPos;
4728
4826
 
4729
- if (input.substr(peg$currPos, 5).toLowerCase() === peg$c98) {
4827
+ if (input.substr(peg$currPos, 5).toLowerCase() === peg$c96) {
4730
4828
  s1 = input.substr(peg$currPos, 5);
4731
4829
  peg$currPos += 5;
4732
4830
  } else {
4733
4831
  s1 = peg$FAILED;
4734
4832
 
4735
4833
  if (peg$silentFails === 0) {
4736
- peg$fail(peg$c99);
4834
+ peg$fail(peg$c97);
4737
4835
  }
4738
4836
  }
4739
4837
 
@@ -4749,7 +4847,7 @@ function peg$parse(input, options) {
4749
4847
 
4750
4848
  if (s3 !== peg$FAILED) {
4751
4849
  peg$savedPos = s0;
4752
- s1 = peg$c44(s3);
4850
+ s1 = peg$c42(s3);
4753
4851
  s0 = s1;
4754
4852
  } else {
4755
4853
  peg$currPos = s0;
@@ -4768,17 +4866,17 @@ function peg$parse(input, options) {
4768
4866
  }
4769
4867
 
4770
4868
  function peg$parseRefInline() {
4771
- var s0, s1, s2, s3, s4, s5, s6, s7;
4869
+ var s0, s1, s2, s3, s4, s5;
4772
4870
  s0 = peg$currPos;
4773
4871
 
4774
- if (input.substr(peg$currPos, 4) === peg$c100) {
4775
- s1 = peg$c100;
4872
+ if (input.substr(peg$currPos, 4) === peg$c98) {
4873
+ s1 = peg$c98;
4776
4874
  peg$currPos += 4;
4777
4875
  } else {
4778
4876
  s1 = peg$FAILED;
4779
4877
 
4780
4878
  if (peg$silentFails === 0) {
4781
- peg$fail(peg$c101);
4879
+ peg$fail(peg$c99);
4782
4880
  }
4783
4881
  }
4784
4882
 
@@ -4808,35 +4906,12 @@ function peg$parse(input, options) {
4808
4906
  }
4809
4907
 
4810
4908
  if (s4 !== peg$FAILED) {
4811
- s5 = peg$parsename();
4909
+ s5 = peg$parseinline_field_identifier();
4812
4910
 
4813
4911
  if (s5 !== peg$FAILED) {
4814
- if (input.charCodeAt(peg$currPos) === 46) {
4815
- s6 = peg$c25;
4816
- peg$currPos++;
4817
- } else {
4818
- s6 = peg$FAILED;
4819
-
4820
- if (peg$silentFails === 0) {
4821
- peg$fail(peg$c26);
4822
- }
4823
- }
4824
-
4825
- if (s6 !== peg$FAILED) {
4826
- s7 = peg$parsename();
4827
-
4828
- if (s7 !== peg$FAILED) {
4829
- peg$savedPos = s0;
4830
- s1 = peg$c102(s3, s5, s7);
4831
- s0 = s1;
4832
- } else {
4833
- peg$currPos = s0;
4834
- s0 = peg$FAILED;
4835
- }
4836
- } else {
4837
- peg$currPos = s0;
4838
- s0 = peg$FAILED;
4839
- }
4912
+ peg$savedPos = s0;
4913
+ s1 = peg$c100(s3, s5);
4914
+ s0 = s1;
4840
4915
  } else {
4841
4916
  peg$currPos = s0;
4842
4917
  s0 = peg$FAILED;
@@ -4865,14 +4940,14 @@ function peg$parse(input, options) {
4865
4940
  var s0, s1, s2, s3;
4866
4941
  s0 = peg$currPos;
4867
4942
 
4868
- if (input.substr(peg$currPos, 8).toLowerCase() === peg$c103) {
4943
+ if (input.substr(peg$currPos, 8).toLowerCase() === peg$c101) {
4869
4944
  s1 = input.substr(peg$currPos, 8);
4870
4945
  peg$currPos += 8;
4871
4946
  } else {
4872
4947
  s1 = peg$FAILED;
4873
4948
 
4874
4949
  if (peg$silentFails === 0) {
4875
- peg$fail(peg$c104);
4950
+ peg$fail(peg$c102);
4876
4951
  }
4877
4952
  }
4878
4953
 
@@ -4884,7 +4959,7 @@ function peg$parse(input, options) {
4884
4959
 
4885
4960
  if (s3 !== peg$FAILED) {
4886
4961
  peg$savedPos = s0;
4887
- s1 = peg$c105(s3);
4962
+ s1 = peg$c103(s3);
4888
4963
  s0 = s1;
4889
4964
  } else {
4890
4965
  peg$currPos = s0;
@@ -4937,14 +5012,14 @@ function peg$parse(input, options) {
4937
5012
  }
4938
5013
 
4939
5014
  if (s1 !== peg$FAILED) {
4940
- if (input.substr(peg$currPos, 2) === peg$c106) {
4941
- s2 = peg$c106;
5015
+ if (input.substr(peg$currPos, 2) === peg$c104) {
5016
+ s2 = peg$c104;
4942
5017
  peg$currPos += 2;
4943
5018
  } else {
4944
5019
  s2 = peg$FAILED;
4945
5020
 
4946
5021
  if (peg$silentFails === 0) {
4947
- peg$fail(peg$c107);
5022
+ peg$fail(peg$c105);
4948
5023
  }
4949
5024
  }
4950
5025
 
@@ -4966,7 +5041,7 @@ function peg$parse(input, options) {
4966
5041
 
4967
5042
  if (s4 !== peg$FAILED) {
4968
5043
  peg$savedPos = s0;
4969
- s1 = peg$c108(s4);
5044
+ s1 = peg$c106(s4);
4970
5045
  s0 = s1;
4971
5046
  } else {
4972
5047
  peg$currPos = s0;
@@ -5022,7 +5097,7 @@ function peg$parse(input, options) {
5022
5097
 
5023
5098
  if (s7 !== peg$FAILED) {
5024
5099
  peg$savedPos = s0;
5025
- s1 = peg$c109(s5, s6);
5100
+ s1 = peg$c107(s5, s6);
5026
5101
  s0 = s1;
5027
5102
  } else {
5028
5103
  peg$currPos = s0;
@@ -5163,14 +5238,14 @@ function peg$parse(input, options) {
5163
5238
  var s0, s1;
5164
5239
  peg$silentFails++;
5165
5240
 
5166
- if (input.substr(peg$currPos, 7).toLowerCase() === peg$c111) {
5241
+ if (input.substr(peg$currPos, 7).toLowerCase() === peg$c109) {
5167
5242
  s0 = input.substr(peg$currPos, 7);
5168
5243
  peg$currPos += 7;
5169
5244
  } else {
5170
5245
  s0 = peg$FAILED;
5171
5246
 
5172
5247
  if (peg$silentFails === 0) {
5173
- peg$fail(peg$c112);
5248
+ peg$fail(peg$c110);
5174
5249
  }
5175
5250
  }
5176
5251
 
@@ -5180,7 +5255,7 @@ function peg$parse(input, options) {
5180
5255
  s1 = peg$FAILED;
5181
5256
 
5182
5257
  if (peg$silentFails === 0) {
5183
- peg$fail(peg$c110);
5258
+ peg$fail(peg$c108);
5184
5259
  }
5185
5260
  }
5186
5261
 
@@ -5191,14 +5266,14 @@ function peg$parse(input, options) {
5191
5266
  var s0, s1;
5192
5267
  peg$silentFails++;
5193
5268
 
5194
- if (input.substr(peg$currPos, 5).toLowerCase() === peg$c114) {
5269
+ if (input.substr(peg$currPos, 5).toLowerCase() === peg$c112) {
5195
5270
  s0 = input.substr(peg$currPos, 5);
5196
5271
  peg$currPos += 5;
5197
5272
  } else {
5198
5273
  s0 = peg$FAILED;
5199
5274
 
5200
5275
  if (peg$silentFails === 0) {
5201
- peg$fail(peg$c115);
5276
+ peg$fail(peg$c113);
5202
5277
  }
5203
5278
  }
5204
5279
 
@@ -5208,7 +5283,7 @@ function peg$parse(input, options) {
5208
5283
  s1 = peg$FAILED;
5209
5284
 
5210
5285
  if (peg$silentFails === 0) {
5211
- peg$fail(peg$c113);
5286
+ peg$fail(peg$c111);
5212
5287
  }
5213
5288
  }
5214
5289
 
@@ -5218,14 +5293,14 @@ function peg$parse(input, options) {
5218
5293
  function peg$parseas() {
5219
5294
  var s0;
5220
5295
 
5221
- if (input.substr(peg$currPos, 2).toLowerCase() === peg$c106) {
5296
+ if (input.substr(peg$currPos, 2).toLowerCase() === peg$c104) {
5222
5297
  s0 = input.substr(peg$currPos, 2);
5223
5298
  peg$currPos += 2;
5224
5299
  } else {
5225
5300
  s0 = peg$FAILED;
5226
5301
 
5227
5302
  if (peg$silentFails === 0) {
5228
- peg$fail(peg$c116);
5303
+ peg$fail(peg$c114);
5229
5304
  }
5230
5305
  }
5231
5306
 
@@ -5236,14 +5311,14 @@ function peg$parse(input, options) {
5236
5311
  var s0, s1;
5237
5312
  peg$silentFails++;
5238
5313
 
5239
- if (input.substr(peg$currPos, 3).toLowerCase() === peg$c118) {
5314
+ if (input.substr(peg$currPos, 3).toLowerCase() === peg$c116) {
5240
5315
  s0 = input.substr(peg$currPos, 3);
5241
5316
  peg$currPos += 3;
5242
5317
  } else {
5243
5318
  s0 = peg$FAILED;
5244
5319
 
5245
5320
  if (peg$silentFails === 0) {
5246
- peg$fail(peg$c119);
5321
+ peg$fail(peg$c117);
5247
5322
  }
5248
5323
  }
5249
5324
 
@@ -5253,7 +5328,7 @@ function peg$parse(input, options) {
5253
5328
  s1 = peg$FAILED;
5254
5329
 
5255
5330
  if (peg$silentFails === 0) {
5256
- peg$fail(peg$c117);
5331
+ peg$fail(peg$c115);
5257
5332
  }
5258
5333
  }
5259
5334
 
@@ -5265,20 +5340,20 @@ function peg$parse(input, options) {
5265
5340
  peg$silentFails++;
5266
5341
  s0 = peg$currPos;
5267
5342
 
5268
- if (input.substr(peg$currPos, 6).toLowerCase() === peg$c68) {
5343
+ if (input.substr(peg$currPos, 6).toLowerCase() === peg$c66) {
5269
5344
  s1 = input.substr(peg$currPos, 6);
5270
5345
  peg$currPos += 6;
5271
5346
  } else {
5272
5347
  s1 = peg$FAILED;
5273
5348
 
5274
5349
  if (peg$silentFails === 0) {
5275
- peg$fail(peg$c69);
5350
+ peg$fail(peg$c67);
5276
5351
  }
5277
5352
  }
5278
5353
 
5279
5354
  if (s1 !== peg$FAILED) {
5280
5355
  peg$savedPos = s0;
5281
- s1 = peg$c121();
5356
+ s1 = peg$c119();
5282
5357
  }
5283
5358
 
5284
5359
  s0 = s1;
@@ -5288,7 +5363,7 @@ function peg$parse(input, options) {
5288
5363
  s1 = peg$FAILED;
5289
5364
 
5290
5365
  if (peg$silentFails === 0) {
5291
- peg$fail(peg$c120);
5366
+ peg$fail(peg$c118);
5292
5367
  }
5293
5368
  }
5294
5369
 
@@ -5300,20 +5375,20 @@ function peg$parse(input, options) {
5300
5375
  peg$silentFails++;
5301
5376
  s0 = peg$currPos;
5302
5377
 
5303
- if (input.substr(peg$currPos, 2).toLowerCase() === peg$c66) {
5378
+ if (input.substr(peg$currPos, 2).toLowerCase() === peg$c64) {
5304
5379
  s1 = input.substr(peg$currPos, 2);
5305
5380
  peg$currPos += 2;
5306
5381
  } else {
5307
5382
  s1 = peg$FAILED;
5308
5383
 
5309
5384
  if (peg$silentFails === 0) {
5310
- peg$fail(peg$c67);
5385
+ peg$fail(peg$c65);
5311
5386
  }
5312
5387
  }
5313
5388
 
5314
5389
  if (s1 !== peg$FAILED) {
5315
5390
  peg$savedPos = s0;
5316
- s1 = peg$c123();
5391
+ s1 = peg$c121();
5317
5392
  }
5318
5393
 
5319
5394
  s0 = s1;
@@ -5323,7 +5398,7 @@ function peg$parse(input, options) {
5323
5398
  s1 = peg$FAILED;
5324
5399
 
5325
5400
  if (peg$silentFails === 0) {
5326
- peg$fail(peg$c122);
5401
+ peg$fail(peg$c120);
5327
5402
  }
5328
5403
  }
5329
5404
 
@@ -5334,14 +5409,14 @@ function peg$parse(input, options) {
5334
5409
  var s0, s1;
5335
5410
  peg$silentFails++;
5336
5411
 
5337
- if (input.substr(peg$currPos, 7).toLowerCase() === peg$c125) {
5412
+ if (input.substr(peg$currPos, 7).toLowerCase() === peg$c123) {
5338
5413
  s0 = input.substr(peg$currPos, 7);
5339
5414
  peg$currPos += 7;
5340
5415
  } else {
5341
5416
  s0 = peg$FAILED;
5342
5417
 
5343
5418
  if (peg$silentFails === 0) {
5344
- peg$fail(peg$c126);
5419
+ peg$fail(peg$c124);
5345
5420
  }
5346
5421
  }
5347
5422
 
@@ -5351,7 +5426,7 @@ function peg$parse(input, options) {
5351
5426
  s1 = peg$FAILED;
5352
5427
 
5353
5428
  if (peg$silentFails === 0) {
5354
- peg$fail(peg$c124);
5429
+ peg$fail(peg$c122);
5355
5430
  }
5356
5431
  }
5357
5432
 
@@ -5362,14 +5437,14 @@ function peg$parse(input, options) {
5362
5437
  var s0, s1;
5363
5438
  peg$silentFails++;
5364
5439
 
5365
- if (input.substr(peg$currPos, 5).toLowerCase() === peg$c128) {
5440
+ if (input.substr(peg$currPos, 5).toLowerCase() === peg$c126) {
5366
5441
  s0 = input.substr(peg$currPos, 5);
5367
5442
  peg$currPos += 5;
5368
5443
  } else {
5369
5444
  s0 = peg$FAILED;
5370
5445
 
5371
5446
  if (peg$silentFails === 0) {
5372
- peg$fail(peg$c129);
5447
+ peg$fail(peg$c127);
5373
5448
  }
5374
5449
  }
5375
5450
 
@@ -5379,7 +5454,7 @@ function peg$parse(input, options) {
5379
5454
  s1 = peg$FAILED;
5380
5455
 
5381
5456
  if (peg$silentFails === 0) {
5382
- peg$fail(peg$c127);
5457
+ peg$fail(peg$c125);
5383
5458
  }
5384
5459
  }
5385
5460
 
@@ -5390,14 +5465,14 @@ function peg$parse(input, options) {
5390
5465
  var s0, s1;
5391
5466
  peg$silentFails++;
5392
5467
 
5393
- if (input.substr(peg$currPos, 4).toLowerCase() === peg$c131) {
5468
+ if (input.substr(peg$currPos, 4).toLowerCase() === peg$c129) {
5394
5469
  s0 = input.substr(peg$currPos, 4);
5395
5470
  peg$currPos += 4;
5396
5471
  } else {
5397
5472
  s0 = peg$FAILED;
5398
5473
 
5399
5474
  if (peg$silentFails === 0) {
5400
- peg$fail(peg$c132);
5475
+ peg$fail(peg$c130);
5401
5476
  }
5402
5477
  }
5403
5478
 
@@ -5407,7 +5482,7 @@ function peg$parse(input, options) {
5407
5482
  s1 = peg$FAILED;
5408
5483
 
5409
5484
  if (peg$silentFails === 0) {
5410
- peg$fail(peg$c130);
5485
+ peg$fail(peg$c128);
5411
5486
  }
5412
5487
  }
5413
5488
 
@@ -5418,14 +5493,14 @@ function peg$parse(input, options) {
5418
5493
  var s0, s1;
5419
5494
  peg$silentFails++;
5420
5495
 
5421
- if (input.substr(peg$currPos, 4).toLowerCase() === peg$c134) {
5496
+ if (input.substr(peg$currPos, 4).toLowerCase() === peg$c132) {
5422
5497
  s0 = input.substr(peg$currPos, 4);
5423
5498
  peg$currPos += 4;
5424
5499
  } else {
5425
5500
  s0 = peg$FAILED;
5426
5501
 
5427
5502
  if (peg$silentFails === 0) {
5428
- peg$fail(peg$c135);
5503
+ peg$fail(peg$c133);
5429
5504
  }
5430
5505
  }
5431
5506
 
@@ -5435,7 +5510,7 @@ function peg$parse(input, options) {
5435
5510
  s1 = peg$FAILED;
5436
5511
 
5437
5512
  if (peg$silentFails === 0) {
5438
- peg$fail(peg$c133);
5513
+ peg$fail(peg$c131);
5439
5514
  }
5440
5515
  }
5441
5516
 
@@ -5445,14 +5520,14 @@ function peg$parse(input, options) {
5445
5520
  function peg$parseheader_color() {
5446
5521
  var s0;
5447
5522
 
5448
- if (input.substr(peg$currPos, 11).toLowerCase() === peg$c136) {
5523
+ if (input.substr(peg$currPos, 11).toLowerCase() === peg$c134) {
5449
5524
  s0 = input.substr(peg$currPos, 11);
5450
5525
  peg$currPos += 11;
5451
5526
  } else {
5452
5527
  s0 = peg$FAILED;
5453
5528
 
5454
5529
  if (peg$silentFails === 0) {
5455
- peg$fail(peg$c137);
5530
+ peg$fail(peg$c135);
5456
5531
  }
5457
5532
  }
5458
5533
 
@@ -5463,14 +5538,14 @@ function peg$parse(input, options) {
5463
5538
  var s0, s1;
5464
5539
  peg$silentFails++;
5465
5540
 
5466
- if (input.substr(peg$currPos, 10).toLowerCase() === peg$c139) {
5541
+ if (input.substr(peg$currPos, 10).toLowerCase() === peg$c137) {
5467
5542
  s0 = input.substr(peg$currPos, 10);
5468
5543
  peg$currPos += 10;
5469
5544
  } else {
5470
5545
  s0 = peg$FAILED;
5471
5546
 
5472
5547
  if (peg$silentFails === 0) {
5473
- peg$fail(peg$c140);
5548
+ peg$fail(peg$c138);
5474
5549
  }
5475
5550
  }
5476
5551
 
@@ -5480,7 +5555,7 @@ function peg$parse(input, options) {
5480
5555
  s1 = peg$FAILED;
5481
5556
 
5482
5557
  if (peg$silentFails === 0) {
5483
- peg$fail(peg$c138);
5558
+ peg$fail(peg$c136);
5484
5559
  }
5485
5560
  }
5486
5561
 
@@ -5491,14 +5566,14 @@ function peg$parse(input, options) {
5491
5566
  var s0, s1;
5492
5567
  peg$silentFails++;
5493
5568
 
5494
- if (input.substr(peg$currPos, 9).toLowerCase() === peg$c142) {
5569
+ if (input.substr(peg$currPos, 9).toLowerCase() === peg$c140) {
5495
5570
  s0 = input.substr(peg$currPos, 9);
5496
5571
  peg$currPos += 9;
5497
5572
  } else {
5498
5573
  s0 = peg$FAILED;
5499
5574
 
5500
5575
  if (peg$silentFails === 0) {
5501
- peg$fail(peg$c143);
5576
+ peg$fail(peg$c141);
5502
5577
  }
5503
5578
  }
5504
5579
 
@@ -5508,7 +5583,7 @@ function peg$parse(input, options) {
5508
5583
  s1 = peg$FAILED;
5509
5584
 
5510
5585
  if (peg$silentFails === 0) {
5511
- peg$fail(peg$c141);
5586
+ peg$fail(peg$c139);
5512
5587
  }
5513
5588
  }
5514
5589
 
@@ -5519,14 +5594,14 @@ function peg$parse(input, options) {
5519
5594
  var s0, s1;
5520
5595
  peg$silentFails++;
5521
5596
 
5522
- if (input.substr(peg$currPos, 8).toLowerCase() === peg$c145) {
5597
+ if (input.substr(peg$currPos, 8).toLowerCase() === peg$c143) {
5523
5598
  s0 = input.substr(peg$currPos, 8);
5524
5599
  peg$currPos += 8;
5525
5600
  } else {
5526
5601
  s0 = peg$FAILED;
5527
5602
 
5528
5603
  if (peg$silentFails === 0) {
5529
- peg$fail(peg$c146);
5604
+ peg$fail(peg$c144);
5530
5605
  }
5531
5606
  }
5532
5607
 
@@ -5536,7 +5611,7 @@ function peg$parse(input, options) {
5536
5611
  s1 = peg$FAILED;
5537
5612
 
5538
5613
  if (peg$silentFails === 0) {
5539
- peg$fail(peg$c144);
5614
+ peg$fail(peg$c142);
5540
5615
  }
5541
5616
  }
5542
5617
 
@@ -5547,14 +5622,14 @@ function peg$parse(input, options) {
5547
5622
  var s0, s1;
5548
5623
  peg$silentFails++;
5549
5624
 
5550
- if (input.substr(peg$currPos, 7).toLowerCase() === peg$c148) {
5625
+ if (input.substr(peg$currPos, 7).toLowerCase() === peg$c146) {
5551
5626
  s0 = input.substr(peg$currPos, 7);
5552
5627
  peg$currPos += 7;
5553
5628
  } else {
5554
5629
  s0 = peg$FAILED;
5555
5630
 
5556
5631
  if (peg$silentFails === 0) {
5557
- peg$fail(peg$c149);
5632
+ peg$fail(peg$c147);
5558
5633
  }
5559
5634
  }
5560
5635
 
@@ -5564,7 +5639,7 @@ function peg$parse(input, options) {
5564
5639
  s1 = peg$FAILED;
5565
5640
 
5566
5641
  if (peg$silentFails === 0) {
5567
- peg$fail(peg$c147);
5642
+ peg$fail(peg$c145);
5568
5643
  }
5569
5644
  }
5570
5645
 
@@ -5575,14 +5650,14 @@ function peg$parse(input, options) {
5575
5650
  var s0, s1;
5576
5651
  peg$silentFails++;
5577
5652
 
5578
- if (input.substr(peg$currPos, 8).toLowerCase() === peg$c151) {
5653
+ if (input.substr(peg$currPos, 8).toLowerCase() === peg$c149) {
5579
5654
  s0 = input.substr(peg$currPos, 8);
5580
5655
  peg$currPos += 8;
5581
5656
  } else {
5582
5657
  s0 = peg$FAILED;
5583
5658
 
5584
5659
  if (peg$silentFails === 0) {
5585
- peg$fail(peg$c152);
5660
+ peg$fail(peg$c150);
5586
5661
  }
5587
5662
  }
5588
5663
 
@@ -5592,7 +5667,7 @@ function peg$parse(input, options) {
5592
5667
  s1 = peg$FAILED;
5593
5668
 
5594
5669
  if (peg$silentFails === 0) {
5595
- peg$fail(peg$c150);
5670
+ peg$fail(peg$c148);
5596
5671
  }
5597
5672
  }
5598
5673
 
@@ -5603,14 +5678,14 @@ function peg$parse(input, options) {
5603
5678
  var s0, s1;
5604
5679
  peg$silentFails++;
5605
5680
 
5606
- if (input.substr(peg$currPos, 11).toLowerCase() === peg$c154) {
5681
+ if (input.substr(peg$currPos, 11).toLowerCase() === peg$c152) {
5607
5682
  s0 = input.substr(peg$currPos, 11);
5608
5683
  peg$currPos += 11;
5609
5684
  } else {
5610
5685
  s0 = peg$FAILED;
5611
5686
 
5612
5687
  if (peg$silentFails === 0) {
5613
- peg$fail(peg$c155);
5688
+ peg$fail(peg$c153);
5614
5689
  }
5615
5690
  }
5616
5691
 
@@ -5620,7 +5695,7 @@ function peg$parse(input, options) {
5620
5695
  s1 = peg$FAILED;
5621
5696
 
5622
5697
  if (peg$silentFails === 0) {
5623
- peg$fail(peg$c153);
5698
+ peg$fail(peg$c151);
5624
5699
  }
5625
5700
  }
5626
5701
 
@@ -5631,14 +5706,14 @@ function peg$parse(input, options) {
5631
5706
  var s0, s1;
5632
5707
  peg$silentFails++;
5633
5708
 
5634
- if (peg$c157.test(input.charAt(peg$currPos))) {
5709
+ if (peg$c155.test(input.charAt(peg$currPos))) {
5635
5710
  s0 = input.charAt(peg$currPos);
5636
5711
  peg$currPos++;
5637
5712
  } else {
5638
5713
  s0 = peg$FAILED;
5639
5714
 
5640
5715
  if (peg$silentFails === 0) {
5641
- peg$fail(peg$c158);
5716
+ peg$fail(peg$c156);
5642
5717
  }
5643
5718
  }
5644
5719
 
@@ -5648,7 +5723,7 @@ function peg$parse(input, options) {
5648
5723
  s1 = peg$FAILED;
5649
5724
 
5650
5725
  if (peg$silentFails === 0) {
5651
- peg$fail(peg$c156);
5726
+ peg$fail(peg$c154);
5652
5727
  }
5653
5728
  }
5654
5729
 
@@ -5673,7 +5748,7 @@ function peg$parse(input, options) {
5673
5748
 
5674
5749
  if (s1 !== peg$FAILED) {
5675
5750
  peg$savedPos = s0;
5676
- s1 = peg$c160(s1);
5751
+ s1 = peg$c158(s1);
5677
5752
  }
5678
5753
 
5679
5754
  s0 = s1;
@@ -5685,14 +5760,14 @@ function peg$parse(input, options) {
5685
5760
  if (s1 !== peg$FAILED) {
5686
5761
  s2 = [];
5687
5762
 
5688
- if (peg$c161.test(input.charAt(peg$currPos))) {
5763
+ if (peg$c159.test(input.charAt(peg$currPos))) {
5689
5764
  s3 = input.charAt(peg$currPos);
5690
5765
  peg$currPos++;
5691
5766
  } else {
5692
5767
  s3 = peg$FAILED;
5693
5768
 
5694
5769
  if (peg$silentFails === 0) {
5695
- peg$fail(peg$c162);
5770
+ peg$fail(peg$c160);
5696
5771
  }
5697
5772
  }
5698
5773
 
@@ -5700,14 +5775,14 @@ function peg$parse(input, options) {
5700
5775
  while (s3 !== peg$FAILED) {
5701
5776
  s2.push(s3);
5702
5777
 
5703
- if (peg$c161.test(input.charAt(peg$currPos))) {
5778
+ if (peg$c159.test(input.charAt(peg$currPos))) {
5704
5779
  s3 = input.charAt(peg$currPos);
5705
5780
  peg$currPos++;
5706
5781
  } else {
5707
5782
  s3 = peg$FAILED;
5708
5783
 
5709
5784
  if (peg$silentFails === 0) {
5710
- peg$fail(peg$c162);
5785
+ peg$fail(peg$c160);
5711
5786
  }
5712
5787
  }
5713
5788
  }
@@ -5720,7 +5795,7 @@ function peg$parse(input, options) {
5720
5795
 
5721
5796
  if (s3 !== peg$FAILED) {
5722
5797
  peg$savedPos = s0;
5723
- s1 = peg$c160(s2);
5798
+ s1 = peg$c158(s2);
5724
5799
  s0 = s1;
5725
5800
  } else {
5726
5801
  peg$currPos = s0;
@@ -5742,66 +5817,310 @@ function peg$parse(input, options) {
5742
5817
  s1 = peg$FAILED;
5743
5818
 
5744
5819
  if (peg$silentFails === 0) {
5745
- peg$fail(peg$c159);
5820
+ peg$fail(peg$c157);
5746
5821
  }
5747
5822
  }
5748
5823
 
5749
5824
  return s0;
5750
5825
  }
5751
5826
 
5752
- function peg$parsetype_name() {
5753
- var s0, s1, s2, s3;
5827
+ function peg$parseschema_name() {
5828
+ var s0, s1, s2;
5754
5829
  peg$silentFails++;
5755
5830
  s0 = peg$currPos;
5756
- s1 = [];
5757
- s2 = peg$parsetype_character();
5831
+ s1 = peg$parsename();
5758
5832
 
5759
- if (s2 !== peg$FAILED) {
5760
- while (s2 !== peg$FAILED) {
5761
- s1.push(s2);
5762
- s2 = peg$parsetype_character();
5833
+ if (s1 !== peg$FAILED) {
5834
+ if (input.charCodeAt(peg$currPos) === 46) {
5835
+ s2 = peg$c162;
5836
+ peg$currPos++;
5837
+ } else {
5838
+ s2 = peg$FAILED;
5839
+
5840
+ if (peg$silentFails === 0) {
5841
+ peg$fail(peg$c163);
5842
+ }
5763
5843
  }
5764
- } else {
5765
- s1 = peg$FAILED;
5766
- }
5767
5844
 
5768
- if (s1 !== peg$FAILED) {
5769
- peg$savedPos = s0;
5770
- s1 = peg$c160(s1);
5845
+ if (s2 !== peg$FAILED) {
5846
+ peg$savedPos = s0;
5847
+ s1 = peg$c164(s1);
5848
+ s0 = s1;
5849
+ } else {
5850
+ peg$currPos = s0;
5851
+ s0 = peg$FAILED;
5852
+ }
5853
+ } else {
5854
+ peg$currPos = s0;
5855
+ s0 = peg$FAILED;
5771
5856
  }
5772
5857
 
5773
- s0 = s1;
5858
+ peg$silentFails--;
5774
5859
 
5775
5860
  if (s0 === peg$FAILED) {
5776
- s0 = peg$currPos;
5777
- s1 = peg$parsequote();
5778
-
5779
- if (s1 !== peg$FAILED) {
5780
- s2 = [];
5861
+ s1 = peg$FAILED;
5781
5862
 
5782
- if (peg$c161.test(input.charAt(peg$currPos))) {
5783
- s3 = input.charAt(peg$currPos);
5784
- peg$currPos++;
5785
- } else {
5786
- s3 = peg$FAILED;
5863
+ if (peg$silentFails === 0) {
5864
+ peg$fail(peg$c161);
5865
+ }
5866
+ }
5787
5867
 
5788
- if (peg$silentFails === 0) {
5789
- peg$fail(peg$c162);
5790
- }
5791
- }
5868
+ return s0;
5869
+ }
5870
+
5871
+ function peg$parsefield_identifier() {
5872
+ var s0, s1, s2, s3, s4, s5;
5873
+ s0 = peg$currPos;
5874
+ s1 = peg$parsename();
5875
+
5876
+ if (s1 !== peg$FAILED) {
5877
+ if (input.charCodeAt(peg$currPos) === 46) {
5878
+ s2 = peg$c162;
5879
+ peg$currPos++;
5880
+ } else {
5881
+ s2 = peg$FAILED;
5882
+
5883
+ if (peg$silentFails === 0) {
5884
+ peg$fail(peg$c163);
5885
+ }
5886
+ }
5887
+
5888
+ if (s2 !== peg$FAILED) {
5889
+ s3 = peg$parsename();
5890
+
5891
+ if (s3 !== peg$FAILED) {
5892
+ if (input.charCodeAt(peg$currPos) === 46) {
5893
+ s4 = peg$c162;
5894
+ peg$currPos++;
5895
+ } else {
5896
+ s4 = peg$FAILED;
5897
+
5898
+ if (peg$silentFails === 0) {
5899
+ peg$fail(peg$c163);
5900
+ }
5901
+ }
5902
+
5903
+ if (s4 !== peg$FAILED) {
5904
+ s5 = peg$parseRefField();
5905
+
5906
+ if (s5 !== peg$FAILED) {
5907
+ peg$savedPos = s0;
5908
+ s1 = peg$c165(s1, s3, s5);
5909
+ s0 = s1;
5910
+ } else {
5911
+ peg$currPos = s0;
5912
+ s0 = peg$FAILED;
5913
+ }
5914
+ } else {
5915
+ peg$currPos = s0;
5916
+ s0 = peg$FAILED;
5917
+ }
5918
+ } else {
5919
+ peg$currPos = s0;
5920
+ s0 = peg$FAILED;
5921
+ }
5922
+ } else {
5923
+ peg$currPos = s0;
5924
+ s0 = peg$FAILED;
5925
+ }
5926
+ } else {
5927
+ peg$currPos = s0;
5928
+ s0 = peg$FAILED;
5929
+ }
5930
+
5931
+ if (s0 === peg$FAILED) {
5932
+ s0 = peg$currPos;
5933
+ s1 = peg$parsename();
5934
+
5935
+ if (s1 !== peg$FAILED) {
5936
+ if (input.charCodeAt(peg$currPos) === 46) {
5937
+ s2 = peg$c162;
5938
+ peg$currPos++;
5939
+ } else {
5940
+ s2 = peg$FAILED;
5941
+
5942
+ if (peg$silentFails === 0) {
5943
+ peg$fail(peg$c163);
5944
+ }
5945
+ }
5946
+
5947
+ if (s2 !== peg$FAILED) {
5948
+ s3 = peg$parseRefField();
5949
+
5950
+ if (s3 !== peg$FAILED) {
5951
+ peg$savedPos = s0;
5952
+ s1 = peg$c166(s1, s3);
5953
+ s0 = s1;
5954
+ } else {
5955
+ peg$currPos = s0;
5956
+ s0 = peg$FAILED;
5957
+ }
5958
+ } else {
5959
+ peg$currPos = s0;
5960
+ s0 = peg$FAILED;
5961
+ }
5962
+ } else {
5963
+ peg$currPos = s0;
5964
+ s0 = peg$FAILED;
5965
+ }
5966
+ }
5967
+
5968
+ return s0;
5969
+ }
5970
+
5971
+ function peg$parseinline_field_identifier() {
5972
+ var s0, s1, s2, s3, s4, s5;
5973
+ s0 = peg$currPos;
5974
+ s1 = peg$parsename();
5975
+
5976
+ if (s1 !== peg$FAILED) {
5977
+ if (input.charCodeAt(peg$currPos) === 46) {
5978
+ s2 = peg$c162;
5979
+ peg$currPos++;
5980
+ } else {
5981
+ s2 = peg$FAILED;
5982
+
5983
+ if (peg$silentFails === 0) {
5984
+ peg$fail(peg$c163);
5985
+ }
5986
+ }
5987
+
5988
+ if (s2 !== peg$FAILED) {
5989
+ s3 = peg$parsename();
5990
+
5991
+ if (s3 !== peg$FAILED) {
5992
+ if (input.charCodeAt(peg$currPos) === 46) {
5993
+ s4 = peg$c162;
5994
+ peg$currPos++;
5995
+ } else {
5996
+ s4 = peg$FAILED;
5997
+
5998
+ if (peg$silentFails === 0) {
5999
+ peg$fail(peg$c163);
6000
+ }
6001
+ }
6002
+
6003
+ if (s4 !== peg$FAILED) {
6004
+ s5 = peg$parsename();
6005
+
6006
+ if (s5 !== peg$FAILED) {
6007
+ peg$savedPos = s0;
6008
+ s1 = peg$c167(s1, s3, s5);
6009
+ s0 = s1;
6010
+ } else {
6011
+ peg$currPos = s0;
6012
+ s0 = peg$FAILED;
6013
+ }
6014
+ } else {
6015
+ peg$currPos = s0;
6016
+ s0 = peg$FAILED;
6017
+ }
6018
+ } else {
6019
+ peg$currPos = s0;
6020
+ s0 = peg$FAILED;
6021
+ }
6022
+ } else {
6023
+ peg$currPos = s0;
6024
+ s0 = peg$FAILED;
6025
+ }
6026
+ } else {
6027
+ peg$currPos = s0;
6028
+ s0 = peg$FAILED;
6029
+ }
6030
+
6031
+ if (s0 === peg$FAILED) {
6032
+ s0 = peg$currPos;
6033
+ s1 = peg$parsename();
6034
+
6035
+ if (s1 !== peg$FAILED) {
6036
+ if (input.charCodeAt(peg$currPos) === 46) {
6037
+ s2 = peg$c162;
6038
+ peg$currPos++;
6039
+ } else {
6040
+ s2 = peg$FAILED;
6041
+
6042
+ if (peg$silentFails === 0) {
6043
+ peg$fail(peg$c163);
6044
+ }
6045
+ }
6046
+
6047
+ if (s2 !== peg$FAILED) {
6048
+ s3 = peg$parsename();
6049
+
6050
+ if (s3 !== peg$FAILED) {
6051
+ peg$savedPos = s0;
6052
+ s1 = peg$c168(s1, s3);
6053
+ s0 = s1;
6054
+ } else {
6055
+ peg$currPos = s0;
6056
+ s0 = peg$FAILED;
6057
+ }
6058
+ } else {
6059
+ peg$currPos = s0;
6060
+ s0 = peg$FAILED;
6061
+ }
6062
+ } else {
6063
+ peg$currPos = s0;
6064
+ s0 = peg$FAILED;
6065
+ }
6066
+ }
6067
+
6068
+ return s0;
6069
+ }
6070
+
6071
+ function peg$parsetype_name() {
6072
+ var s0, s1, s2, s3;
6073
+ peg$silentFails++;
6074
+ s0 = peg$currPos;
6075
+ s1 = [];
6076
+ s2 = peg$parsetype_character();
6077
+
6078
+ if (s2 !== peg$FAILED) {
6079
+ while (s2 !== peg$FAILED) {
6080
+ s1.push(s2);
6081
+ s2 = peg$parsetype_character();
6082
+ }
6083
+ } else {
6084
+ s1 = peg$FAILED;
6085
+ }
6086
+
6087
+ if (s1 !== peg$FAILED) {
6088
+ peg$savedPos = s0;
6089
+ s1 = peg$c158(s1);
6090
+ }
6091
+
6092
+ s0 = s1;
6093
+
6094
+ if (s0 === peg$FAILED) {
6095
+ s0 = peg$currPos;
6096
+ s1 = peg$parsequote();
6097
+
6098
+ if (s1 !== peg$FAILED) {
6099
+ s2 = [];
6100
+
6101
+ if (peg$c159.test(input.charAt(peg$currPos))) {
6102
+ s3 = input.charAt(peg$currPos);
6103
+ peg$currPos++;
6104
+ } else {
6105
+ s3 = peg$FAILED;
6106
+
6107
+ if (peg$silentFails === 0) {
6108
+ peg$fail(peg$c160);
6109
+ }
6110
+ }
5792
6111
 
5793
6112
  if (s3 !== peg$FAILED) {
5794
6113
  while (s3 !== peg$FAILED) {
5795
6114
  s2.push(s3);
5796
6115
 
5797
- if (peg$c161.test(input.charAt(peg$currPos))) {
6116
+ if (peg$c159.test(input.charAt(peg$currPos))) {
5798
6117
  s3 = input.charAt(peg$currPos);
5799
6118
  peg$currPos++;
5800
6119
  } else {
5801
6120
  s3 = peg$FAILED;
5802
6121
 
5803
6122
  if (peg$silentFails === 0) {
5804
- peg$fail(peg$c162);
6123
+ peg$fail(peg$c160);
5805
6124
  }
5806
6125
  }
5807
6126
  }
@@ -5814,7 +6133,7 @@ function peg$parse(input, options) {
5814
6133
 
5815
6134
  if (s3 !== peg$FAILED) {
5816
6135
  peg$savedPos = s0;
5817
- s1 = peg$c160(s2);
6136
+ s1 = peg$c158(s2);
5818
6137
  s0 = s1;
5819
6138
  } else {
5820
6139
  peg$currPos = s0;
@@ -5836,7 +6155,7 @@ function peg$parse(input, options) {
5836
6155
  s1 = peg$FAILED;
5837
6156
 
5838
6157
  if (peg$silentFails === 0) {
5839
- peg$fail(peg$c159);
6158
+ peg$fail(peg$c157);
5840
6159
  }
5841
6160
  }
5842
6161
 
@@ -5861,13 +6180,13 @@ function peg$parse(input, options) {
5861
6180
 
5862
6181
  if (s3 !== peg$FAILED) {
5863
6182
  if (input.charCodeAt(peg$currPos) === 40) {
5864
- s4 = peg$c30;
6183
+ s4 = peg$c28;
5865
6184
  peg$currPos++;
5866
6185
  } else {
5867
6186
  s4 = peg$FAILED;
5868
6187
 
5869
6188
  if (peg$silentFails === 0) {
5870
- peg$fail(peg$c31);
6189
+ peg$fail(peg$c29);
5871
6190
  }
5872
6191
  }
5873
6192
 
@@ -5894,13 +6213,13 @@ function peg$parse(input, options) {
5894
6213
 
5895
6214
  if (s7 !== peg$FAILED) {
5896
6215
  if (input.charCodeAt(peg$currPos) === 41) {
5897
- s8 = peg$c32;
6216
+ s8 = peg$c30;
5898
6217
  peg$currPos++;
5899
6218
  } else {
5900
6219
  s8 = peg$FAILED;
5901
6220
 
5902
6221
  if (peg$silentFails === 0) {
5903
- peg$fail(peg$c33);
6222
+ peg$fail(peg$c31);
5904
6223
  }
5905
6224
  }
5906
6225
 
@@ -5938,7 +6257,7 @@ function peg$parse(input, options) {
5938
6257
 
5939
6258
  if (s2 !== peg$FAILED) {
5940
6259
  peg$savedPos = s0;
5941
- s1 = peg$c164(s1, s2);
6260
+ s1 = peg$c170(s1, s2);
5942
6261
  s0 = s1;
5943
6262
  } else {
5944
6263
  peg$currPos = s0;
@@ -5955,7 +6274,7 @@ function peg$parse(input, options) {
5955
6274
  s1 = peg$FAILED;
5956
6275
 
5957
6276
  if (peg$silentFails === 0) {
5958
- peg$fail(peg$c163);
6277
+ peg$fail(peg$c169);
5959
6278
  }
5960
6279
  }
5961
6280
 
@@ -5976,7 +6295,7 @@ function peg$parse(input, options) {
5976
6295
 
5977
6296
  if (s1 !== peg$FAILED) {
5978
6297
  peg$savedPos = s0;
5979
- s1 = peg$c166(s1);
6298
+ s1 = peg$c172(s1);
5980
6299
  }
5981
6300
 
5982
6301
  s0 = s1;
@@ -5986,7 +6305,7 @@ function peg$parse(input, options) {
5986
6305
  s1 = peg$FAILED;
5987
6306
 
5988
6307
  if (peg$silentFails === 0) {
5989
- peg$fail(peg$c165);
6308
+ peg$fail(peg$c171);
5990
6309
  }
5991
6310
  }
5992
6311
 
@@ -6020,13 +6339,13 @@ function peg$parse(input, options) {
6020
6339
 
6021
6340
  if (s3 !== peg$FAILED) {
6022
6341
  if (input.charCodeAt(peg$currPos) === 40) {
6023
- s4 = peg$c30;
6342
+ s4 = peg$c28;
6024
6343
  peg$currPos++;
6025
6344
  } else {
6026
6345
  s4 = peg$FAILED;
6027
6346
 
6028
6347
  if (peg$silentFails === 0) {
6029
- peg$fail(peg$c31);
6348
+ peg$fail(peg$c29);
6030
6349
  }
6031
6350
  }
6032
6351
 
@@ -6035,13 +6354,13 @@ function peg$parse(input, options) {
6035
6354
 
6036
6355
  if (s5 !== peg$FAILED) {
6037
6356
  if (input.charCodeAt(peg$currPos) === 41) {
6038
- s6 = peg$c32;
6357
+ s6 = peg$c30;
6039
6358
  peg$currPos++;
6040
6359
  } else {
6041
6360
  s6 = peg$FAILED;
6042
6361
 
6043
6362
  if (peg$silentFails === 0) {
6044
- peg$fail(peg$c33);
6363
+ peg$fail(peg$c31);
6045
6364
  }
6046
6365
  }
6047
6366
 
@@ -6073,13 +6392,13 @@ function peg$parse(input, options) {
6073
6392
  s1 = peg$currPos;
6074
6393
 
6075
6394
  if (input.charCodeAt(peg$currPos) === 40) {
6076
- s2 = peg$c30;
6395
+ s2 = peg$c28;
6077
6396
  peg$currPos++;
6078
6397
  } else {
6079
6398
  s2 = peg$FAILED;
6080
6399
 
6081
6400
  if (peg$silentFails === 0) {
6082
- peg$fail(peg$c31);
6401
+ peg$fail(peg$c29);
6083
6402
  }
6084
6403
  }
6085
6404
 
@@ -6088,13 +6407,13 @@ function peg$parse(input, options) {
6088
6407
 
6089
6408
  if (s3 !== peg$FAILED) {
6090
6409
  if (input.charCodeAt(peg$currPos) === 41) {
6091
- s4 = peg$c32;
6410
+ s4 = peg$c30;
6092
6411
  peg$currPos++;
6093
6412
  } else {
6094
6413
  s4 = peg$FAILED;
6095
6414
 
6096
6415
  if (peg$silentFails === 0) {
6097
- peg$fail(peg$c33);
6416
+ peg$fail(peg$c31);
6098
6417
  }
6099
6418
  }
6100
6419
 
@@ -6141,25 +6460,25 @@ function peg$parse(input, options) {
6141
6460
 
6142
6461
  if (s4 === peg$FAILED) {
6143
6462
  if (input.charCodeAt(peg$currPos) === 44) {
6144
- s4 = peg$c167;
6463
+ s4 = peg$c173;
6145
6464
  peg$currPos++;
6146
6465
  } else {
6147
6466
  s4 = peg$FAILED;
6148
6467
 
6149
6468
  if (peg$silentFails === 0) {
6150
- peg$fail(peg$c168);
6469
+ peg$fail(peg$c174);
6151
6470
  }
6152
6471
  }
6153
6472
 
6154
6473
  if (s4 === peg$FAILED) {
6155
- if (input.substr(peg$currPos, 2) === peg$c169) {
6156
- s4 = peg$c169;
6474
+ if (input.substr(peg$currPos, 2) === peg$c175) {
6475
+ s4 = peg$c175;
6157
6476
  peg$currPos += 2;
6158
6477
  } else {
6159
6478
  s4 = peg$FAILED;
6160
6479
 
6161
6480
  if (peg$silentFails === 0) {
6162
- peg$fail(peg$c170);
6481
+ peg$fail(peg$c176);
6163
6482
  }
6164
6483
  }
6165
6484
 
@@ -6168,14 +6487,14 @@ function peg$parse(input, options) {
6168
6487
  s5 = peg$parseendline();
6169
6488
 
6170
6489
  if (s5 !== peg$FAILED) {
6171
- if (input.substr(peg$currPos, 2) === peg$c169) {
6172
- s6 = peg$c169;
6490
+ if (input.substr(peg$currPos, 2) === peg$c175) {
6491
+ s6 = peg$c175;
6173
6492
  peg$currPos += 2;
6174
6493
  } else {
6175
6494
  s6 = peg$FAILED;
6176
6495
 
6177
6496
  if (peg$silentFails === 0) {
6178
- peg$fail(peg$c170);
6497
+ peg$fail(peg$c176);
6179
6498
  }
6180
6499
  }
6181
6500
 
@@ -6240,7 +6559,7 @@ function peg$parse(input, options) {
6240
6559
  s4 = peg$FAILED;
6241
6560
 
6242
6561
  if (peg$silentFails === 0) {
6243
- peg$fail(peg$c171);
6562
+ peg$fail(peg$c177);
6244
6563
  }
6245
6564
  }
6246
6565
 
@@ -6270,7 +6589,7 @@ function peg$parse(input, options) {
6270
6589
 
6271
6590
  if (s1 !== peg$FAILED) {
6272
6591
  peg$savedPos = s0;
6273
- s1 = peg$c172(s1);
6592
+ s1 = peg$c178(s1);
6274
6593
  }
6275
6594
 
6276
6595
  s0 = s1;
@@ -6280,14 +6599,14 @@ function peg$parse(input, options) {
6280
6599
  function peg$parseexprChar() {
6281
6600
  var s0;
6282
6601
 
6283
- if (peg$c173.test(input.charAt(peg$currPos))) {
6602
+ if (peg$c179.test(input.charAt(peg$currPos))) {
6284
6603
  s0 = input.charAt(peg$currPos);
6285
6604
  peg$currPos++;
6286
6605
  } else {
6287
6606
  s0 = peg$FAILED;
6288
6607
 
6289
6608
  if (peg$silentFails === 0) {
6290
- peg$fail(peg$c174);
6609
+ peg$fail(peg$c180);
6291
6610
  }
6292
6611
  }
6293
6612
 
@@ -6309,14 +6628,14 @@ function peg$parse(input, options) {
6309
6628
  function peg$parseexprCharNoCommaSpace() {
6310
6629
  var s0;
6311
6630
 
6312
- if (peg$c175.test(input.charAt(peg$currPos))) {
6631
+ if (peg$c181.test(input.charAt(peg$currPos))) {
6313
6632
  s0 = input.charAt(peg$currPos);
6314
6633
  peg$currPos++;
6315
6634
  } else {
6316
6635
  s0 = peg$FAILED;
6317
6636
 
6318
6637
  if (peg$silentFails === 0) {
6319
- peg$fail(peg$c176);
6638
+ peg$fail(peg$c182);
6320
6639
  }
6321
6640
  }
6322
6641
 
@@ -6374,13 +6693,13 @@ function peg$parse(input, options) {
6374
6693
  s2 = peg$FAILED;
6375
6694
 
6376
6695
  if (peg$silentFails === 0) {
6377
- peg$fail(peg$c171);
6696
+ peg$fail(peg$c177);
6378
6697
  }
6379
6698
  }
6380
6699
 
6381
6700
  if (s2 !== peg$FAILED) {
6382
6701
  peg$savedPos = s0;
6383
- s1 = peg$c177();
6702
+ s1 = peg$c183();
6384
6703
  s0 = s1;
6385
6704
  } else {
6386
6705
  peg$currPos = s0;
@@ -6399,14 +6718,14 @@ function peg$parse(input, options) {
6399
6718
  s0 = peg$parsecharacter();
6400
6719
 
6401
6720
  if (s0 === peg$FAILED) {
6402
- if (peg$c178.test(input.charAt(peg$currPos))) {
6721
+ if (peg$c184.test(input.charAt(peg$currPos))) {
6403
6722
  s0 = input.charAt(peg$currPos);
6404
6723
  peg$currPos++;
6405
6724
  } else {
6406
6725
  s0 = peg$FAILED;
6407
6726
 
6408
6727
  if (peg$silentFails === 0) {
6409
- peg$fail(peg$c179);
6728
+ peg$fail(peg$c185);
6410
6729
  }
6411
6730
  }
6412
6731
  }
@@ -6418,14 +6737,14 @@ function peg$parse(input, options) {
6418
6737
  var s0, s1;
6419
6738
  peg$silentFails++;
6420
6739
 
6421
- if (peg$c181.test(input.charAt(peg$currPos))) {
6740
+ if (peg$c187.test(input.charAt(peg$currPos))) {
6422
6741
  s0 = input.charAt(peg$currPos);
6423
6742
  peg$currPos++;
6424
6743
  } else {
6425
6744
  s0 = peg$FAILED;
6426
6745
 
6427
6746
  if (peg$silentFails === 0) {
6428
- peg$fail(peg$c182);
6747
+ peg$fail(peg$c188);
6429
6748
  }
6430
6749
  }
6431
6750
 
@@ -6435,7 +6754,7 @@ function peg$parse(input, options) {
6435
6754
  s1 = peg$FAILED;
6436
6755
 
6437
6756
  if (peg$silentFails === 0) {
6438
- peg$fail(peg$c180);
6757
+ peg$fail(peg$c186);
6439
6758
  }
6440
6759
  }
6441
6760
 
@@ -6446,20 +6765,20 @@ function peg$parse(input, options) {
6446
6765
  var s0, s1;
6447
6766
  s0 = peg$currPos;
6448
6767
 
6449
- if (peg$c183.test(input.charAt(peg$currPos))) {
6768
+ if (peg$c189.test(input.charAt(peg$currPos))) {
6450
6769
  s1 = input.charAt(peg$currPos);
6451
6770
  peg$currPos++;
6452
6771
  } else {
6453
6772
  s1 = peg$FAILED;
6454
6773
 
6455
6774
  if (peg$silentFails === 0) {
6456
- peg$fail(peg$c184);
6775
+ peg$fail(peg$c190);
6457
6776
  }
6458
6777
  }
6459
6778
 
6460
6779
  if (s1 !== peg$FAILED) {
6461
6780
  peg$savedPos = s0;
6462
- s1 = peg$c185(s1);
6781
+ s1 = peg$c191(s1);
6463
6782
  }
6464
6783
 
6465
6784
  s0 = s1;
@@ -6470,13 +6789,13 @@ function peg$parse(input, options) {
6470
6789
  var s0;
6471
6790
 
6472
6791
  if (input.charCodeAt(peg$currPos) === 34) {
6473
- s0 = peg$c186;
6792
+ s0 = peg$c192;
6474
6793
  peg$currPos++;
6475
6794
  } else {
6476
6795
  s0 = peg$FAILED;
6477
6796
 
6478
6797
  if (peg$silentFails === 0) {
6479
- peg$fail(peg$c187);
6798
+ peg$fail(peg$c193);
6480
6799
  }
6481
6800
  }
6482
6801
 
@@ -6562,7 +6881,7 @@ function peg$parse(input, options) {
6562
6881
  s1 = peg$FAILED;
6563
6882
 
6564
6883
  if (peg$silentFails === 0) {
6565
- peg$fail(peg$c188);
6884
+ peg$fail(peg$c194);
6566
6885
  }
6567
6886
  }
6568
6887
 
@@ -6573,60 +6892,59 @@ function peg$parse(input, options) {
6573
6892
  var s0;
6574
6893
 
6575
6894
  if (input.charCodeAt(peg$currPos) === 9) {
6576
- s0 = peg$c189;
6895
+ s0 = peg$c195;
6577
6896
  peg$currPos++;
6578
6897
  } else {
6579
6898
  s0 = peg$FAILED;
6580
6899
 
6581
6900
  if (peg$silentFails === 0) {
6582
- peg$fail(peg$c190);
6901
+ peg$fail(peg$c196);
6583
6902
  }
6584
6903
  }
6585
6904
 
6586
6905
  return s0;
6587
6906
  }
6588
6907
 
6589
- function peg$parsecomment() {
6908
+ function peg$parsesingle_line_comment() {
6590
6909
  var s0, s1, s2, s3;
6591
- peg$silentFails++;
6592
6910
  s0 = peg$currPos;
6593
6911
 
6594
- if (input.substr(peg$currPos, 2) === peg$c192) {
6595
- s1 = peg$c192;
6912
+ if (input.substr(peg$currPos, 2) === peg$c197) {
6913
+ s1 = peg$c197;
6596
6914
  peg$currPos += 2;
6597
6915
  } else {
6598
6916
  s1 = peg$FAILED;
6599
6917
 
6600
6918
  if (peg$silentFails === 0) {
6601
- peg$fail(peg$c193);
6919
+ peg$fail(peg$c198);
6602
6920
  }
6603
6921
  }
6604
6922
 
6605
6923
  if (s1 !== peg$FAILED) {
6606
6924
  s2 = [];
6607
6925
 
6608
- if (peg$c194.test(input.charAt(peg$currPos))) {
6926
+ if (peg$c199.test(input.charAt(peg$currPos))) {
6609
6927
  s3 = input.charAt(peg$currPos);
6610
6928
  peg$currPos++;
6611
6929
  } else {
6612
6930
  s3 = peg$FAILED;
6613
6931
 
6614
6932
  if (peg$silentFails === 0) {
6615
- peg$fail(peg$c195);
6933
+ peg$fail(peg$c200);
6616
6934
  }
6617
6935
  }
6618
6936
 
6619
6937
  while (s3 !== peg$FAILED) {
6620
6938
  s2.push(s3);
6621
6939
 
6622
- if (peg$c194.test(input.charAt(peg$currPos))) {
6940
+ if (peg$c199.test(input.charAt(peg$currPos))) {
6623
6941
  s3 = input.charAt(peg$currPos);
6624
6942
  peg$currPos++;
6625
6943
  } else {
6626
6944
  s3 = peg$FAILED;
6627
6945
 
6628
6946
  if (peg$silentFails === 0) {
6629
- peg$fail(peg$c195);
6947
+ peg$fail(peg$c200);
6630
6948
  }
6631
6949
  }
6632
6950
  }
@@ -6643,13 +6961,172 @@ function peg$parse(input, options) {
6643
6961
  s0 = peg$FAILED;
6644
6962
  }
6645
6963
 
6964
+ return s0;
6965
+ }
6966
+
6967
+ function peg$parsemulti_lime_comment() {
6968
+ var s0, s1, s2, s3, s4, s5;
6969
+ s0 = peg$currPos;
6970
+
6971
+ if (input.substr(peg$currPos, 2) === peg$c201) {
6972
+ s1 = peg$c201;
6973
+ peg$currPos += 2;
6974
+ } else {
6975
+ s1 = peg$FAILED;
6976
+
6977
+ if (peg$silentFails === 0) {
6978
+ peg$fail(peg$c202);
6979
+ }
6980
+ }
6981
+
6982
+ if (s1 !== peg$FAILED) {
6983
+ s2 = [];
6984
+ s3 = peg$currPos;
6985
+ s4 = peg$currPos;
6986
+ peg$silentFails++;
6987
+
6988
+ if (input.substr(peg$currPos, 2) === peg$c203) {
6989
+ s5 = peg$c203;
6990
+ peg$currPos += 2;
6991
+ } else {
6992
+ s5 = peg$FAILED;
6993
+
6994
+ if (peg$silentFails === 0) {
6995
+ peg$fail(peg$c204);
6996
+ }
6997
+ }
6998
+
6999
+ peg$silentFails--;
7000
+
7001
+ if (s5 === peg$FAILED) {
7002
+ s4 = void 0;
7003
+ } else {
7004
+ peg$currPos = s4;
7005
+ s4 = peg$FAILED;
7006
+ }
7007
+
7008
+ if (s4 !== peg$FAILED) {
7009
+ if (input.length > peg$currPos) {
7010
+ s5 = input.charAt(peg$currPos);
7011
+ peg$currPos++;
7012
+ } else {
7013
+ s5 = peg$FAILED;
7014
+
7015
+ if (peg$silentFails === 0) {
7016
+ peg$fail(peg$c177);
7017
+ }
7018
+ }
7019
+
7020
+ if (s5 !== peg$FAILED) {
7021
+ s4 = [s4, s5];
7022
+ s3 = s4;
7023
+ } else {
7024
+ peg$currPos = s3;
7025
+ s3 = peg$FAILED;
7026
+ }
7027
+ } else {
7028
+ peg$currPos = s3;
7029
+ s3 = peg$FAILED;
7030
+ }
7031
+
7032
+ while (s3 !== peg$FAILED) {
7033
+ s2.push(s3);
7034
+ s3 = peg$currPos;
7035
+ s4 = peg$currPos;
7036
+ peg$silentFails++;
7037
+
7038
+ if (input.substr(peg$currPos, 2) === peg$c203) {
7039
+ s5 = peg$c203;
7040
+ peg$currPos += 2;
7041
+ } else {
7042
+ s5 = peg$FAILED;
7043
+
7044
+ if (peg$silentFails === 0) {
7045
+ peg$fail(peg$c204);
7046
+ }
7047
+ }
7048
+
7049
+ peg$silentFails--;
7050
+
7051
+ if (s5 === peg$FAILED) {
7052
+ s4 = void 0;
7053
+ } else {
7054
+ peg$currPos = s4;
7055
+ s4 = peg$FAILED;
7056
+ }
7057
+
7058
+ if (s4 !== peg$FAILED) {
7059
+ if (input.length > peg$currPos) {
7060
+ s5 = input.charAt(peg$currPos);
7061
+ peg$currPos++;
7062
+ } else {
7063
+ s5 = peg$FAILED;
7064
+
7065
+ if (peg$silentFails === 0) {
7066
+ peg$fail(peg$c177);
7067
+ }
7068
+ }
7069
+
7070
+ if (s5 !== peg$FAILED) {
7071
+ s4 = [s4, s5];
7072
+ s3 = s4;
7073
+ } else {
7074
+ peg$currPos = s3;
7075
+ s3 = peg$FAILED;
7076
+ }
7077
+ } else {
7078
+ peg$currPos = s3;
7079
+ s3 = peg$FAILED;
7080
+ }
7081
+ }
7082
+
7083
+ if (s2 !== peg$FAILED) {
7084
+ if (input.substr(peg$currPos, 2) === peg$c203) {
7085
+ s3 = peg$c203;
7086
+ peg$currPos += 2;
7087
+ } else {
7088
+ s3 = peg$FAILED;
7089
+
7090
+ if (peg$silentFails === 0) {
7091
+ peg$fail(peg$c204);
7092
+ }
7093
+ }
7094
+
7095
+ if (s3 !== peg$FAILED) {
7096
+ s1 = [s1, s2, s3];
7097
+ s0 = s1;
7098
+ } else {
7099
+ peg$currPos = s0;
7100
+ s0 = peg$FAILED;
7101
+ }
7102
+ } else {
7103
+ peg$currPos = s0;
7104
+ s0 = peg$FAILED;
7105
+ }
7106
+ } else {
7107
+ peg$currPos = s0;
7108
+ s0 = peg$FAILED;
7109
+ }
7110
+
7111
+ return s0;
7112
+ }
7113
+
7114
+ function peg$parsecomment() {
7115
+ var s0, s1;
7116
+ peg$silentFails++;
7117
+ s0 = peg$parsesingle_line_comment();
7118
+
7119
+ if (s0 === peg$FAILED) {
7120
+ s0 = peg$parsemulti_lime_comment();
7121
+ }
7122
+
6646
7123
  peg$silentFails--;
6647
7124
 
6648
7125
  if (s0 === peg$FAILED) {
6649
7126
  s1 = peg$FAILED;
6650
7127
 
6651
7128
  if (peg$silentFails === 0) {
6652
- peg$fail(peg$c191);
7129
+ peg$fail(peg$c205);
6653
7130
  }
6654
7131
  }
6655
7132
 
@@ -6660,26 +7137,26 @@ function peg$parse(input, options) {
6660
7137
  var s0, s1;
6661
7138
  peg$silentFails++;
6662
7139
 
6663
- if (input.substr(peg$currPos, 2) === peg$c197) {
6664
- s0 = peg$c197;
7140
+ if (input.substr(peg$currPos, 2) === peg$c207) {
7141
+ s0 = peg$c207;
6665
7142
  peg$currPos += 2;
6666
7143
  } else {
6667
7144
  s0 = peg$FAILED;
6668
7145
 
6669
7146
  if (peg$silentFails === 0) {
6670
- peg$fail(peg$c198);
7147
+ peg$fail(peg$c208);
6671
7148
  }
6672
7149
  }
6673
7150
 
6674
7151
  if (s0 === peg$FAILED) {
6675
7152
  if (input.charCodeAt(peg$currPos) === 10) {
6676
- s0 = peg$c199;
7153
+ s0 = peg$c209;
6677
7154
  peg$currPos++;
6678
7155
  } else {
6679
7156
  s0 = peg$FAILED;
6680
7157
 
6681
7158
  if (peg$silentFails === 0) {
6682
- peg$fail(peg$c200);
7159
+ peg$fail(peg$c210);
6683
7160
  }
6684
7161
  }
6685
7162
  }
@@ -6690,7 +7167,7 @@ function peg$parse(input, options) {
6690
7167
  s1 = peg$FAILED;
6691
7168
 
6692
7169
  if (peg$silentFails === 0) {
6693
- peg$fail(peg$c196);
7170
+ peg$fail(peg$c206);
6694
7171
  }
6695
7172
  }
6696
7173
 
@@ -6701,14 +7178,14 @@ function peg$parse(input, options) {
6701
7178
  var s0, s1;
6702
7179
  peg$silentFails++;
6703
7180
 
6704
- if (peg$c202.test(input.charAt(peg$currPos))) {
7181
+ if (peg$c212.test(input.charAt(peg$currPos))) {
6705
7182
  s0 = input.charAt(peg$currPos);
6706
7183
  peg$currPos++;
6707
7184
  } else {
6708
7185
  s0 = peg$FAILED;
6709
7186
 
6710
7187
  if (peg$silentFails === 0) {
6711
- peg$fail(peg$c203);
7188
+ peg$fail(peg$c213);
6712
7189
  }
6713
7190
  }
6714
7191
 
@@ -6718,7 +7195,7 @@ function peg$parse(input, options) {
6718
7195
  s1 = peg$FAILED;
6719
7196
 
6720
7197
  if (peg$silentFails === 0) {
6721
- peg$fail(peg$c201);
7198
+ peg$fail(peg$c211);
6722
7199
  }
6723
7200
  }
6724
7201
 
@@ -6729,14 +7206,14 @@ function peg$parse(input, options) {
6729
7206
  var s0, s1;
6730
7207
  peg$silentFails++;
6731
7208
 
6732
- if (peg$c204.test(input.charAt(peg$currPos))) {
7209
+ if (peg$c214.test(input.charAt(peg$currPos))) {
6733
7210
  s0 = input.charAt(peg$currPos);
6734
7211
  peg$currPos++;
6735
7212
  } else {
6736
7213
  s0 = peg$FAILED;
6737
7214
 
6738
7215
  if (peg$silentFails === 0) {
6739
- peg$fail(peg$c205);
7216
+ peg$fail(peg$c215);
6740
7217
  }
6741
7218
  }
6742
7219
 
@@ -6746,7 +7223,7 @@ function peg$parse(input, options) {
6746
7223
  s1 = peg$FAILED;
6747
7224
 
6748
7225
  if (peg$silentFails === 0) {
6749
- peg$fail(peg$c201);
7226
+ peg$fail(peg$c211);
6750
7227
  }
6751
7228
  }
6752
7229
 
@@ -6757,13 +7234,13 @@ function peg$parse(input, options) {
6757
7234
  var s0;
6758
7235
 
6759
7236
  if (input.charCodeAt(peg$currPos) === 32) {
6760
- s0 = peg$c206;
7237
+ s0 = peg$c216;
6761
7238
  peg$currPos++;
6762
7239
  } else {
6763
7240
  s0 = peg$FAILED;
6764
7241
 
6765
7242
  if (peg$silentFails === 0) {
6766
- peg$fail(peg$c207);
7243
+ peg$fail(peg$c217);
6767
7244
  }
6768
7245
  }
6769
7246
 
@@ -6774,13 +7251,13 @@ function peg$parse(input, options) {
6774
7251
  var s0;
6775
7252
 
6776
7253
  if (input.charCodeAt(peg$currPos) === 44) {
6777
- s0 = peg$c167;
7254
+ s0 = peg$c173;
6778
7255
  peg$currPos++;
6779
7256
  } else {
6780
7257
  s0 = peg$FAILED;
6781
7258
 
6782
7259
  if (peg$silentFails === 0) {
6783
- peg$fail(peg$c168);
7260
+ peg$fail(peg$c174);
6784
7261
  }
6785
7262
  }
6786
7263
 
@@ -6792,19 +7269,19 @@ function peg$parse(input, options) {
6792
7269
  s0 = peg$currPos;
6793
7270
 
6794
7271
  if (input.charCodeAt(peg$currPos) === 35) {
6795
- s1 = peg$c208;
7272
+ s1 = peg$c218;
6796
7273
  peg$currPos++;
6797
7274
  } else {
6798
7275
  s1 = peg$FAILED;
6799
7276
 
6800
7277
  if (peg$silentFails === 0) {
6801
- peg$fail(peg$c209);
7278
+ peg$fail(peg$c219);
6802
7279
  }
6803
7280
  }
6804
7281
 
6805
7282
  if (s1 !== peg$FAILED) {
6806
7283
  peg$savedPos = s0;
6807
- s1 = peg$c210();
7284
+ s1 = peg$c220();
6808
7285
  }
6809
7286
 
6810
7287
  s0 = s1;
@@ -6817,13 +7294,13 @@ function peg$parse(input, options) {
6817
7294
  s0 = peg$currPos;
6818
7295
 
6819
7296
  if (input.charCodeAt(peg$currPos) === 34) {
6820
- s1 = peg$c186;
7297
+ s1 = peg$c192;
6821
7298
  peg$currPos++;
6822
7299
  } else {
6823
7300
  s1 = peg$FAILED;
6824
7301
 
6825
7302
  if (peg$silentFails === 0) {
6826
- peg$fail(peg$c187);
7303
+ peg$fail(peg$c193);
6827
7304
  }
6828
7305
  }
6829
7306
 
@@ -6838,19 +7315,19 @@ function peg$parse(input, options) {
6838
7315
 
6839
7316
  if (s2 !== peg$FAILED) {
6840
7317
  if (input.charCodeAt(peg$currPos) === 34) {
6841
- s3 = peg$c186;
7318
+ s3 = peg$c192;
6842
7319
  peg$currPos++;
6843
7320
  } else {
6844
7321
  s3 = peg$FAILED;
6845
7322
 
6846
7323
  if (peg$silentFails === 0) {
6847
- peg$fail(peg$c187);
7324
+ peg$fail(peg$c193);
6848
7325
  }
6849
7326
  }
6850
7327
 
6851
7328
  if (s3 !== peg$FAILED) {
6852
7329
  peg$savedPos = s0;
6853
- s1 = peg$c212(s2);
7330
+ s1 = peg$c222(s2);
6854
7331
  s0 = s1;
6855
7332
  } else {
6856
7333
  peg$currPos = s0;
@@ -6868,14 +7345,14 @@ function peg$parse(input, options) {
6868
7345
  if (s0 === peg$FAILED) {
6869
7346
  s0 = peg$currPos;
6870
7347
 
6871
- if (input.substr(peg$currPos, 3) === peg$c213) {
6872
- s1 = peg$c213;
7348
+ if (input.substr(peg$currPos, 3) === peg$c223) {
7349
+ s1 = peg$c223;
6873
7350
  peg$currPos += 3;
6874
7351
  } else {
6875
7352
  s1 = peg$FAILED;
6876
7353
 
6877
7354
  if (peg$silentFails === 0) {
6878
- peg$fail(peg$c214);
7355
+ peg$fail(peg$c224);
6879
7356
  }
6880
7357
  }
6881
7358
 
@@ -6889,20 +7366,20 @@ function peg$parse(input, options) {
6889
7366
  }
6890
7367
 
6891
7368
  if (s2 !== peg$FAILED) {
6892
- if (input.substr(peg$currPos, 3) === peg$c213) {
6893
- s3 = peg$c213;
7369
+ if (input.substr(peg$currPos, 3) === peg$c223) {
7370
+ s3 = peg$c223;
6894
7371
  peg$currPos += 3;
6895
7372
  } else {
6896
7373
  s3 = peg$FAILED;
6897
7374
 
6898
7375
  if (peg$silentFails === 0) {
6899
- peg$fail(peg$c214);
7376
+ peg$fail(peg$c224);
6900
7377
  }
6901
7378
  }
6902
7379
 
6903
7380
  if (s3 !== peg$FAILED) {
6904
7381
  peg$savedPos = s0;
6905
- s1 = peg$c215(s2);
7382
+ s1 = peg$c225(s2);
6906
7383
  s0 = s1;
6907
7384
  } else {
6908
7385
  peg$currPos = s0;
@@ -6921,13 +7398,13 @@ function peg$parse(input, options) {
6921
7398
  s0 = peg$currPos;
6922
7399
 
6923
7400
  if (input.charCodeAt(peg$currPos) === 39) {
6924
- s1 = peg$c216;
7401
+ s1 = peg$c226;
6925
7402
  peg$currPos++;
6926
7403
  } else {
6927
7404
  s1 = peg$FAILED;
6928
7405
 
6929
7406
  if (peg$silentFails === 0) {
6930
- peg$fail(peg$c217);
7407
+ peg$fail(peg$c227);
6931
7408
  }
6932
7409
  }
6933
7410
 
@@ -6942,19 +7419,19 @@ function peg$parse(input, options) {
6942
7419
 
6943
7420
  if (s2 !== peg$FAILED) {
6944
7421
  if (input.charCodeAt(peg$currPos) === 39) {
6945
- s3 = peg$c216;
7422
+ s3 = peg$c226;
6946
7423
  peg$currPos++;
6947
7424
  } else {
6948
7425
  s3 = peg$FAILED;
6949
7426
 
6950
7427
  if (peg$silentFails === 0) {
6951
- peg$fail(peg$c217);
7428
+ peg$fail(peg$c227);
6952
7429
  }
6953
7430
  }
6954
7431
 
6955
7432
  if (s3 !== peg$FAILED) {
6956
7433
  peg$savedPos = s0;
6957
- s1 = peg$c212(s2);
7434
+ s1 = peg$c222(s2);
6958
7435
  s0 = s1;
6959
7436
  } else {
6960
7437
  peg$currPos = s0;
@@ -6977,7 +7454,7 @@ function peg$parse(input, options) {
6977
7454
  s1 = peg$FAILED;
6978
7455
 
6979
7456
  if (peg$silentFails === 0) {
6980
- peg$fail(peg$c211);
7457
+ peg$fail(peg$c221);
6981
7458
  }
6982
7459
  }
6983
7460
 
@@ -6989,31 +7466,31 @@ function peg$parse(input, options) {
6989
7466
  s0 = peg$currPos;
6990
7467
 
6991
7468
  if (input.charCodeAt(peg$currPos) === 92) {
6992
- s1 = peg$c218;
7469
+ s1 = peg$c228;
6993
7470
  peg$currPos++;
6994
7471
  } else {
6995
7472
  s1 = peg$FAILED;
6996
7473
 
6997
7474
  if (peg$silentFails === 0) {
6998
- peg$fail(peg$c219);
7475
+ peg$fail(peg$c229);
6999
7476
  }
7000
7477
  }
7001
7478
 
7002
7479
  if (s1 !== peg$FAILED) {
7003
7480
  if (input.charCodeAt(peg$currPos) === 34) {
7004
- s2 = peg$c186;
7481
+ s2 = peg$c192;
7005
7482
  peg$currPos++;
7006
7483
  } else {
7007
7484
  s2 = peg$FAILED;
7008
7485
 
7009
7486
  if (peg$silentFails === 0) {
7010
- peg$fail(peg$c187);
7487
+ peg$fail(peg$c193);
7011
7488
  }
7012
7489
  }
7013
7490
 
7014
7491
  if (s2 !== peg$FAILED) {
7015
7492
  peg$savedPos = s0;
7016
- s1 = peg$c220();
7493
+ s1 = peg$c230();
7017
7494
  s0 = s1;
7018
7495
  } else {
7019
7496
  peg$currPos = s0;
@@ -7030,13 +7507,13 @@ function peg$parse(input, options) {
7030
7507
  peg$silentFails++;
7031
7508
 
7032
7509
  if (input.charCodeAt(peg$currPos) === 34) {
7033
- s2 = peg$c186;
7510
+ s2 = peg$c192;
7034
7511
  peg$currPos++;
7035
7512
  } else {
7036
7513
  s2 = peg$FAILED;
7037
7514
 
7038
7515
  if (peg$silentFails === 0) {
7039
- peg$fail(peg$c187);
7516
+ peg$fail(peg$c193);
7040
7517
  }
7041
7518
  }
7042
7519
 
@@ -7054,7 +7531,7 @@ function peg$parse(input, options) {
7054
7531
 
7055
7532
  if (s2 !== peg$FAILED) {
7056
7533
  peg$savedPos = s0;
7057
- s1 = peg$c221();
7534
+ s1 = peg$c231();
7058
7535
  s0 = s1;
7059
7536
  } else {
7060
7537
  peg$currPos = s0;
@@ -7073,20 +7550,20 @@ function peg$parse(input, options) {
7073
7550
  var s0, s1, s2;
7074
7551
  s0 = peg$currPos;
7075
7552
 
7076
- if (input.substr(peg$currPos, 2) === peg$c222) {
7077
- s1 = peg$c222;
7553
+ if (input.substr(peg$currPos, 2) === peg$c232) {
7554
+ s1 = peg$c232;
7078
7555
  peg$currPos += 2;
7079
7556
  } else {
7080
7557
  s1 = peg$FAILED;
7081
7558
 
7082
7559
  if (peg$silentFails === 0) {
7083
- peg$fail(peg$c223);
7560
+ peg$fail(peg$c233);
7084
7561
  }
7085
7562
  }
7086
7563
 
7087
7564
  if (s1 !== peg$FAILED) {
7088
7565
  peg$savedPos = s0;
7089
- s1 = peg$c224();
7566
+ s1 = peg$c234();
7090
7567
  }
7091
7568
 
7092
7569
  s0 = s1;
@@ -7097,13 +7574,13 @@ function peg$parse(input, options) {
7097
7574
  peg$silentFails++;
7098
7575
 
7099
7576
  if (input.charCodeAt(peg$currPos) === 39) {
7100
- s2 = peg$c216;
7577
+ s2 = peg$c226;
7101
7578
  peg$currPos++;
7102
7579
  } else {
7103
7580
  s2 = peg$FAILED;
7104
7581
 
7105
7582
  if (peg$silentFails === 0) {
7106
- peg$fail(peg$c217);
7583
+ peg$fail(peg$c227);
7107
7584
  }
7108
7585
  }
7109
7586
 
@@ -7121,7 +7598,7 @@ function peg$parse(input, options) {
7121
7598
 
7122
7599
  if (s2 !== peg$FAILED) {
7123
7600
  peg$savedPos = s0;
7124
- s1 = peg$c221();
7601
+ s1 = peg$c231();
7125
7602
  s0 = s1;
7126
7603
  } else {
7127
7604
  peg$currPos = s0;
@@ -7140,20 +7617,20 @@ function peg$parse(input, options) {
7140
7617
  var s0, s1, s2, s3;
7141
7618
  s0 = peg$currPos;
7142
7619
 
7143
- if (input.substr(peg$currPos, 2) === peg$c222) {
7144
- s1 = peg$c222;
7620
+ if (input.substr(peg$currPos, 2) === peg$c232) {
7621
+ s1 = peg$c232;
7145
7622
  peg$currPos += 2;
7146
7623
  } else {
7147
7624
  s1 = peg$FAILED;
7148
7625
 
7149
7626
  if (peg$silentFails === 0) {
7150
- peg$fail(peg$c223);
7627
+ peg$fail(peg$c233);
7151
7628
  }
7152
7629
  }
7153
7630
 
7154
7631
  if (s1 !== peg$FAILED) {
7155
7632
  peg$savedPos = s0;
7156
- s1 = peg$c224();
7633
+ s1 = peg$c234();
7157
7634
  }
7158
7635
 
7159
7636
  s0 = s1;
@@ -7162,13 +7639,13 @@ function peg$parse(input, options) {
7162
7639
  s0 = peg$currPos;
7163
7640
 
7164
7641
  if (input.charCodeAt(peg$currPos) === 92) {
7165
- s1 = peg$c218;
7642
+ s1 = peg$c228;
7166
7643
  peg$currPos++;
7167
7644
  } else {
7168
7645
  s1 = peg$FAILED;
7169
7646
 
7170
7647
  if (peg$silentFails === 0) {
7171
- peg$fail(peg$c219);
7648
+ peg$fail(peg$c229);
7172
7649
  }
7173
7650
  }
7174
7651
 
@@ -7176,13 +7653,13 @@ function peg$parse(input, options) {
7176
7653
  s2 = [];
7177
7654
 
7178
7655
  if (input.charCodeAt(peg$currPos) === 92) {
7179
- s3 = peg$c218;
7656
+ s3 = peg$c228;
7180
7657
  peg$currPos++;
7181
7658
  } else {
7182
7659
  s3 = peg$FAILED;
7183
7660
 
7184
7661
  if (peg$silentFails === 0) {
7185
- peg$fail(peg$c219);
7662
+ peg$fail(peg$c229);
7186
7663
  }
7187
7664
  }
7188
7665
 
@@ -7191,13 +7668,13 @@ function peg$parse(input, options) {
7191
7668
  s2.push(s3);
7192
7669
 
7193
7670
  if (input.charCodeAt(peg$currPos) === 92) {
7194
- s3 = peg$c218;
7671
+ s3 = peg$c228;
7195
7672
  peg$currPos++;
7196
7673
  } else {
7197
7674
  s3 = peg$FAILED;
7198
7675
 
7199
7676
  if (peg$silentFails === 0) {
7200
- peg$fail(peg$c219);
7677
+ peg$fail(peg$c229);
7201
7678
  }
7202
7679
  }
7203
7680
  }
@@ -7207,7 +7684,7 @@ function peg$parse(input, options) {
7207
7684
 
7208
7685
  if (s2 !== peg$FAILED) {
7209
7686
  peg$savedPos = s0;
7210
- s1 = peg$c225(s2);
7687
+ s1 = peg$c235(s2);
7211
7688
  s0 = s1;
7212
7689
  } else {
7213
7690
  peg$currPos = s0;
@@ -7222,25 +7699,25 @@ function peg$parse(input, options) {
7222
7699
  s0 = peg$currPos;
7223
7700
 
7224
7701
  if (input.charCodeAt(peg$currPos) === 92) {
7225
- s1 = peg$c218;
7702
+ s1 = peg$c228;
7226
7703
  peg$currPos++;
7227
7704
  } else {
7228
7705
  s1 = peg$FAILED;
7229
7706
 
7230
7707
  if (peg$silentFails === 0) {
7231
- peg$fail(peg$c219);
7708
+ peg$fail(peg$c229);
7232
7709
  }
7233
7710
  }
7234
7711
 
7235
7712
  if (s1 !== peg$FAILED) {
7236
7713
  if (input.charCodeAt(peg$currPos) === 10) {
7237
- s2 = peg$c199;
7714
+ s2 = peg$c209;
7238
7715
  peg$currPos++;
7239
7716
  } else {
7240
7717
  s2 = peg$FAILED;
7241
7718
 
7242
7719
  if (peg$silentFails === 0) {
7243
- peg$fail(peg$c200);
7720
+ peg$fail(peg$c210);
7244
7721
  }
7245
7722
  }
7246
7723
 
@@ -7250,7 +7727,7 @@ function peg$parse(input, options) {
7250
7727
 
7251
7728
  if (s2 !== peg$FAILED) {
7252
7729
  peg$savedPos = s0;
7253
- s1 = peg$c226();
7730
+ s1 = peg$c236();
7254
7731
  s0 = s1;
7255
7732
  } else {
7256
7733
  peg$currPos = s0;
@@ -7266,14 +7743,14 @@ function peg$parse(input, options) {
7266
7743
  s1 = peg$currPos;
7267
7744
  peg$silentFails++;
7268
7745
 
7269
- if (input.substr(peg$currPos, 3) === peg$c213) {
7270
- s2 = peg$c213;
7746
+ if (input.substr(peg$currPos, 3) === peg$c223) {
7747
+ s2 = peg$c223;
7271
7748
  peg$currPos += 3;
7272
7749
  } else {
7273
7750
  s2 = peg$FAILED;
7274
7751
 
7275
7752
  if (peg$silentFails === 0) {
7276
- peg$fail(peg$c214);
7753
+ peg$fail(peg$c224);
7277
7754
  }
7278
7755
  }
7279
7756
 
@@ -7291,7 +7768,7 @@ function peg$parse(input, options) {
7291
7768
 
7292
7769
  if (s2 !== peg$FAILED) {
7293
7770
  peg$savedPos = s0;
7294
- s1 = peg$c221();
7771
+ s1 = peg$c231();
7295
7772
  s0 = s1;
7296
7773
  } else {
7297
7774
  peg$currPos = s0;
@@ -7318,7 +7795,7 @@ function peg$parse(input, options) {
7318
7795
  s0 = peg$FAILED;
7319
7796
 
7320
7797
  if (peg$silentFails === 0) {
7321
- peg$fail(peg$c171);
7798
+ peg$fail(peg$c177);
7322
7799
  }
7323
7800
  }
7324
7801
 
@@ -7328,14 +7805,14 @@ function peg$parse(input, options) {
7328
7805
  function peg$parsedigit() {
7329
7806
  var s0;
7330
7807
 
7331
- if (peg$c227.test(input.charAt(peg$currPos))) {
7808
+ if (peg$c237.test(input.charAt(peg$currPos))) {
7332
7809
  s0 = input.charAt(peg$currPos);
7333
7810
  peg$currPos++;
7334
7811
  } else {
7335
7812
  s0 = peg$FAILED;
7336
7813
 
7337
7814
  if (peg$silentFails === 0) {
7338
- peg$fail(peg$c228);
7815
+ peg$fail(peg$c238);
7339
7816
  }
7340
7817
  }
7341
7818
 
@@ -7346,13 +7823,13 @@ function peg$parse(input, options) {
7346
7823
  var s0;
7347
7824
 
7348
7825
  if (input.charCodeAt(peg$currPos) === 61) {
7349
- s0 = peg$c229;
7826
+ s0 = peg$c239;
7350
7827
  peg$currPos++;
7351
7828
  } else {
7352
7829
  s0 = peg$FAILED;
7353
7830
 
7354
7831
  if (peg$silentFails === 0) {
7355
- peg$fail(peg$c230);
7832
+ peg$fail(peg$c240);
7356
7833
  }
7357
7834
  }
7358
7835
 
@@ -7363,13 +7840,13 @@ function peg$parse(input, options) {
7363
7840
  var s0;
7364
7841
 
7365
7842
  if (input.charCodeAt(peg$currPos) === 46) {
7366
- s0 = peg$c25;
7843
+ s0 = peg$c162;
7367
7844
  peg$currPos++;
7368
7845
  } else {
7369
7846
  s0 = peg$FAILED;
7370
7847
 
7371
7848
  if (peg$silentFails === 0) {
7372
- peg$fail(peg$c26);
7849
+ peg$fail(peg$c163);
7373
7850
  }
7374
7851
  }
7375
7852
 
@@ -7380,38 +7857,38 @@ function peg$parse(input, options) {
7380
7857
  var s0, s1;
7381
7858
  s0 = peg$currPos;
7382
7859
 
7383
- if (input.substr(peg$currPos, 4).toLowerCase() === peg$c231) {
7860
+ if (input.substr(peg$currPos, 4).toLowerCase() === peg$c241) {
7384
7861
  s1 = input.substr(peg$currPos, 4);
7385
7862
  peg$currPos += 4;
7386
7863
  } else {
7387
7864
  s1 = peg$FAILED;
7388
7865
 
7389
7866
  if (peg$silentFails === 0) {
7390
- peg$fail(peg$c232);
7867
+ peg$fail(peg$c242);
7391
7868
  }
7392
7869
  }
7393
7870
 
7394
7871
  if (s1 === peg$FAILED) {
7395
- if (input.substr(peg$currPos, 5).toLowerCase() === peg$c233) {
7872
+ if (input.substr(peg$currPos, 5).toLowerCase() === peg$c243) {
7396
7873
  s1 = input.substr(peg$currPos, 5);
7397
7874
  peg$currPos += 5;
7398
7875
  } else {
7399
7876
  s1 = peg$FAILED;
7400
7877
 
7401
7878
  if (peg$silentFails === 0) {
7402
- peg$fail(peg$c234);
7879
+ peg$fail(peg$c244);
7403
7880
  }
7404
7881
  }
7405
7882
 
7406
7883
  if (s1 === peg$FAILED) {
7407
- if (input.substr(peg$currPos, 4).toLowerCase() === peg$c62) {
7884
+ if (input.substr(peg$currPos, 4).toLowerCase() === peg$c60) {
7408
7885
  s1 = input.substr(peg$currPos, 4);
7409
7886
  peg$currPos += 4;
7410
7887
  } else {
7411
7888
  s1 = peg$FAILED;
7412
7889
 
7413
7890
  if (peg$silentFails === 0) {
7414
- peg$fail(peg$c63);
7891
+ peg$fail(peg$c61);
7415
7892
  }
7416
7893
  }
7417
7894
  }
@@ -7419,7 +7896,7 @@ function peg$parse(input, options) {
7419
7896
 
7420
7897
  if (s1 !== peg$FAILED) {
7421
7898
  peg$savedPos = s0;
7422
- s1 = peg$c235(s1);
7899
+ s1 = peg$c245(s1);
7423
7900
  }
7424
7901
 
7425
7902
  s0 = s1;
@@ -7427,20 +7904,44 @@ function peg$parse(input, options) {
7427
7904
  }
7428
7905
 
7429
7906
  function peg$parseNumberLiteral() {
7430
- var s0, s1;
7907
+ var s0, s1, s2;
7431
7908
  s0 = peg$currPos;
7432
- s1 = peg$parsefloat();
7909
+
7910
+ if (input.charCodeAt(peg$currPos) === 45) {
7911
+ s1 = peg$c246;
7912
+ peg$currPos++;
7913
+ } else {
7914
+ s1 = peg$FAILED;
7915
+
7916
+ if (peg$silentFails === 0) {
7917
+ peg$fail(peg$c247);
7918
+ }
7919
+ }
7433
7920
 
7434
7921
  if (s1 === peg$FAILED) {
7435
- s1 = peg$parseinteger();
7922
+ s1 = null;
7436
7923
  }
7437
7924
 
7438
7925
  if (s1 !== peg$FAILED) {
7439
- peg$savedPos = s0;
7440
- s1 = peg$c236(s1);
7926
+ s2 = peg$parsefloat();
7927
+
7928
+ if (s2 === peg$FAILED) {
7929
+ s2 = peg$parseinteger();
7930
+ }
7931
+
7932
+ if (s2 !== peg$FAILED) {
7933
+ peg$savedPos = s0;
7934
+ s1 = peg$c248(s1, s2);
7935
+ s0 = s1;
7936
+ } else {
7937
+ peg$currPos = s0;
7938
+ s0 = peg$FAILED;
7939
+ }
7940
+ } else {
7941
+ peg$currPos = s0;
7942
+ s0 = peg$FAILED;
7441
7943
  }
7442
7944
 
7443
- s0 = s1;
7444
7945
  return s0;
7445
7946
  }
7446
7947
 
@@ -7449,14 +7950,14 @@ function peg$parse(input, options) {
7449
7950
  s0 = peg$currPos;
7450
7951
  s1 = [];
7451
7952
 
7452
- if (peg$c227.test(input.charAt(peg$currPos))) {
7953
+ if (peg$c237.test(input.charAt(peg$currPos))) {
7453
7954
  s2 = input.charAt(peg$currPos);
7454
7955
  peg$currPos++;
7455
7956
  } else {
7456
7957
  s2 = peg$FAILED;
7457
7958
 
7458
7959
  if (peg$silentFails === 0) {
7459
- peg$fail(peg$c228);
7960
+ peg$fail(peg$c238);
7460
7961
  }
7461
7962
  }
7462
7963
 
@@ -7464,14 +7965,14 @@ function peg$parse(input, options) {
7464
7965
  while (s2 !== peg$FAILED) {
7465
7966
  s1.push(s2);
7466
7967
 
7467
- if (peg$c227.test(input.charAt(peg$currPos))) {
7968
+ if (peg$c237.test(input.charAt(peg$currPos))) {
7468
7969
  s2 = input.charAt(peg$currPos);
7469
7970
  peg$currPos++;
7470
7971
  } else {
7471
7972
  s2 = peg$FAILED;
7472
7973
 
7473
7974
  if (peg$silentFails === 0) {
7474
- peg$fail(peg$c228);
7975
+ peg$fail(peg$c238);
7475
7976
  }
7476
7977
  }
7477
7978
  }
@@ -7481,27 +7982,27 @@ function peg$parse(input, options) {
7481
7982
 
7482
7983
  if (s1 !== peg$FAILED) {
7483
7984
  if (input.charCodeAt(peg$currPos) === 46) {
7484
- s2 = peg$c25;
7985
+ s2 = peg$c162;
7485
7986
  peg$currPos++;
7486
7987
  } else {
7487
7988
  s2 = peg$FAILED;
7488
7989
 
7489
7990
  if (peg$silentFails === 0) {
7490
- peg$fail(peg$c26);
7991
+ peg$fail(peg$c163);
7491
7992
  }
7492
7993
  }
7493
7994
 
7494
7995
  if (s2 !== peg$FAILED) {
7495
7996
  s3 = [];
7496
7997
 
7497
- if (peg$c227.test(input.charAt(peg$currPos))) {
7998
+ if (peg$c237.test(input.charAt(peg$currPos))) {
7498
7999
  s4 = input.charAt(peg$currPos);
7499
8000
  peg$currPos++;
7500
8001
  } else {
7501
8002
  s4 = peg$FAILED;
7502
8003
 
7503
8004
  if (peg$silentFails === 0) {
7504
- peg$fail(peg$c228);
8005
+ peg$fail(peg$c238);
7505
8006
  }
7506
8007
  }
7507
8008
 
@@ -7509,14 +8010,14 @@ function peg$parse(input, options) {
7509
8010
  while (s4 !== peg$FAILED) {
7510
8011
  s3.push(s4);
7511
8012
 
7512
- if (peg$c227.test(input.charAt(peg$currPos))) {
8013
+ if (peg$c237.test(input.charAt(peg$currPos))) {
7513
8014
  s4 = input.charAt(peg$currPos);
7514
8015
  peg$currPos++;
7515
8016
  } else {
7516
8017
  s4 = peg$FAILED;
7517
8018
 
7518
8019
  if (peg$silentFails === 0) {
7519
- peg$fail(peg$c228);
8020
+ peg$fail(peg$c238);
7520
8021
  }
7521
8022
  }
7522
8023
  }
@@ -7526,7 +8027,7 @@ function peg$parse(input, options) {
7526
8027
 
7527
8028
  if (s3 !== peg$FAILED) {
7528
8029
  peg$savedPos = s0;
7529
- s1 = peg$c237(s1, s3);
8030
+ s1 = peg$c249(s1, s3);
7530
8031
  s0 = s1;
7531
8032
  } else {
7532
8033
  peg$currPos = s0;
@@ -7549,14 +8050,14 @@ function peg$parse(input, options) {
7549
8050
  s0 = peg$currPos;
7550
8051
  s1 = [];
7551
8052
 
7552
- if (peg$c227.test(input.charAt(peg$currPos))) {
8053
+ if (peg$c237.test(input.charAt(peg$currPos))) {
7553
8054
  s2 = input.charAt(peg$currPos);
7554
8055
  peg$currPos++;
7555
8056
  } else {
7556
8057
  s2 = peg$FAILED;
7557
8058
 
7558
8059
  if (peg$silentFails === 0) {
7559
- peg$fail(peg$c228);
8060
+ peg$fail(peg$c238);
7560
8061
  }
7561
8062
  }
7562
8063
 
@@ -7564,14 +8065,14 @@ function peg$parse(input, options) {
7564
8065
  while (s2 !== peg$FAILED) {
7565
8066
  s1.push(s2);
7566
8067
 
7567
- if (peg$c227.test(input.charAt(peg$currPos))) {
8068
+ if (peg$c237.test(input.charAt(peg$currPos))) {
7568
8069
  s2 = input.charAt(peg$currPos);
7569
8070
  peg$currPos++;
7570
8071
  } else {
7571
8072
  s2 = peg$FAILED;
7572
8073
 
7573
8074
  if (peg$silentFails === 0) {
7574
- peg$fail(peg$c228);
8075
+ peg$fail(peg$c238);
7575
8076
  }
7576
8077
  }
7577
8078
  }
@@ -7581,7 +8082,7 @@ function peg$parse(input, options) {
7581
8082
 
7582
8083
  if (s1 !== peg$FAILED) {
7583
8084
  peg$savedPos = s0;
7584
- s1 = peg$c238(s1);
8085
+ s1 = peg$c250(s1);
7585
8086
  }
7586
8087
 
7587
8088
  s0 = s1;
@@ -7594,6 +8095,7 @@ function peg$parse(input, options) {
7594
8095
  refs: [],
7595
8096
  enums: [],
7596
8097
  tableGroups: [],
8098
+ aliases: [],
7597
8099
  project: {}
7598
8100
  };
7599
8101
  var projectCnt = 0;