vorax 0.4.2 → 5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. data/README.md +4 -29
  2. data/vorax.gemspec +3 -11
  3. metadata +4 -92
  4. data/.rspec +0 -1
  5. data/Rakefile +0 -30
  6. data/lib/vorax.rb +0 -60
  7. data/lib/vorax/base_funnel.rb +0 -30
  8. data/lib/vorax/output/html_convertor.rb +0 -120
  9. data/lib/vorax/output/html_funnel.rb +0 -79
  10. data/lib/vorax/output/pagezip_convertor.rb +0 -20
  11. data/lib/vorax/output/tablezip_convertor.rb +0 -22
  12. data/lib/vorax/output/vertical_convertor.rb +0 -53
  13. data/lib/vorax/output/zip_convertor.rb +0 -117
  14. data/lib/vorax/parser/argument.rb~ +0 -125
  15. data/lib/vorax/parser/conn_string.rb +0 -104
  16. data/lib/vorax/parser/grammars/alias.rb +0 -904
  17. data/lib/vorax/parser/grammars/alias.rl +0 -138
  18. data/lib/vorax/parser/grammars/column.rb +0 -454
  19. data/lib/vorax/parser/grammars/column.rl +0 -64
  20. data/lib/vorax/parser/grammars/common.rl +0 -107
  21. data/lib/vorax/parser/grammars/declare.rb +0 -9606
  22. data/lib/vorax/parser/grammars/declare.rl +0 -160
  23. data/lib/vorax/parser/grammars/for_block.rb +0 -440
  24. data/lib/vorax/parser/grammars/for_block.rl +0 -73
  25. data/lib/vorax/parser/grammars/plsql_def.rb +0 -539
  26. data/lib/vorax/parser/grammars/plsql_def.rl +0 -73
  27. data/lib/vorax/parser/grammars/statement.rb +0 -925
  28. data/lib/vorax/parser/grammars/statement.rl +0 -83
  29. data/lib/vorax/parser/parser.rb +0 -344
  30. data/lib/vorax/parser/plsql_structure.rb +0 -222
  31. data/lib/vorax/parser/plsql_walker.rb +0 -143
  32. data/lib/vorax/parser/statement_inspector.rb~ +0 -52
  33. data/lib/vorax/parser/stmt_inspector.rb +0 -78
  34. data/lib/vorax/parser/target_ref.rb +0 -110
  35. data/lib/vorax/sqlplus.rb +0 -273
  36. data/lib/vorax/version.rb +0 -7
  37. data/lib/vorax/vorax_io.rb +0 -70
  38. data/spec/column_spec.rb +0 -40
  39. data/spec/conn_string_spec.rb +0 -53
  40. data/spec/declare_spec.rb +0 -281
  41. data/spec/pagezip_spec.rb +0 -153
  42. data/spec/parser_spec.rb +0 -352
  43. data/spec/plsql_structure_spec.rb +0 -68
  44. data/spec/spec_helper.rb +0 -13
  45. data/spec/sql/create_objects.sql +0 -69
  46. data/spec/sql/dbms_crypto.spc +0 -339
  47. data/spec/sql/dbms_stats.spc +0 -4097
  48. data/spec/sql/drop_user.sql +0 -10
  49. data/spec/sql/muci.spc +0 -26
  50. data/spec/sql/setup_user.sql +0 -22
  51. data/spec/sql/test.fnc +0 -12
  52. data/spec/sql/test.pkg +0 -83
  53. data/spec/sqlplus_spec.rb +0 -52
  54. data/spec/stmt_inspector_spec.rb +0 -96
  55. data/spec/tablezip_spec.rb +0 -111
  56. data/spec/vertical_spec.rb +0 -150
@@ -1,73 +0,0 @@
1
- %%{
2
-
3
- machine for_block;
4
-
5
- include common "common.rl";
6
-
7
- action expr_start {
8
- @expr = Parser.walk_balanced_paren(data[(p..-1)])
9
- p += @expr.length - 1
10
- }
11
-
12
- action mark_end {
13
- @end_pos = p
14
- }
15
-
16
- action for_var {
17
- @for_var = data[(@start..@end)]
18
- }
19
-
20
- action start_capture_cursor {
21
- @cursor_var_start = p
22
- }
23
-
24
- action end_capture_cursor {
25
- @cursor_var = data[(@cursor_var_start..p-1)]
26
- }
27
-
28
- action start_identifier {
29
- @start = p
30
- }
31
-
32
- action end_identifier {
33
- @end = p - 1
34
- }
35
-
36
- # a bracket expression
37
- expression = '(' >expr_start;
38
- id = identifier >start_identifier %end_identifier;
39
-
40
- cursor_var = qualified_identifier - K_REVERSE;
41
-
42
- for_stmt_range = ws+ (K_REVERSE ws+)? digit+ ws* '..' ws* digit+ ws+;
43
- for_stmt_query = ws* expression ws*;
44
- for_stmt_cursor = ws+ cursor_var >start_capture_cursor %end_capture_cursor ws+;
45
- for_stmt := (K_FOR ws+ id %for_var ws+ K_IN (for_stmt_range | for_stmt_query | for_stmt_cursor) K_LOOP ws+) @mark_end;
46
-
47
- }%%
48
-
49
-
50
- module Vorax
51
-
52
- module Parser
53
-
54
- def self.describe_for(data)
55
- @cursor_var = nil
56
- @for_var = nil
57
- @expr = nil
58
- @end_pos = -1
59
- if data
60
- eof = data.length
61
- %% write data;
62
- %% write init;
63
- %% write exec;
64
- end
65
- return {:cursor_var => @cursor_var,
66
- :for_var => @for_var,
67
- :expr => @expr,
68
- :end_pos => @end_pos}
69
- end
70
-
71
- end
72
-
73
- end
@@ -1,539 +0,0 @@
1
-
2
- # line 1 "lib/vorax/parser/grammars/plsql_def.rl"
3
-
4
- # line 45 "lib/vorax/parser/grammars/plsql_def.rl"
5
-
6
-
7
- module Vorax
8
-
9
- module Parser
10
-
11
- # Check if the provided fragment could be a PLSQL spec or body (package or type).
12
- #
13
- # @param data [String] the PLSQL spec fragment (e.g. "PACKAGE muci as")
14
- # @return [Hash] a hash with the following keys: :name => is the name
15
- # of the PLSQL spec module, :end_def => the position where the spec
16
- # fragment ends (immediatelly after "AS|IS"), :type => 'SPEC' or 'BODY'.
17
- def self.plsql_def(data)
18
- @end_pos = -1
19
- @name = ""
20
- @type = ""
21
- if data
22
- eof = data.length
23
-
24
- # line 25 "lib/vorax/parser/grammars/plsql_def.rb"
25
- class << self
26
- attr_accessor :_plsql_def_actions
27
- private :_plsql_def_actions, :_plsql_def_actions=
28
- end
29
- self._plsql_def_actions = [
30
- 0, 1, 0, 1, 1, 1, 2, 1,
31
- 3, 1, 4, 1, 5, 1, 6, 2,
32
- 5, 0
33
- ]
34
-
35
- class << self
36
- attr_accessor :_plsql_def_key_offsets
37
- private :_plsql_def_key_offsets, :_plsql_def_key_offsets=
38
- end
39
- self._plsql_def_key_offsets = [
40
- 0, 0, 6, 8, 10, 20, 38, 39,
41
- 45, 46, 47, 48, 49, 51, 66, 67,
42
- 68, 69, 70, 72, 89, 104, 110, 111,
43
- 112, 113, 114, 116, 133, 150, 167, 182,
44
- 188, 189, 190, 191, 192, 194, 196, 198,
45
- 200, 202, 204, 206, 208, 210, 212, 214,
46
- 219, 234, 235, 241, 250, 251, 252, 253,
47
- 254, 256, 258, 263, 264, 265, 266, 267,
48
- 269, 277, 278, 283, 297, 312, 313, 314,
49
- 315, 316, 318, 335, 352, 369, 384, 401,
50
- 402, 408, 417, 418, 419, 420, 421, 423,
51
- 425, 430, 431, 432, 433, 434, 436, 444,
52
- 445, 450, 464, 479, 480, 481, 482, 483,
53
- 485, 502, 517, 518, 519, 520, 521, 523,
54
- 525, 527, 527, 532, 537
55
- ]
56
-
57
- class << self
58
- attr_accessor :_plsql_def_trans_keys
59
- private :_plsql_def_trans_keys, :_plsql_def_trans_keys=
60
- end
61
- self._plsql_def_trans_keys = [
62
- 69, 80, 84, 101, 112, 116, 78, 110,
63
- 68, 100, 32, 45, 47, 59, 73, 76,
64
- 105, 108, 9, 13, 32, 34, 45, 47,
65
- 59, 73, 76, 95, 105, 108, 9, 13,
66
- 35, 36, 65, 90, 97, 122, 34, 32,
67
- 45, 47, 59, 9, 13, 45, 10, 42,
68
- 42, 42, 47, 32, 45, 47, 59, 95,
69
- 9, 13, 35, 36, 48, 57, 65, 90,
70
- 97, 122, 45, 10, 42, 42, 42, 47,
71
- 32, 45, 47, 59, 70, 95, 102, 9,
72
- 13, 35, 36, 48, 57, 65, 90, 97,
73
- 122, 32, 45, 47, 59, 95, 9, 13,
74
- 35, 36, 48, 57, 65, 90, 97, 122,
75
- 32, 45, 47, 59, 9, 13, 45, 10,
76
- 42, 42, 42, 47, 32, 45, 47, 59,
77
- 79, 95, 111, 9, 13, 35, 36, 48,
78
- 57, 65, 90, 97, 122, 32, 45, 47,
79
- 59, 79, 95, 111, 9, 13, 35, 36,
80
- 48, 57, 65, 90, 97, 122, 32, 45,
81
- 47, 59, 80, 95, 112, 9, 13, 35,
82
- 36, 48, 57, 65, 90, 97, 122, 32,
83
- 45, 47, 59, 95, 9, 13, 35, 36,
84
- 48, 57, 65, 90, 97, 122, 32, 45,
85
- 47, 59, 9, 13, 45, 10, 42, 42,
86
- 42, 47, 70, 102, 79, 111, 79, 111,
87
- 80, 112, 65, 97, 67, 99, 75, 107,
88
- 65, 97, 71, 103, 69, 101, 32, 45,
89
- 47, 9, 13, 32, 34, 45, 47, 66,
90
- 95, 98, 9, 13, 35, 36, 65, 90,
91
- 97, 122, 34, 32, 45, 46, 47, 9,
92
- 13, 32, 45, 47, 65, 73, 97, 105,
93
- 9, 13, 45, 10, 42, 42, 42, 47,
94
- 83, 115, 32, 45, 47, 9, 13, 45,
95
- 10, 42, 42, 42, 47, 34, 95, 35,
96
- 36, 65, 90, 97, 122, 34, 32, 45,
97
- 47, 9, 13, 32, 45, 47, 95, 9,
98
- 13, 35, 36, 48, 57, 65, 90, 97,
99
- 122, 32, 45, 46, 47, 95, 9, 13,
100
- 35, 36, 48, 57, 65, 90, 97, 122,
101
- 45, 10, 42, 42, 42, 47, 32, 45,
102
- 46, 47, 79, 95, 111, 9, 13, 35,
103
- 36, 48, 57, 65, 90, 97, 122, 32,
104
- 45, 46, 47, 68, 95, 100, 9, 13,
105
- 35, 36, 48, 57, 65, 90, 97, 122,
106
- 32, 45, 46, 47, 89, 95, 121, 9,
107
- 13, 35, 36, 48, 57, 65, 90, 97,
108
- 122, 32, 45, 46, 47, 95, 9, 13,
109
- 35, 36, 48, 57, 65, 90, 97, 122,
110
- 32, 34, 45, 47, 65, 73, 95, 97,
111
- 105, 9, 13, 35, 36, 66, 90, 98,
112
- 122, 34, 32, 45, 46, 47, 9, 13,
113
- 32, 45, 47, 65, 73, 97, 105, 9,
114
- 13, 45, 10, 42, 42, 42, 47, 83,
115
- 115, 32, 45, 47, 9, 13, 45, 10,
116
- 42, 42, 42, 47, 34, 95, 35, 36,
117
- 65, 90, 97, 122, 34, 32, 45, 47,
118
- 9, 13, 32, 45, 47, 95, 9, 13,
119
- 35, 36, 48, 57, 65, 90, 97, 122,
120
- 32, 45, 46, 47, 95, 9, 13, 35,
121
- 36, 48, 57, 65, 90, 97, 122, 45,
122
- 10, 42, 42, 42, 47, 32, 45, 46,
123
- 47, 83, 95, 115, 9, 13, 35, 36,
124
- 48, 57, 65, 90, 97, 122, 32, 45,
125
- 46, 47, 95, 9, 13, 35, 36, 48,
126
- 57, 65, 90, 97, 122, 45, 10, 42,
127
- 42, 42, 47, 89, 121, 80, 112, 32,
128
- 45, 47, 9, 13, 32, 45, 47, 9,
129
- 13, 32, 45, 47, 65, 73, 97, 105,
130
- 9, 13, 0
131
- ]
132
-
133
- class << self
134
- attr_accessor :_plsql_def_single_lengths
135
- private :_plsql_def_single_lengths, :_plsql_def_single_lengths=
136
- end
137
- self._plsql_def_single_lengths = [
138
- 0, 6, 2, 2, 8, 10, 1, 4,
139
- 1, 1, 1, 1, 2, 5, 1, 1,
140
- 1, 1, 2, 7, 5, 4, 1, 1,
141
- 1, 1, 2, 7, 7, 7, 5, 4,
142
- 1, 1, 1, 1, 2, 2, 2, 2,
143
- 2, 2, 2, 2, 2, 2, 2, 3,
144
- 7, 1, 4, 7, 1, 1, 1, 1,
145
- 2, 2, 3, 1, 1, 1, 1, 2,
146
- 2, 1, 3, 4, 5, 1, 1, 1,
147
- 1, 2, 7, 7, 7, 5, 9, 1,
148
- 4, 7, 1, 1, 1, 1, 2, 2,
149
- 3, 1, 1, 1, 1, 2, 2, 1,
150
- 3, 4, 5, 1, 1, 1, 1, 2,
151
- 7, 5, 1, 1, 1, 1, 2, 2,
152
- 2, 0, 3, 3, 7
153
- ]
154
-
155
- class << self
156
- attr_accessor :_plsql_def_range_lengths
157
- private :_plsql_def_range_lengths, :_plsql_def_range_lengths=
158
- end
159
- self._plsql_def_range_lengths = [
160
- 0, 0, 0, 0, 1, 4, 0, 1,
161
- 0, 0, 0, 0, 0, 5, 0, 0,
162
- 0, 0, 0, 5, 5, 1, 0, 0,
163
- 0, 0, 0, 5, 5, 5, 5, 1,
164
- 0, 0, 0, 0, 0, 0, 0, 0,
165
- 0, 0, 0, 0, 0, 0, 0, 1,
166
- 4, 0, 1, 1, 0, 0, 0, 0,
167
- 0, 0, 1, 0, 0, 0, 0, 0,
168
- 3, 0, 1, 5, 5, 0, 0, 0,
169
- 0, 0, 5, 5, 5, 5, 4, 0,
170
- 1, 1, 0, 0, 0, 0, 0, 0,
171
- 1, 0, 0, 0, 0, 0, 3, 0,
172
- 1, 5, 5, 0, 0, 0, 0, 0,
173
- 5, 5, 0, 0, 0, 0, 0, 0,
174
- 0, 0, 1, 1, 1
175
- ]
176
-
177
- class << self
178
- attr_accessor :_plsql_def_index_offsets
179
- private :_plsql_def_index_offsets, :_plsql_def_index_offsets=
180
- end
181
- self._plsql_def_index_offsets = [
182
- 0, 0, 7, 10, 13, 23, 38, 40,
183
- 46, 48, 50, 52, 54, 57, 68, 70,
184
- 72, 74, 76, 79, 92, 103, 109, 111,
185
- 113, 115, 117, 120, 133, 146, 159, 170,
186
- 176, 178, 180, 182, 184, 187, 190, 193,
187
- 196, 199, 202, 205, 208, 211, 214, 217,
188
- 222, 234, 236, 242, 251, 253, 255, 257,
189
- 259, 262, 265, 270, 272, 274, 276, 278,
190
- 281, 287, 289, 294, 304, 315, 317, 319,
191
- 321, 323, 326, 339, 352, 365, 376, 390,
192
- 392, 398, 407, 409, 411, 413, 415, 418,
193
- 421, 426, 428, 430, 432, 434, 437, 443,
194
- 445, 450, 460, 471, 473, 475, 477, 479,
195
- 482, 495, 506, 508, 510, 512, 514, 517,
196
- 520, 523, 524, 529, 534
197
- ]
198
-
199
- class << self
200
- attr_accessor :_plsql_def_trans_targs
201
- private :_plsql_def_trans_targs, :_plsql_def_trans_targs=
202
- end
203
- self._plsql_def_trans_targs = [
204
- 2, 41, 111, 2, 41, 111, 0, 3,
205
- 3, 0, 4, 4, 0, 5, 14, 16,
206
- 113, 37, 38, 37, 38, 5, 0, 5,
207
- 6, 14, 16, 113, 19, 27, 13, 19,
208
- 27, 5, 13, 13, 13, 0, 7, 6,
209
- 7, 8, 10, 113, 7, 0, 9, 0,
210
- 7, 9, 11, 0, 12, 11, 12, 7,
211
- 11, 7, 8, 10, 113, 13, 7, 13,
212
- 13, 13, 13, 0, 15, 0, 5, 15,
213
- 17, 0, 18, 17, 18, 5, 17, 7,
214
- 8, 10, 113, 20, 13, 20, 7, 13,
215
- 13, 13, 13, 0, 21, 22, 24, 113,
216
- 13, 21, 13, 13, 13, 13, 0, 21,
217
- 22, 24, 113, 21, 0, 23, 0, 21,
218
- 23, 25, 0, 26, 25, 26, 21, 25,
219
- 7, 8, 10, 113, 28, 13, 28, 7,
220
- 13, 13, 13, 13, 0, 7, 8, 10,
221
- 113, 29, 13, 29, 7, 13, 13, 13,
222
- 13, 0, 7, 8, 10, 113, 30, 13,
223
- 30, 7, 13, 13, 13, 13, 0, 31,
224
- 32, 34, 113, 13, 31, 13, 13, 13,
225
- 13, 0, 31, 32, 34, 113, 31, 0,
226
- 33, 0, 31, 33, 35, 0, 36, 35,
227
- 36, 31, 35, 21, 21, 0, 39, 39,
228
- 0, 40, 40, 0, 31, 31, 0, 42,
229
- 42, 0, 43, 43, 0, 44, 44, 0,
230
- 45, 45, 0, 46, 46, 0, 47, 47,
231
- 0, 48, 69, 71, 48, 0, 48, 49,
232
- 69, 71, 74, 68, 74, 48, 68, 68,
233
- 68, 0, 50, 49, 51, 52, 64, 54,
234
- 51, 0, 51, 52, 54, 57, 57, 57,
235
- 57, 51, 0, 53, 0, 51, 53, 55,
236
- 0, 56, 55, 56, 51, 55, 58, 58,
237
- 0, 114, 59, 61, 114, 0, 60, 0,
238
- 114, 60, 62, 0, 63, 62, 63, 114,
239
- 62, 65, 67, 67, 67, 67, 0, 66,
240
- 65, 51, 52, 54, 51, 0, 51, 52,
241
- 54, 67, 51, 67, 67, 67, 67, 0,
242
- 51, 52, 64, 54, 68, 51, 68, 68,
243
- 68, 68, 0, 70, 0, 48, 70, 72,
244
- 0, 73, 72, 73, 48, 72, 51, 52,
245
- 64, 54, 75, 68, 75, 51, 68, 68,
246
- 68, 68, 0, 51, 52, 64, 54, 76,
247
- 68, 76, 51, 68, 68, 68, 68, 0,
248
- 51, 52, 64, 54, 77, 68, 77, 51,
249
- 68, 68, 68, 68, 0, 78, 99, 64,
250
- 101, 68, 78, 68, 68, 68, 68, 0,
251
- 78, 79, 99, 101, 104, 104, 98, 104,
252
- 104, 78, 98, 98, 98, 0, 80, 79,
253
- 81, 82, 94, 84, 81, 0, 81, 82,
254
- 84, 87, 87, 87, 87, 81, 0, 83,
255
- 0, 81, 83, 85, 0, 86, 85, 86,
256
- 81, 85, 88, 88, 0, 115, 89, 91,
257
- 115, 0, 90, 0, 115, 90, 92, 0,
258
- 93, 92, 93, 115, 92, 95, 97, 97,
259
- 97, 97, 0, 96, 95, 81, 82, 84,
260
- 81, 0, 81, 82, 84, 97, 81, 97,
261
- 97, 97, 97, 0, 81, 82, 94, 84,
262
- 98, 81, 98, 98, 98, 98, 0, 100,
263
- 0, 78, 100, 102, 0, 103, 102, 103,
264
- 78, 102, 81, 82, 94, 84, 105, 98,
265
- 105, 81, 98, 98, 98, 98, 0, 116,
266
- 106, 94, 108, 98, 116, 98, 98, 98,
267
- 98, 0, 107, 0, 116, 107, 109, 0,
268
- 110, 109, 110, 116, 109, 112, 112, 0,
269
- 46, 46, 0, 0, 114, 59, 61, 114,
270
- 0, 115, 89, 91, 115, 0, 116, 106,
271
- 108, 87, 87, 87, 87, 116, 0, 0
272
- ]
273
-
274
- class << self
275
- attr_accessor :_plsql_def_trans_actions
276
- private :_plsql_def_trans_actions, :_plsql_def_trans_actions=
277
- end
278
- self._plsql_def_trans_actions = [
279
- 0, 0, 0, 0, 0, 0, 0, 0,
280
- 0, 0, 0, 0, 0, 0, 0, 0,
281
- 5, 0, 0, 0, 0, 0, 0, 0,
282
- 0, 0, 0, 5, 0, 0, 0, 0,
283
- 0, 0, 0, 0, 0, 0, 0, 0,
284
- 0, 0, 0, 5, 0, 0, 0, 0,
285
- 0, 0, 0, 0, 0, 0, 0, 0,
286
- 0, 0, 0, 0, 5, 0, 0, 0,
287
- 0, 0, 0, 0, 0, 0, 0, 0,
288
- 0, 0, 0, 0, 0, 0, 0, 0,
289
- 0, 0, 5, 0, 0, 0, 0, 0,
290
- 0, 0, 0, 0, 0, 0, 0, 9,
291
- 0, 0, 0, 0, 0, 0, 0, 0,
292
- 0, 0, 9, 0, 0, 0, 0, 0,
293
- 0, 0, 0, 0, 0, 0, 0, 0,
294
- 0, 0, 0, 5, 0, 0, 0, 0,
295
- 0, 0, 0, 0, 0, 0, 0, 0,
296
- 5, 0, 0, 0, 0, 0, 0, 0,
297
- 0, 0, 0, 0, 0, 5, 0, 0,
298
- 0, 0, 0, 0, 0, 0, 0, 0,
299
- 0, 0, 7, 0, 0, 0, 0, 0,
300
- 0, 0, 0, 0, 0, 7, 0, 0,
301
- 0, 0, 0, 0, 0, 0, 0, 0,
302
- 0, 0, 0, 0, 0, 0, 0, 0,
303
- 0, 0, 0, 0, 0, 0, 0, 0,
304
- 0, 0, 0, 0, 0, 0, 0, 0,
305
- 0, 0, 0, 0, 0, 0, 0, 0,
306
- 0, 0, 0, 0, 0, 0, 0, 13,
307
- 0, 0, 13, 13, 13, 0, 13, 13,
308
- 13, 0, 0, 0, 11, 11, 0, 11,
309
- 11, 0, 0, 0, 0, 0, 0, 0,
310
- 0, 0, 0, 0, 0, 0, 0, 0,
311
- 0, 0, 0, 0, 0, 0, 0, 0,
312
- 0, 1, 0, 0, 1, 0, 0, 0,
313
- 1, 0, 0, 0, 0, 0, 0, 1,
314
- 0, 0, 0, 0, 0, 0, 0, 0,
315
- 0, 11, 11, 11, 11, 0, 11, 11,
316
- 11, 0, 11, 0, 0, 0, 0, 0,
317
- 11, 11, 0, 11, 0, 11, 0, 0,
318
- 0, 0, 0, 0, 0, 0, 0, 0,
319
- 0, 0, 0, 0, 0, 0, 11, 11,
320
- 0, 11, 0, 0, 0, 11, 0, 0,
321
- 0, 0, 0, 11, 11, 0, 11, 0,
322
- 0, 0, 11, 0, 0, 0, 0, 0,
323
- 11, 11, 0, 11, 0, 0, 0, 11,
324
- 0, 0, 0, 0, 0, 11, 11, 0,
325
- 11, 0, 11, 0, 0, 0, 0, 0,
326
- 0, 13, 0, 0, 13, 13, 13, 13,
327
- 13, 0, 13, 13, 13, 0, 0, 0,
328
- 11, 11, 0, 11, 11, 0, 0, 0,
329
- 0, 0, 0, 0, 0, 0, 0, 0,
330
- 0, 0, 0, 0, 0, 0, 0, 0,
331
- 0, 0, 0, 0, 0, 3, 0, 0,
332
- 3, 0, 0, 0, 3, 0, 0, 0,
333
- 0, 0, 0, 3, 0, 0, 0, 0,
334
- 0, 0, 0, 0, 0, 11, 11, 11,
335
- 11, 0, 11, 11, 11, 0, 11, 0,
336
- 0, 0, 0, 0, 11, 11, 0, 11,
337
- 0, 11, 0, 0, 0, 0, 0, 0,
338
- 0, 0, 0, 0, 0, 0, 0, 0,
339
- 0, 0, 11, 11, 0, 11, 0, 0,
340
- 0, 11, 0, 0, 0, 0, 0, 15,
341
- 11, 0, 11, 0, 15, 0, 0, 0,
342
- 0, 0, 0, 0, 1, 0, 0, 0,
343
- 0, 0, 0, 1, 0, 0, 0, 0,
344
- 0, 0, 0, 0, 1, 0, 0, 1,
345
- 0, 3, 0, 0, 3, 0, 1, 0,
346
- 0, 0, 0, 0, 0, 1, 0, 0
347
- ]
348
-
349
- class << self
350
- attr_accessor :plsql_def_start
351
- end
352
- self.plsql_def_start = 1;
353
- class << self
354
- attr_accessor :plsql_def_first_final
355
- end
356
- self.plsql_def_first_final = 113;
357
- class << self
358
- attr_accessor :plsql_def_error
359
- end
360
- self.plsql_def_error = 0;
361
-
362
- class << self
363
- attr_accessor :plsql_def_en_main
364
- end
365
- self.plsql_def_en_main = 1;
366
-
367
-
368
- # line 64 "lib/vorax/parser/grammars/plsql_def.rl"
369
-
370
- # line 371 "lib/vorax/parser/grammars/plsql_def.rb"
371
- begin
372
- p ||= 0
373
- pe ||= data.length
374
- cs = plsql_def_start
375
- end
376
-
377
- # line 65 "lib/vorax/parser/grammars/plsql_def.rl"
378
-
379
- # line 380 "lib/vorax/parser/grammars/plsql_def.rb"
380
- begin
381
- _klen, _trans, _keys, _acts, _nacts = nil
382
- _goto_level = 0
383
- _resume = 10
384
- _eof_trans = 15
385
- _again = 20
386
- _test_eof = 30
387
- _out = 40
388
- while true
389
- _trigger_goto = false
390
- if _goto_level <= 0
391
- if p == pe
392
- _goto_level = _test_eof
393
- next
394
- end
395
- if cs == 0
396
- _goto_level = _out
397
- next
398
- end
399
- end
400
- if _goto_level <= _resume
401
- _keys = _plsql_def_key_offsets[cs]
402
- _trans = _plsql_def_index_offsets[cs]
403
- _klen = _plsql_def_single_lengths[cs]
404
- _break_match = false
405
-
406
- begin
407
- if _klen > 0
408
- _lower = _keys
409
- _upper = _keys + _klen - 1
410
-
411
- loop do
412
- break if _upper < _lower
413
- _mid = _lower + ( (_upper - _lower) >> 1 )
414
-
415
- if data[p].ord < _plsql_def_trans_keys[_mid]
416
- _upper = _mid - 1
417
- elsif data[p].ord > _plsql_def_trans_keys[_mid]
418
- _lower = _mid + 1
419
- else
420
- _trans += (_mid - _keys)
421
- _break_match = true
422
- break
423
- end
424
- end # loop
425
- break if _break_match
426
- _keys += _klen
427
- _trans += _klen
428
- end
429
- _klen = _plsql_def_range_lengths[cs]
430
- if _klen > 0
431
- _lower = _keys
432
- _upper = _keys + (_klen << 1) - 2
433
- loop do
434
- break if _upper < _lower
435
- _mid = _lower + (((_upper-_lower) >> 1) & ~1)
436
- if data[p].ord < _plsql_def_trans_keys[_mid]
437
- _upper = _mid - 2
438
- elsif data[p].ord > _plsql_def_trans_keys[_mid+1]
439
- _lower = _mid + 2
440
- else
441
- _trans += ((_mid - _keys) >> 1)
442
- _break_match = true
443
- break
444
- end
445
- end # loop
446
- break if _break_match
447
- _trans += _klen
448
- end
449
- end while false
450
- cs = _plsql_def_trans_targs[_trans]
451
- if _plsql_def_trans_actions[_trans] != 0
452
- _acts = _plsql_def_trans_actions[_trans]
453
- _nacts = _plsql_def_actions[_acts]
454
- _acts += 1
455
- while _nacts > 0
456
- _nacts -= 1
457
- _acts += 1
458
- case _plsql_def_actions[_acts - 1]
459
- when 0 then
460
- # line 7 "lib/vorax/parser/grammars/plsql_def.rl"
461
- begin
462
-
463
- @end_pos = p - 1;
464
- @type = 'SPEC';
465
- end
466
- when 1 then
467
- # line 12 "lib/vorax/parser/grammars/plsql_def.rl"
468
- begin
469
-
470
- @end_pos = p - 1;
471
- @type = 'BODY';
472
- end
473
- when 2 then
474
- # line 17 "lib/vorax/parser/grammars/plsql_def.rl"
475
- begin
476
-
477
- @end_pos = p - 1;
478
- @type = 'END';
479
- end
480
- when 3 then
481
- # line 22 "lib/vorax/parser/grammars/plsql_def.rl"
482
- begin
483
-
484
- @end_pos = p - 1;
485
- @type = 'END_LOOP';
486
- end
487
- when 4 then
488
- # line 27 "lib/vorax/parser/grammars/plsql_def.rl"
489
- begin
490
-
491
- @end_pos = p - 1;
492
- @type = 'END_IF';
493
- end
494
- when 5 then
495
- # line 32 "lib/vorax/parser/grammars/plsql_def.rl"
496
- begin
497
-
498
- @name = data[(@start..p-1)]
499
- end
500
- when 6 then
501
- # line 40 "lib/vorax/parser/grammars/plsql_def.rl"
502
- begin
503
- @start = p end
504
- # line 505 "lib/vorax/parser/grammars/plsql_def.rb"
505
- end # action switch
506
- end
507
- end
508
- if _trigger_goto
509
- next
510
- end
511
- end
512
- if _goto_level <= _again
513
- if cs == 0
514
- _goto_level = _out
515
- next
516
- end
517
- p += 1
518
- if p != pe
519
- _goto_level = _resume
520
- next
521
- end
522
- end
523
- if _goto_level <= _test_eof
524
- end
525
- if _goto_level <= _out
526
- break
527
- end
528
- end
529
- end
530
-
531
- # line 66 "lib/vorax/parser/grammars/plsql_def.rl"
532
- end
533
- return {:name => @name, :end_def => @end_pos, :type => @type}
534
- end
535
-
536
- end
537
-
538
- end
539
-