bel_parser 1.0.0.alpha.7 → 1.0.0.alpha.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +4 -4
  2. data/.gemspec +1 -1
  3. data/VERSION +1 -1
  4. data/bin/bel2_validator +7 -4
  5. data/lib/bel_parser/ast_filter.rb +2 -2
  6. data/lib/bel_parser/ast_generator.rb +11 -18
  7. data/lib/bel_parser/language/expression_validator.rb +8 -0
  8. data/lib/bel_parser/language/quoting.rb +19 -22
  9. data/lib/bel_parser/language/semantics/deeply_nested_statement.rb +65 -0
  10. data/lib/bel_parser/language/semantics/function_deprecation.rb +36 -0
  11. data/lib/bel_parser/language/semantics/list_function_subject.rb +45 -0
  12. data/lib/bel_parser/language/semantics/relationship_deprecation.rb +36 -0
  13. data/lib/bel_parser/language/semantics/signature_mapping.rb +30 -16
  14. data/lib/bel_parser/language/semantics.rb +7 -2
  15. data/lib/bel_parser/language/semantics_ast.rb +22 -12
  16. data/lib/bel_parser/language/semantics_function.rb +4 -1
  17. data/lib/bel_parser/language/semantics_result.rb +1 -0
  18. data/lib/bel_parser/language/semantics_warning.rb +2 -0
  19. data/lib/bel_parser/language/signature.rb +3 -3
  20. data/lib/bel_parser/language/syntax/invalid_function.rb +2 -2
  21. data/lib/bel_parser/language/syntax/invalid_relationship.rb +2 -2
  22. data/lib/bel_parser/language/syntax/undefined_namespace.rb +0 -1
  23. data/lib/bel_parser/language/syntax.rb +7 -2
  24. data/lib/bel_parser/language/syntax_error.rb +2 -0
  25. data/lib/bel_parser/language/syntax_function.rb +4 -1
  26. data/lib/bel_parser/language/syntax_result.rb +1 -0
  27. data/lib/bel_parser/language/syntax_warning.rb +2 -0
  28. data/lib/bel_parser/language/version1_0/functions/abundance.rb +14 -15
  29. data/lib/bel_parser/language/version1_0/functions/biological_process.rb +14 -15
  30. data/lib/bel_parser/language/version1_0/functions/catalytic_activity.rb +25 -21
  31. data/lib/bel_parser/language/version1_0/functions/cell_secretion.rb +15 -12
  32. data/lib/bel_parser/language/version1_0/functions/cell_surface_expression.rb +15 -12
  33. data/lib/bel_parser/language/version1_0/functions/chaperone_activity.rb +25 -21
  34. data/lib/bel_parser/language/version1_0/functions/complex_abundance.rb +26 -25
  35. data/lib/bel_parser/language/version1_0/functions/composite_abundance.rb +13 -12
  36. data/lib/bel_parser/language/version1_0/functions/degradation.rb +15 -12
  37. data/lib/bel_parser/language/version1_0/functions/fusion.rb +135 -129
  38. data/lib/bel_parser/language/version1_0/functions/gene_abundance.rb +34 -34
  39. data/lib/bel_parser/language/version1_0/functions/gtp_bound_activity.rb +24 -21
  40. data/lib/bel_parser/language/version1_0/functions/kinase_activity.rb +25 -21
  41. data/lib/bel_parser/language/version1_0/functions/list.rb +24 -24
  42. data/lib/bel_parser/language/version1_0/functions/micro_rna_abundance.rb +18 -17
  43. data/lib/bel_parser/language/version1_0/functions/molecular_activity.rb +14 -12
  44. data/lib/bel_parser/language/version1_0/functions/pathology.rb +14 -15
  45. data/lib/bel_parser/language/version1_0/functions/peptidase_activity.rb +23 -21
  46. data/lib/bel_parser/language/version1_0/functions/phosphatase_activity.rb +23 -21
  47. data/lib/bel_parser/language/version1_0/functions/products.rb +9 -10
  48. data/lib/bel_parser/language/version1_0/functions/protein_abundance.rb +94 -91
  49. data/lib/bel_parser/language/version1_0/functions/protein_modification.rb +60 -57
  50. data/lib/bel_parser/language/version1_0/functions/reactants.rb +9 -10
  51. data/lib/bel_parser/language/version1_0/functions/reaction.rb +18 -17
  52. data/lib/bel_parser/language/version1_0/functions/ribosylation_activity.rb +25 -21
  53. data/lib/bel_parser/language/version1_0/functions/rna_abundance.rb +34 -34
  54. data/lib/bel_parser/language/version1_0/functions/substitution.rb +29 -28
  55. data/lib/bel_parser/language/version1_0/functions/transcriptional_activity.rb +25 -21
  56. data/lib/bel_parser/language/version1_0/functions/translocation.rb +33 -32
  57. data/lib/bel_parser/language/version1_0/functions/transport_activity.rb +26 -21
  58. data/lib/bel_parser/language/version1_0/functions/truncation.rb +15 -14
  59. data/lib/bel_parser/language/version1_0/relationships/acts_in.rb +16 -2
  60. data/lib/bel_parser/language/version1_0/relationships/analogous.rb +8 -2
  61. data/lib/bel_parser/language/version1_0/relationships/association.rb +13 -2
  62. data/lib/bel_parser/language/version1_0/relationships/biomarker_for.rb +9 -2
  63. data/lib/bel_parser/language/version1_0/relationships/causes_no_change.rb +13 -2
  64. data/lib/bel_parser/language/version1_0/relationships/decreases.rb +22 -2
  65. data/lib/bel_parser/language/version1_0/relationships/directly_decreases.rb +11 -2
  66. data/lib/bel_parser/language/version1_0/relationships/directly_increases.rb +11 -2
  67. data/lib/bel_parser/language/version1_0/relationships/has_component.rb +25 -2
  68. data/lib/bel_parser/language/version1_0/relationships/has_components.rb +20 -2
  69. data/lib/bel_parser/language/version1_0/relationships/has_member.rb +15 -2
  70. data/lib/bel_parser/language/version1_0/relationships/has_members.rb +20 -2
  71. data/lib/bel_parser/language/version1_0/relationships/has_modification.rb +13 -2
  72. data/lib/bel_parser/language/version1_0/relationships/has_product.rb +15 -2
  73. data/lib/bel_parser/language/version1_0/relationships/has_variant.rb +13 -2
  74. data/lib/bel_parser/language/version1_0/relationships/includes.rb +18 -2
  75. data/lib/bel_parser/language/version1_0/relationships/increases.rb +22 -2
  76. data/lib/bel_parser/language/version1_0/relationships/is_a.rb +15 -2
  77. data/lib/bel_parser/language/version1_0/relationships/negative_correlation.rb +13 -2
  78. data/lib/bel_parser/language/version1_0/relationships/orthologous.rb +15 -2
  79. data/lib/bel_parser/language/version1_0/relationships/positive_correlation.rb +9 -2
  80. data/lib/bel_parser/language/version1_0/relationships/prognostic_biomarker_for.rb +11 -2
  81. data/lib/bel_parser/language/version1_0/relationships/rate_limiting_step_of.rb +16 -2
  82. data/lib/bel_parser/language/version1_0/relationships/reactant_in.rb +15 -2
  83. data/lib/bel_parser/language/version1_0/relationships/sub_process_of.rb +22 -2
  84. data/lib/bel_parser/language/version1_0/relationships/transcribed_to.rb +12 -2
  85. data/lib/bel_parser/language/version1_0/relationships/translated_to.rb +13 -2
  86. data/lib/bel_parser/language/version1_0/relationships/translocates.rb +16 -2
  87. data/lib/bel_parser/language/version1_0/syntax/function.rb +0 -1
  88. data/lib/bel_parser/language/version1_0.rb +13 -2
  89. data/lib/bel_parser/language/version2_0/functions/abundance.rb +54 -53
  90. data/lib/bel_parser/language/version2_0/functions/activity.rb +8 -5
  91. data/lib/bel_parser/language/version2_0/functions/biological_process.rb +16 -16
  92. data/lib/bel_parser/language/version2_0/functions/cell_secretion.rb +15 -12
  93. data/lib/bel_parser/language/version2_0/functions/cell_surface_expression.rb +15 -12
  94. data/lib/bel_parser/language/version2_0/functions/complex_abundance.rb +61 -58
  95. data/lib/bel_parser/language/version2_0/functions/composite_abundance.rb +13 -12
  96. data/lib/bel_parser/language/version2_0/functions/degradation.rb +15 -12
  97. data/lib/bel_parser/language/version2_0/functions/fragment.rb +8 -6
  98. data/lib/bel_parser/language/version2_0/functions/from_location.rb +18 -17
  99. data/lib/bel_parser/language/version2_0/functions/fusion.rb +120 -117
  100. data/lib/bel_parser/language/version2_0/functions/gene_abundance.rb +64 -62
  101. data/lib/bel_parser/language/version2_0/functions/list.rb +24 -24
  102. data/lib/bel_parser/language/version2_0/functions/location.rb +14 -15
  103. data/lib/bel_parser/language/version2_0/functions/micro_rna_abundance.rb +58 -55
  104. data/lib/bel_parser/language/version2_0/functions/molecular_activity.rb +16 -14
  105. data/lib/bel_parser/language/version2_0/functions/pathology.rb +14 -15
  106. data/lib/bel_parser/language/version2_0/functions/products.rb +9 -10
  107. data/lib/bel_parser/language/version2_0/functions/protein_abundance.rb +96 -92
  108. data/lib/bel_parser/language/version2_0/functions/protein_modification.rb +57 -54
  109. data/lib/bel_parser/language/version2_0/functions/reactants.rb +9 -10
  110. data/lib/bel_parser/language/version2_0/functions/reaction.rb +18 -17
  111. data/lib/bel_parser/language/version2_0/functions/rna_abundance.rb +64 -62
  112. data/lib/bel_parser/language/version2_0/functions/to_location.rb +16 -16
  113. data/lib/bel_parser/language/version2_0/functions/translocation.rb +23 -22
  114. data/lib/bel_parser/language/version2_0/functions/variant.rb +13 -13
  115. data/lib/bel_parser/language/version2_0/relationships/acts_in.rb +16 -2
  116. data/lib/bel_parser/language/version2_0/relationships/analogous.rb +8 -2
  117. data/lib/bel_parser/language/version2_0/relationships/association.rb +13 -2
  118. data/lib/bel_parser/language/version2_0/relationships/biomarker_for.rb +9 -2
  119. data/lib/bel_parser/language/version2_0/relationships/causes_no_change.rb +13 -2
  120. data/lib/bel_parser/language/version2_0/relationships/decreases.rb +22 -2
  121. data/lib/bel_parser/language/version2_0/relationships/directly_decreases.rb +11 -2
  122. data/lib/bel_parser/language/version2_0/relationships/directly_increases.rb +11 -2
  123. data/lib/bel_parser/language/version2_0/relationships/has_component.rb +25 -2
  124. data/lib/bel_parser/language/version2_0/relationships/has_components.rb +20 -2
  125. data/lib/bel_parser/language/version2_0/relationships/has_member.rb +15 -2
  126. data/lib/bel_parser/language/version2_0/relationships/has_members.rb +20 -2
  127. data/lib/bel_parser/language/version2_0/relationships/has_modification.rb +13 -2
  128. data/lib/bel_parser/language/version2_0/relationships/has_product.rb +15 -2
  129. data/lib/bel_parser/language/version2_0/relationships/has_variant.rb +13 -2
  130. data/lib/bel_parser/language/version2_0/relationships/includes.rb +18 -2
  131. data/lib/bel_parser/language/version2_0/relationships/increases.rb +22 -2
  132. data/lib/bel_parser/language/version2_0/relationships/is_a.rb +15 -2
  133. data/lib/bel_parser/language/version2_0/relationships/negative_correlation.rb +13 -2
  134. data/lib/bel_parser/language/version2_0/relationships/orthologous.rb +15 -2
  135. data/lib/bel_parser/language/version2_0/relationships/positive_correlation.rb +9 -2
  136. data/lib/bel_parser/language/version2_0/relationships/prognostic_biomarker_for.rb +11 -2
  137. data/lib/bel_parser/language/version2_0/relationships/rate_limiting_step_of.rb +16 -2
  138. data/lib/bel_parser/language/version2_0/relationships/reactant_in.rb +15 -2
  139. data/lib/bel_parser/language/version2_0/relationships/regulates.rb +14 -2
  140. data/lib/bel_parser/language/version2_0/relationships/sub_process_of.rb +22 -2
  141. data/lib/bel_parser/language/version2_0/relationships/transcribed_to.rb +12 -2
  142. data/lib/bel_parser/language/version2_0/relationships/translated_to.rb +13 -2
  143. data/lib/bel_parser/language/version2_0/relationships/translocates.rb +16 -2
  144. data/lib/bel_parser/language.rb +18 -8
  145. data/lib/bel_parser/parser.rb +1 -0
  146. data/lib/bel_parser/parsers/ast/node.rb +112 -74
  147. data/lib/bel_parser/parsers/bel_script/set.rl +1 -1
  148. data/lib/bel_parser/parsers/bel_script/set_document.rb +7087 -0
  149. data/lib/bel_parser/parsers/bel_script/set_document.rl +97 -0
  150. data/lib/bel_parser/parsers/bel_script.rb +1 -0
  151. data/lib/bel_parser/parsers/common/common.rl +1 -1
  152. data/lib/bel_parser/script/parser.rb +1 -0
  153. metadata +8 -2
@@ -13,14 +13,13 @@ module BELParser
13
13
 
14
14
  # BEL application-specific AST node.
15
15
  #
16
- # All BEL AST nodes have a basic set of properties. Additional properties
17
- # may be specified by subclasses. Each class in the hierarchy describes
18
- # its type through the class variable _ast_type_. This is equivalent to
19
- # its _type_ instance variable but the former is not used by the AST
20
- # library itself.
16
+ # All BEL AST nodes have a basic set of properties. Additional
17
+ # properties may be specified by subclasses. Each class in
18
+ # the hierarchy describes its type through the class variable
19
+ # _ast_type_. This is equivalent to its _type_ instance variable
20
+ # but the former is not used by the AST library itself.
21
21
  #
22
- # @see Node.ast_type
23
- # @see Node.initialize
22
+ # @see Node.ast_type @see Node.initialize
24
23
  #
25
24
  class Node < ::AST::Node
26
25
  # AST node type
@@ -30,17 +29,17 @@ module BELParser
30
29
 
31
30
  # New BEL AST node.
32
31
  #
33
- # @param [Symbol] type The node type symbol
34
- # @param [Array] children Optional children of node
35
- # @param [Hash] properties Optional supported node properties
32
+ # @param [Symbol] type The node type symbol @param [Array]
33
+ # children Optional children of node @param [Hash] properties
34
+ # Optional supported node properties
36
35
  #
37
- # === Supported properties
38
- # - +line_number+ -> {#line_number}
39
- # - +character_range+ -> {#character_range}, {#range_start},
36
+ # === Supported properties - +line_number+ -> {#line_number} -
37
+ # +character_range+ -> {#character_range}, {#range_start},
40
38
  # {#range_end}
41
39
  # - +complete+ -> {#complete?}
42
40
  #
43
- # @raise ArgumentError If _children_ is not an Array or _properties_
41
+ # @raise ArgumentError If _children_ is not an Array or
42
+ # _properties_
44
43
  # is not a Hash
45
44
  def initialize(type, children = [], properties = {})
46
45
  AST.assert_is_a(Array, children, 'children')
@@ -48,20 +47,19 @@ module BELParser
48
47
  super(type, children, properties)
49
48
  end
50
49
 
51
- # Get the class AST node type.
52
- # @return [Symbol]
50
+ # Get the class AST node type. @return [Symbol]
53
51
  class << self; attr_reader :ast_type end
54
52
 
55
- # Get whether this class AST node has semantics.
56
- # @return [boolean]
53
+ # Get whether this class AST node has semantics. @return
54
+ # [boolean]
57
55
  class << self; attr_reader :has_semantics end
58
56
 
59
57
  # Get the line number where this AST node originates.
60
58
  attr_reader :line_number
61
59
 
62
- # Get the character range enclosing this AST node.
63
- # It is defined as the close interval containing all the characters
64
- # of this AST node.
60
+ # Get the character range enclosing this AST node. It is defined
61
+ # as the close interval containing all the characters of this
62
+ # AST node.
65
63
  attr_reader :character_range
66
64
 
67
65
  # Get the syntax errors for this AST node.
@@ -112,8 +110,7 @@ module BELParser
112
110
  end
113
111
 
114
112
  def freeze
115
- # no freeze...nothing
116
- # I want to be able to modify properties!
113
+ # no freeze...nothing I want to be able to modify properties!
117
114
  self
118
115
  end
119
116
 
@@ -128,7 +125,8 @@ module BELParser
128
125
  end
129
126
  end
130
127
 
131
- # Concatenates `array` with `children` and returns the resulting node.
128
+ # Concatenates `array` with `children` and returns the resulting
129
+ # node.
132
130
  #
133
131
  # @return [Node]
134
132
  def concat(array)
@@ -209,8 +207,7 @@ module BELParser
209
207
 
210
208
  # AST node representing the function of a BEL term.
211
209
  #
212
- # === Special node properties
213
- # - _return_type_: {#return_type}
210
+ # === Special node properties - _return_type_: {#return_type}
214
211
  #
215
212
  class Function < Node
216
213
  # AST node type
@@ -294,13 +291,13 @@ module BELParser
294
291
  end
295
292
 
296
293
  # Determine if this is a URL domain.
297
- def has_url?
294
+ def url?
298
295
  children[0] && children[0].is_a?(Url)
299
296
  end
300
297
 
301
298
  # Get the domain's Url.
302
299
  def url
303
- has_url? ? children[0] : nil
300
+ url? ? children[0] : nil
304
301
  end
305
302
  end
306
303
 
@@ -409,12 +406,12 @@ module BELParser
409
406
  end
410
407
 
411
408
  # Does the argument have a {Parameter} child?
412
- def has_parameter?
409
+ def parameter?
413
410
  children[0].is_a?(Parameter)
414
411
  end
415
412
 
416
413
  # Does the argument have a {Term} child?
417
- def has_term?
414
+ def term?
418
415
  children[0].is_a?(Term)
419
416
  end
420
417
 
@@ -505,12 +502,38 @@ module BELParser
505
502
 
506
503
  # Get what is being set.
507
504
  def name
508
- # TODO: access children for content
505
+ children[0]
509
506
  end
510
507
 
511
508
  # Get the value of what is being set.
512
509
  def value
513
- # TODO: access children for content
510
+ children[1]
511
+ end
512
+ end
513
+
514
+ # AST node representing a document property (e.g. +SET DOCUMENT
515
+ # ...+).
516
+ class DocumentProperty < Node
517
+ # AST node type
518
+ @ast_type = :document_property
519
+ # DocumentProperty has semantics (what was set?)
520
+ @has_semantics = true
521
+
522
+ # New DocumentProperty AST node.
523
+ #
524
+ # @see Node#initialize Node class for basic properties
525
+ def initialize(children = [], properties = {})
526
+ super(DocumentProperty.ast_type, children, properties)
527
+ end
528
+
529
+ # Get what is being set.
530
+ def name
531
+ children[0]
532
+ end
533
+
534
+ # Get the value of what is being set.
535
+ def value
536
+ children[1]
514
537
  end
515
538
  end
516
539
 
@@ -533,30 +556,30 @@ module BELParser
533
556
  children[0]
534
557
  end
535
558
 
536
- def has_relationship?
559
+ def relationship?
537
560
  children[1] && children[1].is_a?(Relationship)
538
561
  end
539
562
 
540
563
  # Get the relationship of the nested statement.
541
564
  def relationship
542
- has_relationship? ? children[1] : nil
565
+ relationship? ? children[1] : nil
543
566
  end
544
567
 
545
- def has_object?
568
+ def object?
546
569
  children[2] && children[2].is_a?(Object)
547
570
  end
548
571
 
549
572
  # Get the object of the nested statement.
550
573
  def object
551
- has_object? ? children[2] : nil
574
+ object? ? children[2] : nil
552
575
  end
553
576
 
554
- def has_comment?
577
+ def comment?
555
578
  children[-1] && children[-1].is_a?(Comment)
556
579
  end
557
580
 
558
581
  def comment
559
- has_comment? ? children[-1] : nil
582
+ comment? ? children[-1] : nil
560
583
  end
561
584
  end
562
585
 
@@ -574,20 +597,10 @@ module BELParser
574
597
  super(NestedStatement.ast_type, children, properties)
575
598
  end
576
599
 
577
- # Get the subject of the statement.
578
- def subject
600
+ # Get the statement.
601
+ def statement
579
602
  children[0]
580
603
  end
581
-
582
- # Get the relationship of the nested statement.
583
- def relationship
584
- children[1]
585
- end
586
-
587
- # Get the object of the nested statement.
588
- def object
589
- children[2]
590
- end
591
604
  end
592
605
 
593
606
  # AST node representing a observed term statement.
@@ -604,8 +617,8 @@ module BELParser
604
617
  super(ObservedTerm.ast_type, children, properties)
605
618
  end
606
619
 
607
- # Get the subject of the statement.
608
- def subject
620
+ # Get the statement.
621
+ def statement
609
622
  children[0]
610
623
  end
611
624
  end
@@ -624,20 +637,10 @@ module BELParser
624
637
  super(SimpleStatement.ast_type, children, properties)
625
638
  end
626
639
 
627
- # Get the subject of the statement.
628
- def subject
640
+ # Get the statement.
641
+ def statement
629
642
  children[0]
630
643
  end
631
-
632
- # Get the relationship of the nested statement.
633
- def relationship
634
- children[1]
635
- end
636
-
637
- # Get the object of the nested statement.
638
- def object
639
- children[2]
640
- end
641
644
  end
642
645
 
643
646
  # AST node representing the subject of a statement.
@@ -675,12 +678,12 @@ module BELParser
675
678
  end
676
679
 
677
680
  # Does the object have a {Term} child?
678
- def has_term?
681
+ def term?
679
682
  children[0].is_a?(Term)
680
683
  end
681
684
 
682
685
  # Does the object have a {Statement} child?
683
- def has_statement?
686
+ def statement?
684
687
  children[0].is_a?(Statement)
685
688
  end
686
689
 
@@ -735,16 +738,17 @@ module BELParser
735
738
  end
736
739
 
737
740
  # Get the term's function semantics.
738
- def function_semantics
739
- @function_semantics
740
- end
741
+ attr_reader :function_semantics
741
742
 
742
743
  # Sets the term's function semantics.
743
744
  def function_semantics=(function_semantics)
744
- if function_semantics != nil && !function_semantics.is_a?(BELParser::Language::Signature)
745
- raise ArgumentError, "function_semantics: expected nil or BELParser::Language::Signature"
745
+ if !function_semantics.nil? &&
746
+ !function_semantics.is_a?(BELParser::Language::Signature)
747
+ raise(
748
+ ArgumentError,
749
+ 'function_semantics: expected nil or Signature')
746
750
  end
747
- assign_properties({function_semantics: function_semantics})
751
+ assign_properties(function_semantics: function_semantics)
748
752
  end
749
753
  end
750
754
 
@@ -768,10 +772,28 @@ module BELParser
768
772
  end
769
773
  end
770
774
 
775
+ # AST node representing a name.
776
+ class Name < Node
777
+ # AST node type
778
+ @ast_type = :name
779
+ # Name has semantics (name of property or annotation).
780
+ @has_semantics = true
781
+
782
+ # New Name AST node.
783
+ #
784
+ # @see Node#initialize Node class for basic properties
785
+ def initialize(children = [], properties = {})
786
+ super(Name.ast_type, children, properties)
787
+ end
788
+
789
+ def identifier
790
+ children[0]
791
+ end
792
+ end
793
+
771
794
  # AST node representing a value.
772
795
  #
773
- # === Special node properties
774
- # - _encoding_: {#encoding}
796
+ # === Special node properties - _encoding_: {#encoding}
775
797
  #
776
798
  class Value < Node
777
799
  # AST node type
@@ -790,6 +812,10 @@ module BELParser
790
812
  attr_reader :encoding
791
813
  end
792
814
 
815
+ # Sexp defines a module that creates {BELParser::Parsers::AST::Node
816
+ # AST nodes} using S-expression syntax.
817
+ #
818
+ # @see https://en.wikipedia.org/wiki/S-expression S-expression
793
819
  module Sexp
794
820
  def nested_statement(*children)
795
821
  NestedStatement.new(children)
@@ -839,6 +865,10 @@ module BELParser
839
865
  Prefix.new(children)
840
866
  end
841
867
 
868
+ def name(*children)
869
+ Name.new(children)
870
+ end
871
+
842
872
  def value(*children)
843
873
  Value.new(children)
844
874
  end
@@ -871,6 +901,14 @@ module BELParser
871
901
  BlankLine.new
872
902
  end
873
903
 
904
+ def set(*children)
905
+ Set.new(children)
906
+ end
907
+
908
+ def document_property(*children)
909
+ DocumentProperty.new(children)
910
+ end
911
+
874
912
  def annotation_definition(*children)
875
913
  AnnotationDefinition.new(children)
876
914
  end
@@ -35,7 +35,7 @@
35
35
  }
36
36
 
37
37
  set :=
38
- SET_KW %set_keyword
38
+ SET_KW %set_keyword
39
39
  SP+
40
40
  IDENT %name
41
41
  SP+