bel_parser 1.0.0.alpha.44 → 1.0.0.alpha.45

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,10 +17,15 @@
17
17
  action add_string_value {
18
18
  trace('DEFINE_ANNOTATION add_string_value')
19
19
  string_node = @buffers.delete(:string)
20
- if @url_domain
20
+
21
+ case
22
+ when @uri_domain
23
+ leaf = domain(uri(string_node))
24
+ leaf.complete = string_node.complete
25
+ when @url_domain
21
26
  leaf = domain(url(string_node))
22
27
  leaf.complete = string_node.complete
23
- elsif @pattern_domain
28
+ when @pattern_domain
24
29
  leaf = domain(pattern(string_node))
25
30
  leaf.complete = string_node.complete
26
31
  else
@@ -54,6 +59,11 @@
54
59
  @list_domain = true
55
60
  }
56
61
 
62
+ action add_uri_domain {
63
+ trace('DEFINE_ANNOTATION add_uri_domain')
64
+ @uri_domain = true
65
+ }
66
+
57
67
  action add_url_domain {
58
68
  trace('DEFINE_ANNOTATION add_url_domain')
59
69
  @url_domain = true
@@ -87,9 +97,13 @@
87
97
  action define_annotation_node_eof {
88
98
  trace('DEFINE_ANNOTATION define_annotation_node_eof')
89
99
  annotation_definition_node = annotation_definition()
90
- if @url_domain
100
+
101
+ case
102
+ when @uri_domain
103
+ domain_node = domain(uri())
104
+ when @url_domain
91
105
  domain_node = domain(url())
92
- elsif @pattern_domain
106
+ when @pattern_domain
93
107
  domain_node = domain(pattern())
94
108
  else
95
109
  domain_node = domain()
@@ -131,6 +145,11 @@
131
145
  %add_list_domain
132
146
  ;
133
147
 
148
+ uri_domain =
149
+ KW_URI
150
+ %add_uri_domain
151
+ ;
152
+
134
153
  url_domain =
135
154
  KW_URL
136
155
  %add_url_domain
@@ -143,6 +162,7 @@
143
162
 
144
163
  domain =
145
164
  list_domain |
165
+ uri_domain |
146
166
  url_domain |
147
167
  pattern_domain
148
168
  ;