bel_parser 1.0.8 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/.gemspec +12 -2
  3. data/VERSION +1 -1
  4. data/bin/bel2_compatibility +12 -9
  5. data/bin/bel2_upgrade +18 -6
  6. data/bin/bel2_validator +6 -3
  7. data/bin/bel_script_reader +1 -0
  8. data/lib/bel_parser/completion.rb +984 -0
  9. data/lib/bel_parser/language/apply_namespace_encoding.rb +14 -3
  10. data/lib/bel_parser/language/expression_validator.rb +1 -2
  11. data/lib/bel_parser/language/function.rb +4 -0
  12. data/lib/bel_parser/language/relationship.rb +4 -0
  13. data/lib/bel_parser/language/semantics/function_deprecation.rb +1 -0
  14. data/lib/bel_parser/language/semantics/list_function_subject.rb +2 -0
  15. data/lib/bel_parser/language/semantics/multiple_subject_object.rb +4 -1
  16. data/lib/bel_parser/language/semantics/nested_statement_without_object.rb +43 -0
  17. data/lib/bel_parser/language/semantics/non_object_list.rb +3 -0
  18. data/lib/bel_parser/language/semantics/relationship_not_listable.rb +2 -0
  19. data/lib/bel_parser/language/semantics/signature_mapping.rb +2 -0
  20. data/lib/bel_parser/language/semantics_ast.rb +0 -7
  21. data/lib/bel_parser/language/syntax/invalid_function.rb +6 -1
  22. data/lib/bel_parser/language/syntax/invalid_relationship.rb +1 -0
  23. data/lib/bel_parser/language/version1_0/relationships/acts_in.rb +9 -9
  24. data/lib/bel_parser/language/version1_0/relationships/analogous.rb +6 -4
  25. data/lib/bel_parser/language/version1_0/relationships/association.rb +8 -7
  26. data/lib/bel_parser/language/version1_0/relationships/biomarker_for.rb +6 -5
  27. data/lib/bel_parser/language/version1_0/relationships/causes_no_change.rb +8 -7
  28. data/lib/bel_parser/language/version1_0/relationships/decreases.rb +13 -12
  29. data/lib/bel_parser/language/version1_0/relationships/directly_decreases.rb +8 -6
  30. data/lib/bel_parser/language/version1_0/relationships/directly_increases.rb +8 -6
  31. data/lib/bel_parser/language/version1_0/relationships/has_component.rb +14 -14
  32. data/lib/bel_parser/language/version1_0/relationships/has_components.rb +12 -11
  33. data/lib/bel_parser/language/version1_0/relationships/has_member.rb +10 -8
  34. data/lib/bel_parser/language/version1_0/relationships/has_members.rb +12 -11
  35. data/lib/bel_parser/language/version1_0/relationships/has_modification.rb +9 -7
  36. data/lib/bel_parser/language/version1_0/relationships/has_product.rb +10 -8
  37. data/lib/bel_parser/language/version1_0/relationships/has_variant.rb +9 -7
  38. data/lib/bel_parser/language/version1_0/relationships/includes.rb +11 -10
  39. data/lib/bel_parser/language/version1_0/relationships/increases.rb +12 -13
  40. data/lib/bel_parser/language/version1_0/relationships/is_a.rb +10 -8
  41. data/lib/bel_parser/language/version1_0/relationships/negative_correlation.rb +9 -7
  42. data/lib/bel_parser/language/version1_0/relationships/orthologous.rb +9 -8
  43. data/lib/bel_parser/language/version1_0/relationships/positive_correlation.rb +8 -5
  44. data/lib/bel_parser/language/version1_0/relationships/prognostic_biomarker_for.rb +8 -6
  45. data/lib/bel_parser/language/version1_0/relationships/rate_limiting_step_of.rb +10 -9
  46. data/lib/bel_parser/language/version1_0/relationships/reactant_in.rb +10 -8
  47. data/lib/bel_parser/language/version1_0/relationships/sub_process_of.rb +13 -12
  48. data/lib/bel_parser/language/version1_0/relationships/transcribed_to.rb +8 -7
  49. data/lib/bel_parser/language/version1_0/relationships/translated_to.rb +9 -7
  50. data/lib/bel_parser/language/version1_0/relationships/translocates.rb +10 -9
  51. data/lib/bel_parser/language/version2_0/functions/protein_modification.rb +1 -2
  52. data/lib/bel_parser/language/version2_0/functions/translocation.rb +1 -2
  53. data/lib/bel_parser/language/version2_0/functions/variant.rb +1 -2
  54. data/lib/bel_parser/language/version2_0/relationships/acts_in.rb +10 -9
  55. data/lib/bel_parser/language/version2_0/relationships/biomarker_for.rb +7 -5
  56. data/lib/bel_parser/language/version2_0/relationships/causes_no_change.rb +9 -7
  57. data/lib/bel_parser/language/version2_0/relationships/decreases.rb +13 -12
  58. data/lib/bel_parser/language/version2_0/relationships/directly_decreases.rb +8 -6
  59. data/lib/bel_parser/language/version2_0/relationships/directly_increases.rb +8 -6
  60. data/lib/bel_parser/language/version2_0/relationships/has_component.rb +15 -14
  61. data/lib/bel_parser/language/version2_0/relationships/has_components.rb +12 -11
  62. data/lib/bel_parser/language/version2_0/relationships/has_member.rb +9 -8
  63. data/lib/bel_parser/language/version2_0/relationships/has_members.rb +12 -11
  64. data/lib/bel_parser/language/version2_0/relationships/has_modification.rb +9 -7
  65. data/lib/bel_parser/language/version2_0/relationships/has_product.rb +10 -8
  66. data/lib/bel_parser/language/version2_0/relationships/has_variant.rb +9 -7
  67. data/lib/bel_parser/language/version2_0/relationships/includes.rb +11 -10
  68. data/lib/bel_parser/language/version2_0/relationships/increases.rb +13 -12
  69. data/lib/bel_parser/language/version2_0/relationships/is_a.rb +10 -8
  70. data/lib/bel_parser/language/version2_0/relationships/negative_correlation.rb +9 -7
  71. data/lib/bel_parser/language/version2_0/relationships/orthologous.rb +10 -8
  72. data/lib/bel_parser/language/version2_0/relationships/positive_correlation.rb +7 -5
  73. data/lib/bel_parser/language/version2_0/relationships/prognostic_biomarker_for.rb +8 -6
  74. data/lib/bel_parser/language/version2_0/relationships/rate_limiting_step_of.rb +10 -9
  75. data/lib/bel_parser/language/version2_0/relationships/reactant_in.rb +10 -8
  76. data/lib/bel_parser/language/version2_0/relationships/regulates.rb +9 -8
  77. data/lib/bel_parser/language/version2_0/relationships/sub_process_of.rb +13 -12
  78. data/lib/bel_parser/language/version2_0/relationships/transcribed_to.rb +8 -7
  79. data/lib/bel_parser/language/version2_0/relationships/translated_to.rb +9 -7
  80. data/lib/bel_parser/language/version2_0/relationships/translocates.rb +10 -9
  81. data/lib/bel_parser/mixin/levenshtein.rb +20 -0
  82. data/lib/bel_parser/parsers/ast/node.rb +49 -2
  83. data/lib/bel_parser/parsers/bel_script/define_annotation.rb +156 -156
  84. data/lib/bel_parser/parsers/bel_script/define_namespace.rb +60 -60
  85. data/lib/bel_parser/parsers/bel_script/set.rb +200 -200
  86. data/lib/bel_parser/parsers/bel_script/set_document.rb +188 -188
  87. data/lib/bel_parser/parsers/bel_script/unset.rb +14 -14
  88. data/lib/bel_parser/parsers/common/common.rl +1 -0
  89. data/lib/bel_parser/parsers/common/function.rb +8 -8
  90. data/lib/bel_parser/parsers/common/function.rl +6 -6
  91. data/lib/bel_parser/parsers/common/identifier.rb +3 -3
  92. data/lib/bel_parser/parsers/common/identifier.rl +4 -4
  93. data/lib/bel_parser/parsers/common/list.rb +78 -78
  94. data/lib/bel_parser/parsers/common/multi_identifier.rb +275 -0
  95. data/lib/bel_parser/parsers/common/multi_identifier.rl +141 -0
  96. data/lib/bel_parser/parsers/common/string.rb +6 -6
  97. data/lib/bel_parser/parsers/common/string.rl +4 -4
  98. data/lib/bel_parser/parsers/common.rb +1 -0
  99. data/lib/bel_parser/parsers/expression/nested_statement.rb +30180 -29055
  100. data/lib/bel_parser/parsers/expression/observed_term.rb +1456 -1099
  101. data/lib/bel_parser/parsers/expression/parameter.rb +192 -111
  102. data/lib/bel_parser/parsers/expression/parameter.rl +6 -3
  103. data/lib/bel_parser/parsers/expression/relationship.rb +43 -19
  104. data/lib/bel_parser/parsers/expression/relationship.rl +1 -0
  105. data/lib/bel_parser/parsers/expression/simple_statement.rb +17805 -17093
  106. data/lib/bel_parser/parsers/expression/statement_autocomplete.rb +1035 -0
  107. data/lib/bel_parser/parsers/expression/statement_autocomplete.rl +736 -0
  108. data/lib/bel_parser/parsers/expression/term.rb +960 -705
  109. data/lib/bel_parser/parsers/serializer.rb +8 -4
  110. data/lib/bel_parser/version.rb +33 -0
  111. data/lib/bel_parser.rb +3 -0
  112. metadata +25 -3
@@ -399,7 +399,7 @@ begin
399
399
  id_end = p
400
400
  chars = data[id_start...id_end]
401
401
  completed = !chars.empty?
402
- ast_node = identifier(utf8_string(chars), complete: completed)
402
+ ast_node = identifier(utf8_string(chars), complete: completed, character_range: [id_start, id_end])
403
403
  @buffers[:ident] = ast_node
404
404
  end
405
405
  when 2 then
@@ -408,7 +408,7 @@ begin
408
408
  trace('IDENTIFIER an_ident_err')
409
409
  id_end = p
410
410
  chars = data[id_start...id_end]
411
- ast_node = identifier(utf8_string(chars), complete: false)
411
+ ast_node = identifier(utf8_string(chars), complete: false, character_range: [id_start, id_end])
412
412
  @buffers[:ident] = ast_node
413
413
  end
414
414
  when 20 then
@@ -417,7 +417,7 @@ begin
417
417
  trace('IDENTIFIER ident_node_err')
418
418
  id_end = p
419
419
  chars = data[id_start...id_end]
420
- ast_node = identifier(utf8_string(chars), complete: false)
420
+ ast_node = identifier(utf8_string(chars), complete: false, character_range: [id_start, id_end])
421
421
  yield ast_node
422
422
  end
423
423
  when 9 then
@@ -433,7 +433,7 @@ begin
433
433
  trace('STRING a_string_err')
434
434
  p_end = p
435
435
  chars = data[p_start...p_end]
436
- ast_node = string(utf8_string(chars), complete: false)
436
+ ast_node = string(utf8_string(chars), complete: false, character_range: [p_start, p_end])
437
437
  @buffers[:string] = ast_node
438
438
  end
439
439
  when 15 then
@@ -442,7 +442,7 @@ begin
442
442
  trace('STRING string_node_err')
443
443
  p_end = p
444
444
  chars = data[p_start...p_end]
445
- ast_node = string(utf8_string(chars), complete: false)
445
+ ast_node = string(utf8_string(chars), complete: false, character_range: [p_start, p_end])
446
446
  yield ast_node
447
447
  end
448
448
  when 5 then
@@ -464,7 +464,7 @@ begin
464
464
  id_end = p
465
465
  chars = data[id_start...id_end]
466
466
  completed = !chars.empty?
467
- ast_node = identifier(utf8_string(chars), complete: completed)
467
+ ast_node = identifier(utf8_string(chars), complete: completed, character_range: [id_start, id_end])
468
468
  @buffers[:ident] = ast_node
469
469
  end
470
470
  begin
@@ -485,7 +485,7 @@ begin
485
485
  trace('STRING string_end')
486
486
  completed = @string_opened && @string_closed
487
487
  chars = data[p_start...p_end]
488
- ast_node = string(utf8_string(chars), complete: true)
488
+ ast_node = string(utf8_string(chars), complete: true, character_range: [p_start, p_end])
489
489
  @buffers[:string] = ast_node
490
490
  end
491
491
  when 10 then
@@ -506,7 +506,7 @@ begin
506
506
  trace('STRING string_end')
507
507
  completed = @string_opened && @string_closed
508
508
  chars = data[p_start...p_end]
509
- ast_node = string(utf8_string(chars), complete: true)
509
+ ast_node = string(utf8_string(chars), complete: true, character_range: [p_start, p_end])
510
510
  @buffers[:string] = ast_node
511
511
  end
512
512
  when 18 then
@@ -521,7 +521,7 @@ begin
521
521
  trace('STRING string_end')
522
522
  completed = @string_opened && @string_closed
523
523
  chars = data[p_start...p_end]
524
- ast_node = string(utf8_string(chars), complete: true)
524
+ ast_node = string(utf8_string(chars), complete: true, character_range: [p_start, p_end])
525
525
  @buffers[:string] = ast_node
526
526
  end
527
527
  begin
@@ -578,7 +578,7 @@ begin
578
578
  trace('STRING string_end')
579
579
  completed = @string_opened && @string_closed
580
580
  chars = data[p_start...p_end]
581
- ast_node = string(utf8_string(chars), complete: true)
581
+ ast_node = string(utf8_string(chars), complete: true, character_range: [p_start, p_end])
582
582
  @buffers[:string] = ast_node
583
583
  end
584
584
  begin
@@ -615,7 +615,7 @@ begin
615
615
  trace('STRING a_string_err')
616
616
  p_end = p
617
617
  chars = data[p_start...p_end]
618
- ast_node = string(utf8_string(chars), complete: false)
618
+ ast_node = string(utf8_string(chars), complete: false, character_range: [p_start, p_end])
619
619
  @buffers[:string] = ast_node
620
620
  end
621
621
  when 19 then
@@ -625,7 +625,7 @@ begin
625
625
  id_end = p
626
626
  chars = data[id_start...id_end]
627
627
  completed = !chars.empty?
628
- ast_node = identifier(utf8_string(chars), complete: completed)
628
+ ast_node = identifier(utf8_string(chars), complete: completed, character_range: [id_start, id_end])
629
629
  @buffers[:ident] = ast_node
630
630
  end
631
631
  begin
@@ -641,7 +641,7 @@ begin
641
641
  id_end = p
642
642
  chars = data[id_start...id_end]
643
643
  completed = !chars.empty?
644
- ast_node = identifier(utf8_string(chars), complete: completed)
644
+ ast_node = identifier(utf8_string(chars), complete: completed, character_range: [id_start, id_end])
645
645
  @buffers[:ident] = ast_node
646
646
  end
647
647
  end
@@ -650,7 +650,7 @@ begin
650
650
  trace('IDENTIFIER an_ident_err')
651
651
  id_end = p
652
652
  chars = data[id_start...id_end]
653
- ast_node = identifier(utf8_string(chars), complete: false)
653
+ ast_node = identifier(utf8_string(chars), complete: false, character_range: [id_start, id_end])
654
654
  @buffers[:ident] = ast_node
655
655
  end
656
656
  when 6 then
@@ -659,7 +659,7 @@ begin
659
659
  trace('STRING a_string_err')
660
660
  p_end = p
661
661
  chars = data[p_start...p_end]
662
- ast_node = string(utf8_string(chars), complete: false)
662
+ ast_node = string(utf8_string(chars), complete: false, character_range: [p_start, p_end])
663
663
  @buffers[:string] = ast_node
664
664
  end
665
665
  begin
@@ -683,7 +683,7 @@ begin
683
683
  trace('STRING string_node_err')
684
684
  p_end = p
685
685
  chars = data[p_start...p_end]
686
- ast_node = string(utf8_string(chars), complete: false)
686
+ ast_node = string(utf8_string(chars), complete: false, character_range: [p_start, p_end])
687
687
  yield ast_node
688
688
  end
689
689
  begin
@@ -697,7 +697,7 @@ begin
697
697
  trace('STRING eof_string')
698
698
  p_end = p
699
699
  chars = data[p_start...p_end]
700
- ast_node = string(utf8_string(chars), complete: false)
700
+ ast_node = string(utf8_string(chars), complete: false, character_range: [p_start, p_end])
701
701
  @buffers[:string] = ast_node
702
702
  end
703
703
  begin
@@ -705,7 +705,7 @@ begin
705
705
  trace('STRING a_string_err')
706
706
  p_end = p
707
707
  chars = data[p_start...p_end]
708
- ast_node = string(utf8_string(chars), complete: false)
708
+ ast_node = string(utf8_string(chars), complete: false, character_range: [p_start, p_end])
709
709
  @buffers[:string] = ast_node
710
710
  end
711
711
  begin
@@ -729,7 +729,7 @@ begin
729
729
  trace('STRING eof_string')
730
730
  p_end = p
731
731
  chars = data[p_start...p_end]
732
- ast_node = string(utf8_string(chars), complete: false)
732
+ ast_node = string(utf8_string(chars), complete: false, character_range: [p_start, p_end])
733
733
  @buffers[:string] = ast_node
734
734
  end
735
735
  begin
@@ -737,7 +737,7 @@ begin
737
737
  trace('STRING string_node_err')
738
738
  p_end = p
739
739
  chars = data[p_start...p_end]
740
- ast_node = string(utf8_string(chars), complete: false)
740
+ ast_node = string(utf8_string(chars), complete: false, character_range: [p_start, p_end])
741
741
  yield ast_node
742
742
  end
743
743
  begin
@@ -1152,7 +1152,7 @@ begin
1152
1152
  id_end = p
1153
1153
  chars = data[id_start...id_end]
1154
1154
  completed = !chars.empty?
1155
- ast_node = identifier(utf8_string(chars), complete: completed)
1155
+ ast_node = identifier(utf8_string(chars), complete: completed, character_range: [id_start, id_end])
1156
1156
  @buffers[:ident] = ast_node
1157
1157
  end
1158
1158
  when 2 then
@@ -1161,7 +1161,7 @@ begin
1161
1161
  trace('IDENTIFIER an_ident_err')
1162
1162
  id_end = p
1163
1163
  chars = data[id_start...id_end]
1164
- ast_node = identifier(utf8_string(chars), complete: false)
1164
+ ast_node = identifier(utf8_string(chars), complete: false, character_range: [id_start, id_end])
1165
1165
  @buffers[:ident] = ast_node
1166
1166
  end
1167
1167
  when 20 then
@@ -1170,7 +1170,7 @@ begin
1170
1170
  trace('IDENTIFIER ident_node_err')
1171
1171
  id_end = p
1172
1172
  chars = data[id_start...id_end]
1173
- ast_node = identifier(utf8_string(chars), complete: false)
1173
+ ast_node = identifier(utf8_string(chars), complete: false, character_range: [id_start, id_end])
1174
1174
  yield ast_node
1175
1175
  end
1176
1176
  when 9 then
@@ -1186,7 +1186,7 @@ begin
1186
1186
  trace('STRING a_string_err')
1187
1187
  p_end = p
1188
1188
  chars = data[p_start...p_end]
1189
- ast_node = string(utf8_string(chars), complete: false)
1189
+ ast_node = string(utf8_string(chars), complete: false, character_range: [p_start, p_end])
1190
1190
  @buffers[:string] = ast_node
1191
1191
  end
1192
1192
  when 15 then
@@ -1195,7 +1195,7 @@ begin
1195
1195
  trace('STRING string_node_err')
1196
1196
  p_end = p
1197
1197
  chars = data[p_start...p_end]
1198
- ast_node = string(utf8_string(chars), complete: false)
1198
+ ast_node = string(utf8_string(chars), complete: false, character_range: [p_start, p_end])
1199
1199
  yield ast_node
1200
1200
  end
1201
1201
  when 5 then
@@ -1217,7 +1217,7 @@ begin
1217
1217
  id_end = p
1218
1218
  chars = data[id_start...id_end]
1219
1219
  completed = !chars.empty?
1220
- ast_node = identifier(utf8_string(chars), complete: completed)
1220
+ ast_node = identifier(utf8_string(chars), complete: completed, character_range: [id_start, id_end])
1221
1221
  @buffers[:ident] = ast_node
1222
1222
  end
1223
1223
  begin
@@ -1238,7 +1238,7 @@ begin
1238
1238
  trace('STRING string_end')
1239
1239
  completed = @string_opened && @string_closed
1240
1240
  chars = data[p_start...p_end]
1241
- ast_node = string(utf8_string(chars), complete: true)
1241
+ ast_node = string(utf8_string(chars), complete: true, character_range: [p_start, p_end])
1242
1242
  @buffers[:string] = ast_node
1243
1243
  end
1244
1244
  when 10 then
@@ -1259,7 +1259,7 @@ begin
1259
1259
  trace('STRING string_end')
1260
1260
  completed = @string_opened && @string_closed
1261
1261
  chars = data[p_start...p_end]
1262
- ast_node = string(utf8_string(chars), complete: true)
1262
+ ast_node = string(utf8_string(chars), complete: true, character_range: [p_start, p_end])
1263
1263
  @buffers[:string] = ast_node
1264
1264
  end
1265
1265
  when 18 then
@@ -1274,7 +1274,7 @@ begin
1274
1274
  trace('STRING string_end')
1275
1275
  completed = @string_opened && @string_closed
1276
1276
  chars = data[p_start...p_end]
1277
- ast_node = string(utf8_string(chars), complete: true)
1277
+ ast_node = string(utf8_string(chars), complete: true, character_range: [p_start, p_end])
1278
1278
  @buffers[:string] = ast_node
1279
1279
  end
1280
1280
  begin
@@ -1331,7 +1331,7 @@ begin
1331
1331
  trace('STRING string_end')
1332
1332
  completed = @string_opened && @string_closed
1333
1333
  chars = data[p_start...p_end]
1334
- ast_node = string(utf8_string(chars), complete: true)
1334
+ ast_node = string(utf8_string(chars), complete: true, character_range: [p_start, p_end])
1335
1335
  @buffers[:string] = ast_node
1336
1336
  end
1337
1337
  begin
@@ -1368,7 +1368,7 @@ begin
1368
1368
  trace('STRING a_string_err')
1369
1369
  p_end = p
1370
1370
  chars = data[p_start...p_end]
1371
- ast_node = string(utf8_string(chars), complete: false)
1371
+ ast_node = string(utf8_string(chars), complete: false, character_range: [p_start, p_end])
1372
1372
  @buffers[:string] = ast_node
1373
1373
  end
1374
1374
  when 19 then
@@ -1378,7 +1378,7 @@ begin
1378
1378
  id_end = p
1379
1379
  chars = data[id_start...id_end]
1380
1380
  completed = !chars.empty?
1381
- ast_node = identifier(utf8_string(chars), complete: completed)
1381
+ ast_node = identifier(utf8_string(chars), complete: completed, character_range: [id_start, id_end])
1382
1382
  @buffers[:ident] = ast_node
1383
1383
  end
1384
1384
  begin
@@ -1394,7 +1394,7 @@ begin
1394
1394
  id_end = p
1395
1395
  chars = data[id_start...id_end]
1396
1396
  completed = !chars.empty?
1397
- ast_node = identifier(utf8_string(chars), complete: completed)
1397
+ ast_node = identifier(utf8_string(chars), complete: completed, character_range: [id_start, id_end])
1398
1398
  @buffers[:ident] = ast_node
1399
1399
  end
1400
1400
  end
@@ -1403,7 +1403,7 @@ begin
1403
1403
  trace('IDENTIFIER an_ident_err')
1404
1404
  id_end = p
1405
1405
  chars = data[id_start...id_end]
1406
- ast_node = identifier(utf8_string(chars), complete: false)
1406
+ ast_node = identifier(utf8_string(chars), complete: false, character_range: [id_start, id_end])
1407
1407
  @buffers[:ident] = ast_node
1408
1408
  end
1409
1409
  when 6 then
@@ -1412,7 +1412,7 @@ begin
1412
1412
  trace('STRING a_string_err')
1413
1413
  p_end = p
1414
1414
  chars = data[p_start...p_end]
1415
- ast_node = string(utf8_string(chars), complete: false)
1415
+ ast_node = string(utf8_string(chars), complete: false, character_range: [p_start, p_end])
1416
1416
  @buffers[:string] = ast_node
1417
1417
  end
1418
1418
  begin
@@ -1436,7 +1436,7 @@ begin
1436
1436
  trace('STRING string_node_err')
1437
1437
  p_end = p
1438
1438
  chars = data[p_start...p_end]
1439
- ast_node = string(utf8_string(chars), complete: false)
1439
+ ast_node = string(utf8_string(chars), complete: false, character_range: [p_start, p_end])
1440
1440
  yield ast_node
1441
1441
  end
1442
1442
  begin
@@ -1450,7 +1450,7 @@ begin
1450
1450
  trace('STRING eof_string')
1451
1451
  p_end = p
1452
1452
  chars = data[p_start...p_end]
1453
- ast_node = string(utf8_string(chars), complete: false)
1453
+ ast_node = string(utf8_string(chars), complete: false, character_range: [p_start, p_end])
1454
1454
  @buffers[:string] = ast_node
1455
1455
  end
1456
1456
  begin
@@ -1458,7 +1458,7 @@ begin
1458
1458
  trace('STRING a_string_err')
1459
1459
  p_end = p
1460
1460
  chars = data[p_start...p_end]
1461
- ast_node = string(utf8_string(chars), complete: false)
1461
+ ast_node = string(utf8_string(chars), complete: false, character_range: [p_start, p_end])
1462
1462
  @buffers[:string] = ast_node
1463
1463
  end
1464
1464
  begin
@@ -1482,7 +1482,7 @@ begin
1482
1482
  trace('STRING eof_string')
1483
1483
  p_end = p
1484
1484
  chars = data[p_start...p_end]
1485
- ast_node = string(utf8_string(chars), complete: false)
1485
+ ast_node = string(utf8_string(chars), complete: false, character_range: [p_start, p_end])
1486
1486
  @buffers[:string] = ast_node
1487
1487
  end
1488
1488
  begin
@@ -1490,7 +1490,7 @@ begin
1490
1490
  trace('STRING string_node_err')
1491
1491
  p_end = p
1492
1492
  chars = data[p_start...p_end]
1493
- ast_node = string(utf8_string(chars), complete: false)
1493
+ ast_node = string(utf8_string(chars), complete: false, character_range: [p_start, p_end])
1494
1494
  yield ast_node
1495
1495
  end
1496
1496
  begin
@@ -1959,7 +1959,7 @@ begin
1959
1959
  id_end = p
1960
1960
  chars = data[id_start...id_end]
1961
1961
  completed = !chars.empty?
1962
- ast_node = identifier(utf8_string(chars), complete: completed)
1962
+ ast_node = identifier(utf8_string(chars), complete: completed, character_range: [id_start, id_end])
1963
1963
  @buffers[:ident] = ast_node
1964
1964
  end
1965
1965
  when 2 then
@@ -1968,7 +1968,7 @@ begin
1968
1968
  trace('IDENTIFIER an_ident_err')
1969
1969
  id_end = p
1970
1970
  chars = data[id_start...id_end]
1971
- ast_node = identifier(utf8_string(chars), complete: false)
1971
+ ast_node = identifier(utf8_string(chars), complete: false, character_range: [id_start, id_end])
1972
1972
  @buffers[:ident] = ast_node
1973
1973
  end
1974
1974
  when 20 then
@@ -1977,7 +1977,7 @@ begin
1977
1977
  trace('IDENTIFIER ident_node_err')
1978
1978
  id_end = p
1979
1979
  chars = data[id_start...id_end]
1980
- ast_node = identifier(utf8_string(chars), complete: false)
1980
+ ast_node = identifier(utf8_string(chars), complete: false, character_range: [id_start, id_end])
1981
1981
  yield ast_node
1982
1982
  end
1983
1983
  when 9 then
@@ -1993,7 +1993,7 @@ begin
1993
1993
  trace('STRING a_string_err')
1994
1994
  p_end = p
1995
1995
  chars = data[p_start...p_end]
1996
- ast_node = string(utf8_string(chars), complete: false)
1996
+ ast_node = string(utf8_string(chars), complete: false, character_range: [p_start, p_end])
1997
1997
  @buffers[:string] = ast_node
1998
1998
  end
1999
1999
  when 15 then
@@ -2002,7 +2002,7 @@ begin
2002
2002
  trace('STRING string_node_err')
2003
2003
  p_end = p
2004
2004
  chars = data[p_start...p_end]
2005
- ast_node = string(utf8_string(chars), complete: false)
2005
+ ast_node = string(utf8_string(chars), complete: false, character_range: [p_start, p_end])
2006
2006
  yield ast_node
2007
2007
  end
2008
2008
  when 5 then
@@ -2024,7 +2024,7 @@ begin
2024
2024
  id_end = p
2025
2025
  chars = data[id_start...id_end]
2026
2026
  completed = !chars.empty?
2027
- ast_node = identifier(utf8_string(chars), complete: completed)
2027
+ ast_node = identifier(utf8_string(chars), complete: completed, character_range: [id_start, id_end])
2028
2028
  @buffers[:ident] = ast_node
2029
2029
  end
2030
2030
  begin
@@ -2045,7 +2045,7 @@ begin
2045
2045
  trace('STRING string_end')
2046
2046
  completed = @string_opened && @string_closed
2047
2047
  chars = data[p_start...p_end]
2048
- ast_node = string(utf8_string(chars), complete: true)
2048
+ ast_node = string(utf8_string(chars), complete: true, character_range: [p_start, p_end])
2049
2049
  @buffers[:string] = ast_node
2050
2050
  end
2051
2051
  when 10 then
@@ -2066,7 +2066,7 @@ begin
2066
2066
  trace('STRING string_end')
2067
2067
  completed = @string_opened && @string_closed
2068
2068
  chars = data[p_start...p_end]
2069
- ast_node = string(utf8_string(chars), complete: true)
2069
+ ast_node = string(utf8_string(chars), complete: true, character_range: [p_start, p_end])
2070
2070
  @buffers[:string] = ast_node
2071
2071
  end
2072
2072
  when 18 then
@@ -2081,7 +2081,7 @@ begin
2081
2081
  trace('STRING string_end')
2082
2082
  completed = @string_opened && @string_closed
2083
2083
  chars = data[p_start...p_end]
2084
- ast_node = string(utf8_string(chars), complete: true)
2084
+ ast_node = string(utf8_string(chars), complete: true, character_range: [p_start, p_end])
2085
2085
  @buffers[:string] = ast_node
2086
2086
  end
2087
2087
  begin
@@ -2138,7 +2138,7 @@ begin
2138
2138
  trace('STRING string_end')
2139
2139
  completed = @string_opened && @string_closed
2140
2140
  chars = data[p_start...p_end]
2141
- ast_node = string(utf8_string(chars), complete: true)
2141
+ ast_node = string(utf8_string(chars), complete: true, character_range: [p_start, p_end])
2142
2142
  @buffers[:string] = ast_node
2143
2143
  end
2144
2144
  begin
@@ -2175,7 +2175,7 @@ begin
2175
2175
  trace('STRING a_string_err')
2176
2176
  p_end = p
2177
2177
  chars = data[p_start...p_end]
2178
- ast_node = string(utf8_string(chars), complete: false)
2178
+ ast_node = string(utf8_string(chars), complete: false, character_range: [p_start, p_end])
2179
2179
  @buffers[:string] = ast_node
2180
2180
  end
2181
2181
  when 19 then
@@ -2185,7 +2185,7 @@ begin
2185
2185
  id_end = p
2186
2186
  chars = data[id_start...id_end]
2187
2187
  completed = !chars.empty?
2188
- ast_node = identifier(utf8_string(chars), complete: completed)
2188
+ ast_node = identifier(utf8_string(chars), complete: completed, character_range: [id_start, id_end])
2189
2189
  @buffers[:ident] = ast_node
2190
2190
  end
2191
2191
  begin
@@ -2201,7 +2201,7 @@ begin
2201
2201
  id_end = p
2202
2202
  chars = data[id_start...id_end]
2203
2203
  completed = !chars.empty?
2204
- ast_node = identifier(utf8_string(chars), complete: completed)
2204
+ ast_node = identifier(utf8_string(chars), complete: completed, character_range: [id_start, id_end])
2205
2205
  @buffers[:ident] = ast_node
2206
2206
  end
2207
2207
  end
@@ -2210,7 +2210,7 @@ begin
2210
2210
  trace('IDENTIFIER an_ident_err')
2211
2211
  id_end = p
2212
2212
  chars = data[id_start...id_end]
2213
- ast_node = identifier(utf8_string(chars), complete: false)
2213
+ ast_node = identifier(utf8_string(chars), complete: false, character_range: [id_start, id_end])
2214
2214
  @buffers[:ident] = ast_node
2215
2215
  end
2216
2216
  when 6 then
@@ -2219,7 +2219,7 @@ begin
2219
2219
  trace('STRING a_string_err')
2220
2220
  p_end = p
2221
2221
  chars = data[p_start...p_end]
2222
- ast_node = string(utf8_string(chars), complete: false)
2222
+ ast_node = string(utf8_string(chars), complete: false, character_range: [p_start, p_end])
2223
2223
  @buffers[:string] = ast_node
2224
2224
  end
2225
2225
  begin
@@ -2243,7 +2243,7 @@ begin
2243
2243
  trace('STRING string_node_err')
2244
2244
  p_end = p
2245
2245
  chars = data[p_start...p_end]
2246
- ast_node = string(utf8_string(chars), complete: false)
2246
+ ast_node = string(utf8_string(chars), complete: false, character_range: [p_start, p_end])
2247
2247
  yield ast_node
2248
2248
  end
2249
2249
  begin
@@ -2257,7 +2257,7 @@ begin
2257
2257
  trace('STRING eof_string')
2258
2258
  p_end = p
2259
2259
  chars = data[p_start...p_end]
2260
- ast_node = string(utf8_string(chars), complete: false)
2260
+ ast_node = string(utf8_string(chars), complete: false, character_range: [p_start, p_end])
2261
2261
  @buffers[:string] = ast_node
2262
2262
  end
2263
2263
  begin
@@ -2265,7 +2265,7 @@ begin
2265
2265
  trace('STRING a_string_err')
2266
2266
  p_end = p
2267
2267
  chars = data[p_start...p_end]
2268
- ast_node = string(utf8_string(chars), complete: false)
2268
+ ast_node = string(utf8_string(chars), complete: false, character_range: [p_start, p_end])
2269
2269
  @buffers[:string] = ast_node
2270
2270
  end
2271
2271
  begin
@@ -2289,7 +2289,7 @@ begin
2289
2289
  trace('STRING eof_string')
2290
2290
  p_end = p
2291
2291
  chars = data[p_start...p_end]
2292
- ast_node = string(utf8_string(chars), complete: false)
2292
+ ast_node = string(utf8_string(chars), complete: false, character_range: [p_start, p_end])
2293
2293
  @buffers[:string] = ast_node
2294
2294
  end
2295
2295
  begin
@@ -2297,7 +2297,7 @@ begin
2297
2297
  trace('STRING string_node_err')
2298
2298
  p_end = p
2299
2299
  chars = data[p_start...p_end]
2300
- ast_node = string(utf8_string(chars), complete: false)
2300
+ ast_node = string(utf8_string(chars), complete: false, character_range: [p_start, p_end])
2301
2301
  yield ast_node
2302
2302
  end
2303
2303
  begin