bel_parser 1.0.0.alpha.38-java → 1.0.0.alpha.39-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/bel_parser/ast_filter.rb +6 -2
  4. data/lib/bel_parser/parsers/ast/node.rb +113 -58
  5. data/lib/bel_parser/parsers/bel_script/define_annotation.rb +4175 -3097
  6. data/lib/bel_parser/parsers/bel_script/define_annotation.rl +142 -49
  7. data/lib/bel_parser/parsers/bel_script/define_namespace.rb +980 -461
  8. data/lib/bel_parser/parsers/bel_script/define_namespace.rl +79 -39
  9. data/lib/bel_parser/parsers/bel_script/set.rb +4878 -2743
  10. data/lib/bel_parser/parsers/bel_script/set.rl +114 -32
  11. data/lib/bel_parser/parsers/bel_script/set_document.rb +5839 -5292
  12. data/lib/bel_parser/parsers/bel_script/set_document.rl +130 -27
  13. data/lib/bel_parser/parsers/bel_script/unset.rb +321 -234
  14. data/lib/bel_parser/parsers/bel_script/unset.rl +49 -21
  15. data/lib/bel_parser/parsers/common/blank_line.rb +12 -11
  16. data/lib/bel_parser/parsers/common/blank_line.rl +12 -12
  17. data/lib/bel_parser/parsers/common/comment_line.rb +65 -40
  18. data/lib/bel_parser/parsers/common/comment_line.rl +26 -26
  19. data/lib/bel_parser/parsers/common/common.rl +60 -0
  20. data/lib/bel_parser/parsers/common/function.rb +319 -0
  21. data/lib/bel_parser/parsers/common/function.rl +149 -0
  22. data/lib/bel_parser/parsers/common/identifier.rb +72 -68
  23. data/lib/bel_parser/parsers/common/identifier.rl +73 -29
  24. data/lib/bel_parser/parsers/common/list.rb +1617 -1243
  25. data/lib/bel_parser/parsers/common/list.rl +120 -60
  26. data/lib/bel_parser/parsers/common/string.rb +114 -41
  27. data/lib/bel_parser/parsers/common/string.rl +91 -28
  28. data/lib/bel_parser/parsers/common.rb +1 -0
  29. data/lib/bel_parser/parsers/expression/comment.rb +70 -38
  30. data/lib/bel_parser/parsers/expression/comment.rl +37 -20
  31. data/lib/bel_parser/parsers/expression/nested_statement.rb +63116 -13958
  32. data/lib/bel_parser/parsers/expression/nested_statement.rl +53 -23
  33. data/lib/bel_parser/parsers/expression/observed_term.rb +32497 -5188
  34. data/lib/bel_parser/parsers/expression/observed_term.rl +25 -20
  35. data/lib/bel_parser/parsers/expression/parameter.rb +2861 -847
  36. data/lib/bel_parser/parsers/expression/parameter.rl +178 -21
  37. data/lib/bel_parser/parsers/expression/relationship.rb +73 -55
  38. data/lib/bel_parser/parsers/expression/relationship.rl +41 -23
  39. data/lib/bel_parser/parsers/expression/simple_statement.rb +42895 -7846
  40. data/lib/bel_parser/parsers/expression/simple_statement.rl +41 -24
  41. data/lib/bel_parser/parsers/expression/term.rb +16498 -2602
  42. data/lib/bel_parser/parsers/expression/term.rl +52 -35
  43. data/lib/bel_parser/parsers/line_parser.rb +1 -0
  44. data/lib/bel_parser/parsers/mixin/buffer.rb +4 -0
  45. data/lib/bel_parser/parsers/tracer.rb +19 -0
  46. data/lib/bel_parser/script/state/namespace_definition.rb +1 -0
  47. metadata +10 -7
@@ -8,12 +8,14 @@ class << self
8
8
  end
9
9
  self._bel_trans_keys = [
10
10
  0, 0, 9, 122, 9, 122,
11
- 34, 92, 10, 10, 92,
12
- 92, 10, 122, 10, 122,
13
- 48, 122, 10, 122, 34, 34,
14
- 34, 92, 10, 10, 92,
15
- 92, 0, 0, 0, 0,
16
- 0, 0, 0
11
+ 9, 34, 34, 92, 34,
12
+ 92, 0, 0, 48, 122,
13
+ 9, 34, 34, 92, 34, 92,
14
+ 0, 0, 10, 10, 0,
15
+ 0, 10, 122, 10, 122,
16
+ 9, 122, 9, 122, 9, 34,
17
+ 10, 122, 0, 0, 0,
18
+ 0, 0
17
19
  ]
18
20
 
19
21
  class << self
@@ -21,9 +23,9 @@ class << self
21
23
  private :_bel_key_spans, :_bel_key_spans=
22
24
  end
23
25
  self._bel_key_spans = [
24
- 0, 114, 114, 59, 1, 1, 113, 113,
25
- 75, 113, 1, 59, 1, 1, 0, 0,
26
- 0
26
+ 0, 114, 114, 26, 59, 59, 0, 75,
27
+ 26, 59, 59, 0, 1, 0, 113, 113,
28
+ 114, 114, 26, 113, 0, 0
27
29
  ]
28
30
 
29
31
  class << self
@@ -31,9 +33,9 @@ class << self
31
33
  private :_bel_index_offsets, :_bel_index_offsets=
32
34
  end
33
35
  self._bel_index_offsets = [
34
- 0, 0, 115, 230, 290, 292, 294, 408,
35
- 522, 598, 712, 714, 774, 776, 778, 779,
36
- 780
36
+ 0, 0, 115, 230, 257, 317, 377, 378,
37
+ 454, 481, 541, 601, 602, 604, 605, 719,
38
+ 833, 948, 1063, 1090, 1204, 1205
37
39
  ]
38
40
 
39
41
  class << self
@@ -41,104 +43,157 @@ class << self
41
43
  private :_bel_indicies, :_bel_indicies=
42
44
  end
43
45
  self._bel_indicies = [
44
- 1, 0, 0, 0, 0, 0, 0, 0,
46
+ 1, 2, 2, 2, 2, 0, 0, 0,
45
47
  0, 0, 0, 0, 0, 0, 0, 0,
46
48
  0, 0, 0, 0, 0, 0, 0, 1,
47
- 0, 2, 0, 0, 0, 0, 0, 0,
48
- 0, 0, 0, 0, 0, 0, 0, 3,
49
- 3, 3, 3, 3, 3, 3, 3, 3,
50
- 3, 0, 0, 0, 0, 0, 0, 0,
51
- 3, 3, 3, 3, 3, 3, 3, 3,
52
- 3, 3, 3, 3, 3, 3, 3, 3,
53
- 3, 3, 3, 3, 3, 3, 3, 3,
54
- 3, 3, 0, 0, 0, 0, 3, 0,
55
- 3, 3, 3, 3, 3, 3, 3, 3,
56
- 3, 3, 3, 3, 3, 3, 3, 3,
57
- 3, 3, 3, 3, 3, 3, 3, 3,
58
- 3, 3, 0, 1, 4, 4, 4, 4,
49
+ 0, 3, 0, 0, 0, 0, 0, 0,
50
+ 0, 0, 0, 0, 0, 0, 0, 4,
59
51
  4, 4, 4, 4, 4, 4, 4, 4,
52
+ 4, 0, 0, 0, 0, 0, 0, 0,
60
53
  4, 4, 4, 4, 4, 4, 4, 4,
61
- 4, 4, 1, 4, 2, 4, 4, 4,
62
54
  4, 4, 4, 4, 4, 4, 4, 4,
63
- 4, 4, 5, 5, 5, 5, 5, 5,
64
- 5, 5, 5, 5, 4, 4, 4, 4,
65
- 4, 4, 4, 5, 5, 5, 5, 5,
55
+ 4, 4, 4, 4, 4, 4, 4, 4,
56
+ 4, 4, 0, 0, 0, 0, 4, 0,
57
+ 4, 4, 4, 4, 4, 4, 4, 4,
58
+ 4, 4, 4, 4, 4, 4, 4, 4,
59
+ 4, 4, 4, 4, 4, 4, 4, 4,
60
+ 4, 4, 0, 1, 2, 2, 2, 2,
61
+ 0, 0, 0, 0, 0, 0, 0, 0,
62
+ 0, 0, 0, 0, 0, 0, 0, 0,
63
+ 0, 0, 1, 0, 3, 0, 0, 0,
64
+ 0, 0, 0, 0, 0, 0, 0, 0,
65
+ 0, 0, 5, 5, 5, 5, 5, 5,
66
+ 5, 5, 5, 5, 0, 0, 0, 0,
67
+ 0, 0, 0, 5, 5, 5, 5, 5,
66
68
  5, 5, 5, 5, 5, 5, 5, 5,
67
69
  5, 5, 5, 5, 5, 5, 5, 5,
68
- 5, 5, 5, 5, 5, 4, 4, 4,
69
- 4, 5, 4, 5, 5, 5, 5, 5,
70
+ 5, 5, 5, 5, 5, 0, 0, 0,
71
+ 0, 5, 0, 5, 5, 5, 5, 5,
70
72
  5, 5, 5, 5, 5, 5, 5, 5,
71
73
  5, 5, 5, 5, 5, 5, 5, 5,
72
- 5, 5, 5, 5, 5, 4, 7, 6,
73
- 6, 6, 6, 6, 6, 6, 6, 6,
74
+ 5, 5, 5, 5, 5, 0, 2, 2,
75
+ 2, 2, 2, 6, 6, 6, 6, 6,
74
76
  6, 6, 6, 6, 6, 6, 6, 6,
75
- 6, 6, 6, 6, 6, 6, 6, 6,
76
- 6, 6, 6, 6, 6, 6, 6, 6,
77
- 6, 6, 6, 6, 6, 6, 6, 6,
78
- 6, 6, 6, 6, 6, 6, 6, 6,
79
- 6, 6, 6, 6, 6, 6, 6, 6,
80
- 8, 6, 10, 9, 8, 6, 12, 11,
81
- 11, 11, 11, 11, 11, 11, 11, 11,
82
- 11, 11, 11, 11, 11, 11, 11, 11,
83
- 11, 11, 11, 11, 11, 11, 11, 11,
84
- 11, 11, 11, 11, 11, 11, 11, 11,
85
- 11, 11, 11, 11, 13, 13, 13, 13,
86
- 13, 13, 13, 13, 13, 13, 11, 11,
87
- 11, 11, 11, 11, 11, 13, 13, 13,
77
+ 6, 6, 6, 6, 6, 2, 6, 3,
78
+ 6, 8, 7, 7, 7, 7, 7, 7,
79
+ 7, 7, 7, 7, 7, 7, 7, 7,
80
+ 7, 7, 7, 7, 7, 7, 7, 7,
81
+ 7, 7, 7, 7, 7, 7, 7, 7,
82
+ 7, 7, 7, 7, 7, 7, 7, 7,
83
+ 7, 7, 7, 7, 7, 7, 7, 7,
84
+ 7, 7, 7, 7, 7, 7, 7, 7,
85
+ 7, 7, 7, 9, 7, 11, 10, 10,
86
+ 10, 10, 10, 10, 10, 10, 10, 10,
87
+ 10, 10, 10, 10, 10, 10, 10, 10,
88
+ 10, 10, 10, 10, 10, 10, 10, 10,
89
+ 10, 10, 10, 10, 10, 10, 10, 10,
90
+ 10, 10, 10, 10, 10, 10, 10, 10,
91
+ 10, 10, 10, 10, 10, 10, 10, 10,
92
+ 10, 10, 10, 10, 10, 10, 10, 12,
93
+ 10, 10, 13, 13, 13, 13, 13, 13,
94
+ 13, 13, 13, 13, 14, 14, 14, 14,
95
+ 14, 14, 14, 13, 13, 13, 13, 13,
88
96
  13, 13, 13, 13, 13, 13, 13, 13,
89
97
  13, 13, 13, 13, 13, 13, 13, 13,
90
- 13, 13, 13, 13, 13, 13, 13, 11,
91
- 11, 11, 11, 13, 11, 13, 13, 13,
98
+ 13, 13, 13, 13, 13, 14, 14, 14,
99
+ 14, 13, 14, 13, 13, 13, 13, 13,
92
100
  13, 13, 13, 13, 13, 13, 13, 13,
93
101
  13, 13, 13, 13, 13, 13, 13, 13,
94
- 13, 13, 13, 13, 13, 13, 13, 11,
95
- 12, 11, 11, 11, 11, 11, 11, 11,
96
- 11, 11, 11, 11, 11, 11, 11, 11,
97
- 11, 11, 11, 11, 11, 11, 11, 11,
98
- 11, 11, 11, 11, 11, 11, 11, 11,
99
- 11, 11, 11, 11, 11, 11, 14, 14,
100
- 14, 14, 14, 14, 14, 14, 14, 14,
101
- 15, 11, 11, 11, 11, 11, 11, 14,
102
- 14, 14, 14, 14, 14, 14, 14, 14,
103
- 14, 14, 14, 14, 14, 14, 14, 14,
104
- 14, 14, 14, 14, 14, 14, 14, 14,
105
- 14, 11, 11, 11, 11, 14, 11, 14,
106
- 14, 14, 14, 14, 14, 14, 14, 14,
107
- 14, 14, 14, 14, 14, 14, 14, 14,
108
- 14, 14, 14, 14, 14, 14, 14, 14,
109
- 14, 11, 17, 17, 17, 17, 17, 17,
110
- 17, 17, 17, 17, 16, 16, 16, 16,
111
- 16, 16, 16, 17, 17, 17, 17, 17,
112
- 17, 17, 17, 17, 17, 17, 17, 17,
113
- 17, 17, 17, 17, 17, 17, 17, 17,
114
- 17, 17, 17, 17, 17, 16, 16, 16,
115
- 16, 17, 16, 17, 17, 17, 17, 17,
116
- 17, 17, 17, 17, 17, 17, 17, 17,
117
- 17, 17, 17, 17, 17, 17, 17, 17,
118
- 17, 17, 17, 17, 17, 16, 18, 16,
119
- 16, 16, 16, 16, 16, 16, 16, 16,
120
- 16, 16, 16, 16, 16, 16, 16, 16,
121
- 16, 16, 16, 16, 16, 16, 16, 16,
122
- 16, 16, 16, 16, 16, 16, 16, 16,
123
- 16, 16, 16, 16, 19, 19, 19, 19,
124
- 19, 19, 19, 19, 19, 19, 16, 16,
125
- 16, 16, 16, 16, 16, 19, 19, 19,
126
- 19, 19, 19, 19, 19, 19, 19, 19,
127
- 19, 19, 19, 19, 19, 19, 19, 19,
128
- 19, 19, 19, 19, 19, 19, 19, 16,
129
- 16, 16, 16, 19, 16, 19, 19, 19,
130
- 19, 19, 19, 19, 19, 19, 19, 19,
131
- 19, 19, 19, 19, 19, 19, 19, 19,
132
- 19, 19, 19, 19, 19, 19, 19, 16,
133
- 21, 20, 23, 22, 22, 22, 22, 22,
134
- 22, 22, 22, 22, 22, 22, 22, 22,
135
- 22, 22, 22, 22, 22, 22, 22, 22,
136
- 22, 22, 22, 22, 22, 22, 22, 22,
137
- 22, 22, 22, 22, 22, 22, 22, 22,
138
- 22, 22, 22, 22, 22, 22, 22, 22,
139
- 22, 22, 22, 22, 22, 22, 22, 22,
140
- 22, 22, 22, 22, 24, 22, 25, 20,
141
- 24, 22, 26, 26, 26, 0
102
+ 13, 13, 13, 13, 13, 14, 16, 16,
103
+ 16, 16, 16, 15, 15, 15, 15, 15,
104
+ 15, 15, 15, 15, 15, 15, 15, 15,
105
+ 15, 15, 15, 15, 15, 16, 15, 17,
106
+ 15, 19, 18, 18, 18, 18, 18, 18,
107
+ 18, 18, 18, 18, 18, 18, 18, 18,
108
+ 18, 18, 18, 18, 18, 18, 18, 18,
109
+ 18, 18, 18, 18, 18, 18, 18, 18,
110
+ 18, 18, 18, 18, 18, 18, 18, 18,
111
+ 18, 18, 18, 18, 18, 18, 18, 18,
112
+ 18, 18, 18, 18, 18, 18, 18, 18,
113
+ 18, 18, 18, 20, 18, 22, 21, 21,
114
+ 21, 21, 21, 21, 21, 21, 21, 21,
115
+ 21, 21, 21, 21, 21, 21, 21, 21,
116
+ 21, 21, 21, 21, 21, 21, 21, 21,
117
+ 21, 21, 21, 21, 21, 21, 21, 21,
118
+ 21, 21, 21, 21, 21, 21, 21, 21,
119
+ 21, 21, 21, 21, 21, 21, 21, 21,
120
+ 21, 21, 21, 21, 21, 21, 21, 23,
121
+ 21, 21, 24, 6, 14, 26, 25, 25,
122
+ 25, 25, 25, 25, 25, 25, 25, 25,
123
+ 25, 25, 25, 25, 25, 25, 25, 25,
124
+ 25, 25, 25, 25, 25, 25, 25, 25,
125
+ 25, 25, 25, 25, 25, 25, 25, 25,
126
+ 25, 25, 25, 27, 27, 27, 27, 27,
127
+ 27, 27, 27, 27, 27, 25, 25, 25,
128
+ 25, 25, 25, 25, 27, 27, 27, 27,
129
+ 27, 27, 27, 27, 27, 27, 27, 27,
130
+ 27, 27, 27, 27, 27, 27, 27, 27,
131
+ 27, 27, 27, 27, 27, 27, 25, 25,
132
+ 25, 25, 27, 25, 27, 27, 27, 27,
133
+ 27, 27, 27, 27, 27, 27, 27, 27,
134
+ 27, 27, 27, 27, 27, 27, 27, 27,
135
+ 27, 27, 27, 27, 27, 27, 25, 26,
136
+ 25, 25, 25, 25, 25, 25, 25, 25,
137
+ 25, 25, 25, 25, 25, 25, 25, 25,
138
+ 25, 25, 25, 25, 25, 25, 25, 25,
139
+ 25, 25, 25, 25, 25, 25, 25, 25,
140
+ 25, 25, 25, 25, 25, 28, 28, 28,
141
+ 28, 28, 28, 28, 28, 28, 28, 29,
142
+ 25, 25, 25, 25, 25, 25, 28, 28,
143
+ 28, 28, 28, 28, 28, 28, 28, 28,
144
+ 28, 28, 28, 28, 28, 28, 28, 28,
145
+ 28, 28, 28, 28, 28, 28, 28, 28,
146
+ 25, 25, 25, 25, 28, 25, 28, 28,
147
+ 28, 28, 28, 28, 28, 28, 28, 28,
148
+ 28, 28, 28, 28, 28, 28, 28, 28,
149
+ 28, 28, 28, 28, 28, 28, 28, 28,
150
+ 25, 30, 31, 32, 32, 32, 0, 0,
151
+ 0, 0, 0, 0, 0, 0, 0, 0,
152
+ 0, 0, 0, 0, 0, 0, 0, 0,
153
+ 30, 0, 33, 0, 0, 0, 0, 0,
154
+ 0, 0, 0, 0, 0, 0, 0, 0,
155
+ 34, 34, 34, 34, 34, 34, 34, 34,
156
+ 34, 34, 0, 0, 0, 0, 0, 0,
157
+ 0, 34, 34, 34, 34, 34, 34, 34,
158
+ 34, 34, 34, 34, 34, 34, 34, 34,
159
+ 34, 34, 34, 34, 34, 34, 34, 34,
160
+ 34, 34, 34, 0, 0, 0, 0, 34,
161
+ 0, 34, 34, 34, 34, 34, 34, 34,
162
+ 34, 34, 34, 34, 34, 34, 34, 34,
163
+ 34, 34, 34, 34, 34, 34, 34, 34,
164
+ 34, 34, 34, 0, 35, 36, 2, 2,
165
+ 2, 0, 0, 0, 0, 0, 0, 0,
166
+ 0, 0, 0, 0, 0, 0, 0, 0,
167
+ 0, 0, 0, 35, 0, 3, 0, 0,
168
+ 0, 0, 0, 0, 0, 0, 0, 0,
169
+ 0, 0, 0, 5, 5, 5, 5, 5,
170
+ 5, 5, 5, 5, 5, 0, 0, 0,
171
+ 0, 0, 0, 0, 5, 5, 5, 5,
172
+ 5, 5, 5, 5, 5, 5, 5, 5,
173
+ 5, 5, 5, 5, 5, 5, 5, 5,
174
+ 5, 5, 5, 5, 5, 5, 0, 0,
175
+ 0, 0, 5, 0, 5, 5, 5, 5,
176
+ 5, 5, 5, 5, 5, 5, 5, 5,
177
+ 5, 5, 5, 5, 5, 5, 5, 5,
178
+ 5, 5, 5, 5, 5, 5, 0, 2,
179
+ 2, 2, 2, 2, 6, 6, 6, 6,
180
+ 6, 6, 6, 6, 6, 6, 6, 6,
181
+ 6, 6, 6, 6, 6, 6, 2, 6,
182
+ 3, 6, 38, 37, 37, 37, 37, 37,
183
+ 37, 37, 37, 37, 37, 37, 37, 37,
184
+ 37, 37, 37, 37, 37, 37, 37, 37,
185
+ 37, 37, 37, 37, 37, 37, 37, 37,
186
+ 37, 37, 37, 37, 37, 37, 37, 37,
187
+ 39, 39, 39, 39, 39, 39, 39, 39,
188
+ 39, 39, 37, 37, 37, 37, 37, 37,
189
+ 37, 39, 39, 39, 39, 39, 39, 39,
190
+ 39, 39, 39, 39, 39, 39, 39, 39,
191
+ 39, 39, 39, 39, 39, 39, 39, 39,
192
+ 39, 39, 39, 37, 37, 37, 37, 39,
193
+ 37, 39, 39, 39, 39, 39, 39, 39,
194
+ 39, 39, 39, 39, 39, 39, 39, 39,
195
+ 39, 39, 39, 39, 39, 39, 39, 39,
196
+ 39, 39, 39, 37, 37, 15, 0
142
197
  ]
143
198
 
144
199
  class << self
@@ -146,10 +201,11 @@ class << self
146
201
  private :_bel_trans_targs, :_bel_trans_targs=
147
202
  end
148
203
  self._bel_trans_targs = [
149
- 0, 2, 3, 7, 0, 6, 3, 4,
150
- 5, 0, 14, 0, 14, 6, 7, 2,
151
- 0, 9, 15, 9, 0, 11, 11, 12,
152
- 13, 16, 0
204
+ 0, 2, 3, 4, 15, 14, 0, 5,
205
+ 12, 6, 5, 12, 6, 19, 0, 0,
206
+ 8, 9, 10, 21, 11, 10, 21, 11,
207
+ 13, 0, 13, 14, 15, 16, 17, 18,
208
+ 3, 4, 14, 17, 18, 0, 20, 19
153
209
  ]
154
210
 
155
211
  class << self
@@ -157,10 +213,11 @@ class << self
157
213
  private :_bel_trans_actions, :_bel_trans_actions=
158
214
  end
159
215
  self._bel_trans_actions = [
160
- 1, 0, 2, 3, 4, 3, 6, 6,
161
- 6, 5, 7, 8, 9, 10, 10, 11,
162
- 12, 3, 13, 10, 14, 2, 6, 6,
163
- 6, 15, 0
216
+ 2, 0, 0, 0, 3, 3, 5, 7,
217
+ 8, 7, 0, 9, 0, 3, 0, 11,
218
+ 0, 0, 7, 13, 7, 0, 14, 0,
219
+ 15, 17, 18, 0, 0, 20, 22, 23,
220
+ 22, 22, 24, 0, 26, 29, 20, 0
164
221
  ]
165
222
 
166
223
  class << self
@@ -168,9 +225,9 @@ class << self
168
225
  private :_bel_eof_actions, :_bel_eof_actions=
169
226
  end
170
227
  self._bel_eof_actions = [
171
- 0, 1, 4, 5, 5, 5, 8, 8,
172
- 12, 12, 14, 14, 14, 14, 0, 0,
173
- 0
228
+ 0, 1, 1, 4, 6, 6, 6, 0,
229
+ 10, 12, 12, 12, 15, 0, 16, 19,
230
+ 21, 25, 27, 28, 30, 0
174
231
  ]
175
232
 
176
233
  class << self
@@ -180,24 +237,24 @@ self.bel_start = 1;
180
237
  class << self
181
238
  attr_accessor :bel_first_final
182
239
  end
183
- self.bel_first_final = 14;
240
+ self.bel_first_final = 12;
184
241
  class << self
185
242
  attr_accessor :bel_error
186
243
  end
187
244
  self.bel_error = 0;
188
245
 
189
246
  class << self
190
- attr_accessor :bel_en_ident
247
+ attr_accessor :bel_en_ident_node
191
248
  end
192
- self.bel_en_ident = 8;
249
+ self.bel_en_ident_node = 7;
193
250
  class << self
194
- attr_accessor :bel_en_string
251
+ attr_accessor :bel_en_string_node
195
252
  end
196
- self.bel_en_string = 10;
253
+ self.bel_en_string_node = 8;
197
254
  class << self
198
- attr_accessor :bel_en_bel_parameter
255
+ attr_accessor :bel_en_parameter_node
199
256
  end
200
- self.bel_en_bel_parameter = 1;
257
+ self.bel_en_parameter_node = 1;
201
258
 
202
259
 
203
260
  begin
@@ -242,153 +299,353 @@ begin
242
299
  cs = _bel_trans_targs[_trans]
243
300
  if _bel_trans_actions[_trans] != 0
244
301
  case _bel_trans_actions[_trans]
245
- when 10 then
302
+ when 3 then
246
303
  begin
247
304
 
248
- (@buffers[:ident] ||= []) << data[p].ord
305
+ trace('IDENTIFIER start_identifier')
306
+ @identifier_started = true
307
+ id_start = p;
249
308
  end
250
- when 8 then
309
+ when 20 then
251
310
  begin
252
311
 
253
- unless @buffers[:ident].is_a?(::AST::Node)
254
- @buffers[:ident] ||= []
255
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]).sub(/\n$/, ''))
256
- end
312
+ trace('IDENTIFIER end_identifier')
313
+ id_end = p
314
+ chars = data[id_start...id_end]
315
+ completed = !chars.empty?
316
+ ast_node = identifier(utf8_string(chars), complete: completed)
317
+ @buffers[:ident] = ast_node
257
318
  end
258
- when 6 then
319
+ when 17 then
320
+ begin
321
+
322
+ trace('IDENTIFIER an_ident_err')
323
+ id_end = p
324
+ chars = data[id_start...id_end]
325
+ ast_node = identifier(utf8_string(chars), complete: false)
326
+ @buffers[:ident] = ast_node
327
+ end
328
+ when 29 then
329
+ begin
330
+
331
+ trace('IDENTIFIER ident_node_err')
332
+ id_end = p
333
+ chars = data[id_start...id_end]
334
+ ast_node = identifier(utf8_string(chars), complete: false)
335
+ yield ast_node
336
+ end
337
+ when 7 then
259
338
  begin
260
339
 
261
- (@buffers[:string] ||= []) << data[p].ord
340
+ trace('STRING start_string')
341
+ @string_opened = true
342
+ p_start = p
262
343
  end
263
344
  when 5 then
264
345
  begin
265
346
 
266
- @buffers[:string] ||= []
267
- @buffers[:string] = string(utf8_string(@buffers[:string]).sub(/\n$/, ''))
347
+ trace('STRING a_string_err')
348
+ p_end = p
349
+ chars = data[p_start...p_end]
350
+ ast_node = string(utf8_string(chars), complete: false)
351
+ @buffers[:string] = ast_node
268
352
  end
269
- when 3 then
353
+ when 11 then
270
354
  begin
271
355
 
272
- @buffers[:ident] = []
356
+ trace('STRING string_node_err')
357
+ p_end = p
358
+ chars = data[p_start...p_end]
359
+ ast_node = string(utf8_string(chars), complete: false)
360
+ yield ast_node
273
361
  end
362
+ when 22 then
274
363
  begin
275
364
 
276
- (@buffers[:ident] ||= []) << data[p].ord
365
+ trace('PARAMETER add_prefix')
366
+ ident = @buffers.delete(:ident)
367
+ prefix_node = prefix(ident, complete: ident.complete)
368
+ @buffers[:param_prefix] = prefix_node
277
369
  end
278
- when 13 then
370
+ when 2 then
279
371
  begin
280
372
 
281
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]))
373
+ trace('IDENTIFIER an_ident_err')
374
+ id_end = p
375
+ chars = data[id_start...id_end]
376
+ ast_node = identifier(utf8_string(chars), complete: false)
377
+ @buffers[:ident] = ast_node
282
378
  end
283
379
  begin
284
380
 
285
- yield @buffers[:ident]
381
+ trace('STRING a_string_err')
382
+ p_end = p
383
+ chars = data[p_start...p_end]
384
+ ast_node = string(utf8_string(chars), complete: false)
385
+ @buffers[:string] = ast_node
286
386
  end
287
- when 11 then
387
+ when 9 then
288
388
  begin
289
389
 
290
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]))
390
+ trace('STRING stop_string')
391
+ @string_closed = true
392
+ p_end = p
291
393
  end
292
394
  begin
293
395
 
294
- @buffers[:parameter] = parameter(prefix(@buffers[:ident]))
396
+ trace('STRING string_end')
397
+ completed = @string_opened && @string_closed
398
+ chars = data[p_start...p_end]
399
+ ast_node = string(utf8_string(chars), complete: true)
400
+ @buffers[:string] = ast_node
295
401
  end
296
- when 12 then
402
+ when 26 then
297
403
  begin
298
404
 
299
- unless @buffers[:ident].is_a?(::AST::Node)
300
- @buffers[:ident] ||= []
301
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]).sub(/\n$/, ''))
405
+ trace('PARAMETER parameter_end')
406
+ param_node = parameter()
407
+ completed = true
408
+ prefix_node = @buffers.delete(:param_prefix)
409
+ unless prefix_node.nil?
410
+ param_node <<= prefix_node
411
+ unless prefix_node.complete
412
+ trace('PN incomplete')
413
+ completed = false
414
+ end
415
+ end
416
+
417
+ value_node = @buffers.delete(:param_value)
418
+ unless value_node.nil?
419
+ param_node <<= value_node
420
+ unless value_node.complete
421
+ trace('VN incomplete')
422
+ completed = false
423
+ end
424
+ else
425
+ completed = false
302
426
  end
427
+
428
+ param_node.complete = completed
429
+ @buffers[:parameter] = param_node
303
430
  end
304
431
  begin
305
432
 
306
- @buffers[:ident] ||= []
307
- yield @buffers[:ident]
433
+ trace('PARAMETER yield_parameter')
434
+ yield @buffers[:parameter]
308
435
  end
309
- when 1 then
436
+ when 24 then
310
437
  begin
311
438
 
312
- unless @buffers[:ident].is_a?(::AST::Node)
313
- @buffers[:ident] ||= []
314
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]).sub(/\n$/, ''))
315
- end
439
+ trace('PARAMETER add_prefix')
440
+ ident = @buffers.delete(:ident)
441
+ prefix_node = prefix(ident, complete: ident.complete)
442
+ @buffers[:param_prefix] = prefix_node
316
443
  end
317
444
  begin
318
445
 
319
- @buffers[:string] ||= []
320
- @buffers[:string] = string(utf8_string(@buffers[:string]).sub(/\n$/, ''))
446
+ trace('IDENTIFIER start_identifier')
447
+ @identifier_started = true
448
+ id_start = p;
321
449
  end
322
- when 2 then
450
+ when 8 then
323
451
  begin
324
452
 
325
- @buffers[:string] = []
453
+ trace('STRING start_string')
454
+ @string_opened = true
455
+ p_start = p
326
456
  end
327
457
  begin
328
458
 
329
- (@buffers[:string] ||= []) << data[p].ord
459
+ trace('STRING stop_string')
460
+ @string_closed = true
461
+ p_end = p
462
+ end
463
+ begin
464
+
465
+ trace('STRING string_end')
466
+ completed = @string_opened && @string_closed
467
+ chars = data[p_start...p_end]
468
+ ast_node = string(utf8_string(chars), complete: true)
469
+ @buffers[:string] = ast_node
470
+ end
471
+ when 14 then
472
+ begin
473
+
474
+ trace('STRING stop_string')
475
+ @string_closed = true
476
+ p_end = p
330
477
  end
331
- when 15 then
332
478
  begin
333
479
 
334
- @buffers[:string] = string(utf8_string(@buffers[:string]))
480
+ trace('STRING string_end')
481
+ completed = @string_opened && @string_closed
482
+ chars = data[p_start...p_end]
483
+ ast_node = string(utf8_string(chars), complete: true)
484
+ @buffers[:string] = ast_node
335
485
  end
336
486
  begin
337
487
 
488
+ trace('STRING yield_string')
338
489
  yield @buffers[:string]
339
490
  end
340
- when 4 then
491
+ when 15 then
341
492
  begin
342
493
 
343
- @buffers[:string] ||= []
344
- @buffers[:string] = string(utf8_string(@buffers[:string]).sub(/\n$/, ''))
494
+ trace('PARAMETER add_string_param_value')
495
+ string_node = @buffers.delete(:string)
496
+ value_node = value(string_node, complete: string_node.complete)
497
+ @buffers[:param_value] = value_node
345
498
  end
346
499
  begin
347
500
 
348
- unless @buffers[:ident].is_a?(::AST::Node)
349
- @buffers[:ident] ||= []
350
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]).sub(/\n$/, ''))
501
+ trace('PARAMETER parameter_end')
502
+ param_node = parameter()
503
+ completed = true
504
+ prefix_node = @buffers.delete(:param_prefix)
505
+ unless prefix_node.nil?
506
+ param_node <<= prefix_node
507
+ unless prefix_node.complete
508
+ trace('PN incomplete')
509
+ completed = false
510
+ end
511
+ end
512
+
513
+ value_node = @buffers.delete(:param_value)
514
+ unless value_node.nil?
515
+ param_node <<= value_node
516
+ unless value_node.complete
517
+ trace('VN incomplete')
518
+ completed = false
519
+ end
520
+ else
521
+ completed = false
351
522
  end
523
+
524
+ param_node.complete = completed
525
+ @buffers[:parameter] = param_node
352
526
  end
353
- when 14 then
354
527
  begin
355
528
 
356
- @buffers[:string] ||= []
357
- @buffers[:string] = string(utf8_string(@buffers[:string]).sub(/\n$/, ''))
529
+ trace('PARAMETER yield_parameter')
530
+ yield @buffers[:parameter]
358
531
  end
532
+ when 23 then
359
533
  begin
360
534
 
361
- @buffers[:string] ||= []
362
- yield @buffers[:string]
535
+ trace('PARAMETER add_prefix')
536
+ ident = @buffers.delete(:ident)
537
+ prefix_node = prefix(ident, complete: ident.complete)
538
+ @buffers[:param_prefix] = prefix_node
363
539
  end
364
- when 9 then
365
540
  begin
366
541
 
367
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]))
542
+ trace('PARAMETER parameter_end')
543
+ param_node = parameter()
544
+ completed = true
545
+ prefix_node = @buffers.delete(:param_prefix)
546
+ unless prefix_node.nil?
547
+ param_node <<= prefix_node
548
+ unless prefix_node.complete
549
+ trace('PN incomplete')
550
+ completed = false
551
+ end
552
+ end
553
+
554
+ value_node = @buffers.delete(:param_value)
555
+ unless value_node.nil?
556
+ param_node <<= value_node
557
+ unless value_node.complete
558
+ trace('VN incomplete')
559
+ completed = false
560
+ end
561
+ else
562
+ completed = false
563
+ end
564
+
565
+ param_node.complete = completed
566
+ @buffers[:parameter] = param_node
368
567
  end
369
568
  begin
370
569
 
371
- @buffers[:parameter] ||= parameter(prefix(nil))
372
- @buffers[:parameter] = @buffers[:parameter] << value(@buffers[:ident])
570
+ trace('PARAMETER yield_parameter')
571
+ yield @buffers[:parameter]
373
572
  end
573
+ when 18 then
374
574
  begin
375
575
 
376
- yield @buffers[:parameter]
576
+ trace('IDENTIFIER end_identifier')
577
+ id_end = p
578
+ chars = data[id_start...id_end]
579
+ completed = !chars.empty?
580
+ ast_node = identifier(utf8_string(chars), complete: completed)
581
+ @buffers[:ident] = ast_node
377
582
  end
378
- when 7 then
379
583
  begin
380
584
 
381
- @buffers[:string] = string(utf8_string(@buffers[:string]))
585
+ trace('PARAMETER add_ident_param_value')
586
+ ident = @buffers.delete(:ident)
587
+ value_node = value(ident, complete: ident.complete)
588
+ @buffers[:param_value] = value_node
382
589
  end
383
590
  begin
384
591
 
385
- @buffers[:parameter] ||= parameter(prefix(nil))
386
- @buffers[:parameter] = @buffers[:parameter] << value(@buffers[:string])
592
+ trace('PARAMETER parameter_end')
593
+ param_node = parameter()
594
+ completed = true
595
+ prefix_node = @buffers.delete(:param_prefix)
596
+ unless prefix_node.nil?
597
+ param_node <<= prefix_node
598
+ unless prefix_node.complete
599
+ trace('PN incomplete')
600
+ completed = false
601
+ end
602
+ end
603
+
604
+ value_node = @buffers.delete(:param_value)
605
+ unless value_node.nil?
606
+ param_node <<= value_node
607
+ unless value_node.complete
608
+ trace('VN incomplete')
609
+ completed = false
610
+ end
611
+ else
612
+ completed = false
613
+ end
614
+
615
+ param_node.complete = completed
616
+ @buffers[:parameter] = param_node
387
617
  end
388
618
  begin
389
619
 
620
+ trace('PARAMETER yield_parameter')
390
621
  yield @buffers[:parameter]
391
622
  end
623
+ when 13 then
624
+ begin
625
+
626
+ trace('STRING start_string')
627
+ @string_opened = true
628
+ p_start = p
629
+ end
630
+ begin
631
+
632
+ trace('STRING stop_string')
633
+ @string_closed = true
634
+ p_end = p
635
+ end
636
+ begin
637
+
638
+ trace('STRING string_end')
639
+ completed = @string_opened && @string_closed
640
+ chars = data[p_start...p_end]
641
+ ast_node = string(utf8_string(chars), complete: true)
642
+ @buffers[:string] = ast_node
643
+ end
644
+ begin
645
+
646
+ trace('STRING yield_string')
647
+ yield @buffers[:string]
648
+ end
392
649
  end
393
650
  end
394
651
  end
@@ -406,547 +663,481 @@ begin
406
663
  if _goto_level <= _test_eof
407
664
  if p == eof
408
665
  case _bel_eof_actions[cs]
409
- when 8 then
666
+ when 30 then
410
667
  begin
411
668
 
412
- unless @buffers[:ident].is_a?(::AST::Node)
413
- @buffers[:ident] ||= []
414
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]).sub(/\n$/, ''))
415
- end
669
+ trace('IDENTIFIER yield_identifier')
670
+ yield @buffers[:ident]
416
671
  end
417
- when 5 then
672
+ when 27 then
418
673
  begin
419
674
 
420
- @buffers[:string] ||= []
421
- @buffers[:string] = string(utf8_string(@buffers[:string]).sub(/\n$/, ''))
675
+ trace("PARAMETER parameter_node_eof")
676
+ param_node = parameter()
677
+ completed = true
678
+ prefix_node = @buffers.delete(:param_prefix)
679
+ unless prefix_node.nil?
680
+ param_node <<= prefix_node
681
+ unless prefix_node.complete
682
+ completed = false
683
+ end
684
+ end
685
+
686
+ string_value_node = @buffers.delete(:string)
687
+ unless string_value_node.nil?
688
+ param_node <<= string_value_node
689
+ unless string_value_node.complete
690
+ completed = false
691
+ end
692
+ else
693
+ completed = false
694
+ end
695
+
696
+ param_node.complete = completed
697
+ yield param_node
422
698
  end
423
- when 12 then
699
+ when 28 then
424
700
  begin
425
701
 
426
- unless @buffers[:ident].is_a?(::AST::Node)
427
- @buffers[:ident] ||= []
428
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]).sub(/\n$/, ''))
429
- end
702
+ trace('IDENTIFIER end_identifier')
703
+ id_end = p
704
+ chars = data[id_start...id_end]
705
+ completed = !chars.empty?
706
+ ast_node = identifier(utf8_string(chars), complete: completed)
707
+ @buffers[:ident] = ast_node
430
708
  end
431
709
  begin
432
710
 
433
- @buffers[:ident] ||= []
711
+ trace('IDENTIFIER yield_identifier')
434
712
  yield @buffers[:ident]
435
713
  end
436
- when 1 then
714
+ when 4 then
437
715
  begin
438
716
 
439
- unless @buffers[:ident].is_a?(::AST::Node)
440
- @buffers[:ident] ||= []
441
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]).sub(/\n$/, ''))
717
+ trace('STRING a_string_err')
718
+ p_end = p
719
+ chars = data[p_start...p_end]
720
+ ast_node = string(utf8_string(chars), complete: false)
721
+ @buffers[:string] = ast_node
722
+ end
723
+ begin
724
+
725
+ trace("PARAMETER parameter_node_eof")
726
+ param_node = parameter()
727
+ completed = true
728
+ prefix_node = @buffers.delete(:param_prefix)
729
+ unless prefix_node.nil?
730
+ param_node <<= prefix_node
731
+ unless prefix_node.complete
732
+ completed = false
733
+ end
734
+ end
735
+
736
+ string_value_node = @buffers.delete(:string)
737
+ unless string_value_node.nil?
738
+ param_node <<= string_value_node
739
+ unless string_value_node.complete
740
+ completed = false
741
+ end
742
+ else
743
+ completed = false
442
744
  end
745
+
746
+ param_node.complete = completed
747
+ yield param_node
443
748
  end
749
+ when 10 then
444
750
  begin
445
751
 
446
- @buffers[:string] ||= []
447
- @buffers[:string] = string(utf8_string(@buffers[:string]).sub(/\n$/, ''))
752
+ trace('STRING string_node_err')
753
+ p_end = p
754
+ chars = data[p_start...p_end]
755
+ ast_node = string(utf8_string(chars), complete: false)
756
+ yield ast_node
448
757
  end
449
- when 4 then
450
758
  begin
451
759
 
452
- @buffers[:string] ||= []
453
- @buffers[:string] = string(utf8_string(@buffers[:string]).sub(/\n$/, ''))
760
+ trace('STRING string_node_eof')
761
+ yield @buffers[:string]
454
762
  end
763
+ when 25 then
455
764
  begin
456
765
 
457
- unless @buffers[:ident].is_a?(::AST::Node)
458
- @buffers[:ident] ||= []
459
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]).sub(/\n$/, ''))
766
+ trace('IDENTIFIER an_ident_eof')
767
+ if @identifier_started
768
+ id_end = p
769
+ chars = data[id_start...id_end]
770
+ completed = !chars.empty?
771
+ ast_node = identifier(utf8_string(chars), complete: completed)
772
+ @buffers[:ident] = ast_node
460
773
  end
461
774
  end
462
- when 14 then
463
775
  begin
464
776
 
465
- @buffers[:string] ||= []
466
- @buffers[:string] = string(utf8_string(@buffers[:string]).sub(/\n$/, ''))
777
+ trace('PARAMETER parameter_end')
778
+ param_node = parameter()
779
+ completed = true
780
+ prefix_node = @buffers.delete(:param_prefix)
781
+ unless prefix_node.nil?
782
+ param_node <<= prefix_node
783
+ unless prefix_node.complete
784
+ trace('PN incomplete')
785
+ completed = false
786
+ end
787
+ end
788
+
789
+ value_node = @buffers.delete(:param_value)
790
+ unless value_node.nil?
791
+ param_node <<= value_node
792
+ unless value_node.complete
793
+ trace('VN incomplete')
794
+ completed = false
795
+ end
796
+ else
797
+ completed = false
798
+ end
799
+
800
+ param_node.complete = completed
801
+ @buffers[:parameter] = param_node
467
802
  end
468
803
  begin
469
804
 
470
- @buffers[:string] ||= []
471
- yield @buffers[:string]
805
+ trace('PARAMETER yield_parameter')
806
+ yield @buffers[:parameter]
472
807
  end
473
- end
474
- end
808
+ when 6 then
809
+ begin
475
810
 
476
- end
477
- if _goto_level <= _out
478
- break
479
- end
480
- end
481
- end
811
+ trace('STRING eof_string')
812
+ p_end = p
813
+ chars = data[p_start...p_end]
814
+ ast_node = string(utf8_string(chars), complete: false)
815
+ @buffers[:string] = ast_node
816
+ end
817
+ begin
482
818
 
483
- class << self
484
- attr_accessor :_bel_trans_keys
485
- private :_bel_trans_keys, :_bel_trans_keys=
486
- end
487
- self._bel_trans_keys = [
488
- 0, 0, 9, 122, 9, 122,
489
- 34, 92, 10, 10, 92,
490
- 92, 10, 122, 10, 122,
491
- 48, 122, 10, 122, 34, 34,
492
- 34, 92, 10, 10, 92,
493
- 92, 0, 0, 0, 0,
494
- 0, 0, 0
495
- ]
819
+ trace('STRING a_string_err')
820
+ p_end = p
821
+ chars = data[p_start...p_end]
822
+ ast_node = string(utf8_string(chars), complete: false)
823
+ @buffers[:string] = ast_node
824
+ end
825
+ begin
496
826
 
497
- class << self
498
- attr_accessor :_bel_key_spans
499
- private :_bel_key_spans, :_bel_key_spans=
500
- end
501
- self._bel_key_spans = [
502
- 0, 114, 114, 59, 1, 1, 113, 113,
503
- 75, 113, 1, 59, 1, 1, 0, 0,
504
- 0
505
- ]
827
+ trace("PARAMETER parameter_node_eof")
828
+ param_node = parameter()
829
+ completed = true
830
+ prefix_node = @buffers.delete(:param_prefix)
831
+ unless prefix_node.nil?
832
+ param_node <<= prefix_node
833
+ unless prefix_node.complete
834
+ completed = false
835
+ end
836
+ end
506
837
 
507
- class << self
508
- attr_accessor :_bel_index_offsets
509
- private :_bel_index_offsets, :_bel_index_offsets=
510
- end
511
- self._bel_index_offsets = [
512
- 0, 0, 115, 230, 290, 292, 294, 408,
513
- 522, 598, 712, 714, 774, 776, 778, 779,
514
- 780
515
- ]
838
+ string_value_node = @buffers.delete(:string)
839
+ unless string_value_node.nil?
840
+ param_node <<= string_value_node
841
+ unless string_value_node.complete
842
+ completed = false
843
+ end
844
+ else
845
+ completed = false
846
+ end
516
847
 
517
- class << self
518
- attr_accessor :_bel_indicies
519
- private :_bel_indicies, :_bel_indicies=
520
- end
521
- self._bel_indicies = [
522
- 1, 0, 0, 0, 0, 0, 0, 0,
523
- 0, 0, 0, 0, 0, 0, 0, 0,
524
- 0, 0, 0, 0, 0, 0, 0, 1,
525
- 0, 2, 0, 0, 0, 0, 0, 0,
526
- 0, 0, 0, 0, 0, 0, 0, 3,
527
- 3, 3, 3, 3, 3, 3, 3, 3,
528
- 3, 0, 0, 0, 0, 0, 0, 0,
529
- 3, 3, 3, 3, 3, 3, 3, 3,
530
- 3, 3, 3, 3, 3, 3, 3, 3,
531
- 3, 3, 3, 3, 3, 3, 3, 3,
532
- 3, 3, 0, 0, 0, 0, 3, 0,
533
- 3, 3, 3, 3, 3, 3, 3, 3,
534
- 3, 3, 3, 3, 3, 3, 3, 3,
535
- 3, 3, 3, 3, 3, 3, 3, 3,
536
- 3, 3, 0, 1, 4, 4, 4, 4,
537
- 4, 4, 4, 4, 4, 4, 4, 4,
538
- 4, 4, 4, 4, 4, 4, 4, 4,
539
- 4, 4, 1, 4, 2, 4, 4, 4,
540
- 4, 4, 4, 4, 4, 4, 4, 4,
541
- 4, 4, 5, 5, 5, 5, 5, 5,
542
- 5, 5, 5, 5, 4, 4, 4, 4,
543
- 4, 4, 4, 5, 5, 5, 5, 5,
544
- 5, 5, 5, 5, 5, 5, 5, 5,
545
- 5, 5, 5, 5, 5, 5, 5, 5,
546
- 5, 5, 5, 5, 5, 4, 4, 4,
547
- 4, 5, 4, 5, 5, 5, 5, 5,
548
- 5, 5, 5, 5, 5, 5, 5, 5,
549
- 5, 5, 5, 5, 5, 5, 5, 5,
550
- 5, 5, 5, 5, 5, 4, 7, 6,
551
- 6, 6, 6, 6, 6, 6, 6, 6,
552
- 6, 6, 6, 6, 6, 6, 6, 6,
553
- 6, 6, 6, 6, 6, 6, 6, 6,
554
- 6, 6, 6, 6, 6, 6, 6, 6,
555
- 6, 6, 6, 6, 6, 6, 6, 6,
556
- 6, 6, 6, 6, 6, 6, 6, 6,
557
- 6, 6, 6, 6, 6, 6, 6, 6,
558
- 8, 6, 10, 9, 8, 6, 12, 11,
559
- 11, 11, 11, 11, 11, 11, 11, 11,
560
- 11, 11, 11, 11, 11, 11, 11, 11,
561
- 11, 11, 11, 11, 11, 11, 11, 11,
562
- 11, 11, 11, 11, 11, 11, 11, 11,
563
- 11, 11, 11, 11, 13, 13, 13, 13,
564
- 13, 13, 13, 13, 13, 13, 11, 11,
565
- 11, 11, 11, 11, 11, 13, 13, 13,
566
- 13, 13, 13, 13, 13, 13, 13, 13,
567
- 13, 13, 13, 13, 13, 13, 13, 13,
568
- 13, 13, 13, 13, 13, 13, 13, 11,
569
- 11, 11, 11, 13, 11, 13, 13, 13,
570
- 13, 13, 13, 13, 13, 13, 13, 13,
571
- 13, 13, 13, 13, 13, 13, 13, 13,
572
- 13, 13, 13, 13, 13, 13, 13, 11,
573
- 12, 11, 11, 11, 11, 11, 11, 11,
574
- 11, 11, 11, 11, 11, 11, 11, 11,
575
- 11, 11, 11, 11, 11, 11, 11, 11,
576
- 11, 11, 11, 11, 11, 11, 11, 11,
577
- 11, 11, 11, 11, 11, 11, 14, 14,
578
- 14, 14, 14, 14, 14, 14, 14, 14,
579
- 15, 11, 11, 11, 11, 11, 11, 14,
580
- 14, 14, 14, 14, 14, 14, 14, 14,
581
- 14, 14, 14, 14, 14, 14, 14, 14,
582
- 14, 14, 14, 14, 14, 14, 14, 14,
583
- 14, 11, 11, 11, 11, 14, 11, 14,
584
- 14, 14, 14, 14, 14, 14, 14, 14,
585
- 14, 14, 14, 14, 14, 14, 14, 14,
586
- 14, 14, 14, 14, 14, 14, 14, 14,
587
- 14, 11, 17, 17, 17, 17, 17, 17,
588
- 17, 17, 17, 17, 16, 16, 16, 16,
589
- 16, 16, 16, 17, 17, 17, 17, 17,
590
- 17, 17, 17, 17, 17, 17, 17, 17,
591
- 17, 17, 17, 17, 17, 17, 17, 17,
592
- 17, 17, 17, 17, 17, 16, 16, 16,
593
- 16, 17, 16, 17, 17, 17, 17, 17,
594
- 17, 17, 17, 17, 17, 17, 17, 17,
595
- 17, 17, 17, 17, 17, 17, 17, 17,
596
- 17, 17, 17, 17, 17, 16, 18, 16,
597
- 16, 16, 16, 16, 16, 16, 16, 16,
598
- 16, 16, 16, 16, 16, 16, 16, 16,
599
- 16, 16, 16, 16, 16, 16, 16, 16,
600
- 16, 16, 16, 16, 16, 16, 16, 16,
601
- 16, 16, 16, 16, 19, 19, 19, 19,
602
- 19, 19, 19, 19, 19, 19, 16, 16,
603
- 16, 16, 16, 16, 16, 19, 19, 19,
604
- 19, 19, 19, 19, 19, 19, 19, 19,
605
- 19, 19, 19, 19, 19, 19, 19, 19,
606
- 19, 19, 19, 19, 19, 19, 19, 16,
607
- 16, 16, 16, 19, 16, 19, 19, 19,
608
- 19, 19, 19, 19, 19, 19, 19, 19,
609
- 19, 19, 19, 19, 19, 19, 19, 19,
610
- 19, 19, 19, 19, 19, 19, 19, 16,
611
- 21, 20, 23, 22, 22, 22, 22, 22,
612
- 22, 22, 22, 22, 22, 22, 22, 22,
613
- 22, 22, 22, 22, 22, 22, 22, 22,
614
- 22, 22, 22, 22, 22, 22, 22, 22,
615
- 22, 22, 22, 22, 22, 22, 22, 22,
616
- 22, 22, 22, 22, 22, 22, 22, 22,
617
- 22, 22, 22, 22, 22, 22, 22, 22,
618
- 22, 22, 22, 22, 24, 22, 25, 20,
619
- 24, 22, 26, 26, 26, 0
620
- ]
848
+ param_node.complete = completed
849
+ yield param_node
850
+ end
851
+ when 12 then
852
+ begin
621
853
 
622
- class << self
623
- attr_accessor :_bel_trans_targs
624
- private :_bel_trans_targs, :_bel_trans_targs=
625
- end
626
- self._bel_trans_targs = [
627
- 0, 2, 3, 7, 0, 6, 3, 4,
628
- 5, 0, 14, 0, 14, 6, 7, 2,
629
- 0, 9, 15, 9, 0, 11, 11, 12,
630
- 13, 16, 0
631
- ]
854
+ trace('STRING eof_string')
855
+ p_end = p
856
+ chars = data[p_start...p_end]
857
+ ast_node = string(utf8_string(chars), complete: false)
858
+ @buffers[:string] = ast_node
859
+ end
860
+ begin
632
861
 
633
- class << self
634
- attr_accessor :_bel_trans_actions
635
- private :_bel_trans_actions, :_bel_trans_actions=
636
- end
637
- self._bel_trans_actions = [
638
- 1, 0, 2, 3, 4, 3, 6, 6,
639
- 6, 5, 7, 8, 9, 10, 10, 11,
640
- 12, 3, 13, 10, 14, 2, 6, 6,
641
- 6, 15, 0
642
- ]
862
+ trace('STRING string_node_err')
863
+ p_end = p
864
+ chars = data[p_start...p_end]
865
+ ast_node = string(utf8_string(chars), complete: false)
866
+ yield ast_node
867
+ end
868
+ begin
643
869
 
644
- class << self
645
- attr_accessor :_bel_eof_actions
646
- private :_bel_eof_actions, :_bel_eof_actions=
647
- end
648
- self._bel_eof_actions = [
649
- 0, 1, 4, 5, 5, 5, 8, 8,
650
- 12, 12, 14, 14, 14, 14, 0, 0,
651
- 0
652
- ]
870
+ trace('STRING string_node_eof')
871
+ yield @buffers[:string]
872
+ end
873
+ when 15 then
874
+ begin
653
875
 
654
- class << self
655
- attr_accessor :bel_start
656
- end
657
- self.bel_start = 1;
658
- class << self
659
- attr_accessor :bel_first_final
660
- end
661
- self.bel_first_final = 14;
662
- class << self
663
- attr_accessor :bel_error
664
- end
665
- self.bel_error = 0;
876
+ trace('PARAMETER add_string_param_value')
877
+ string_node = @buffers.delete(:string)
878
+ value_node = value(string_node, complete: string_node.complete)
879
+ @buffers[:param_value] = value_node
880
+ end
881
+ begin
666
882
 
667
- class << self
668
- attr_accessor :bel_en_ident
669
- end
670
- self.bel_en_ident = 8;
671
- class << self
672
- attr_accessor :bel_en_string
673
- end
674
- self.bel_en_string = 10;
675
- class << self
676
- attr_accessor :bel_en_bel_parameter
677
- end
678
- self.bel_en_bel_parameter = 1;
883
+ trace('PARAMETER parameter_end')
884
+ param_node = parameter()
885
+ completed = true
886
+ prefix_node = @buffers.delete(:param_prefix)
887
+ unless prefix_node.nil?
888
+ param_node <<= prefix_node
889
+ unless prefix_node.complete
890
+ trace('PN incomplete')
891
+ completed = false
892
+ end
893
+ end
679
894
 
895
+ value_node = @buffers.delete(:param_value)
896
+ unless value_node.nil?
897
+ param_node <<= value_node
898
+ unless value_node.complete
899
+ trace('VN incomplete')
900
+ completed = false
901
+ end
902
+ else
903
+ completed = false
904
+ end
680
905
 
681
- begin
682
- p ||= 0
683
- pe ||= data.length
684
- cs = bel_start
685
- end
686
-
687
- begin
688
- testEof = false
689
- _slen, _trans, _keys, _inds, _acts, _nacts = nil
690
- _goto_level = 0
691
- _resume = 10
692
- _eof_trans = 15
693
- _again = 20
694
- _test_eof = 30
695
- _out = 40
696
- while true
697
- if _goto_level <= 0
698
- if p == pe
699
- _goto_level = _test_eof
700
- next
701
- end
702
- if cs == 0
703
- _goto_level = _out
704
- next
705
- end
706
- end
707
- if _goto_level <= _resume
708
- _keys = cs << 1
709
- _inds = _bel_index_offsets[cs]
710
- _slen = _bel_key_spans[cs]
711
- _wide = data[p].ord
712
- _trans = if ( _slen > 0 &&
713
- _bel_trans_keys[_keys] <= _wide &&
714
- _wide <= _bel_trans_keys[_keys + 1]
715
- ) then
716
- _bel_indicies[ _inds + _wide - _bel_trans_keys[_keys] ]
717
- else
718
- _bel_indicies[ _inds + _slen ]
719
- end
720
- cs = _bel_trans_targs[_trans]
721
- if _bel_trans_actions[_trans] != 0
722
- case _bel_trans_actions[_trans]
723
- when 10 then
724
- begin
725
-
726
- (@buffers[:ident] ||= []) << data[p].ord
727
- end
728
- when 8 then
729
- begin
730
-
731
- unless @buffers[:ident].is_a?(::AST::Node)
732
- @buffers[:ident] ||= []
733
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]).sub(/\n$/, ''))
734
- end
735
- end
736
- when 6 then
737
- begin
738
-
739
- (@buffers[:string] ||= []) << data[p].ord
740
- end
741
- when 5 then
742
- begin
743
-
744
- @buffers[:string] ||= []
745
- @buffers[:string] = string(utf8_string(@buffers[:string]).sub(/\n$/, ''))
746
- end
747
- when 3 then
748
- begin
749
-
750
- @buffers[:ident] = []
906
+ param_node.complete = completed
907
+ @buffers[:parameter] = param_node
751
908
  end
752
909
  begin
753
910
 
754
- (@buffers[:ident] ||= []) << data[p].ord
911
+ trace('PARAMETER yield_parameter')
912
+ yield @buffers[:parameter]
755
913
  end
756
- when 13 then
914
+ when 1 then
757
915
  begin
758
916
 
759
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]))
917
+ trace('IDENTIFIER an_ident_eof')
918
+ if @identifier_started
919
+ id_end = p
920
+ chars = data[id_start...id_end]
921
+ completed = !chars.empty?
922
+ ast_node = identifier(utf8_string(chars), complete: completed)
923
+ @buffers[:ident] = ast_node
924
+ end
760
925
  end
761
926
  begin
762
927
 
763
- yield @buffers[:ident]
928
+ trace('IDENTIFIER an_ident_err')
929
+ id_end = p
930
+ chars = data[id_start...id_end]
931
+ ast_node = identifier(utf8_string(chars), complete: false)
932
+ @buffers[:ident] = ast_node
764
933
  end
765
- when 11 then
766
934
  begin
767
935
 
768
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]))
936
+ trace('STRING a_string_err')
937
+ p_end = p
938
+ chars = data[p_start...p_end]
939
+ ast_node = string(utf8_string(chars), complete: false)
940
+ @buffers[:string] = ast_node
769
941
  end
770
942
  begin
771
943
 
772
- @buffers[:parameter] = parameter(prefix(@buffers[:ident]))
773
- end
774
- when 12 then
775
- begin
944
+ trace("PARAMETER parameter_node_eof")
945
+ param_node = parameter()
946
+ completed = true
947
+ prefix_node = @buffers.delete(:param_prefix)
948
+ unless prefix_node.nil?
949
+ param_node <<= prefix_node
950
+ unless prefix_node.complete
951
+ completed = false
952
+ end
953
+ end
776
954
 
777
- unless @buffers[:ident].is_a?(::AST::Node)
778
- @buffers[:ident] ||= []
779
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]).sub(/\n$/, ''))
955
+ string_value_node = @buffers.delete(:string)
956
+ unless string_value_node.nil?
957
+ param_node <<= string_value_node
958
+ unless string_value_node.complete
959
+ completed = false
960
+ end
961
+ else
962
+ completed = false
780
963
  end
781
- end
782
- begin
783
964
 
784
- @buffers[:ident] ||= []
785
- yield @buffers[:ident]
965
+ param_node.complete = completed
966
+ yield param_node
786
967
  end
787
- when 1 then
968
+ when 21 then
788
969
  begin
789
970
 
790
- unless @buffers[:ident].is_a?(::AST::Node)
791
- @buffers[:ident] ||= []
792
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]).sub(/\n$/, ''))
971
+ trace('IDENTIFIER an_ident_eof')
972
+ if @identifier_started
973
+ id_end = p
974
+ chars = data[id_start...id_end]
975
+ completed = !chars.empty?
976
+ ast_node = identifier(utf8_string(chars), complete: completed)
977
+ @buffers[:ident] = ast_node
793
978
  end
794
979
  end
795
980
  begin
796
981
 
797
- @buffers[:string] ||= []
798
- @buffers[:string] = string(utf8_string(@buffers[:string]).sub(/\n$/, ''))
982
+ trace('PARAMETER add_prefix')
983
+ ident = @buffers.delete(:ident)
984
+ prefix_node = prefix(ident, complete: ident.complete)
985
+ @buffers[:param_prefix] = prefix_node
799
986
  end
800
- when 2 then
801
987
  begin
802
988
 
803
- @buffers[:string] = []
804
- end
805
- begin
989
+ trace('PARAMETER parameter_end')
990
+ param_node = parameter()
991
+ completed = true
992
+ prefix_node = @buffers.delete(:param_prefix)
993
+ unless prefix_node.nil?
994
+ param_node <<= prefix_node
995
+ unless prefix_node.complete
996
+ trace('PN incomplete')
997
+ completed = false
998
+ end
999
+ end
806
1000
 
807
- (@buffers[:string] ||= []) << data[p].ord
808
- end
809
- when 15 then
810
- begin
1001
+ value_node = @buffers.delete(:param_value)
1002
+ unless value_node.nil?
1003
+ param_node <<= value_node
1004
+ unless value_node.complete
1005
+ trace('VN incomplete')
1006
+ completed = false
1007
+ end
1008
+ else
1009
+ completed = false
1010
+ end
811
1011
 
812
- @buffers[:string] = string(utf8_string(@buffers[:string]))
1012
+ param_node.complete = completed
1013
+ @buffers[:parameter] = param_node
813
1014
  end
814
1015
  begin
815
1016
 
816
- yield @buffers[:string]
1017
+ trace('PARAMETER yield_parameter')
1018
+ yield @buffers[:parameter]
817
1019
  end
818
- when 4 then
1020
+ when 16 then
819
1021
  begin
820
1022
 
821
- @buffers[:string] ||= []
822
- @buffers[:string] = string(utf8_string(@buffers[:string]).sub(/\n$/, ''))
1023
+ trace('IDENTIFIER end_identifier')
1024
+ id_end = p
1025
+ chars = data[id_start...id_end]
1026
+ completed = !chars.empty?
1027
+ ast_node = identifier(utf8_string(chars), complete: completed)
1028
+ @buffers[:ident] = ast_node
823
1029
  end
824
1030
  begin
825
1031
 
826
- unless @buffers[:ident].is_a?(::AST::Node)
827
- @buffers[:ident] ||= []
828
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]).sub(/\n$/, ''))
1032
+ trace('IDENTIFIER an_ident_eof')
1033
+ if @identifier_started
1034
+ id_end = p
1035
+ chars = data[id_start...id_end]
1036
+ completed = !chars.empty?
1037
+ ast_node = identifier(utf8_string(chars), complete: completed)
1038
+ @buffers[:ident] = ast_node
829
1039
  end
830
1040
  end
831
- when 14 then
832
- begin
833
-
834
- @buffers[:string] ||= []
835
- @buffers[:string] = string(utf8_string(@buffers[:string]).sub(/\n$/, ''))
836
- end
837
- begin
838
-
839
- @buffers[:string] ||= []
840
- yield @buffers[:string]
841
- end
842
- when 9 then
843
- begin
844
-
845
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]))
846
- end
847
1041
  begin
848
1042
 
849
- @buffers[:parameter] ||= parameter(prefix(nil))
850
- @buffers[:parameter] = @buffers[:parameter] << value(@buffers[:ident])
1043
+ trace('PARAMETER add_ident_param_value')
1044
+ ident = @buffers.delete(:ident)
1045
+ value_node = value(ident, complete: ident.complete)
1046
+ @buffers[:param_value] = value_node
851
1047
  end
852
1048
  begin
853
1049
 
854
- yield @buffers[:parameter]
855
- end
856
- when 7 then
857
- begin
1050
+ trace('PARAMETER parameter_end')
1051
+ param_node = parameter()
1052
+ completed = true
1053
+ prefix_node = @buffers.delete(:param_prefix)
1054
+ unless prefix_node.nil?
1055
+ param_node <<= prefix_node
1056
+ unless prefix_node.complete
1057
+ trace('PN incomplete')
1058
+ completed = false
1059
+ end
1060
+ end
858
1061
 
859
- @buffers[:string] = string(utf8_string(@buffers[:string]))
860
- end
861
- begin
1062
+ value_node = @buffers.delete(:param_value)
1063
+ unless value_node.nil?
1064
+ param_node <<= value_node
1065
+ unless value_node.complete
1066
+ trace('VN incomplete')
1067
+ completed = false
1068
+ end
1069
+ else
1070
+ completed = false
1071
+ end
862
1072
 
863
- @buffers[:parameter] ||= parameter(prefix(nil))
864
- @buffers[:parameter] = @buffers[:parameter] << value(@buffers[:string])
1073
+ param_node.complete = completed
1074
+ @buffers[:parameter] = param_node
865
1075
  end
866
1076
  begin
867
1077
 
1078
+ trace('PARAMETER yield_parameter')
868
1079
  yield @buffers[:parameter]
869
1080
  end
870
- end
871
- end
872
- end
873
- if _goto_level <= _again
874
- if cs == 0
875
- _goto_level = _out
876
- next
877
- end
878
- p += 1
879
- if p != pe
880
- _goto_level = _resume
881
- next
882
- end
883
- end
884
- if _goto_level <= _test_eof
885
- if p == eof
886
- case _bel_eof_actions[cs]
887
- when 8 then
1081
+ when 19 then
888
1082
  begin
889
1083
 
890
- unless @buffers[:ident].is_a?(::AST::Node)
891
- @buffers[:ident] ||= []
892
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]).sub(/\n$/, ''))
1084
+ trace('IDENTIFIER an_ident_eof')
1085
+ if @identifier_started
1086
+ id_end = p
1087
+ chars = data[id_start...id_end]
1088
+ completed = !chars.empty?
1089
+ ast_node = identifier(utf8_string(chars), complete: completed)
1090
+ @buffers[:ident] = ast_node
893
1091
  end
894
1092
  end
895
- when 5 then
896
- begin
897
-
898
- @buffers[:string] ||= []
899
- @buffers[:string] = string(utf8_string(@buffers[:string]).sub(/\n$/, ''))
900
- end
901
- when 12 then
902
1093
  begin
903
1094
 
904
- unless @buffers[:ident].is_a?(::AST::Node)
905
- @buffers[:ident] ||= []
906
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]).sub(/\n$/, ''))
907
- end
1095
+ trace('IDENTIFIER end_identifier')
1096
+ id_end = p
1097
+ chars = data[id_start...id_end]
1098
+ completed = !chars.empty?
1099
+ ast_node = identifier(utf8_string(chars), complete: completed)
1100
+ @buffers[:ident] = ast_node
908
1101
  end
909
1102
  begin
910
1103
 
911
- @buffers[:ident] ||= []
912
- yield @buffers[:ident]
1104
+ trace('PARAMETER add_ident_param_value')
1105
+ ident = @buffers.delete(:ident)
1106
+ value_node = value(ident, complete: ident.complete)
1107
+ @buffers[:param_value] = value_node
913
1108
  end
914
- when 1 then
915
1109
  begin
916
1110
 
917
- unless @buffers[:ident].is_a?(::AST::Node)
918
- @buffers[:ident] ||= []
919
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]).sub(/\n$/, ''))
1111
+ trace('PARAMETER parameter_end')
1112
+ param_node = parameter()
1113
+ completed = true
1114
+ prefix_node = @buffers.delete(:param_prefix)
1115
+ unless prefix_node.nil?
1116
+ param_node <<= prefix_node
1117
+ unless prefix_node.complete
1118
+ trace('PN incomplete')
1119
+ completed = false
1120
+ end
920
1121
  end
921
- end
922
- begin
923
-
924
- @buffers[:string] ||= []
925
- @buffers[:string] = string(utf8_string(@buffers[:string]).sub(/\n$/, ''))
926
- end
927
- when 4 then
928
- begin
929
-
930
- @buffers[:string] ||= []
931
- @buffers[:string] = string(utf8_string(@buffers[:string]).sub(/\n$/, ''))
932
- end
933
- begin
934
1122
 
935
- unless @buffers[:ident].is_a?(::AST::Node)
936
- @buffers[:ident] ||= []
937
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]).sub(/\n$/, ''))
1123
+ value_node = @buffers.delete(:param_value)
1124
+ unless value_node.nil?
1125
+ param_node <<= value_node
1126
+ unless value_node.complete
1127
+ trace('VN incomplete')
1128
+ completed = false
1129
+ end
1130
+ else
1131
+ completed = false
938
1132
  end
939
- end
940
- when 14 then
941
- begin
942
1133
 
943
- @buffers[:string] ||= []
944
- @buffers[:string] = string(utf8_string(@buffers[:string]).sub(/\n$/, ''))
1134
+ param_node.complete = completed
1135
+ @buffers[:parameter] = param_node
945
1136
  end
946
1137
  begin
947
1138
 
948
- @buffers[:string] ||= []
949
- yield @buffers[:string]
1139
+ trace('PARAMETER yield_parameter')
1140
+ yield @buffers[:parameter]
950
1141
  end
951
1142
  end
952
1143
  end
@@ -958,55 +1149,20 @@ begin
958
1149
  end
959
1150
  end
960
1151
 
961
-
962
- =end
963
- # end: ragel
964
-
965
- require_relative '../ast/node'
966
- require_relative '../mixin/buffer'
967
- require_relative '../nonblocking_io_wrapper'
968
-
969
- module BELParser
970
- module Parsers
971
- module Expression
972
- module Parameter
973
-
974
- class << self
975
-
976
- MAX_LENGTH = 1024 * 128 # 128K
977
-
978
- def parse(content)
979
- return nil unless content
980
-
981
- Parser.new(content).each do |obj|
982
- yield obj
983
- end
984
- end
985
- end
986
-
987
- private
988
-
989
- class Parser
990
- include Enumerable
991
- include BELParser::Parsers::Buffer
992
- include BELParser::Parsers::AST::Sexp
993
-
994
- def initialize(content)
995
- @content = content
996
- # begin: ragel
997
-
998
1152
  class << self
999
1153
  attr_accessor :_bel_trans_keys
1000
1154
  private :_bel_trans_keys, :_bel_trans_keys=
1001
1155
  end
1002
1156
  self._bel_trans_keys = [
1003
1157
  0, 0, 9, 122, 9, 122,
1004
- 34, 92, 10, 10, 92,
1005
- 92, 10, 122, 10, 122,
1006
- 48, 122, 10, 122, 34, 34,
1007
- 34, 92, 10, 10, 92,
1008
- 92, 0, 0, 0, 0,
1009
- 0, 0, 0
1158
+ 9, 34, 34, 92, 34,
1159
+ 92, 0, 0, 48, 122,
1160
+ 9, 34, 34, 92, 34, 92,
1161
+ 0, 0, 10, 10, 0,
1162
+ 0, 10, 122, 10, 122,
1163
+ 9, 122, 9, 122, 9, 34,
1164
+ 10, 122, 0, 0, 0,
1165
+ 0, 0
1010
1166
  ]
1011
1167
 
1012
1168
  class << self
@@ -1014,9 +1170,9 @@ class << self
1014
1170
  private :_bel_key_spans, :_bel_key_spans=
1015
1171
  end
1016
1172
  self._bel_key_spans = [
1017
- 0, 114, 114, 59, 1, 1, 113, 113,
1018
- 75, 113, 1, 59, 1, 1, 0, 0,
1019
- 0
1173
+ 0, 114, 114, 26, 59, 59, 0, 75,
1174
+ 26, 59, 59, 0, 1, 0, 113, 113,
1175
+ 114, 114, 26, 113, 0, 0
1020
1176
  ]
1021
1177
 
1022
1178
  class << self
@@ -1024,9 +1180,9 @@ class << self
1024
1180
  private :_bel_index_offsets, :_bel_index_offsets=
1025
1181
  end
1026
1182
  self._bel_index_offsets = [
1027
- 0, 0, 115, 230, 290, 292, 294, 408,
1028
- 522, 598, 712, 714, 774, 776, 778, 779,
1029
- 780
1183
+ 0, 0, 115, 230, 257, 317, 377, 378,
1184
+ 454, 481, 541, 601, 602, 604, 605, 719,
1185
+ 833, 948, 1063, 1090, 1204, 1205
1030
1186
  ]
1031
1187
 
1032
1188
  class << self
@@ -1034,104 +1190,157 @@ class << self
1034
1190
  private :_bel_indicies, :_bel_indicies=
1035
1191
  end
1036
1192
  self._bel_indicies = [
1037
- 1, 0, 0, 0, 0, 0, 0, 0,
1193
+ 1, 2, 2, 2, 2, 0, 0, 0,
1038
1194
  0, 0, 0, 0, 0, 0, 0, 0,
1039
1195
  0, 0, 0, 0, 0, 0, 0, 1,
1040
- 0, 2, 0, 0, 0, 0, 0, 0,
1041
- 0, 0, 0, 0, 0, 0, 0, 3,
1042
- 3, 3, 3, 3, 3, 3, 3, 3,
1043
- 3, 0, 0, 0, 0, 0, 0, 0,
1044
- 3, 3, 3, 3, 3, 3, 3, 3,
1045
- 3, 3, 3, 3, 3, 3, 3, 3,
1046
- 3, 3, 3, 3, 3, 3, 3, 3,
1047
- 3, 3, 0, 0, 0, 0, 3, 0,
1048
- 3, 3, 3, 3, 3, 3, 3, 3,
1049
- 3, 3, 3, 3, 3, 3, 3, 3,
1050
- 3, 3, 3, 3, 3, 3, 3, 3,
1051
- 3, 3, 0, 1, 4, 4, 4, 4,
1196
+ 0, 3, 0, 0, 0, 0, 0, 0,
1197
+ 0, 0, 0, 0, 0, 0, 0, 4,
1198
+ 4, 4, 4, 4, 4, 4, 4, 4,
1199
+ 4, 0, 0, 0, 0, 0, 0, 0,
1200
+ 4, 4, 4, 4, 4, 4, 4, 4,
1052
1201
  4, 4, 4, 4, 4, 4, 4, 4,
1053
1202
  4, 4, 4, 4, 4, 4, 4, 4,
1054
- 4, 4, 1, 4, 2, 4, 4, 4,
1203
+ 4, 4, 0, 0, 0, 0, 4, 0,
1055
1204
  4, 4, 4, 4, 4, 4, 4, 4,
1056
- 4, 4, 5, 5, 5, 5, 5, 5,
1057
- 5, 5, 5, 5, 4, 4, 4, 4,
1058
- 4, 4, 4, 5, 5, 5, 5, 5,
1205
+ 4, 4, 4, 4, 4, 4, 4, 4,
1206
+ 4, 4, 4, 4, 4, 4, 4, 4,
1207
+ 4, 4, 0, 1, 2, 2, 2, 2,
1208
+ 0, 0, 0, 0, 0, 0, 0, 0,
1209
+ 0, 0, 0, 0, 0, 0, 0, 0,
1210
+ 0, 0, 1, 0, 3, 0, 0, 0,
1211
+ 0, 0, 0, 0, 0, 0, 0, 0,
1212
+ 0, 0, 5, 5, 5, 5, 5, 5,
1213
+ 5, 5, 5, 5, 0, 0, 0, 0,
1214
+ 0, 0, 0, 5, 5, 5, 5, 5,
1059
1215
  5, 5, 5, 5, 5, 5, 5, 5,
1060
1216
  5, 5, 5, 5, 5, 5, 5, 5,
1061
- 5, 5, 5, 5, 5, 4, 4, 4,
1062
- 4, 5, 4, 5, 5, 5, 5, 5,
1217
+ 5, 5, 5, 5, 5, 0, 0, 0,
1218
+ 0, 5, 0, 5, 5, 5, 5, 5,
1063
1219
  5, 5, 5, 5, 5, 5, 5, 5,
1064
1220
  5, 5, 5, 5, 5, 5, 5, 5,
1065
- 5, 5, 5, 5, 5, 4, 7, 6,
1066
- 6, 6, 6, 6, 6, 6, 6, 6,
1067
- 6, 6, 6, 6, 6, 6, 6, 6,
1068
- 6, 6, 6, 6, 6, 6, 6, 6,
1221
+ 5, 5, 5, 5, 5, 0, 2, 2,
1222
+ 2, 2, 2, 6, 6, 6, 6, 6,
1069
1223
  6, 6, 6, 6, 6, 6, 6, 6,
1070
- 6, 6, 6, 6, 6, 6, 6, 6,
1071
- 6, 6, 6, 6, 6, 6, 6, 6,
1072
- 6, 6, 6, 6, 6, 6, 6, 6,
1073
- 8, 6, 10, 9, 8, 6, 12, 11,
1074
- 11, 11, 11, 11, 11, 11, 11, 11,
1075
- 11, 11, 11, 11, 11, 11, 11, 11,
1076
- 11, 11, 11, 11, 11, 11, 11, 11,
1077
- 11, 11, 11, 11, 11, 11, 11, 11,
1078
- 11, 11, 11, 11, 13, 13, 13, 13,
1079
- 13, 13, 13, 13, 13, 13, 11, 11,
1080
- 11, 11, 11, 11, 11, 13, 13, 13,
1224
+ 6, 6, 6, 6, 6, 2, 6, 3,
1225
+ 6, 8, 7, 7, 7, 7, 7, 7,
1226
+ 7, 7, 7, 7, 7, 7, 7, 7,
1227
+ 7, 7, 7, 7, 7, 7, 7, 7,
1228
+ 7, 7, 7, 7, 7, 7, 7, 7,
1229
+ 7, 7, 7, 7, 7, 7, 7, 7,
1230
+ 7, 7, 7, 7, 7, 7, 7, 7,
1231
+ 7, 7, 7, 7, 7, 7, 7, 7,
1232
+ 7, 7, 7, 9, 7, 11, 10, 10,
1233
+ 10, 10, 10, 10, 10, 10, 10, 10,
1234
+ 10, 10, 10, 10, 10, 10, 10, 10,
1235
+ 10, 10, 10, 10, 10, 10, 10, 10,
1236
+ 10, 10, 10, 10, 10, 10, 10, 10,
1237
+ 10, 10, 10, 10, 10, 10, 10, 10,
1238
+ 10, 10, 10, 10, 10, 10, 10, 10,
1239
+ 10, 10, 10, 10, 10, 10, 10, 12,
1240
+ 10, 10, 13, 13, 13, 13, 13, 13,
1241
+ 13, 13, 13, 13, 14, 14, 14, 14,
1242
+ 14, 14, 14, 13, 13, 13, 13, 13,
1081
1243
  13, 13, 13, 13, 13, 13, 13, 13,
1082
1244
  13, 13, 13, 13, 13, 13, 13, 13,
1083
- 13, 13, 13, 13, 13, 13, 13, 11,
1084
- 11, 11, 11, 13, 11, 13, 13, 13,
1245
+ 13, 13, 13, 13, 13, 14, 14, 14,
1246
+ 14, 13, 14, 13, 13, 13, 13, 13,
1085
1247
  13, 13, 13, 13, 13, 13, 13, 13,
1086
1248
  13, 13, 13, 13, 13, 13, 13, 13,
1087
- 13, 13, 13, 13, 13, 13, 13, 11,
1088
- 12, 11, 11, 11, 11, 11, 11, 11,
1089
- 11, 11, 11, 11, 11, 11, 11, 11,
1090
- 11, 11, 11, 11, 11, 11, 11, 11,
1091
- 11, 11, 11, 11, 11, 11, 11, 11,
1092
- 11, 11, 11, 11, 11, 11, 14, 14,
1093
- 14, 14, 14, 14, 14, 14, 14, 14,
1094
- 15, 11, 11, 11, 11, 11, 11, 14,
1095
- 14, 14, 14, 14, 14, 14, 14, 14,
1096
- 14, 14, 14, 14, 14, 14, 14, 14,
1097
- 14, 14, 14, 14, 14, 14, 14, 14,
1098
- 14, 11, 11, 11, 11, 14, 11, 14,
1099
- 14, 14, 14, 14, 14, 14, 14, 14,
1100
- 14, 14, 14, 14, 14, 14, 14, 14,
1101
- 14, 14, 14, 14, 14, 14, 14, 14,
1102
- 14, 11, 17, 17, 17, 17, 17, 17,
1103
- 17, 17, 17, 17, 16, 16, 16, 16,
1104
- 16, 16, 16, 17, 17, 17, 17, 17,
1105
- 17, 17, 17, 17, 17, 17, 17, 17,
1106
- 17, 17, 17, 17, 17, 17, 17, 17,
1107
- 17, 17, 17, 17, 17, 16, 16, 16,
1108
- 16, 17, 16, 17, 17, 17, 17, 17,
1109
- 17, 17, 17, 17, 17, 17, 17, 17,
1110
- 17, 17, 17, 17, 17, 17, 17, 17,
1111
- 17, 17, 17, 17, 17, 16, 18, 16,
1112
- 16, 16, 16, 16, 16, 16, 16, 16,
1113
- 16, 16, 16, 16, 16, 16, 16, 16,
1114
- 16, 16, 16, 16, 16, 16, 16, 16,
1115
- 16, 16, 16, 16, 16, 16, 16, 16,
1116
- 16, 16, 16, 16, 19, 19, 19, 19,
1117
- 19, 19, 19, 19, 19, 19, 16, 16,
1118
- 16, 16, 16, 16, 16, 19, 19, 19,
1119
- 19, 19, 19, 19, 19, 19, 19, 19,
1120
- 19, 19, 19, 19, 19, 19, 19, 19,
1121
- 19, 19, 19, 19, 19, 19, 19, 16,
1122
- 16, 16, 16, 19, 16, 19, 19, 19,
1123
- 19, 19, 19, 19, 19, 19, 19, 19,
1124
- 19, 19, 19, 19, 19, 19, 19, 19,
1125
- 19, 19, 19, 19, 19, 19, 19, 16,
1126
- 21, 20, 23, 22, 22, 22, 22, 22,
1127
- 22, 22, 22, 22, 22, 22, 22, 22,
1128
- 22, 22, 22, 22, 22, 22, 22, 22,
1129
- 22, 22, 22, 22, 22, 22, 22, 22,
1130
- 22, 22, 22, 22, 22, 22, 22, 22,
1131
- 22, 22, 22, 22, 22, 22, 22, 22,
1132
- 22, 22, 22, 22, 22, 22, 22, 22,
1133
- 22, 22, 22, 22, 24, 22, 25, 20,
1134
- 24, 22, 26, 26, 26, 0
1249
+ 13, 13, 13, 13, 13, 14, 16, 16,
1250
+ 16, 16, 16, 15, 15, 15, 15, 15,
1251
+ 15, 15, 15, 15, 15, 15, 15, 15,
1252
+ 15, 15, 15, 15, 15, 16, 15, 17,
1253
+ 15, 19, 18, 18, 18, 18, 18, 18,
1254
+ 18, 18, 18, 18, 18, 18, 18, 18,
1255
+ 18, 18, 18, 18, 18, 18, 18, 18,
1256
+ 18, 18, 18, 18, 18, 18, 18, 18,
1257
+ 18, 18, 18, 18, 18, 18, 18, 18,
1258
+ 18, 18, 18, 18, 18, 18, 18, 18,
1259
+ 18, 18, 18, 18, 18, 18, 18, 18,
1260
+ 18, 18, 18, 20, 18, 22, 21, 21,
1261
+ 21, 21, 21, 21, 21, 21, 21, 21,
1262
+ 21, 21, 21, 21, 21, 21, 21, 21,
1263
+ 21, 21, 21, 21, 21, 21, 21, 21,
1264
+ 21, 21, 21, 21, 21, 21, 21, 21,
1265
+ 21, 21, 21, 21, 21, 21, 21, 21,
1266
+ 21, 21, 21, 21, 21, 21, 21, 21,
1267
+ 21, 21, 21, 21, 21, 21, 21, 23,
1268
+ 21, 21, 24, 6, 14, 26, 25, 25,
1269
+ 25, 25, 25, 25, 25, 25, 25, 25,
1270
+ 25, 25, 25, 25, 25, 25, 25, 25,
1271
+ 25, 25, 25, 25, 25, 25, 25, 25,
1272
+ 25, 25, 25, 25, 25, 25, 25, 25,
1273
+ 25, 25, 25, 27, 27, 27, 27, 27,
1274
+ 27, 27, 27, 27, 27, 25, 25, 25,
1275
+ 25, 25, 25, 25, 27, 27, 27, 27,
1276
+ 27, 27, 27, 27, 27, 27, 27, 27,
1277
+ 27, 27, 27, 27, 27, 27, 27, 27,
1278
+ 27, 27, 27, 27, 27, 27, 25, 25,
1279
+ 25, 25, 27, 25, 27, 27, 27, 27,
1280
+ 27, 27, 27, 27, 27, 27, 27, 27,
1281
+ 27, 27, 27, 27, 27, 27, 27, 27,
1282
+ 27, 27, 27, 27, 27, 27, 25, 26,
1283
+ 25, 25, 25, 25, 25, 25, 25, 25,
1284
+ 25, 25, 25, 25, 25, 25, 25, 25,
1285
+ 25, 25, 25, 25, 25, 25, 25, 25,
1286
+ 25, 25, 25, 25, 25, 25, 25, 25,
1287
+ 25, 25, 25, 25, 25, 28, 28, 28,
1288
+ 28, 28, 28, 28, 28, 28, 28, 29,
1289
+ 25, 25, 25, 25, 25, 25, 28, 28,
1290
+ 28, 28, 28, 28, 28, 28, 28, 28,
1291
+ 28, 28, 28, 28, 28, 28, 28, 28,
1292
+ 28, 28, 28, 28, 28, 28, 28, 28,
1293
+ 25, 25, 25, 25, 28, 25, 28, 28,
1294
+ 28, 28, 28, 28, 28, 28, 28, 28,
1295
+ 28, 28, 28, 28, 28, 28, 28, 28,
1296
+ 28, 28, 28, 28, 28, 28, 28, 28,
1297
+ 25, 30, 31, 32, 32, 32, 0, 0,
1298
+ 0, 0, 0, 0, 0, 0, 0, 0,
1299
+ 0, 0, 0, 0, 0, 0, 0, 0,
1300
+ 30, 0, 33, 0, 0, 0, 0, 0,
1301
+ 0, 0, 0, 0, 0, 0, 0, 0,
1302
+ 34, 34, 34, 34, 34, 34, 34, 34,
1303
+ 34, 34, 0, 0, 0, 0, 0, 0,
1304
+ 0, 34, 34, 34, 34, 34, 34, 34,
1305
+ 34, 34, 34, 34, 34, 34, 34, 34,
1306
+ 34, 34, 34, 34, 34, 34, 34, 34,
1307
+ 34, 34, 34, 0, 0, 0, 0, 34,
1308
+ 0, 34, 34, 34, 34, 34, 34, 34,
1309
+ 34, 34, 34, 34, 34, 34, 34, 34,
1310
+ 34, 34, 34, 34, 34, 34, 34, 34,
1311
+ 34, 34, 34, 0, 35, 36, 2, 2,
1312
+ 2, 0, 0, 0, 0, 0, 0, 0,
1313
+ 0, 0, 0, 0, 0, 0, 0, 0,
1314
+ 0, 0, 0, 35, 0, 3, 0, 0,
1315
+ 0, 0, 0, 0, 0, 0, 0, 0,
1316
+ 0, 0, 0, 5, 5, 5, 5, 5,
1317
+ 5, 5, 5, 5, 5, 0, 0, 0,
1318
+ 0, 0, 0, 0, 5, 5, 5, 5,
1319
+ 5, 5, 5, 5, 5, 5, 5, 5,
1320
+ 5, 5, 5, 5, 5, 5, 5, 5,
1321
+ 5, 5, 5, 5, 5, 5, 0, 0,
1322
+ 0, 0, 5, 0, 5, 5, 5, 5,
1323
+ 5, 5, 5, 5, 5, 5, 5, 5,
1324
+ 5, 5, 5, 5, 5, 5, 5, 5,
1325
+ 5, 5, 5, 5, 5, 5, 0, 2,
1326
+ 2, 2, 2, 2, 6, 6, 6, 6,
1327
+ 6, 6, 6, 6, 6, 6, 6, 6,
1328
+ 6, 6, 6, 6, 6, 6, 2, 6,
1329
+ 3, 6, 38, 37, 37, 37, 37, 37,
1330
+ 37, 37, 37, 37, 37, 37, 37, 37,
1331
+ 37, 37, 37, 37, 37, 37, 37, 37,
1332
+ 37, 37, 37, 37, 37, 37, 37, 37,
1333
+ 37, 37, 37, 37, 37, 37, 37, 37,
1334
+ 39, 39, 39, 39, 39, 39, 39, 39,
1335
+ 39, 39, 37, 37, 37, 37, 37, 37,
1336
+ 37, 39, 39, 39, 39, 39, 39, 39,
1337
+ 39, 39, 39, 39, 39, 39, 39, 39,
1338
+ 39, 39, 39, 39, 39, 39, 39, 39,
1339
+ 39, 39, 39, 37, 37, 37, 37, 39,
1340
+ 37, 39, 39, 39, 39, 39, 39, 39,
1341
+ 39, 39, 39, 39, 39, 39, 39, 39,
1342
+ 39, 39, 39, 39, 39, 39, 39, 39,
1343
+ 39, 39, 39, 37, 37, 15, 0
1135
1344
  ]
1136
1345
 
1137
1346
  class << self
@@ -1139,10 +1348,11 @@ class << self
1139
1348
  private :_bel_trans_targs, :_bel_trans_targs=
1140
1349
  end
1141
1350
  self._bel_trans_targs = [
1142
- 0, 2, 3, 7, 0, 6, 3, 4,
1143
- 5, 0, 14, 0, 14, 6, 7, 2,
1144
- 0, 9, 15, 9, 0, 11, 11, 12,
1145
- 13, 16, 0
1351
+ 0, 2, 3, 4, 15, 14, 0, 5,
1352
+ 12, 6, 5, 12, 6, 19, 0, 0,
1353
+ 8, 9, 10, 21, 11, 10, 21, 11,
1354
+ 13, 0, 13, 14, 15, 16, 17, 18,
1355
+ 3, 4, 14, 17, 18, 0, 20, 19
1146
1356
  ]
1147
1357
 
1148
1358
  class << self
@@ -1150,10 +1360,11 @@ class << self
1150
1360
  private :_bel_trans_actions, :_bel_trans_actions=
1151
1361
  end
1152
1362
  self._bel_trans_actions = [
1153
- 1, 0, 2, 3, 4, 3, 6, 6,
1154
- 6, 5, 7, 8, 9, 10, 10, 11,
1155
- 12, 3, 13, 10, 14, 2, 6, 6,
1156
- 6, 15, 0
1363
+ 2, 0, 0, 0, 3, 3, 5, 7,
1364
+ 8, 7, 0, 9, 0, 3, 0, 11,
1365
+ 0, 0, 7, 13, 7, 0, 14, 0,
1366
+ 15, 17, 18, 0, 0, 20, 22, 23,
1367
+ 22, 22, 24, 0, 26, 29, 20, 0
1157
1368
  ]
1158
1369
 
1159
1370
  class << self
@@ -1161,9 +1372,9 @@ class << self
1161
1372
  private :_bel_eof_actions, :_bel_eof_actions=
1162
1373
  end
1163
1374
  self._bel_eof_actions = [
1164
- 0, 1, 4, 5, 5, 5, 8, 8,
1165
- 12, 12, 14, 14, 14, 14, 0, 0,
1166
- 0
1375
+ 0, 1, 1, 4, 6, 6, 6, 0,
1376
+ 10, 12, 12, 12, 15, 0, 16, 19,
1377
+ 21, 25, 27, 28, 30, 0
1167
1378
  ]
1168
1379
 
1169
1380
  class << self
@@ -1173,45 +1384,32 @@ self.bel_start = 1;
1173
1384
  class << self
1174
1385
  attr_accessor :bel_first_final
1175
1386
  end
1176
- self.bel_first_final = 14;
1387
+ self.bel_first_final = 12;
1177
1388
  class << self
1178
1389
  attr_accessor :bel_error
1179
1390
  end
1180
1391
  self.bel_error = 0;
1181
1392
 
1182
1393
  class << self
1183
- attr_accessor :bel_en_ident
1394
+ attr_accessor :bel_en_ident_node
1184
1395
  end
1185
- self.bel_en_ident = 8;
1396
+ self.bel_en_ident_node = 7;
1186
1397
  class << self
1187
- attr_accessor :bel_en_string
1398
+ attr_accessor :bel_en_string_node
1188
1399
  end
1189
- self.bel_en_string = 10;
1400
+ self.bel_en_string_node = 8;
1190
1401
  class << self
1191
- attr_accessor :bel_en_bel_parameter
1402
+ attr_accessor :bel_en_parameter_node
1192
1403
  end
1193
- self.bel_en_bel_parameter = 1;
1194
-
1195
-
1196
- # end: ragel
1197
- end
1404
+ self.bel_en_parameter_node = 1;
1198
1405
 
1199
- def each
1200
- @buffers = {}
1201
- data = @content.unpack('C*')
1202
- p = 0
1203
- pe = data.length
1204
- eof = data.length
1205
1406
 
1206
- # begin: ragel
1207
-
1208
1407
  begin
1209
1408
  p ||= 0
1210
1409
  pe ||= data.length
1211
1410
  cs = bel_start
1212
1411
  end
1213
1412
 
1214
-
1215
1413
  begin
1216
1414
  testEof = false
1217
1415
  _slen, _trans, _keys, _inds, _acts, _nacts = nil
@@ -1248,153 +1446,1557 @@ begin
1248
1446
  cs = _bel_trans_targs[_trans]
1249
1447
  if _bel_trans_actions[_trans] != 0
1250
1448
  case _bel_trans_actions[_trans]
1251
- when 10 then
1449
+ when 3 then
1252
1450
  begin
1253
1451
 
1254
- (@buffers[:ident] ||= []) << data[p].ord
1452
+ trace('IDENTIFIER start_identifier')
1453
+ @identifier_started = true
1454
+ id_start = p;
1255
1455
  end
1256
- when 8 then
1456
+ when 20 then
1257
1457
  begin
1258
1458
 
1259
- unless @buffers[:ident].is_a?(::AST::Node)
1260
- @buffers[:ident] ||= []
1261
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]).sub(/\n$/, ''))
1262
- end
1459
+ trace('IDENTIFIER end_identifier')
1460
+ id_end = p
1461
+ chars = data[id_start...id_end]
1462
+ completed = !chars.empty?
1463
+ ast_node = identifier(utf8_string(chars), complete: completed)
1464
+ @buffers[:ident] = ast_node
1263
1465
  end
1264
- when 6 then
1466
+ when 17 then
1265
1467
  begin
1266
1468
 
1267
- (@buffers[:string] ||= []) << data[p].ord
1469
+ trace('IDENTIFIER an_ident_err')
1470
+ id_end = p
1471
+ chars = data[id_start...id_end]
1472
+ ast_node = identifier(utf8_string(chars), complete: false)
1473
+ @buffers[:ident] = ast_node
1268
1474
  end
1269
- when 5 then
1475
+ when 29 then
1270
1476
  begin
1271
1477
 
1272
- @buffers[:string] ||= []
1273
- @buffers[:string] = string(utf8_string(@buffers[:string]).sub(/\n$/, ''))
1478
+ trace('IDENTIFIER ident_node_err')
1479
+ id_end = p
1480
+ chars = data[id_start...id_end]
1481
+ ast_node = identifier(utf8_string(chars), complete: false)
1482
+ yield ast_node
1274
1483
  end
1275
- when 3 then
1484
+ when 7 then
1276
1485
  begin
1277
1486
 
1278
- @buffers[:ident] = []
1487
+ trace('STRING start_string')
1488
+ @string_opened = true
1489
+ p_start = p
1279
1490
  end
1491
+ when 5 then
1280
1492
  begin
1281
1493
 
1282
- (@buffers[:ident] ||= []) << data[p].ord
1494
+ trace('STRING a_string_err')
1495
+ p_end = p
1496
+ chars = data[p_start...p_end]
1497
+ ast_node = string(utf8_string(chars), complete: false)
1498
+ @buffers[:string] = ast_node
1283
1499
  end
1284
- when 13 then
1500
+ when 11 then
1285
1501
  begin
1286
1502
 
1287
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]))
1503
+ trace('STRING string_node_err')
1504
+ p_end = p
1505
+ chars = data[p_start...p_end]
1506
+ ast_node = string(utf8_string(chars), complete: false)
1507
+ yield ast_node
1288
1508
  end
1509
+ when 22 then
1289
1510
  begin
1290
1511
 
1291
- yield @buffers[:ident]
1512
+ trace('PARAMETER add_prefix')
1513
+ ident = @buffers.delete(:ident)
1514
+ prefix_node = prefix(ident, complete: ident.complete)
1515
+ @buffers[:param_prefix] = prefix_node
1292
1516
  end
1293
- when 11 then
1517
+ when 2 then
1294
1518
  begin
1295
1519
 
1296
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]))
1520
+ trace('IDENTIFIER an_ident_err')
1521
+ id_end = p
1522
+ chars = data[id_start...id_end]
1523
+ ast_node = identifier(utf8_string(chars), complete: false)
1524
+ @buffers[:ident] = ast_node
1297
1525
  end
1298
1526
  begin
1299
1527
 
1300
- @buffers[:parameter] = parameter(prefix(@buffers[:ident]))
1528
+ trace('STRING a_string_err')
1529
+ p_end = p
1530
+ chars = data[p_start...p_end]
1531
+ ast_node = string(utf8_string(chars), complete: false)
1532
+ @buffers[:string] = ast_node
1301
1533
  end
1302
- when 12 then
1534
+ when 9 then
1303
1535
  begin
1304
1536
 
1305
- unless @buffers[:ident].is_a?(::AST::Node)
1306
- @buffers[:ident] ||= []
1307
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]).sub(/\n$/, ''))
1308
- end
1537
+ trace('STRING stop_string')
1538
+ @string_closed = true
1539
+ p_end = p
1309
1540
  end
1310
1541
  begin
1311
1542
 
1312
- @buffers[:ident] ||= []
1313
- yield @buffers[:ident]
1543
+ trace('STRING string_end')
1544
+ completed = @string_opened && @string_closed
1545
+ chars = data[p_start...p_end]
1546
+ ast_node = string(utf8_string(chars), complete: true)
1547
+ @buffers[:string] = ast_node
1314
1548
  end
1315
- when 1 then
1549
+ when 26 then
1316
1550
  begin
1317
1551
 
1318
- unless @buffers[:ident].is_a?(::AST::Node)
1319
- @buffers[:ident] ||= []
1320
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]).sub(/\n$/, ''))
1552
+ trace('PARAMETER parameter_end')
1553
+ param_node = parameter()
1554
+ completed = true
1555
+ prefix_node = @buffers.delete(:param_prefix)
1556
+ unless prefix_node.nil?
1557
+ param_node <<= prefix_node
1558
+ unless prefix_node.complete
1559
+ trace('PN incomplete')
1560
+ completed = false
1561
+ end
1562
+ end
1563
+
1564
+ value_node = @buffers.delete(:param_value)
1565
+ unless value_node.nil?
1566
+ param_node <<= value_node
1567
+ unless value_node.complete
1568
+ trace('VN incomplete')
1569
+ completed = false
1570
+ end
1571
+ else
1572
+ completed = false
1321
1573
  end
1574
+
1575
+ param_node.complete = completed
1576
+ @buffers[:parameter] = param_node
1322
1577
  end
1323
1578
  begin
1324
1579
 
1325
- @buffers[:string] ||= []
1326
- @buffers[:string] = string(utf8_string(@buffers[:string]).sub(/\n$/, ''))
1580
+ trace('PARAMETER yield_parameter')
1581
+ yield @buffers[:parameter]
1327
1582
  end
1328
- when 2 then
1583
+ when 24 then
1329
1584
  begin
1330
1585
 
1331
- @buffers[:string] = []
1586
+ trace('PARAMETER add_prefix')
1587
+ ident = @buffers.delete(:ident)
1588
+ prefix_node = prefix(ident, complete: ident.complete)
1589
+ @buffers[:param_prefix] = prefix_node
1332
1590
  end
1333
1591
  begin
1334
1592
 
1335
- (@buffers[:string] ||= []) << data[p].ord
1593
+ trace('IDENTIFIER start_identifier')
1594
+ @identifier_started = true
1595
+ id_start = p;
1336
1596
  end
1337
- when 15 then
1597
+ when 8 then
1338
1598
  begin
1339
1599
 
1340
- @buffers[:string] = string(utf8_string(@buffers[:string]))
1600
+ trace('STRING start_string')
1601
+ @string_opened = true
1602
+ p_start = p
1341
1603
  end
1342
1604
  begin
1343
1605
 
1344
- yield @buffers[:string]
1606
+ trace('STRING stop_string')
1607
+ @string_closed = true
1608
+ p_end = p
1345
1609
  end
1346
- when 4 then
1347
1610
  begin
1348
1611
 
1349
- @buffers[:string] ||= []
1350
- @buffers[:string] = string(utf8_string(@buffers[:string]).sub(/\n$/, ''))
1612
+ trace('STRING string_end')
1613
+ completed = @string_opened && @string_closed
1614
+ chars = data[p_start...p_end]
1615
+ ast_node = string(utf8_string(chars), complete: true)
1616
+ @buffers[:string] = ast_node
1351
1617
  end
1618
+ when 14 then
1352
1619
  begin
1353
1620
 
1354
- unless @buffers[:ident].is_a?(::AST::Node)
1355
- @buffers[:ident] ||= []
1356
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]).sub(/\n$/, ''))
1357
- end
1621
+ trace('STRING stop_string')
1622
+ @string_closed = true
1623
+ p_end = p
1358
1624
  end
1359
- when 14 then
1360
1625
  begin
1361
1626
 
1362
- @buffers[:string] ||= []
1363
- @buffers[:string] = string(utf8_string(@buffers[:string]).sub(/\n$/, ''))
1627
+ trace('STRING string_end')
1628
+ completed = @string_opened && @string_closed
1629
+ chars = data[p_start...p_end]
1630
+ ast_node = string(utf8_string(chars), complete: true)
1631
+ @buffers[:string] = ast_node
1364
1632
  end
1365
1633
  begin
1366
1634
 
1367
- @buffers[:string] ||= []
1635
+ trace('STRING yield_string')
1368
1636
  yield @buffers[:string]
1369
1637
  end
1370
- when 9 then
1638
+ when 15 then
1371
1639
  begin
1372
1640
 
1373
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]))
1641
+ trace('PARAMETER add_string_param_value')
1642
+ string_node = @buffers.delete(:string)
1643
+ value_node = value(string_node, complete: string_node.complete)
1644
+ @buffers[:param_value] = value_node
1374
1645
  end
1375
1646
  begin
1376
1647
 
1377
- @buffers[:parameter] ||= parameter(prefix(nil))
1378
- @buffers[:parameter] = @buffers[:parameter] << value(@buffers[:ident])
1648
+ trace('PARAMETER parameter_end')
1649
+ param_node = parameter()
1650
+ completed = true
1651
+ prefix_node = @buffers.delete(:param_prefix)
1652
+ unless prefix_node.nil?
1653
+ param_node <<= prefix_node
1654
+ unless prefix_node.complete
1655
+ trace('PN incomplete')
1656
+ completed = false
1657
+ end
1658
+ end
1659
+
1660
+ value_node = @buffers.delete(:param_value)
1661
+ unless value_node.nil?
1662
+ param_node <<= value_node
1663
+ unless value_node.complete
1664
+ trace('VN incomplete')
1665
+ completed = false
1666
+ end
1667
+ else
1668
+ completed = false
1669
+ end
1670
+
1671
+ param_node.complete = completed
1672
+ @buffers[:parameter] = param_node
1379
1673
  end
1380
1674
  begin
1381
1675
 
1676
+ trace('PARAMETER yield_parameter')
1382
1677
  yield @buffers[:parameter]
1383
1678
  end
1679
+ when 23 then
1680
+ begin
1681
+
1682
+ trace('PARAMETER add_prefix')
1683
+ ident = @buffers.delete(:ident)
1684
+ prefix_node = prefix(ident, complete: ident.complete)
1685
+ @buffers[:param_prefix] = prefix_node
1686
+ end
1687
+ begin
1688
+
1689
+ trace('PARAMETER parameter_end')
1690
+ param_node = parameter()
1691
+ completed = true
1692
+ prefix_node = @buffers.delete(:param_prefix)
1693
+ unless prefix_node.nil?
1694
+ param_node <<= prefix_node
1695
+ unless prefix_node.complete
1696
+ trace('PN incomplete')
1697
+ completed = false
1698
+ end
1699
+ end
1700
+
1701
+ value_node = @buffers.delete(:param_value)
1702
+ unless value_node.nil?
1703
+ param_node <<= value_node
1704
+ unless value_node.complete
1705
+ trace('VN incomplete')
1706
+ completed = false
1707
+ end
1708
+ else
1709
+ completed = false
1710
+ end
1711
+
1712
+ param_node.complete = completed
1713
+ @buffers[:parameter] = param_node
1714
+ end
1715
+ begin
1716
+
1717
+ trace('PARAMETER yield_parameter')
1718
+ yield @buffers[:parameter]
1719
+ end
1720
+ when 18 then
1721
+ begin
1722
+
1723
+ trace('IDENTIFIER end_identifier')
1724
+ id_end = p
1725
+ chars = data[id_start...id_end]
1726
+ completed = !chars.empty?
1727
+ ast_node = identifier(utf8_string(chars), complete: completed)
1728
+ @buffers[:ident] = ast_node
1729
+ end
1730
+ begin
1731
+
1732
+ trace('PARAMETER add_ident_param_value')
1733
+ ident = @buffers.delete(:ident)
1734
+ value_node = value(ident, complete: ident.complete)
1735
+ @buffers[:param_value] = value_node
1736
+ end
1737
+ begin
1738
+
1739
+ trace('PARAMETER parameter_end')
1740
+ param_node = parameter()
1741
+ completed = true
1742
+ prefix_node = @buffers.delete(:param_prefix)
1743
+ unless prefix_node.nil?
1744
+ param_node <<= prefix_node
1745
+ unless prefix_node.complete
1746
+ trace('PN incomplete')
1747
+ completed = false
1748
+ end
1749
+ end
1750
+
1751
+ value_node = @buffers.delete(:param_value)
1752
+ unless value_node.nil?
1753
+ param_node <<= value_node
1754
+ unless value_node.complete
1755
+ trace('VN incomplete')
1756
+ completed = false
1757
+ end
1758
+ else
1759
+ completed = false
1760
+ end
1761
+
1762
+ param_node.complete = completed
1763
+ @buffers[:parameter] = param_node
1764
+ end
1765
+ begin
1766
+
1767
+ trace('PARAMETER yield_parameter')
1768
+ yield @buffers[:parameter]
1769
+ end
1770
+ when 13 then
1771
+ begin
1772
+
1773
+ trace('STRING start_string')
1774
+ @string_opened = true
1775
+ p_start = p
1776
+ end
1777
+ begin
1778
+
1779
+ trace('STRING stop_string')
1780
+ @string_closed = true
1781
+ p_end = p
1782
+ end
1783
+ begin
1784
+
1785
+ trace('STRING string_end')
1786
+ completed = @string_opened && @string_closed
1787
+ chars = data[p_start...p_end]
1788
+ ast_node = string(utf8_string(chars), complete: true)
1789
+ @buffers[:string] = ast_node
1790
+ end
1791
+ begin
1792
+
1793
+ trace('STRING yield_string')
1794
+ yield @buffers[:string]
1795
+ end
1796
+ end
1797
+ end
1798
+ end
1799
+ if _goto_level <= _again
1800
+ if cs == 0
1801
+ _goto_level = _out
1802
+ next
1803
+ end
1804
+ p += 1
1805
+ if p != pe
1806
+ _goto_level = _resume
1807
+ next
1808
+ end
1809
+ end
1810
+ if _goto_level <= _test_eof
1811
+ if p == eof
1812
+ case _bel_eof_actions[cs]
1813
+ when 30 then
1814
+ begin
1815
+
1816
+ trace('IDENTIFIER yield_identifier')
1817
+ yield @buffers[:ident]
1818
+ end
1819
+ when 27 then
1820
+ begin
1821
+
1822
+ trace("PARAMETER parameter_node_eof")
1823
+ param_node = parameter()
1824
+ completed = true
1825
+ prefix_node = @buffers.delete(:param_prefix)
1826
+ unless prefix_node.nil?
1827
+ param_node <<= prefix_node
1828
+ unless prefix_node.complete
1829
+ completed = false
1830
+ end
1831
+ end
1832
+
1833
+ string_value_node = @buffers.delete(:string)
1834
+ unless string_value_node.nil?
1835
+ param_node <<= string_value_node
1836
+ unless string_value_node.complete
1837
+ completed = false
1838
+ end
1839
+ else
1840
+ completed = false
1841
+ end
1842
+
1843
+ param_node.complete = completed
1844
+ yield param_node
1845
+ end
1846
+ when 28 then
1847
+ begin
1848
+
1849
+ trace('IDENTIFIER end_identifier')
1850
+ id_end = p
1851
+ chars = data[id_start...id_end]
1852
+ completed = !chars.empty?
1853
+ ast_node = identifier(utf8_string(chars), complete: completed)
1854
+ @buffers[:ident] = ast_node
1855
+ end
1856
+ begin
1857
+
1858
+ trace('IDENTIFIER yield_identifier')
1859
+ yield @buffers[:ident]
1860
+ end
1861
+ when 4 then
1862
+ begin
1863
+
1864
+ trace('STRING a_string_err')
1865
+ p_end = p
1866
+ chars = data[p_start...p_end]
1867
+ ast_node = string(utf8_string(chars), complete: false)
1868
+ @buffers[:string] = ast_node
1869
+ end
1870
+ begin
1871
+
1872
+ trace("PARAMETER parameter_node_eof")
1873
+ param_node = parameter()
1874
+ completed = true
1875
+ prefix_node = @buffers.delete(:param_prefix)
1876
+ unless prefix_node.nil?
1877
+ param_node <<= prefix_node
1878
+ unless prefix_node.complete
1879
+ completed = false
1880
+ end
1881
+ end
1882
+
1883
+ string_value_node = @buffers.delete(:string)
1884
+ unless string_value_node.nil?
1885
+ param_node <<= string_value_node
1886
+ unless string_value_node.complete
1887
+ completed = false
1888
+ end
1889
+ else
1890
+ completed = false
1891
+ end
1892
+
1893
+ param_node.complete = completed
1894
+ yield param_node
1895
+ end
1896
+ when 10 then
1897
+ begin
1898
+
1899
+ trace('STRING string_node_err')
1900
+ p_end = p
1901
+ chars = data[p_start...p_end]
1902
+ ast_node = string(utf8_string(chars), complete: false)
1903
+ yield ast_node
1904
+ end
1905
+ begin
1906
+
1907
+ trace('STRING string_node_eof')
1908
+ yield @buffers[:string]
1909
+ end
1910
+ when 25 then
1911
+ begin
1912
+
1913
+ trace('IDENTIFIER an_ident_eof')
1914
+ if @identifier_started
1915
+ id_end = p
1916
+ chars = data[id_start...id_end]
1917
+ completed = !chars.empty?
1918
+ ast_node = identifier(utf8_string(chars), complete: completed)
1919
+ @buffers[:ident] = ast_node
1920
+ end
1921
+ end
1922
+ begin
1923
+
1924
+ trace('PARAMETER parameter_end')
1925
+ param_node = parameter()
1926
+ completed = true
1927
+ prefix_node = @buffers.delete(:param_prefix)
1928
+ unless prefix_node.nil?
1929
+ param_node <<= prefix_node
1930
+ unless prefix_node.complete
1931
+ trace('PN incomplete')
1932
+ completed = false
1933
+ end
1934
+ end
1935
+
1936
+ value_node = @buffers.delete(:param_value)
1937
+ unless value_node.nil?
1938
+ param_node <<= value_node
1939
+ unless value_node.complete
1940
+ trace('VN incomplete')
1941
+ completed = false
1942
+ end
1943
+ else
1944
+ completed = false
1945
+ end
1946
+
1947
+ param_node.complete = completed
1948
+ @buffers[:parameter] = param_node
1949
+ end
1950
+ begin
1951
+
1952
+ trace('PARAMETER yield_parameter')
1953
+ yield @buffers[:parameter]
1954
+ end
1955
+ when 6 then
1956
+ begin
1957
+
1958
+ trace('STRING eof_string')
1959
+ p_end = p
1960
+ chars = data[p_start...p_end]
1961
+ ast_node = string(utf8_string(chars), complete: false)
1962
+ @buffers[:string] = ast_node
1963
+ end
1964
+ begin
1965
+
1966
+ trace('STRING a_string_err')
1967
+ p_end = p
1968
+ chars = data[p_start...p_end]
1969
+ ast_node = string(utf8_string(chars), complete: false)
1970
+ @buffers[:string] = ast_node
1971
+ end
1972
+ begin
1973
+
1974
+ trace("PARAMETER parameter_node_eof")
1975
+ param_node = parameter()
1976
+ completed = true
1977
+ prefix_node = @buffers.delete(:param_prefix)
1978
+ unless prefix_node.nil?
1979
+ param_node <<= prefix_node
1980
+ unless prefix_node.complete
1981
+ completed = false
1982
+ end
1983
+ end
1984
+
1985
+ string_value_node = @buffers.delete(:string)
1986
+ unless string_value_node.nil?
1987
+ param_node <<= string_value_node
1988
+ unless string_value_node.complete
1989
+ completed = false
1990
+ end
1991
+ else
1992
+ completed = false
1993
+ end
1994
+
1995
+ param_node.complete = completed
1996
+ yield param_node
1997
+ end
1998
+ when 12 then
1999
+ begin
2000
+
2001
+ trace('STRING eof_string')
2002
+ p_end = p
2003
+ chars = data[p_start...p_end]
2004
+ ast_node = string(utf8_string(chars), complete: false)
2005
+ @buffers[:string] = ast_node
2006
+ end
2007
+ begin
2008
+
2009
+ trace('STRING string_node_err')
2010
+ p_end = p
2011
+ chars = data[p_start...p_end]
2012
+ ast_node = string(utf8_string(chars), complete: false)
2013
+ yield ast_node
2014
+ end
2015
+ begin
2016
+
2017
+ trace('STRING string_node_eof')
2018
+ yield @buffers[:string]
2019
+ end
2020
+ when 15 then
2021
+ begin
2022
+
2023
+ trace('PARAMETER add_string_param_value')
2024
+ string_node = @buffers.delete(:string)
2025
+ value_node = value(string_node, complete: string_node.complete)
2026
+ @buffers[:param_value] = value_node
2027
+ end
2028
+ begin
2029
+
2030
+ trace('PARAMETER parameter_end')
2031
+ param_node = parameter()
2032
+ completed = true
2033
+ prefix_node = @buffers.delete(:param_prefix)
2034
+ unless prefix_node.nil?
2035
+ param_node <<= prefix_node
2036
+ unless prefix_node.complete
2037
+ trace('PN incomplete')
2038
+ completed = false
2039
+ end
2040
+ end
2041
+
2042
+ value_node = @buffers.delete(:param_value)
2043
+ unless value_node.nil?
2044
+ param_node <<= value_node
2045
+ unless value_node.complete
2046
+ trace('VN incomplete')
2047
+ completed = false
2048
+ end
2049
+ else
2050
+ completed = false
2051
+ end
2052
+
2053
+ param_node.complete = completed
2054
+ @buffers[:parameter] = param_node
2055
+ end
2056
+ begin
2057
+
2058
+ trace('PARAMETER yield_parameter')
2059
+ yield @buffers[:parameter]
2060
+ end
2061
+ when 1 then
2062
+ begin
2063
+
2064
+ trace('IDENTIFIER an_ident_eof')
2065
+ if @identifier_started
2066
+ id_end = p
2067
+ chars = data[id_start...id_end]
2068
+ completed = !chars.empty?
2069
+ ast_node = identifier(utf8_string(chars), complete: completed)
2070
+ @buffers[:ident] = ast_node
2071
+ end
2072
+ end
2073
+ begin
2074
+
2075
+ trace('IDENTIFIER an_ident_err')
2076
+ id_end = p
2077
+ chars = data[id_start...id_end]
2078
+ ast_node = identifier(utf8_string(chars), complete: false)
2079
+ @buffers[:ident] = ast_node
2080
+ end
2081
+ begin
2082
+
2083
+ trace('STRING a_string_err')
2084
+ p_end = p
2085
+ chars = data[p_start...p_end]
2086
+ ast_node = string(utf8_string(chars), complete: false)
2087
+ @buffers[:string] = ast_node
2088
+ end
2089
+ begin
2090
+
2091
+ trace("PARAMETER parameter_node_eof")
2092
+ param_node = parameter()
2093
+ completed = true
2094
+ prefix_node = @buffers.delete(:param_prefix)
2095
+ unless prefix_node.nil?
2096
+ param_node <<= prefix_node
2097
+ unless prefix_node.complete
2098
+ completed = false
2099
+ end
2100
+ end
2101
+
2102
+ string_value_node = @buffers.delete(:string)
2103
+ unless string_value_node.nil?
2104
+ param_node <<= string_value_node
2105
+ unless string_value_node.complete
2106
+ completed = false
2107
+ end
2108
+ else
2109
+ completed = false
2110
+ end
2111
+
2112
+ param_node.complete = completed
2113
+ yield param_node
2114
+ end
2115
+ when 21 then
2116
+ begin
2117
+
2118
+ trace('IDENTIFIER an_ident_eof')
2119
+ if @identifier_started
2120
+ id_end = p
2121
+ chars = data[id_start...id_end]
2122
+ completed = !chars.empty?
2123
+ ast_node = identifier(utf8_string(chars), complete: completed)
2124
+ @buffers[:ident] = ast_node
2125
+ end
2126
+ end
2127
+ begin
2128
+
2129
+ trace('PARAMETER add_prefix')
2130
+ ident = @buffers.delete(:ident)
2131
+ prefix_node = prefix(ident, complete: ident.complete)
2132
+ @buffers[:param_prefix] = prefix_node
2133
+ end
2134
+ begin
2135
+
2136
+ trace('PARAMETER parameter_end')
2137
+ param_node = parameter()
2138
+ completed = true
2139
+ prefix_node = @buffers.delete(:param_prefix)
2140
+ unless prefix_node.nil?
2141
+ param_node <<= prefix_node
2142
+ unless prefix_node.complete
2143
+ trace('PN incomplete')
2144
+ completed = false
2145
+ end
2146
+ end
2147
+
2148
+ value_node = @buffers.delete(:param_value)
2149
+ unless value_node.nil?
2150
+ param_node <<= value_node
2151
+ unless value_node.complete
2152
+ trace('VN incomplete')
2153
+ completed = false
2154
+ end
2155
+ else
2156
+ completed = false
2157
+ end
2158
+
2159
+ param_node.complete = completed
2160
+ @buffers[:parameter] = param_node
2161
+ end
2162
+ begin
2163
+
2164
+ trace('PARAMETER yield_parameter')
2165
+ yield @buffers[:parameter]
2166
+ end
2167
+ when 16 then
2168
+ begin
2169
+
2170
+ trace('IDENTIFIER end_identifier')
2171
+ id_end = p
2172
+ chars = data[id_start...id_end]
2173
+ completed = !chars.empty?
2174
+ ast_node = identifier(utf8_string(chars), complete: completed)
2175
+ @buffers[:ident] = ast_node
2176
+ end
2177
+ begin
2178
+
2179
+ trace('IDENTIFIER an_ident_eof')
2180
+ if @identifier_started
2181
+ id_end = p
2182
+ chars = data[id_start...id_end]
2183
+ completed = !chars.empty?
2184
+ ast_node = identifier(utf8_string(chars), complete: completed)
2185
+ @buffers[:ident] = ast_node
2186
+ end
2187
+ end
2188
+ begin
2189
+
2190
+ trace('PARAMETER add_ident_param_value')
2191
+ ident = @buffers.delete(:ident)
2192
+ value_node = value(ident, complete: ident.complete)
2193
+ @buffers[:param_value] = value_node
2194
+ end
2195
+ begin
2196
+
2197
+ trace('PARAMETER parameter_end')
2198
+ param_node = parameter()
2199
+ completed = true
2200
+ prefix_node = @buffers.delete(:param_prefix)
2201
+ unless prefix_node.nil?
2202
+ param_node <<= prefix_node
2203
+ unless prefix_node.complete
2204
+ trace('PN incomplete')
2205
+ completed = false
2206
+ end
2207
+ end
2208
+
2209
+ value_node = @buffers.delete(:param_value)
2210
+ unless value_node.nil?
2211
+ param_node <<= value_node
2212
+ unless value_node.complete
2213
+ trace('VN incomplete')
2214
+ completed = false
2215
+ end
2216
+ else
2217
+ completed = false
2218
+ end
2219
+
2220
+ param_node.complete = completed
2221
+ @buffers[:parameter] = param_node
2222
+ end
2223
+ begin
2224
+
2225
+ trace('PARAMETER yield_parameter')
2226
+ yield @buffers[:parameter]
2227
+ end
2228
+ when 19 then
2229
+ begin
2230
+
2231
+ trace('IDENTIFIER an_ident_eof')
2232
+ if @identifier_started
2233
+ id_end = p
2234
+ chars = data[id_start...id_end]
2235
+ completed = !chars.empty?
2236
+ ast_node = identifier(utf8_string(chars), complete: completed)
2237
+ @buffers[:ident] = ast_node
2238
+ end
2239
+ end
2240
+ begin
2241
+
2242
+ trace('IDENTIFIER end_identifier')
2243
+ id_end = p
2244
+ chars = data[id_start...id_end]
2245
+ completed = !chars.empty?
2246
+ ast_node = identifier(utf8_string(chars), complete: completed)
2247
+ @buffers[:ident] = ast_node
2248
+ end
2249
+ begin
2250
+
2251
+ trace('PARAMETER add_ident_param_value')
2252
+ ident = @buffers.delete(:ident)
2253
+ value_node = value(ident, complete: ident.complete)
2254
+ @buffers[:param_value] = value_node
2255
+ end
2256
+ begin
2257
+
2258
+ trace('PARAMETER parameter_end')
2259
+ param_node = parameter()
2260
+ completed = true
2261
+ prefix_node = @buffers.delete(:param_prefix)
2262
+ unless prefix_node.nil?
2263
+ param_node <<= prefix_node
2264
+ unless prefix_node.complete
2265
+ trace('PN incomplete')
2266
+ completed = false
2267
+ end
2268
+ end
2269
+
2270
+ value_node = @buffers.delete(:param_value)
2271
+ unless value_node.nil?
2272
+ param_node <<= value_node
2273
+ unless value_node.complete
2274
+ trace('VN incomplete')
2275
+ completed = false
2276
+ end
2277
+ else
2278
+ completed = false
2279
+ end
2280
+
2281
+ param_node.complete = completed
2282
+ @buffers[:parameter] = param_node
2283
+ end
2284
+ begin
2285
+
2286
+ trace('PARAMETER yield_parameter')
2287
+ yield @buffers[:parameter]
2288
+ end
2289
+ end
2290
+ end
2291
+
2292
+ end
2293
+ if _goto_level <= _out
2294
+ break
2295
+ end
2296
+ end
2297
+ end
2298
+
2299
+
2300
+ =end
2301
+ # end: ragel
2302
+
2303
+ require_relative '../ast/node'
2304
+ require_relative '../mixin/buffer'
2305
+ require_relative '../nonblocking_io_wrapper'
2306
+ require_relative '../tracer'
2307
+
2308
+ module BELParser
2309
+ module Parsers
2310
+ module Expression
2311
+ module Parameter
2312
+
2313
+ class << self
2314
+
2315
+ MAX_LENGTH = 1024 * 128 # 128K
2316
+
2317
+ def parse(content)
2318
+ return nil unless content
2319
+
2320
+ Parser.new(content).each do |obj|
2321
+ yield obj
2322
+ end
2323
+ end
2324
+ end
2325
+
2326
+ private
2327
+
2328
+ class Parser
2329
+ include Enumerable
2330
+ include BELParser::Parsers::Buffer
2331
+ include BELParser::Parsers::AST::Sexp
2332
+ include BELParser::Parsers::Tracer
2333
+
2334
+ def initialize(content)
2335
+ @content = content
2336
+ # begin: ragel
2337
+
2338
+ class << self
2339
+ attr_accessor :_bel_trans_keys
2340
+ private :_bel_trans_keys, :_bel_trans_keys=
2341
+ end
2342
+ self._bel_trans_keys = [
2343
+ 0, 0, 9, 122, 9, 122,
2344
+ 9, 34, 34, 92, 34,
2345
+ 92, 0, 0, 48, 122,
2346
+ 9, 34, 34, 92, 34, 92,
2347
+ 0, 0, 10, 10, 0,
2348
+ 0, 10, 122, 10, 122,
2349
+ 9, 122, 9, 122, 9, 34,
2350
+ 10, 122, 0, 0, 0,
2351
+ 0, 0
2352
+ ]
2353
+
2354
+ class << self
2355
+ attr_accessor :_bel_key_spans
2356
+ private :_bel_key_spans, :_bel_key_spans=
2357
+ end
2358
+ self._bel_key_spans = [
2359
+ 0, 114, 114, 26, 59, 59, 0, 75,
2360
+ 26, 59, 59, 0, 1, 0, 113, 113,
2361
+ 114, 114, 26, 113, 0, 0
2362
+ ]
2363
+
2364
+ class << self
2365
+ attr_accessor :_bel_index_offsets
2366
+ private :_bel_index_offsets, :_bel_index_offsets=
2367
+ end
2368
+ self._bel_index_offsets = [
2369
+ 0, 0, 115, 230, 257, 317, 377, 378,
2370
+ 454, 481, 541, 601, 602, 604, 605, 719,
2371
+ 833, 948, 1063, 1090, 1204, 1205
2372
+ ]
2373
+
2374
+ class << self
2375
+ attr_accessor :_bel_indicies
2376
+ private :_bel_indicies, :_bel_indicies=
2377
+ end
2378
+ self._bel_indicies = [
2379
+ 1, 2, 2, 2, 2, 0, 0, 0,
2380
+ 0, 0, 0, 0, 0, 0, 0, 0,
2381
+ 0, 0, 0, 0, 0, 0, 0, 1,
2382
+ 0, 3, 0, 0, 0, 0, 0, 0,
2383
+ 0, 0, 0, 0, 0, 0, 0, 4,
2384
+ 4, 4, 4, 4, 4, 4, 4, 4,
2385
+ 4, 0, 0, 0, 0, 0, 0, 0,
2386
+ 4, 4, 4, 4, 4, 4, 4, 4,
2387
+ 4, 4, 4, 4, 4, 4, 4, 4,
2388
+ 4, 4, 4, 4, 4, 4, 4, 4,
2389
+ 4, 4, 0, 0, 0, 0, 4, 0,
2390
+ 4, 4, 4, 4, 4, 4, 4, 4,
2391
+ 4, 4, 4, 4, 4, 4, 4, 4,
2392
+ 4, 4, 4, 4, 4, 4, 4, 4,
2393
+ 4, 4, 0, 1, 2, 2, 2, 2,
2394
+ 0, 0, 0, 0, 0, 0, 0, 0,
2395
+ 0, 0, 0, 0, 0, 0, 0, 0,
2396
+ 0, 0, 1, 0, 3, 0, 0, 0,
2397
+ 0, 0, 0, 0, 0, 0, 0, 0,
2398
+ 0, 0, 5, 5, 5, 5, 5, 5,
2399
+ 5, 5, 5, 5, 0, 0, 0, 0,
2400
+ 0, 0, 0, 5, 5, 5, 5, 5,
2401
+ 5, 5, 5, 5, 5, 5, 5, 5,
2402
+ 5, 5, 5, 5, 5, 5, 5, 5,
2403
+ 5, 5, 5, 5, 5, 0, 0, 0,
2404
+ 0, 5, 0, 5, 5, 5, 5, 5,
2405
+ 5, 5, 5, 5, 5, 5, 5, 5,
2406
+ 5, 5, 5, 5, 5, 5, 5, 5,
2407
+ 5, 5, 5, 5, 5, 0, 2, 2,
2408
+ 2, 2, 2, 6, 6, 6, 6, 6,
2409
+ 6, 6, 6, 6, 6, 6, 6, 6,
2410
+ 6, 6, 6, 6, 6, 2, 6, 3,
2411
+ 6, 8, 7, 7, 7, 7, 7, 7,
2412
+ 7, 7, 7, 7, 7, 7, 7, 7,
2413
+ 7, 7, 7, 7, 7, 7, 7, 7,
2414
+ 7, 7, 7, 7, 7, 7, 7, 7,
2415
+ 7, 7, 7, 7, 7, 7, 7, 7,
2416
+ 7, 7, 7, 7, 7, 7, 7, 7,
2417
+ 7, 7, 7, 7, 7, 7, 7, 7,
2418
+ 7, 7, 7, 9, 7, 11, 10, 10,
2419
+ 10, 10, 10, 10, 10, 10, 10, 10,
2420
+ 10, 10, 10, 10, 10, 10, 10, 10,
2421
+ 10, 10, 10, 10, 10, 10, 10, 10,
2422
+ 10, 10, 10, 10, 10, 10, 10, 10,
2423
+ 10, 10, 10, 10, 10, 10, 10, 10,
2424
+ 10, 10, 10, 10, 10, 10, 10, 10,
2425
+ 10, 10, 10, 10, 10, 10, 10, 12,
2426
+ 10, 10, 13, 13, 13, 13, 13, 13,
2427
+ 13, 13, 13, 13, 14, 14, 14, 14,
2428
+ 14, 14, 14, 13, 13, 13, 13, 13,
2429
+ 13, 13, 13, 13, 13, 13, 13, 13,
2430
+ 13, 13, 13, 13, 13, 13, 13, 13,
2431
+ 13, 13, 13, 13, 13, 14, 14, 14,
2432
+ 14, 13, 14, 13, 13, 13, 13, 13,
2433
+ 13, 13, 13, 13, 13, 13, 13, 13,
2434
+ 13, 13, 13, 13, 13, 13, 13, 13,
2435
+ 13, 13, 13, 13, 13, 14, 16, 16,
2436
+ 16, 16, 16, 15, 15, 15, 15, 15,
2437
+ 15, 15, 15, 15, 15, 15, 15, 15,
2438
+ 15, 15, 15, 15, 15, 16, 15, 17,
2439
+ 15, 19, 18, 18, 18, 18, 18, 18,
2440
+ 18, 18, 18, 18, 18, 18, 18, 18,
2441
+ 18, 18, 18, 18, 18, 18, 18, 18,
2442
+ 18, 18, 18, 18, 18, 18, 18, 18,
2443
+ 18, 18, 18, 18, 18, 18, 18, 18,
2444
+ 18, 18, 18, 18, 18, 18, 18, 18,
2445
+ 18, 18, 18, 18, 18, 18, 18, 18,
2446
+ 18, 18, 18, 20, 18, 22, 21, 21,
2447
+ 21, 21, 21, 21, 21, 21, 21, 21,
2448
+ 21, 21, 21, 21, 21, 21, 21, 21,
2449
+ 21, 21, 21, 21, 21, 21, 21, 21,
2450
+ 21, 21, 21, 21, 21, 21, 21, 21,
2451
+ 21, 21, 21, 21, 21, 21, 21, 21,
2452
+ 21, 21, 21, 21, 21, 21, 21, 21,
2453
+ 21, 21, 21, 21, 21, 21, 21, 23,
2454
+ 21, 21, 24, 6, 14, 26, 25, 25,
2455
+ 25, 25, 25, 25, 25, 25, 25, 25,
2456
+ 25, 25, 25, 25, 25, 25, 25, 25,
2457
+ 25, 25, 25, 25, 25, 25, 25, 25,
2458
+ 25, 25, 25, 25, 25, 25, 25, 25,
2459
+ 25, 25, 25, 27, 27, 27, 27, 27,
2460
+ 27, 27, 27, 27, 27, 25, 25, 25,
2461
+ 25, 25, 25, 25, 27, 27, 27, 27,
2462
+ 27, 27, 27, 27, 27, 27, 27, 27,
2463
+ 27, 27, 27, 27, 27, 27, 27, 27,
2464
+ 27, 27, 27, 27, 27, 27, 25, 25,
2465
+ 25, 25, 27, 25, 27, 27, 27, 27,
2466
+ 27, 27, 27, 27, 27, 27, 27, 27,
2467
+ 27, 27, 27, 27, 27, 27, 27, 27,
2468
+ 27, 27, 27, 27, 27, 27, 25, 26,
2469
+ 25, 25, 25, 25, 25, 25, 25, 25,
2470
+ 25, 25, 25, 25, 25, 25, 25, 25,
2471
+ 25, 25, 25, 25, 25, 25, 25, 25,
2472
+ 25, 25, 25, 25, 25, 25, 25, 25,
2473
+ 25, 25, 25, 25, 25, 28, 28, 28,
2474
+ 28, 28, 28, 28, 28, 28, 28, 29,
2475
+ 25, 25, 25, 25, 25, 25, 28, 28,
2476
+ 28, 28, 28, 28, 28, 28, 28, 28,
2477
+ 28, 28, 28, 28, 28, 28, 28, 28,
2478
+ 28, 28, 28, 28, 28, 28, 28, 28,
2479
+ 25, 25, 25, 25, 28, 25, 28, 28,
2480
+ 28, 28, 28, 28, 28, 28, 28, 28,
2481
+ 28, 28, 28, 28, 28, 28, 28, 28,
2482
+ 28, 28, 28, 28, 28, 28, 28, 28,
2483
+ 25, 30, 31, 32, 32, 32, 0, 0,
2484
+ 0, 0, 0, 0, 0, 0, 0, 0,
2485
+ 0, 0, 0, 0, 0, 0, 0, 0,
2486
+ 30, 0, 33, 0, 0, 0, 0, 0,
2487
+ 0, 0, 0, 0, 0, 0, 0, 0,
2488
+ 34, 34, 34, 34, 34, 34, 34, 34,
2489
+ 34, 34, 0, 0, 0, 0, 0, 0,
2490
+ 0, 34, 34, 34, 34, 34, 34, 34,
2491
+ 34, 34, 34, 34, 34, 34, 34, 34,
2492
+ 34, 34, 34, 34, 34, 34, 34, 34,
2493
+ 34, 34, 34, 0, 0, 0, 0, 34,
2494
+ 0, 34, 34, 34, 34, 34, 34, 34,
2495
+ 34, 34, 34, 34, 34, 34, 34, 34,
2496
+ 34, 34, 34, 34, 34, 34, 34, 34,
2497
+ 34, 34, 34, 0, 35, 36, 2, 2,
2498
+ 2, 0, 0, 0, 0, 0, 0, 0,
2499
+ 0, 0, 0, 0, 0, 0, 0, 0,
2500
+ 0, 0, 0, 35, 0, 3, 0, 0,
2501
+ 0, 0, 0, 0, 0, 0, 0, 0,
2502
+ 0, 0, 0, 5, 5, 5, 5, 5,
2503
+ 5, 5, 5, 5, 5, 0, 0, 0,
2504
+ 0, 0, 0, 0, 5, 5, 5, 5,
2505
+ 5, 5, 5, 5, 5, 5, 5, 5,
2506
+ 5, 5, 5, 5, 5, 5, 5, 5,
2507
+ 5, 5, 5, 5, 5, 5, 0, 0,
2508
+ 0, 0, 5, 0, 5, 5, 5, 5,
2509
+ 5, 5, 5, 5, 5, 5, 5, 5,
2510
+ 5, 5, 5, 5, 5, 5, 5, 5,
2511
+ 5, 5, 5, 5, 5, 5, 0, 2,
2512
+ 2, 2, 2, 2, 6, 6, 6, 6,
2513
+ 6, 6, 6, 6, 6, 6, 6, 6,
2514
+ 6, 6, 6, 6, 6, 6, 2, 6,
2515
+ 3, 6, 38, 37, 37, 37, 37, 37,
2516
+ 37, 37, 37, 37, 37, 37, 37, 37,
2517
+ 37, 37, 37, 37, 37, 37, 37, 37,
2518
+ 37, 37, 37, 37, 37, 37, 37, 37,
2519
+ 37, 37, 37, 37, 37, 37, 37, 37,
2520
+ 39, 39, 39, 39, 39, 39, 39, 39,
2521
+ 39, 39, 37, 37, 37, 37, 37, 37,
2522
+ 37, 39, 39, 39, 39, 39, 39, 39,
2523
+ 39, 39, 39, 39, 39, 39, 39, 39,
2524
+ 39, 39, 39, 39, 39, 39, 39, 39,
2525
+ 39, 39, 39, 37, 37, 37, 37, 39,
2526
+ 37, 39, 39, 39, 39, 39, 39, 39,
2527
+ 39, 39, 39, 39, 39, 39, 39, 39,
2528
+ 39, 39, 39, 39, 39, 39, 39, 39,
2529
+ 39, 39, 39, 37, 37, 15, 0
2530
+ ]
2531
+
2532
+ class << self
2533
+ attr_accessor :_bel_trans_targs
2534
+ private :_bel_trans_targs, :_bel_trans_targs=
2535
+ end
2536
+ self._bel_trans_targs = [
2537
+ 0, 2, 3, 4, 15, 14, 0, 5,
2538
+ 12, 6, 5, 12, 6, 19, 0, 0,
2539
+ 8, 9, 10, 21, 11, 10, 21, 11,
2540
+ 13, 0, 13, 14, 15, 16, 17, 18,
2541
+ 3, 4, 14, 17, 18, 0, 20, 19
2542
+ ]
2543
+
2544
+ class << self
2545
+ attr_accessor :_bel_trans_actions
2546
+ private :_bel_trans_actions, :_bel_trans_actions=
2547
+ end
2548
+ self._bel_trans_actions = [
2549
+ 2, 0, 0, 0, 3, 3, 5, 7,
2550
+ 8, 7, 0, 9, 0, 3, 0, 11,
2551
+ 0, 0, 7, 13, 7, 0, 14, 0,
2552
+ 15, 17, 18, 0, 0, 20, 22, 23,
2553
+ 22, 22, 24, 0, 26, 29, 20, 0
2554
+ ]
2555
+
2556
+ class << self
2557
+ attr_accessor :_bel_eof_actions
2558
+ private :_bel_eof_actions, :_bel_eof_actions=
2559
+ end
2560
+ self._bel_eof_actions = [
2561
+ 0, 1, 1, 4, 6, 6, 6, 0,
2562
+ 10, 12, 12, 12, 15, 0, 16, 19,
2563
+ 21, 25, 27, 28, 30, 0
2564
+ ]
2565
+
2566
+ class << self
2567
+ attr_accessor :bel_start
2568
+ end
2569
+ self.bel_start = 1;
2570
+ class << self
2571
+ attr_accessor :bel_first_final
2572
+ end
2573
+ self.bel_first_final = 12;
2574
+ class << self
2575
+ attr_accessor :bel_error
2576
+ end
2577
+ self.bel_error = 0;
2578
+
2579
+ class << self
2580
+ attr_accessor :bel_en_ident_node
2581
+ end
2582
+ self.bel_en_ident_node = 7;
2583
+ class << self
2584
+ attr_accessor :bel_en_string_node
2585
+ end
2586
+ self.bel_en_string_node = 8;
2587
+ class << self
2588
+ attr_accessor :bel_en_parameter_node
2589
+ end
2590
+ self.bel_en_parameter_node = 1;
2591
+
2592
+
2593
+ # end: ragel
2594
+ end
2595
+
2596
+ def each
2597
+ @buffers = {}
2598
+ @incomplete = {}
2599
+ data = @content.unpack('C*')
2600
+ p = 0
2601
+ pe = data.length
2602
+ p_start = 0
2603
+ p_end = 0
2604
+ id_start = 0
2605
+ id_end = 0
2606
+ eof = data.length
2607
+
2608
+ # begin: ragel
2609
+
2610
+ begin
2611
+ p ||= 0
2612
+ pe ||= data.length
2613
+ cs = bel_start
2614
+ end
2615
+
2616
+
2617
+ begin
2618
+ testEof = false
2619
+ _slen, _trans, _keys, _inds, _acts, _nacts = nil
2620
+ _goto_level = 0
2621
+ _resume = 10
2622
+ _eof_trans = 15
2623
+ _again = 20
2624
+ _test_eof = 30
2625
+ _out = 40
2626
+ while true
2627
+ if _goto_level <= 0
2628
+ if p == pe
2629
+ _goto_level = _test_eof
2630
+ next
2631
+ end
2632
+ if cs == 0
2633
+ _goto_level = _out
2634
+ next
2635
+ end
2636
+ end
2637
+ if _goto_level <= _resume
2638
+ _keys = cs << 1
2639
+ _inds = _bel_index_offsets[cs]
2640
+ _slen = _bel_key_spans[cs]
2641
+ _wide = data[p].ord
2642
+ _trans = if ( _slen > 0 &&
2643
+ _bel_trans_keys[_keys] <= _wide &&
2644
+ _wide <= _bel_trans_keys[_keys + 1]
2645
+ ) then
2646
+ _bel_indicies[ _inds + _wide - _bel_trans_keys[_keys] ]
2647
+ else
2648
+ _bel_indicies[ _inds + _slen ]
2649
+ end
2650
+ cs = _bel_trans_targs[_trans]
2651
+ if _bel_trans_actions[_trans] != 0
2652
+ case _bel_trans_actions[_trans]
2653
+ when 3 then
2654
+ begin
2655
+
2656
+ trace('IDENTIFIER start_identifier')
2657
+ @identifier_started = true
2658
+ id_start = p;
2659
+ end
2660
+ when 20 then
2661
+ begin
2662
+
2663
+ trace('IDENTIFIER end_identifier')
2664
+ id_end = p
2665
+ chars = data[id_start...id_end]
2666
+ completed = !chars.empty?
2667
+ ast_node = identifier(utf8_string(chars), complete: completed)
2668
+ @buffers[:ident] = ast_node
2669
+ end
2670
+ when 17 then
2671
+ begin
2672
+
2673
+ trace('IDENTIFIER an_ident_err')
2674
+ id_end = p
2675
+ chars = data[id_start...id_end]
2676
+ ast_node = identifier(utf8_string(chars), complete: false)
2677
+ @buffers[:ident] = ast_node
2678
+ end
2679
+ when 29 then
2680
+ begin
2681
+
2682
+ trace('IDENTIFIER ident_node_err')
2683
+ id_end = p
2684
+ chars = data[id_start...id_end]
2685
+ ast_node = identifier(utf8_string(chars), complete: false)
2686
+ yield ast_node
2687
+ end
1384
2688
  when 7 then
1385
2689
  begin
1386
2690
 
1387
- @buffers[:string] = string(utf8_string(@buffers[:string]))
2691
+ trace('STRING start_string')
2692
+ @string_opened = true
2693
+ p_start = p
2694
+ end
2695
+ when 5 then
2696
+ begin
2697
+
2698
+ trace('STRING a_string_err')
2699
+ p_end = p
2700
+ chars = data[p_start...p_end]
2701
+ ast_node = string(utf8_string(chars), complete: false)
2702
+ @buffers[:string] = ast_node
2703
+ end
2704
+ when 11 then
2705
+ begin
2706
+
2707
+ trace('STRING string_node_err')
2708
+ p_end = p
2709
+ chars = data[p_start...p_end]
2710
+ ast_node = string(utf8_string(chars), complete: false)
2711
+ yield ast_node
2712
+ end
2713
+ when 22 then
2714
+ begin
2715
+
2716
+ trace('PARAMETER add_prefix')
2717
+ ident = @buffers.delete(:ident)
2718
+ prefix_node = prefix(ident, complete: ident.complete)
2719
+ @buffers[:param_prefix] = prefix_node
2720
+ end
2721
+ when 2 then
2722
+ begin
2723
+
2724
+ trace('IDENTIFIER an_ident_err')
2725
+ id_end = p
2726
+ chars = data[id_start...id_end]
2727
+ ast_node = identifier(utf8_string(chars), complete: false)
2728
+ @buffers[:ident] = ast_node
2729
+ end
2730
+ begin
2731
+
2732
+ trace('STRING a_string_err')
2733
+ p_end = p
2734
+ chars = data[p_start...p_end]
2735
+ ast_node = string(utf8_string(chars), complete: false)
2736
+ @buffers[:string] = ast_node
2737
+ end
2738
+ when 9 then
2739
+ begin
2740
+
2741
+ trace('STRING stop_string')
2742
+ @string_closed = true
2743
+ p_end = p
2744
+ end
2745
+ begin
2746
+
2747
+ trace('STRING string_end')
2748
+ completed = @string_opened && @string_closed
2749
+ chars = data[p_start...p_end]
2750
+ ast_node = string(utf8_string(chars), complete: true)
2751
+ @buffers[:string] = ast_node
2752
+ end
2753
+ when 26 then
2754
+ begin
2755
+
2756
+ trace('PARAMETER parameter_end')
2757
+ param_node = parameter()
2758
+ completed = true
2759
+ prefix_node = @buffers.delete(:param_prefix)
2760
+ unless prefix_node.nil?
2761
+ param_node <<= prefix_node
2762
+ unless prefix_node.complete
2763
+ trace('PN incomplete')
2764
+ completed = false
2765
+ end
2766
+ end
2767
+
2768
+ value_node = @buffers.delete(:param_value)
2769
+ unless value_node.nil?
2770
+ param_node <<= value_node
2771
+ unless value_node.complete
2772
+ trace('VN incomplete')
2773
+ completed = false
2774
+ end
2775
+ else
2776
+ completed = false
2777
+ end
2778
+
2779
+ param_node.complete = completed
2780
+ @buffers[:parameter] = param_node
2781
+ end
2782
+ begin
2783
+
2784
+ trace('PARAMETER yield_parameter')
2785
+ yield @buffers[:parameter]
2786
+ end
2787
+ when 24 then
2788
+ begin
2789
+
2790
+ trace('PARAMETER add_prefix')
2791
+ ident = @buffers.delete(:ident)
2792
+ prefix_node = prefix(ident, complete: ident.complete)
2793
+ @buffers[:param_prefix] = prefix_node
2794
+ end
2795
+ begin
2796
+
2797
+ trace('IDENTIFIER start_identifier')
2798
+ @identifier_started = true
2799
+ id_start = p;
2800
+ end
2801
+ when 8 then
2802
+ begin
2803
+
2804
+ trace('STRING start_string')
2805
+ @string_opened = true
2806
+ p_start = p
2807
+ end
2808
+ begin
2809
+
2810
+ trace('STRING stop_string')
2811
+ @string_closed = true
2812
+ p_end = p
2813
+ end
2814
+ begin
2815
+
2816
+ trace('STRING string_end')
2817
+ completed = @string_opened && @string_closed
2818
+ chars = data[p_start...p_end]
2819
+ ast_node = string(utf8_string(chars), complete: true)
2820
+ @buffers[:string] = ast_node
2821
+ end
2822
+ when 14 then
2823
+ begin
2824
+
2825
+ trace('STRING stop_string')
2826
+ @string_closed = true
2827
+ p_end = p
2828
+ end
2829
+ begin
2830
+
2831
+ trace('STRING string_end')
2832
+ completed = @string_opened && @string_closed
2833
+ chars = data[p_start...p_end]
2834
+ ast_node = string(utf8_string(chars), complete: true)
2835
+ @buffers[:string] = ast_node
2836
+ end
2837
+ begin
2838
+
2839
+ trace('STRING yield_string')
2840
+ yield @buffers[:string]
2841
+ end
2842
+ when 15 then
2843
+ begin
2844
+
2845
+ trace('PARAMETER add_string_param_value')
2846
+ string_node = @buffers.delete(:string)
2847
+ value_node = value(string_node, complete: string_node.complete)
2848
+ @buffers[:param_value] = value_node
2849
+ end
2850
+ begin
2851
+
2852
+ trace('PARAMETER parameter_end')
2853
+ param_node = parameter()
2854
+ completed = true
2855
+ prefix_node = @buffers.delete(:param_prefix)
2856
+ unless prefix_node.nil?
2857
+ param_node <<= prefix_node
2858
+ unless prefix_node.complete
2859
+ trace('PN incomplete')
2860
+ completed = false
2861
+ end
2862
+ end
2863
+
2864
+ value_node = @buffers.delete(:param_value)
2865
+ unless value_node.nil?
2866
+ param_node <<= value_node
2867
+ unless value_node.complete
2868
+ trace('VN incomplete')
2869
+ completed = false
2870
+ end
2871
+ else
2872
+ completed = false
2873
+ end
2874
+
2875
+ param_node.complete = completed
2876
+ @buffers[:parameter] = param_node
2877
+ end
2878
+ begin
2879
+
2880
+ trace('PARAMETER yield_parameter')
2881
+ yield @buffers[:parameter]
2882
+ end
2883
+ when 23 then
2884
+ begin
2885
+
2886
+ trace('PARAMETER add_prefix')
2887
+ ident = @buffers.delete(:ident)
2888
+ prefix_node = prefix(ident, complete: ident.complete)
2889
+ @buffers[:param_prefix] = prefix_node
2890
+ end
2891
+ begin
2892
+
2893
+ trace('PARAMETER parameter_end')
2894
+ param_node = parameter()
2895
+ completed = true
2896
+ prefix_node = @buffers.delete(:param_prefix)
2897
+ unless prefix_node.nil?
2898
+ param_node <<= prefix_node
2899
+ unless prefix_node.complete
2900
+ trace('PN incomplete')
2901
+ completed = false
2902
+ end
2903
+ end
2904
+
2905
+ value_node = @buffers.delete(:param_value)
2906
+ unless value_node.nil?
2907
+ param_node <<= value_node
2908
+ unless value_node.complete
2909
+ trace('VN incomplete')
2910
+ completed = false
2911
+ end
2912
+ else
2913
+ completed = false
2914
+ end
2915
+
2916
+ param_node.complete = completed
2917
+ @buffers[:parameter] = param_node
2918
+ end
2919
+ begin
2920
+
2921
+ trace('PARAMETER yield_parameter')
2922
+ yield @buffers[:parameter]
2923
+ end
2924
+ when 18 then
2925
+ begin
2926
+
2927
+ trace('IDENTIFIER end_identifier')
2928
+ id_end = p
2929
+ chars = data[id_start...id_end]
2930
+ completed = !chars.empty?
2931
+ ast_node = identifier(utf8_string(chars), complete: completed)
2932
+ @buffers[:ident] = ast_node
2933
+ end
2934
+ begin
2935
+
2936
+ trace('PARAMETER add_ident_param_value')
2937
+ ident = @buffers.delete(:ident)
2938
+ value_node = value(ident, complete: ident.complete)
2939
+ @buffers[:param_value] = value_node
1388
2940
  end
1389
2941
  begin
1390
2942
 
1391
- @buffers[:parameter] ||= parameter(prefix(nil))
1392
- @buffers[:parameter] = @buffers[:parameter] << value(@buffers[:string])
2943
+ trace('PARAMETER parameter_end')
2944
+ param_node = parameter()
2945
+ completed = true
2946
+ prefix_node = @buffers.delete(:param_prefix)
2947
+ unless prefix_node.nil?
2948
+ param_node <<= prefix_node
2949
+ unless prefix_node.complete
2950
+ trace('PN incomplete')
2951
+ completed = false
2952
+ end
2953
+ end
2954
+
2955
+ value_node = @buffers.delete(:param_value)
2956
+ unless value_node.nil?
2957
+ param_node <<= value_node
2958
+ unless value_node.complete
2959
+ trace('VN incomplete')
2960
+ completed = false
2961
+ end
2962
+ else
2963
+ completed = false
2964
+ end
2965
+
2966
+ param_node.complete = completed
2967
+ @buffers[:parameter] = param_node
1393
2968
  end
1394
2969
  begin
1395
2970
 
2971
+ trace('PARAMETER yield_parameter')
1396
2972
  yield @buffers[:parameter]
1397
2973
  end
2974
+ when 13 then
2975
+ begin
2976
+
2977
+ trace('STRING start_string')
2978
+ @string_opened = true
2979
+ p_start = p
2980
+ end
2981
+ begin
2982
+
2983
+ trace('STRING stop_string')
2984
+ @string_closed = true
2985
+ p_end = p
2986
+ end
2987
+ begin
2988
+
2989
+ trace('STRING string_end')
2990
+ completed = @string_opened && @string_closed
2991
+ chars = data[p_start...p_end]
2992
+ ast_node = string(utf8_string(chars), complete: true)
2993
+ @buffers[:string] = ast_node
2994
+ end
2995
+ begin
2996
+
2997
+ trace('STRING yield_string')
2998
+ yield @buffers[:string]
2999
+ end
1398
3000
  end
1399
3001
  end
1400
3002
  end
@@ -1412,69 +3014,481 @@ begin
1412
3014
  if _goto_level <= _test_eof
1413
3015
  if p == eof
1414
3016
  case _bel_eof_actions[cs]
1415
- when 8 then
3017
+ when 30 then
3018
+ begin
3019
+
3020
+ trace('IDENTIFIER yield_identifier')
3021
+ yield @buffers[:ident]
3022
+ end
3023
+ when 27 then
1416
3024
  begin
1417
3025
 
1418
- unless @buffers[:ident].is_a?(::AST::Node)
1419
- @buffers[:ident] ||= []
1420
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]).sub(/\n$/, ''))
3026
+ trace("PARAMETER parameter_node_eof")
3027
+ param_node = parameter()
3028
+ completed = true
3029
+ prefix_node = @buffers.delete(:param_prefix)
3030
+ unless prefix_node.nil?
3031
+ param_node <<= prefix_node
3032
+ unless prefix_node.complete
3033
+ completed = false
3034
+ end
3035
+ end
3036
+
3037
+ string_value_node = @buffers.delete(:string)
3038
+ unless string_value_node.nil?
3039
+ param_node <<= string_value_node
3040
+ unless string_value_node.complete
3041
+ completed = false
3042
+ end
3043
+ else
3044
+ completed = false
1421
3045
  end
3046
+
3047
+ param_node.complete = completed
3048
+ yield param_node
3049
+ end
3050
+ when 28 then
3051
+ begin
3052
+
3053
+ trace('IDENTIFIER end_identifier')
3054
+ id_end = p
3055
+ chars = data[id_start...id_end]
3056
+ completed = !chars.empty?
3057
+ ast_node = identifier(utf8_string(chars), complete: completed)
3058
+ @buffers[:ident] = ast_node
3059
+ end
3060
+ begin
3061
+
3062
+ trace('IDENTIFIER yield_identifier')
3063
+ yield @buffers[:ident]
3064
+ end
3065
+ when 4 then
3066
+ begin
3067
+
3068
+ trace('STRING a_string_err')
3069
+ p_end = p
3070
+ chars = data[p_start...p_end]
3071
+ ast_node = string(utf8_string(chars), complete: false)
3072
+ @buffers[:string] = ast_node
3073
+ end
3074
+ begin
3075
+
3076
+ trace("PARAMETER parameter_node_eof")
3077
+ param_node = parameter()
3078
+ completed = true
3079
+ prefix_node = @buffers.delete(:param_prefix)
3080
+ unless prefix_node.nil?
3081
+ param_node <<= prefix_node
3082
+ unless prefix_node.complete
3083
+ completed = false
3084
+ end
3085
+ end
3086
+
3087
+ string_value_node = @buffers.delete(:string)
3088
+ unless string_value_node.nil?
3089
+ param_node <<= string_value_node
3090
+ unless string_value_node.complete
3091
+ completed = false
3092
+ end
3093
+ else
3094
+ completed = false
3095
+ end
3096
+
3097
+ param_node.complete = completed
3098
+ yield param_node
3099
+ end
3100
+ when 10 then
3101
+ begin
3102
+
3103
+ trace('STRING string_node_err')
3104
+ p_end = p
3105
+ chars = data[p_start...p_end]
3106
+ ast_node = string(utf8_string(chars), complete: false)
3107
+ yield ast_node
3108
+ end
3109
+ begin
3110
+
3111
+ trace('STRING string_node_eof')
3112
+ yield @buffers[:string]
3113
+ end
3114
+ when 25 then
3115
+ begin
3116
+
3117
+ trace('IDENTIFIER an_ident_eof')
3118
+ if @identifier_started
3119
+ id_end = p
3120
+ chars = data[id_start...id_end]
3121
+ completed = !chars.empty?
3122
+ ast_node = identifier(utf8_string(chars), complete: completed)
3123
+ @buffers[:ident] = ast_node
3124
+ end
3125
+ end
3126
+ begin
3127
+
3128
+ trace('PARAMETER parameter_end')
3129
+ param_node = parameter()
3130
+ completed = true
3131
+ prefix_node = @buffers.delete(:param_prefix)
3132
+ unless prefix_node.nil?
3133
+ param_node <<= prefix_node
3134
+ unless prefix_node.complete
3135
+ trace('PN incomplete')
3136
+ completed = false
3137
+ end
3138
+ end
3139
+
3140
+ value_node = @buffers.delete(:param_value)
3141
+ unless value_node.nil?
3142
+ param_node <<= value_node
3143
+ unless value_node.complete
3144
+ trace('VN incomplete')
3145
+ completed = false
3146
+ end
3147
+ else
3148
+ completed = false
3149
+ end
3150
+
3151
+ param_node.complete = completed
3152
+ @buffers[:parameter] = param_node
3153
+ end
3154
+ begin
3155
+
3156
+ trace('PARAMETER yield_parameter')
3157
+ yield @buffers[:parameter]
3158
+ end
3159
+ when 6 then
3160
+ begin
3161
+
3162
+ trace('STRING eof_string')
3163
+ p_end = p
3164
+ chars = data[p_start...p_end]
3165
+ ast_node = string(utf8_string(chars), complete: false)
3166
+ @buffers[:string] = ast_node
3167
+ end
3168
+ begin
3169
+
3170
+ trace('STRING a_string_err')
3171
+ p_end = p
3172
+ chars = data[p_start...p_end]
3173
+ ast_node = string(utf8_string(chars), complete: false)
3174
+ @buffers[:string] = ast_node
1422
3175
  end
1423
- when 5 then
1424
3176
  begin
1425
3177
 
1426
- @buffers[:string] ||= []
1427
- @buffers[:string] = string(utf8_string(@buffers[:string]).sub(/\n$/, ''))
3178
+ trace("PARAMETER parameter_node_eof")
3179
+ param_node = parameter()
3180
+ completed = true
3181
+ prefix_node = @buffers.delete(:param_prefix)
3182
+ unless prefix_node.nil?
3183
+ param_node <<= prefix_node
3184
+ unless prefix_node.complete
3185
+ completed = false
3186
+ end
3187
+ end
3188
+
3189
+ string_value_node = @buffers.delete(:string)
3190
+ unless string_value_node.nil?
3191
+ param_node <<= string_value_node
3192
+ unless string_value_node.complete
3193
+ completed = false
3194
+ end
3195
+ else
3196
+ completed = false
3197
+ end
3198
+
3199
+ param_node.complete = completed
3200
+ yield param_node
1428
3201
  end
1429
3202
  when 12 then
1430
3203
  begin
1431
3204
 
1432
- unless @buffers[:ident].is_a?(::AST::Node)
1433
- @buffers[:ident] ||= []
1434
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]).sub(/\n$/, ''))
3205
+ trace('STRING eof_string')
3206
+ p_end = p
3207
+ chars = data[p_start...p_end]
3208
+ ast_node = string(utf8_string(chars), complete: false)
3209
+ @buffers[:string] = ast_node
3210
+ end
3211
+ begin
3212
+
3213
+ trace('STRING string_node_err')
3214
+ p_end = p
3215
+ chars = data[p_start...p_end]
3216
+ ast_node = string(utf8_string(chars), complete: false)
3217
+ yield ast_node
3218
+ end
3219
+ begin
3220
+
3221
+ trace('STRING string_node_eof')
3222
+ yield @buffers[:string]
3223
+ end
3224
+ when 15 then
3225
+ begin
3226
+
3227
+ trace('PARAMETER add_string_param_value')
3228
+ string_node = @buffers.delete(:string)
3229
+ value_node = value(string_node, complete: string_node.complete)
3230
+ @buffers[:param_value] = value_node
3231
+ end
3232
+ begin
3233
+
3234
+ trace('PARAMETER parameter_end')
3235
+ param_node = parameter()
3236
+ completed = true
3237
+ prefix_node = @buffers.delete(:param_prefix)
3238
+ unless prefix_node.nil?
3239
+ param_node <<= prefix_node
3240
+ unless prefix_node.complete
3241
+ trace('PN incomplete')
3242
+ completed = false
3243
+ end
3244
+ end
3245
+
3246
+ value_node = @buffers.delete(:param_value)
3247
+ unless value_node.nil?
3248
+ param_node <<= value_node
3249
+ unless value_node.complete
3250
+ trace('VN incomplete')
3251
+ completed = false
3252
+ end
3253
+ else
3254
+ completed = false
1435
3255
  end
3256
+
3257
+ param_node.complete = completed
3258
+ @buffers[:parameter] = param_node
1436
3259
  end
1437
3260
  begin
1438
3261
 
1439
- @buffers[:ident] ||= []
1440
- yield @buffers[:ident]
3262
+ trace('PARAMETER yield_parameter')
3263
+ yield @buffers[:parameter]
1441
3264
  end
1442
3265
  when 1 then
1443
3266
  begin
1444
3267
 
1445
- unless @buffers[:ident].is_a?(::AST::Node)
1446
- @buffers[:ident] ||= []
1447
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]).sub(/\n$/, ''))
3268
+ trace('IDENTIFIER an_ident_eof')
3269
+ if @identifier_started
3270
+ id_end = p
3271
+ chars = data[id_start...id_end]
3272
+ completed = !chars.empty?
3273
+ ast_node = identifier(utf8_string(chars), complete: completed)
3274
+ @buffers[:ident] = ast_node
1448
3275
  end
1449
3276
  end
1450
3277
  begin
1451
3278
 
1452
- @buffers[:string] ||= []
1453
- @buffers[:string] = string(utf8_string(@buffers[:string]).sub(/\n$/, ''))
3279
+ trace('IDENTIFIER an_ident_err')
3280
+ id_end = p
3281
+ chars = data[id_start...id_end]
3282
+ ast_node = identifier(utf8_string(chars), complete: false)
3283
+ @buffers[:ident] = ast_node
3284
+ end
3285
+ begin
3286
+
3287
+ trace('STRING a_string_err')
3288
+ p_end = p
3289
+ chars = data[p_start...p_end]
3290
+ ast_node = string(utf8_string(chars), complete: false)
3291
+ @buffers[:string] = ast_node
1454
3292
  end
1455
- when 4 then
1456
3293
  begin
1457
3294
 
1458
- @buffers[:string] ||= []
1459
- @buffers[:string] = string(utf8_string(@buffers[:string]).sub(/\n$/, ''))
3295
+ trace("PARAMETER parameter_node_eof")
3296
+ param_node = parameter()
3297
+ completed = true
3298
+ prefix_node = @buffers.delete(:param_prefix)
3299
+ unless prefix_node.nil?
3300
+ param_node <<= prefix_node
3301
+ unless prefix_node.complete
3302
+ completed = false
3303
+ end
3304
+ end
3305
+
3306
+ string_value_node = @buffers.delete(:string)
3307
+ unless string_value_node.nil?
3308
+ param_node <<= string_value_node
3309
+ unless string_value_node.complete
3310
+ completed = false
3311
+ end
3312
+ else
3313
+ completed = false
3314
+ end
3315
+
3316
+ param_node.complete = completed
3317
+ yield param_node
1460
3318
  end
3319
+ when 21 then
1461
3320
  begin
1462
3321
 
1463
- unless @buffers[:ident].is_a?(::AST::Node)
1464
- @buffers[:ident] ||= []
1465
- @buffers[:ident] = identifier(utf8_string(@buffers[:ident]).sub(/\n$/, ''))
3322
+ trace('IDENTIFIER an_ident_eof')
3323
+ if @identifier_started
3324
+ id_end = p
3325
+ chars = data[id_start...id_end]
3326
+ completed = !chars.empty?
3327
+ ast_node = identifier(utf8_string(chars), complete: completed)
3328
+ @buffers[:ident] = ast_node
1466
3329
  end
1467
3330
  end
1468
- when 14 then
1469
3331
  begin
1470
3332
 
1471
- @buffers[:string] ||= []
1472
- @buffers[:string] = string(utf8_string(@buffers[:string]).sub(/\n$/, ''))
3333
+ trace('PARAMETER add_prefix')
3334
+ ident = @buffers.delete(:ident)
3335
+ prefix_node = prefix(ident, complete: ident.complete)
3336
+ @buffers[:param_prefix] = prefix_node
1473
3337
  end
1474
3338
  begin
1475
3339
 
1476
- @buffers[:string] ||= []
1477
- yield @buffers[:string]
3340
+ trace('PARAMETER parameter_end')
3341
+ param_node = parameter()
3342
+ completed = true
3343
+ prefix_node = @buffers.delete(:param_prefix)
3344
+ unless prefix_node.nil?
3345
+ param_node <<= prefix_node
3346
+ unless prefix_node.complete
3347
+ trace('PN incomplete')
3348
+ completed = false
3349
+ end
3350
+ end
3351
+
3352
+ value_node = @buffers.delete(:param_value)
3353
+ unless value_node.nil?
3354
+ param_node <<= value_node
3355
+ unless value_node.complete
3356
+ trace('VN incomplete')
3357
+ completed = false
3358
+ end
3359
+ else
3360
+ completed = false
3361
+ end
3362
+
3363
+ param_node.complete = completed
3364
+ @buffers[:parameter] = param_node
3365
+ end
3366
+ begin
3367
+
3368
+ trace('PARAMETER yield_parameter')
3369
+ yield @buffers[:parameter]
3370
+ end
3371
+ when 16 then
3372
+ begin
3373
+
3374
+ trace('IDENTIFIER end_identifier')
3375
+ id_end = p
3376
+ chars = data[id_start...id_end]
3377
+ completed = !chars.empty?
3378
+ ast_node = identifier(utf8_string(chars), complete: completed)
3379
+ @buffers[:ident] = ast_node
3380
+ end
3381
+ begin
3382
+
3383
+ trace('IDENTIFIER an_ident_eof')
3384
+ if @identifier_started
3385
+ id_end = p
3386
+ chars = data[id_start...id_end]
3387
+ completed = !chars.empty?
3388
+ ast_node = identifier(utf8_string(chars), complete: completed)
3389
+ @buffers[:ident] = ast_node
3390
+ end
3391
+ end
3392
+ begin
3393
+
3394
+ trace('PARAMETER add_ident_param_value')
3395
+ ident = @buffers.delete(:ident)
3396
+ value_node = value(ident, complete: ident.complete)
3397
+ @buffers[:param_value] = value_node
3398
+ end
3399
+ begin
3400
+
3401
+ trace('PARAMETER parameter_end')
3402
+ param_node = parameter()
3403
+ completed = true
3404
+ prefix_node = @buffers.delete(:param_prefix)
3405
+ unless prefix_node.nil?
3406
+ param_node <<= prefix_node
3407
+ unless prefix_node.complete
3408
+ trace('PN incomplete')
3409
+ completed = false
3410
+ end
3411
+ end
3412
+
3413
+ value_node = @buffers.delete(:param_value)
3414
+ unless value_node.nil?
3415
+ param_node <<= value_node
3416
+ unless value_node.complete
3417
+ trace('VN incomplete')
3418
+ completed = false
3419
+ end
3420
+ else
3421
+ completed = false
3422
+ end
3423
+
3424
+ param_node.complete = completed
3425
+ @buffers[:parameter] = param_node
3426
+ end
3427
+ begin
3428
+
3429
+ trace('PARAMETER yield_parameter')
3430
+ yield @buffers[:parameter]
3431
+ end
3432
+ when 19 then
3433
+ begin
3434
+
3435
+ trace('IDENTIFIER an_ident_eof')
3436
+ if @identifier_started
3437
+ id_end = p
3438
+ chars = data[id_start...id_end]
3439
+ completed = !chars.empty?
3440
+ ast_node = identifier(utf8_string(chars), complete: completed)
3441
+ @buffers[:ident] = ast_node
3442
+ end
3443
+ end
3444
+ begin
3445
+
3446
+ trace('IDENTIFIER end_identifier')
3447
+ id_end = p
3448
+ chars = data[id_start...id_end]
3449
+ completed = !chars.empty?
3450
+ ast_node = identifier(utf8_string(chars), complete: completed)
3451
+ @buffers[:ident] = ast_node
3452
+ end
3453
+ begin
3454
+
3455
+ trace('PARAMETER add_ident_param_value')
3456
+ ident = @buffers.delete(:ident)
3457
+ value_node = value(ident, complete: ident.complete)
3458
+ @buffers[:param_value] = value_node
3459
+ end
3460
+ begin
3461
+
3462
+ trace('PARAMETER parameter_end')
3463
+ param_node = parameter()
3464
+ completed = true
3465
+ prefix_node = @buffers.delete(:param_prefix)
3466
+ unless prefix_node.nil?
3467
+ param_node <<= prefix_node
3468
+ unless prefix_node.complete
3469
+ trace('PN incomplete')
3470
+ completed = false
3471
+ end
3472
+ end
3473
+
3474
+ value_node = @buffers.delete(:param_value)
3475
+ unless value_node.nil?
3476
+ param_node <<= value_node
3477
+ unless value_node.complete
3478
+ trace('VN incomplete')
3479
+ completed = false
3480
+ end
3481
+ else
3482
+ completed = false
3483
+ end
3484
+
3485
+ param_node.complete = completed
3486
+ @buffers[:parameter] = param_node
3487
+ end
3488
+ begin
3489
+
3490
+ trace('PARAMETER yield_parameter')
3491
+ yield @buffers[:parameter]
1478
3492
  end
1479
3493
  end
1480
3494
  end
@@ -1486,7 +3500,7 @@ begin
1486
3500
  end
1487
3501
  end
1488
3502
 
1489
- # end: ragel
3503
+ # end: ragel
1490
3504
  end
1491
3505
  end
1492
3506
  end