radius 0.7.5 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +5 -0
  3. data/CONTRIBUTORS +2 -0
  4. data/Gemfile +9 -5
  5. data/README.rdoc +2 -6
  6. data/Rakefile +9 -0
  7. data/coverage/assets/0.13.1/DataTables-1.10.20/images/sort_asc.png +0 -0
  8. data/coverage/assets/0.13.1/DataTables-1.10.20/images/sort_asc_disabled.png +0 -0
  9. data/coverage/assets/0.13.1/DataTables-1.10.20/images/sort_both.png +0 -0
  10. data/coverage/assets/0.13.1/DataTables-1.10.20/images/sort_desc.png +0 -0
  11. data/coverage/assets/0.13.1/DataTables-1.10.20/images/sort_desc_disabled.png +0 -0
  12. data/coverage/assets/0.13.1/application.css +1 -0
  13. data/coverage/assets/0.13.1/application.js +7 -0
  14. data/coverage/assets/0.13.1/colorbox/border.png +0 -0
  15. data/coverage/assets/0.13.1/colorbox/controls.png +0 -0
  16. data/coverage/assets/0.13.1/colorbox/loading.gif +0 -0
  17. data/coverage/assets/0.13.1/colorbox/loading_background.png +0 -0
  18. data/coverage/assets/0.13.1/favicon_green.png +0 -0
  19. data/coverage/assets/0.13.1/favicon_red.png +0 -0
  20. data/coverage/assets/0.13.1/favicon_yellow.png +0 -0
  21. data/coverage/assets/0.13.1/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  22. data/coverage/assets/0.13.1/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  23. data/coverage/assets/0.13.1/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  24. data/coverage/assets/0.13.1/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  25. data/coverage/assets/0.13.1/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  26. data/coverage/assets/0.13.1/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  27. data/coverage/assets/0.13.1/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  28. data/coverage/assets/0.13.1/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  29. data/coverage/assets/0.13.1/images/ui-icons_222222_256x240.png +0 -0
  30. data/coverage/assets/0.13.1/images/ui-icons_2e83ff_256x240.png +0 -0
  31. data/coverage/assets/0.13.1/images/ui-icons_454545_256x240.png +0 -0
  32. data/coverage/assets/0.13.1/images/ui-icons_888888_256x240.png +0 -0
  33. data/coverage/assets/0.13.1/images/ui-icons_cd0a0a_256x240.png +0 -0
  34. data/coverage/assets/0.13.1/loading.gif +0 -0
  35. data/coverage/assets/0.13.1/magnify.png +0 -0
  36. data/lib/radius/context.rb +2 -1
  37. data/lib/radius/delegating_open_struct.rb +15 -19
  38. data/lib/radius/ord_string.rb +6 -8
  39. data/lib/radius/parser/JavaScanner.class +0 -0
  40. data/lib/radius/parser/JavaScanner.java +211 -161
  41. data/lib/radius/parser/JavaScanner.rl +36 -7
  42. data/lib/radius/parser.rb +69 -40
  43. data/lib/radius/utility.rb +5 -14
  44. data/lib/radius/version.rb +1 -1
  45. data/lib/radius.rb +11 -11
  46. data/pkg/radius-0.8.0.gem +0 -0
  47. data/radius.gemspec +12 -4
  48. data/test/context_test.rb +13 -5
  49. data/test/multithreaded_test.rb +60 -43
  50. data/test/ord_string_test.rb +3 -3
  51. data/test/parser_test.rb +3 -3
  52. data/test/quickstart_test.rb +2 -2
  53. data/test/squiggle_test.rb +3 -3
  54. data/test/test_helper.rb +21 -26
  55. data/test/utility_test.rb +3 -3
  56. metadata +52 -16
@@ -1,7 +1,7 @@
1
1
 
2
2
  // line 1 "JavaScanner.rl"
3
3
 
4
- // line 84 "JavaScanner.rl"
4
+ // line 101 "JavaScanner.rl"
5
5
 
6
6
 
7
7
  package radius.parser;
@@ -32,11 +32,23 @@ public class JavaScanner {
32
32
  }
33
33
 
34
34
  void tag(String prefix, String name, RubyHash attr, RubySymbol flavor) {
35
+ // Validate both prefix and name
36
+ if ((prefix == null || prefix.trim().isEmpty()) &&
37
+ (name == null || name.trim().isEmpty())) {
38
+ pass_through("<");
39
+ return;
40
+ }
41
+
42
+ if (name == null || name.trim().isEmpty()) {
43
+ pass_through("<" + prefix + ":");
44
+ return;
45
+ }
46
+
35
47
  RubyHash tag = RubyHash.newHash(runtime);
36
48
  tag.op_aset(
37
49
  runtime.getCurrentContext(),
38
50
  RubySymbol.newSymbol(runtime, "prefix"),
39
- RubyString.newString(runtime, prefix)
51
+ RubyString.newString(runtime, prefix != null ? prefix : "")
40
52
  );
41
53
  tag.op_aset(
42
54
  runtime.getCurrentContext(),
@@ -61,7 +73,7 @@ public class JavaScanner {
61
73
  }
62
74
 
63
75
 
64
- // line 65 "JavaScanner.java"
76
+ // line 77 "JavaScanner.java"
65
77
  private static byte[] init__parser_actions_0()
66
78
  {
67
79
  return new byte [] {
@@ -82,11 +94,12 @@ private static final byte _parser_actions[] = init__parser_actions_0();
82
94
  private static short[] init__parser_key_offsets_0()
83
95
  {
84
96
  return new short [] {
85
- 0, 0, 11, 21, 34, 47, 61, 65, 70, 72, 74, 87,
86
- 100, 101, 103, 118, 133, 149, 155, 161, 176, 179, 182, 185,
87
- 200, 202, 204, 219, 235, 241, 247, 250, 253, 269, 285, 302,
88
- 309, 315, 331, 335, 351, 366, 369, 371, 381, 392, 402, 416,
89
- 420, 420, 421, 430, 430, 430, 432, 434, 437, 440, 442, 444
97
+ 0, 0, 11, 21, 35, 48, 62, 66, 71, 73, 75, 88,
98
+ 101, 102, 104, 119, 134, 150, 156, 162, 177, 180, 183, 186,
99
+ 201, 203, 205, 220, 236, 242, 248, 251, 254, 270, 286, 303,
100
+ 310, 316, 332, 336, 352, 367, 370, 372, 382, 392, 403, 413,
101
+ 428, 432, 442, 442, 443, 452, 452, 452, 454, 456, 459, 462,
102
+ 464, 466
90
103
  };
91
104
  }
92
105
 
@@ -97,43 +110,44 @@ private static char[] init__parser_trans_keys_0()
97
110
  {
98
111
  return new char [] {
99
112
  58, 63, 95, 45, 46, 48, 57, 65, 90, 97, 122, 63,
100
- 95, 45, 46, 48, 58, 65, 90, 97, 122, 32, 47, 62,
101
- 63, 95, 9, 13, 45, 58, 65, 90, 97, 122, 32, 47,
102
- 62, 63, 95, 9, 13, 45, 58, 65, 90, 97, 122, 32,
103
- 61, 63, 95, 9, 13, 45, 46, 48, 58, 65, 90, 97,
104
- 122, 32, 61, 9, 13, 32, 34, 39, 9, 13, 34, 92,
105
- 34, 92, 32, 47, 62, 63, 95, 9, 13, 45, 58, 65,
106
- 90, 97, 122, 32, 47, 62, 63, 95, 9, 13, 45, 58,
107
- 65, 90, 97, 122, 62, 34, 92, 32, 34, 47, 62, 63,
113
+ 95, 45, 46, 48, 57, 65, 90, 97, 122, 32, 47, 58,
114
+ 62, 63, 95, 9, 13, 45, 57, 65, 90, 97, 122, 32,
115
+ 47, 62, 63, 95, 9, 13, 45, 58, 65, 90, 97, 122,
116
+ 32, 61, 63, 95, 9, 13, 45, 46, 48, 58, 65, 90,
117
+ 97, 122, 32, 61, 9, 13, 32, 34, 39, 9, 13, 34,
118
+ 92, 34, 92, 32, 47, 62, 63, 95, 9, 13, 45, 58,
119
+ 65, 90, 97, 122, 32, 47, 62, 63, 95, 9, 13, 45,
120
+ 58, 65, 90, 97, 122, 62, 34, 92, 32, 34, 47, 62,
121
+ 63, 92, 95, 9, 13, 45, 58, 65, 90, 97, 122, 32,
122
+ 34, 47, 62, 63, 92, 95, 9, 13, 45, 58, 65, 90,
123
+ 97, 122, 32, 34, 61, 63, 92, 95, 9, 13, 45, 46,
124
+ 48, 58, 65, 90, 97, 122, 32, 34, 61, 92, 9, 13,
125
+ 32, 34, 39, 92, 9, 13, 32, 34, 47, 62, 63, 92,
126
+ 95, 9, 13, 45, 58, 65, 90, 97, 122, 34, 62, 92,
127
+ 34, 39, 92, 34, 39, 92, 32, 39, 47, 62, 63, 92,
128
+ 95, 9, 13, 45, 58, 65, 90, 97, 122, 39, 92, 39,
129
+ 92, 32, 39, 47, 62, 63, 92, 95, 9, 13, 45, 58,
130
+ 65, 90, 97, 122, 32, 39, 61, 63, 92, 95, 9, 13,
131
+ 45, 46, 48, 58, 65, 90, 97, 122, 32, 39, 61, 92,
132
+ 9, 13, 32, 34, 39, 92, 9, 13, 34, 39, 92, 34,
133
+ 39, 92, 32, 34, 39, 47, 62, 63, 92, 95, 9, 13,
134
+ 45, 58, 65, 90, 97, 122, 32, 34, 39, 47, 62, 63,
108
135
  92, 95, 9, 13, 45, 58, 65, 90, 97, 122, 32, 34,
109
- 47, 62, 63, 92, 95, 9, 13, 45, 58, 65, 90, 97,
110
- 122, 32, 34, 61, 63, 92, 95, 9, 13, 45, 46, 48,
111
- 58, 65, 90, 97, 122, 32, 34, 61, 92, 9, 13, 32,
112
- 34, 39, 92, 9, 13, 32, 34, 47, 62, 63, 92, 95,
113
- 9, 13, 45, 58, 65, 90, 97, 122, 34, 62, 92, 34,
114
- 39, 92, 34, 39, 92, 32, 39, 47, 62, 63, 92, 95,
115
- 9, 13, 45, 58, 65, 90, 97, 122, 39, 92, 39, 92,
116
- 32, 39, 47, 62, 63, 92, 95, 9, 13, 45, 58, 65,
117
- 90, 97, 122, 32, 39, 61, 63, 92, 95, 9, 13, 45,
118
- 46, 48, 58, 65, 90, 97, 122, 32, 39, 61, 92, 9,
119
- 13, 32, 34, 39, 92, 9, 13, 34, 39, 92, 34, 39,
120
- 92, 32, 34, 39, 47, 62, 63, 92, 95, 9, 13, 45,
121
- 58, 65, 90, 97, 122, 32, 34, 39, 47, 62, 63, 92,
122
- 95, 9, 13, 45, 58, 65, 90, 97, 122, 32, 34, 39,
123
- 61, 63, 92, 95, 9, 13, 45, 46, 48, 58, 65, 90,
124
- 97, 122, 32, 34, 39, 61, 92, 9, 13, 32, 34, 39,
125
- 92, 9, 13, 32, 34, 39, 47, 62, 63, 92, 95, 9,
126
- 13, 45, 58, 65, 90, 97, 122, 34, 39, 62, 92, 32,
127
- 34, 39, 47, 62, 63, 92, 95, 9, 13, 45, 58, 65,
128
- 90, 97, 122, 32, 39, 47, 62, 63, 92, 95, 9, 13,
129
- 45, 58, 65, 90, 97, 122, 39, 62, 92, 39, 92, 63,
130
- 95, 45, 46, 48, 57, 65, 90, 97, 122, 58, 63, 95,
131
- 45, 46, 48, 57, 65, 90, 97, 122, 63, 95, 45, 46,
132
- 48, 58, 65, 90, 97, 122, 32, 62, 63, 95, 9, 13,
133
- 45, 46, 48, 58, 65, 90, 97, 122, 32, 62, 9, 13,
134
- 60, 47, 63, 95, 45, 57, 65, 90, 97, 122, 34, 92,
135
- 34, 92, 34, 39, 92, 34, 39, 92, 39, 92, 39, 92,
136
- 0
136
+ 39, 61, 63, 92, 95, 9, 13, 45, 46, 48, 58, 65,
137
+ 90, 97, 122, 32, 34, 39, 61, 92, 9, 13, 32, 34,
138
+ 39, 92, 9, 13, 32, 34, 39, 47, 62, 63, 92, 95,
139
+ 9, 13, 45, 58, 65, 90, 97, 122, 34, 39, 62, 92,
140
+ 32, 34, 39, 47, 62, 63, 92, 95, 9, 13, 45, 58,
141
+ 65, 90, 97, 122, 32, 39, 47, 62, 63, 92, 95, 9,
142
+ 13, 45, 58, 65, 90, 97, 122, 39, 62, 92, 39, 92,
143
+ 63, 95, 45, 46, 48, 57, 65, 90, 97, 122, 63, 95,
144
+ 45, 46, 48, 57, 65, 90, 97, 122, 58, 63, 95, 45,
145
+ 46, 48, 57, 65, 90, 97, 122, 63, 95, 45, 46, 48,
146
+ 57, 65, 90, 97, 122, 32, 58, 62, 63, 95, 9, 13,
147
+ 45, 46, 48, 57, 65, 90, 97, 122, 32, 62, 9, 13,
148
+ 63, 95, 45, 46, 48, 57, 65, 90, 97, 122, 60, 47,
149
+ 63, 95, 45, 57, 65, 90, 97, 122, 34, 92, 34, 92,
150
+ 34, 39, 92, 34, 39, 92, 39, 92, 39, 92, 0
137
151
  };
138
152
  }
139
153
 
@@ -143,11 +157,12 @@ private static final char _parser_trans_keys[] = init__parser_trans_keys_0();
143
157
  private static byte[] init__parser_single_lengths_0()
144
158
  {
145
159
  return new byte [] {
146
- 0, 3, 2, 5, 5, 4, 2, 3, 2, 2, 5, 5,
160
+ 0, 3, 2, 6, 5, 4, 2, 3, 2, 2, 5, 5,
147
161
  1, 2, 7, 7, 6, 4, 4, 7, 3, 3, 3, 7,
148
162
  2, 2, 7, 6, 4, 4, 3, 3, 8, 8, 7, 5,
149
- 4, 8, 4, 8, 7, 3, 2, 2, 3, 2, 4, 2,
150
- 0, 1, 3, 0, 0, 2, 2, 3, 3, 2, 2, 0
163
+ 4, 8, 4, 8, 7, 3, 2, 2, 2, 3, 2, 5,
164
+ 2, 2, 0, 1, 3, 0, 0, 2, 2, 3, 3, 2,
165
+ 2, 0
151
166
  };
152
167
  }
153
168
 
@@ -160,8 +175,9 @@ private static byte[] init__parser_range_lengths_0()
160
175
  0, 4, 4, 4, 4, 5, 1, 1, 0, 0, 4, 4,
161
176
  0, 0, 4, 4, 5, 1, 1, 4, 0, 0, 0, 4,
162
177
  0, 0, 4, 5, 1, 1, 0, 0, 4, 4, 5, 1,
163
- 1, 4, 0, 4, 4, 0, 0, 4, 4, 4, 5, 1,
164
- 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0
178
+ 1, 4, 0, 4, 4, 0, 0, 4, 4, 4, 4, 5,
179
+ 1, 4, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
180
+ 0, 0
165
181
  };
166
182
  }
167
183
 
@@ -171,73 +187,60 @@ private static final byte _parser_range_lengths[] = init__parser_range_lengths_0
171
187
  private static short[] init__parser_index_offsets_0()
172
188
  {
173
189
  return new short [] {
174
- 0, 0, 8, 15, 25, 35, 45, 49, 54, 57, 60, 70,
175
- 80, 82, 85, 97, 109, 121, 127, 133, 145, 149, 153, 157,
176
- 169, 172, 175, 187, 199, 205, 211, 215, 219, 232, 245, 258,
177
- 265, 271, 284, 289, 302, 314, 318, 321, 328, 336, 343, 353,
178
- 357, 358, 360, 367, 368, 369, 372, 375, 379, 383, 386, 389
190
+ 0, 0, 8, 15, 26, 36, 46, 50, 55, 58, 61, 71,
191
+ 81, 83, 86, 98, 110, 122, 128, 134, 146, 150, 154, 158,
192
+ 170, 173, 176, 188, 200, 206, 212, 216, 220, 233, 246, 259,
193
+ 266, 272, 285, 290, 303, 315, 319, 322, 329, 336, 344, 351,
194
+ 362, 366, 373, 374, 376, 383, 384, 385, 388, 391, 395, 399,
195
+ 402, 405
179
196
  };
180
197
  }
181
198
 
182
199
  private static final short _parser_index_offsets[] = init__parser_index_offsets_0();
183
200
 
184
201
 
185
- private static byte[] init__parser_indicies_0()
186
- {
187
- return new byte [] {
188
- 2, 1, 1, 1, 1, 1, 1, 0, 3, 3, 3, 3,
189
- 3, 3, 0, 4, 6, 7, 5, 5, 4, 5, 5, 5,
190
- 0, 8, 10, 11, 9, 9, 8, 9, 9, 9, 0, 13,
191
- 15, 14, 14, 13, 14, 14, 14, 14, 12, 16, 17, 16,
192
- 12, 17, 18, 19, 17, 12, 21, 22, 20, 24, 25, 23,
193
- 26, 28, 29, 27, 27, 26, 27, 27, 27, 12, 30, 32,
194
- 33, 31, 31, 30, 31, 31, 31, 12, 34, 12, 35, 25,
195
- 23, 36, 24, 38, 39, 37, 25, 37, 36, 37, 37, 37,
196
- 23, 40, 24, 42, 43, 41, 25, 41, 40, 41, 41, 41,
197
- 23, 44, 24, 46, 45, 25, 45, 44, 45, 45, 45, 45,
198
- 23, 47, 24, 48, 25, 47, 23, 48, 49, 50, 25, 48,
199
- 23, 51, 21, 53, 54, 52, 22, 52, 51, 52, 52, 52,
200
- 20, 24, 55, 25, 23, 57, 58, 59, 56, 61, 35, 62,
201
- 60, 64, 24, 66, 67, 65, 68, 65, 64, 65, 65, 65,
202
- 63, 24, 68, 63, 61, 68, 63, 69, 24, 71, 72, 70,
203
- 68, 70, 69, 70, 70, 70, 63, 73, 24, 75, 74, 68,
204
- 74, 73, 74, 74, 74, 74, 63, 76, 24, 77, 68, 76,
205
- 63, 77, 78, 79, 68, 77, 63, 80, 58, 59, 56, 81,
206
- 81, 62, 60, 82, 61, 35, 84, 85, 83, 62, 83, 82,
207
- 83, 83, 83, 60, 86, 61, 35, 88, 89, 87, 62, 87,
208
- 86, 87, 87, 87, 60, 90, 61, 35, 92, 91, 62, 91,
209
- 90, 91, 91, 91, 91, 60, 93, 61, 35, 94, 62, 93,
210
- 60, 94, 95, 96, 62, 94, 60, 97, 80, 58, 99, 100,
211
- 98, 59, 98, 97, 98, 98, 98, 56, 61, 35, 101, 62,
212
- 60, 97, 57, 58, 99, 100, 98, 59, 98, 97, 98, 98,
213
- 98, 56, 103, 21, 105, 106, 104, 107, 104, 103, 104, 104,
214
- 104, 102, 24, 108, 68, 63, 21, 107, 102, 109, 109, 109,
215
- 109, 109, 109, 0, 111, 110, 110, 110, 110, 110, 110, 0,
216
- 112, 112, 112, 112, 112, 112, 0, 113, 115, 114, 114, 113,
217
- 114, 114, 114, 114, 0, 116, 117, 116, 0, 118, 120, 119,
218
- 123, 122, 122, 122, 122, 122, 121, 124, 125, 24, 25, 23,
219
- 24, 25, 23, 61, 35, 62, 60, 61, 35, 62, 60, 24,
220
- 68, 63, 24, 68, 63, 126, 0
221
- };
222
- }
223
-
224
- private static final byte _parser_indicies[] = init__parser_indicies_0();
225
-
226
-
227
202
  private static byte[] init__parser_trans_targs_0()
228
203
  {
229
204
  return new byte [] {
230
- 49, 1, 2, 3, 4, 3, 12, 52, 4, 5, 12, 52,
231
- 49, 6, 5, 7, 6, 7, 8, 42, 9, 10, 13, 9,
232
- 10, 13, 11, 5, 12, 52, 11, 5, 12, 52, 51, 14,
233
- 15, 16, 20, 54, 15, 16, 20, 54, 17, 16, 18, 17,
234
- 18, 19, 21, 15, 16, 20, 54, 53, 22, 23, 14, 31,
235
- 22, 23, 31, 24, 26, 27, 41, 58, 25, 26, 27, 41,
236
- 58, 28, 27, 29, 28, 29, 30, 40, 23, 32, 33, 34,
237
- 38, 56, 33, 34, 38, 56, 35, 34, 36, 35, 36, 37,
238
- 39, 33, 34, 38, 56, 55, 24, 26, 27, 41, 58, 25,
239
- 57, 44, 44, 45, 46, 47, 46, 59, 47, 59, 0, 49,
240
- 50, 49, 1, 43, 49, 49, 49
205
+ 2, 1, 1, 1, 1, 1, 1, 51, 3, 3, 3, 3,
206
+ 3, 3, 51, 4, 12, 43, 54, 3, 3, 4, 3, 3,
207
+ 3, 51, 4, 12, 54, 5, 5, 4, 5, 5, 5, 51,
208
+ 6, 7, 5, 5, 6, 5, 5, 5, 5, 51, 6, 7,
209
+ 6, 51, 7, 8, 42, 7, 51, 10, 13, 9, 10, 13,
210
+ 9, 11, 12, 54, 5, 5, 11, 5, 5, 5, 51, 11,
211
+ 12, 54, 5, 5, 11, 5, 5, 5, 51, 53, 51, 14,
212
+ 13, 9, 15, 10, 20, 56, 16, 13, 16, 15, 16, 16,
213
+ 16, 9, 15, 10, 20, 56, 16, 13, 16, 15, 16, 16,
214
+ 16, 9, 17, 10, 18, 16, 13, 16, 17, 16, 16, 16,
215
+ 16, 9, 17, 10, 18, 13, 17, 9, 18, 19, 21, 13,
216
+ 18, 9, 15, 10, 20, 56, 16, 13, 16, 15, 16, 16,
217
+ 16, 9, 10, 55, 13, 9, 23, 14, 31, 22, 23, 14,
218
+ 31, 22, 26, 10, 41, 60, 27, 25, 27, 26, 27, 27,
219
+ 27, 24, 10, 25, 24, 23, 25, 24, 26, 10, 41, 60,
220
+ 27, 25, 27, 26, 27, 27, 27, 24, 28, 10, 29, 27,
221
+ 25, 27, 28, 27, 27, 27, 27, 24, 28, 10, 29, 25,
222
+ 28, 24, 29, 30, 40, 25, 29, 24, 23, 14, 31, 22,
223
+ 32, 32, 31, 22, 33, 23, 14, 38, 58, 34, 31, 34,
224
+ 33, 34, 34, 34, 22, 33, 23, 14, 38, 58, 34, 31,
225
+ 34, 33, 34, 34, 34, 22, 35, 23, 14, 36, 34, 31,
226
+ 34, 35, 34, 34, 34, 34, 22, 35, 23, 14, 36, 31,
227
+ 35, 22, 36, 37, 39, 31, 36, 22, 33, 23, 14, 38,
228
+ 58, 34, 31, 34, 33, 34, 34, 34, 22, 23, 14, 57,
229
+ 31, 22, 33, 23, 14, 38, 58, 34, 31, 34, 33, 34,
230
+ 34, 34, 22, 26, 10, 41, 60, 27, 25, 27, 26, 27,
231
+ 27, 27, 24, 10, 59, 25, 24, 10, 25, 24, 3, 3,
232
+ 3, 3, 3, 3, 51, 45, 45, 45, 45, 45, 45, 51,
233
+ 46, 45, 45, 45, 45, 45, 45, 51, 47, 47, 47, 47,
234
+ 47, 47, 51, 48, 49, 61, 47, 47, 48, 47, 47, 47,
235
+ 47, 51, 48, 61, 48, 51, 47, 47, 47, 47, 47, 47,
236
+ 51, 0, 52, 51, 44, 1, 1, 1, 1, 1, 51, 51,
237
+ 51, 10, 13, 9, 10, 13, 9, 23, 14, 31, 22, 23,
238
+ 14, 31, 22, 10, 25, 24, 10, 25, 24, 51, 51, 51,
239
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
240
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
241
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
242
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
243
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 0
241
244
  };
242
245
  }
243
246
 
@@ -247,17 +250,45 @@ private static final byte _parser_trans_targs[] = init__parser_trans_targs_0();
247
250
  private static byte[] init__parser_trans_actions_0()
248
251
  {
249
252
  return new byte [] {
250
- 27, 0, 31, 3, 5, 0, 5, 5, 0, 11, 0, 0,
251
- 29, 13, 0, 13, 0, 0, 0, 0, 15, 43, 15, 0,
252
- 17, 0, 7, 64, 34, 34, 0, 37, 9, 9, 0, 17,
253
- 7, 64, 34, 81, 0, 37, 9, 72, 13, 0, 13, 0,
254
- 0, 17, 0, 40, 76, 68, 86, 58, 15, 46, 43, 15,
255
- 0, 17, 0, 0, 7, 64, 34, 81, 0, 0, 37, 9,
256
- 72, 13, 0, 13, 0, 0, 0, 17, 43, 17, 7, 64,
257
- 34, 81, 0, 37, 9, 72, 13, 0, 13, 0, 0, 17,
258
- 17, 40, 76, 68, 86, 58, 15, 40, 76, 68, 86, 15,
259
- 58, 1, 0, 31, 3, 5, 0, 5, 0, 0, 0, 23,
260
- 61, 25, 1, 0, 52, 49, 55
253
+ 31, 0, 0, 0, 0, 0, 0, 27, 3, 3, 3, 3,
254
+ 3, 3, 27, 5, 5, 0, 5, 0, 0, 5, 0, 0,
255
+ 0, 27, 0, 0, 0, 11, 11, 0, 11, 11, 11, 27,
256
+ 13, 13, 0, 0, 13, 0, 0, 0, 0, 29, 0, 0,
257
+ 0, 29, 0, 0, 0, 0, 29, 43, 15, 15, 17, 0,
258
+ 0, 7, 34, 34, 64, 64, 7, 64, 64, 64, 29, 0,
259
+ 9, 9, 37, 37, 0, 37, 37, 37, 29, 0, 29, 17,
260
+ 0, 0, 7, 17, 34, 81, 64, 0, 64, 7, 64, 64,
261
+ 64, 0, 0, 17, 9, 72, 37, 0, 37, 0, 37, 37,
262
+ 37, 0, 13, 17, 13, 0, 0, 0, 13, 0, 0, 0,
263
+ 0, 0, 0, 17, 0, 0, 0, 0, 0, 17, 0, 0,
264
+ 0, 0, 40, 43, 68, 86, 76, 15, 76, 40, 76, 76,
265
+ 76, 15, 17, 58, 0, 0, 46, 43, 15, 15, 17, 17,
266
+ 0, 0, 7, 17, 34, 81, 64, 0, 64, 7, 64, 64,
267
+ 64, 0, 17, 0, 0, 17, 0, 0, 0, 17, 9, 72,
268
+ 37, 0, 37, 0, 37, 37, 37, 0, 13, 17, 13, 0,
269
+ 0, 0, 13, 0, 0, 0, 0, 0, 0, 17, 0, 0,
270
+ 0, 0, 0, 0, 17, 0, 0, 0, 43, 43, 15, 15,
271
+ 17, 17, 0, 0, 7, 17, 17, 34, 81, 64, 0, 64,
272
+ 7, 64, 64, 64, 0, 0, 17, 17, 9, 72, 37, 0,
273
+ 37, 0, 37, 37, 37, 0, 13, 17, 17, 13, 0, 0,
274
+ 0, 13, 0, 0, 0, 0, 0, 0, 17, 17, 0, 0,
275
+ 0, 0, 0, 17, 17, 0, 0, 0, 40, 43, 43, 68,
276
+ 86, 76, 15, 76, 40, 76, 76, 76, 15, 17, 17, 58,
277
+ 0, 0, 40, 46, 43, 68, 86, 76, 15, 76, 40, 76,
278
+ 76, 76, 15, 40, 43, 68, 86, 76, 15, 76, 40, 76,
279
+ 76, 76, 15, 17, 58, 0, 0, 43, 15, 15, 0, 0,
280
+ 0, 0, 0, 0, 27, 1, 1, 1, 1, 1, 1, 27,
281
+ 31, 0, 0, 0, 0, 0, 0, 27, 3, 3, 3, 3,
282
+ 3, 3, 27, 5, 0, 5, 0, 0, 5, 0, 0, 0,
283
+ 0, 27, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0,
284
+ 27, 0, 61, 23, 0, 1, 1, 1, 1, 1, 25, 52,
285
+ 49, 17, 0, 0, 17, 0, 0, 17, 17, 0, 0, 17,
286
+ 17, 0, 0, 17, 0, 0, 17, 0, 0, 55, 27, 27,
287
+ 27, 27, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
288
+ 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
289
+ 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
290
+ 29, 29, 29, 29, 27, 27, 27, 27, 27, 27, 27, 25,
291
+ 52, 49, 52, 49, 52, 49, 52, 49, 55, 0
261
292
  };
262
293
  }
263
294
 
@@ -271,7 +302,8 @@ private static byte[] init__parser_to_state_actions_0()
271
302
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
272
303
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
273
304
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
274
- 19, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
305
+ 0, 0, 19, 19, 0, 0, 0, 0, 0, 0, 0, 0,
306
+ 0, 0
275
307
  };
276
308
  }
277
309
 
@@ -285,7 +317,8 @@ private static byte[] init__parser_from_state_actions_0()
285
317
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
286
318
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
287
319
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
288
- 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
320
+ 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0,
321
+ 0, 0
289
322
  };
290
323
  }
291
324
 
@@ -295,26 +328,27 @@ private static final byte _parser_from_state_actions[] = init__parser_from_state
295
328
  private static short[] init__parser_eof_trans_0()
296
329
  {
297
330
  return new short [] {
298
- 0, 1, 1, 1, 1, 13, 13, 13, 13, 13, 13, 13,
299
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
300
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
301
- 13, 13, 13, 13, 13, 13, 13, 1, 1, 1, 1, 1,
302
- 0, 0, 122, 125, 126, 125, 126, 125, 126, 125, 126, 127
331
+ 0, 455, 455, 455, 455, 448, 448, 448, 448, 448, 448, 448,
332
+ 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448,
333
+ 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448,
334
+ 448, 448, 448, 448, 448, 448, 448, 455, 455, 455, 455, 455,
335
+ 455, 455, 0, 0, 456, 463, 464, 463, 464, 463, 464, 463,
336
+ 464, 465
303
337
  };
304
338
  }
305
339
 
306
340
  private static final short _parser_eof_trans[] = init__parser_eof_trans_0();
307
341
 
308
342
 
309
- static final int parser_start = 49;
310
- static final int parser_first_final = 49;
343
+ static final int parser_start = 51;
344
+ static final int parser_first_final = 51;
311
345
  static final int parser_error = 0;
312
346
 
313
- static final int parser_en_Closeout = 48;
314
- static final int parser_en_main = 49;
347
+ static final int parser_en_Closeout = 50;
348
+ static final int parser_en_main = 51;
315
349
 
316
350
 
317
- // line 143 "JavaScanner.rl"
351
+ // line 172 "JavaScanner.rl"
318
352
 
319
353
  public RubyArray operate(String tag_prefix, String input) {
320
354
  char[] data = input.toCharArray();
@@ -347,7 +381,7 @@ static final int parser_en_main = 49;
347
381
  char[] remainder = data;
348
382
 
349
383
 
350
- // line 351 "JavaScanner.java"
384
+ // line 385 "JavaScanner.java"
351
385
  {
352
386
  cs = parser_start;
353
387
  ts = -1;
@@ -355,9 +389,9 @@ static final int parser_en_main = 49;
355
389
  act = 0;
356
390
  }
357
391
 
358
- // line 175 "JavaScanner.rl"
392
+ // line 204 "JavaScanner.rl"
359
393
 
360
- // line 361 "JavaScanner.java"
394
+ // line 395 "JavaScanner.java"
361
395
  {
362
396
  int _klen;
363
397
  int _trans = 0;
@@ -386,7 +420,7 @@ case 1:
386
420
  // line 1 "NONE"
387
421
  {ts = p;}
388
422
  break;
389
- // line 390 "JavaScanner.java"
423
+ // line 424 "JavaScanner.java"
390
424
  }
391
425
  }
392
426
 
@@ -439,7 +473,6 @@ case 1:
439
473
  }
440
474
  } while (false);
441
475
 
442
- _trans = _parser_indicies[_trans];
443
476
  case 3:
444
477
  cs = _parser_trans_targs[_trans];
445
478
 
@@ -457,35 +490,52 @@ case 3:
457
490
  case 1:
458
491
  // line 5 "JavaScanner.rl"
459
492
  {
460
- prefix = input.substring(mark_pfx, p);
493
+ prefix = String.valueOf(input.substring(mark_pfx, p));
461
494
  }
462
495
  break;
463
496
  case 2:
464
497
  // line 8 "JavaScanner.rl"
465
498
  {
466
499
  if ( !prefix.equals(tag_prefix) ) {
467
- // have to manually add ':' / Sep
468
- // pass the text through & reset state
469
- pass_through(input.substring(tagstart, p) + ":");
500
+ // Pass through the entire tag markup as text
501
+ pass_through(input.substring(tagstart, p + 1));
502
+ // Reset all state
470
503
  prefix = "";
471
- {cs = 49; _goto_targ = 2; if (true) continue _goto;}
504
+ name = "";
505
+ attributes = RubyHash.newHash(runtime);
506
+ flavor = RubySymbol.newSymbol(runtime, "tasteless".intern());
507
+ tagstart = p + 1;
508
+ {cs = 51; _goto_targ = 2; if (true) continue _goto;}
472
509
  }
473
510
  }
474
511
  break;
475
512
  case 3:
476
- // line 18 "JavaScanner.rl"
513
+ // line 22 "JavaScanner.rl"
477
514
  { mark_stg = p; }
478
515
  break;
479
516
  case 4:
480
- // line 19 "JavaScanner.rl"
481
- { name = input.substring(mark_stg, p); }
517
+ // line 23 "JavaScanner.rl"
518
+ {
519
+ name = String.valueOf(input.substring(mark_stg, p));
520
+ if (name == null || name.trim().isEmpty()) {
521
+ // Pass through the entire tag markup as text
522
+ pass_through(input.substring(tagstart, p + 1));
523
+ // Reset all state
524
+ prefix = "";
525
+ name = "";
526
+ attributes = RubyHash.newHash(runtime);
527
+ flavor = RubySymbol.newSymbol(runtime, "tasteless".intern());
528
+ tagstart = p + 1;
529
+ {cs = 51; _goto_targ = 2; if (true) continue _goto;}
530
+ }
531
+ }
482
532
  break;
483
533
  case 5:
484
- // line 20 "JavaScanner.rl"
534
+ // line 37 "JavaScanner.rl"
485
535
  { mark_attr = p; }
486
536
  break;
487
537
  case 6:
488
- // line 21 "JavaScanner.rl"
538
+ // line 38 "JavaScanner.rl"
489
539
  {
490
540
  attributes.op_aset(
491
541
  runtime.getCurrentContext(),
@@ -495,31 +545,31 @@ case 3:
495
545
  }
496
546
  break;
497
547
  case 7:
498
- // line 29 "JavaScanner.rl"
548
+ // line 46 "JavaScanner.rl"
499
549
  { mark_nat = p; }
500
550
  break;
501
551
  case 8:
502
- // line 30 "JavaScanner.rl"
552
+ // line 47 "JavaScanner.rl"
503
553
  { nat = input.substring(mark_nat, p); }
504
554
  break;
505
555
  case 9:
506
- // line 31 "JavaScanner.rl"
556
+ // line 48 "JavaScanner.rl"
507
557
  { mark_vat = p; }
508
558
  break;
509
559
  case 10:
510
- // line 32 "JavaScanner.rl"
560
+ // line 49 "JavaScanner.rl"
511
561
  { vat = input.substring(mark_vat, p); }
512
562
  break;
513
563
  case 11:
514
- // line 34 "JavaScanner.rl"
564
+ // line 51 "JavaScanner.rl"
515
565
  { flavor = RubySymbol.newSymbol(runtime, "open".intern()); }
516
566
  break;
517
567
  case 12:
518
- // line 35 "JavaScanner.rl"
568
+ // line 52 "JavaScanner.rl"
519
569
  { flavor = RubySymbol.newSymbol(runtime, "self".intern()); }
520
570
  break;
521
571
  case 13:
522
- // line 36 "JavaScanner.rl"
572
+ // line 53 "JavaScanner.rl"
523
573
  { flavor = RubySymbol.newSymbol(runtime, "close".intern()); }
524
574
  break;
525
575
  case 16:
@@ -527,22 +577,22 @@ case 3:
527
577
  {te = p+1;}
528
578
  break;
529
579
  case 17:
530
- // line 72 "JavaScanner.rl"
580
+ // line 89 "JavaScanner.rl"
531
581
  {act = 1;}
532
582
  break;
533
583
  case 18:
534
- // line 79 "JavaScanner.rl"
584
+ // line 96 "JavaScanner.rl"
535
585
  {act = 2;}
536
586
  break;
537
587
  case 19:
538
- // line 79 "JavaScanner.rl"
588
+ // line 96 "JavaScanner.rl"
539
589
  {te = p+1;{
540
590
  pass_through(input.substring(p, p + 1));
541
591
  tagstart = p + 1;
542
592
  }}
543
593
  break;
544
594
  case 20:
545
- // line 72 "JavaScanner.rl"
595
+ // line 89 "JavaScanner.rl"
546
596
  {te = p;p--;{
547
597
  tag(prefix, name, attributes, flavor);
548
598
  prefix = "";
@@ -552,14 +602,14 @@ case 3:
552
602
  }}
553
603
  break;
554
604
  case 21:
555
- // line 79 "JavaScanner.rl"
605
+ // line 96 "JavaScanner.rl"
556
606
  {te = p;p--;{
557
607
  pass_through(input.substring(p, p + 1));
558
608
  tagstart = p + 1;
559
609
  }}
560
610
  break;
561
611
  case 22:
562
- // line 79 "JavaScanner.rl"
612
+ // line 96 "JavaScanner.rl"
563
613
  {{p = ((te))-1;}{
564
614
  pass_through(input.substring(p, p + 1));
565
615
  tagstart = p + 1;
@@ -586,7 +636,7 @@ case 3:
586
636
  }
587
637
  }
588
638
  break;
589
- // line 590 "JavaScanner.java"
639
+ // line 640 "JavaScanner.java"
590
640
  }
591
641
  }
592
642
  }
@@ -600,7 +650,7 @@ case 2:
600
650
  // line 1 "NONE"
601
651
  {ts = -1;}
602
652
  break;
603
- // line 604 "JavaScanner.java"
653
+ // line 654 "JavaScanner.java"
604
654
  }
605
655
  }
606
656
 
@@ -627,7 +677,7 @@ case 5:
627
677
  break; }
628
678
  }
629
679
 
630
- // line 176 "JavaScanner.rl"
680
+ // line 205 "JavaScanner.rl"
631
681
 
632
682
  return rv;
633
683
  }