bel_parser 1.0.0.alpha.41-java → 1.0.0.alpha.42-java

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,25 +11,25 @@
11
11
  action add_property {
12
12
  trace('SET_DOCUMENT add_property')
13
13
  key = @buffers.delete(:ident)
14
- @buffers[:set_document_name] = key
14
+ @buffers[:set_document_name] = name(key)
15
15
  }
16
16
 
17
17
  action add_ident_value {
18
18
  trace('SET_DOCUMENT add_ident_value')
19
19
  ident = @buffers.delete(:ident)
20
- @buffers[:set_document_value] = ident
20
+ @buffers[:set_document_value] = value(ident)
21
21
  }
22
22
 
23
23
  action add_string_value {
24
24
  trace('SET_DOCUMENT add_string_value')
25
25
  string = @buffers.delete(:string)
26
- @buffers[:set_document_value] = string
26
+ @buffers[:set_document_value] = value(string)
27
27
  }
28
28
 
29
29
  action add_list_value {
30
30
  trace('SET_DOCUMENT add_list_value')
31
31
  list = @buffers.delete(:list)
32
- @buffers[:set_document_value] = list
32
+ @buffers[:set_document_value] = value(list)
33
33
  }
34
34
 
35
35
  action set_document_end {
@@ -68,15 +68,15 @@
68
68
  completed = name.complete
69
69
  if @buffers.key?(:string)
70
70
  value = @buffers.delete(:string)
71
- set_document_node <<= value
71
+ set_document_node <<= value(value)
72
72
  completed = completed && value.complete
73
73
  elsif @buffers.key?(:ident)
74
74
  value = @buffers.delete(:ident)
75
- set_document_node <<= value
75
+ set_document_node <<= value(value)
76
76
  completed = completed && value.complete
77
77
  elsif @buffers.key?(:list)
78
78
  value = @buffers.delete(:list)
79
- set_document_node <<= value
79
+ set_document_node <<= value(value)
80
80
  completed = completed && value.complete
81
81
  end
82
82
  set_document_node.complete = completed
@@ -84,8 +84,7 @@
84
84
  }
85
85
 
86
86
  document_property =
87
- an_ident &
88
- DOCUMENT_PROPERTY
87
+ an_ident
89
88
  ;
90
89
 
91
90
  ident_value =
@@ -124,6 +123,7 @@
124
123
  @eof(set_document_node_eof)
125
124
  %set_document_end
126
125
  %yield_set_document
126
+ NL?
127
127
  ;
128
128
  }%%
129
129
  =end
@@ -29,23 +29,6 @@ machine bel;
29
29
  KW_PATTERN = /PATTERN/i;
30
30
  KW_URL = /URL/i;
31
31
  KW_DOCUMENT = /DOCUMENT/i;
32
- KW_AUTHORS = /Authors/i;
33
- KW_CONTACT_INFO = /ContactInfo/i;
34
- KW_COPYRIGHT = /Copyright/i;
35
- KW_DESCRIPTION = /Description/i;
36
- KW_LICENSES = /Licenses/i;
37
- KW_NAME = /Name/i;
38
- KW_VERSION = /Version/i;
39
-
40
- DOCUMENT_PROPERTY =
41
- KW_AUTHORS |
42
- KW_CONTACT_INFO |
43
- KW_COPYRIGHT |
44
- KW_DESCRIPTION |
45
- KW_LICENSES |
46
- KW_NAME |
47
- KW_VERSION
48
- ;
49
32
 
50
33
  DEFINE_ANNOTATION =
51
34
  KW_DEFINE
@@ -152,7 +152,7 @@ module BELParser
152
152
  end
153
153
 
154
154
  def on_string(string_node)
155
- @string << string_node.string_literal
155
+ @string << %("#{string_node.string_literal}")
156
156
  end
157
157
 
158
158
  def on_subject(subject_node)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bel_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.alpha.41
4
+ version: 1.0.0.alpha.42
5
5
  platform: java
6
6
  authors:
7
7
  - Anthony Bargnesi