nokogiri 1.5.4.rc3-java → 1.5.5-java

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of nokogiri might be problematic. Click here for more details.

Files changed (39) hide show
  1. data/CHANGELOG.ja.rdoc +35 -18
  2. data/CHANGELOG.rdoc +22 -1
  3. data/README.ja.rdoc +5 -5
  4. data/README.rdoc +9 -9
  5. data/ROADMAP.md +20 -20
  6. data/Rakefile +16 -5
  7. data/Y_U_NO_GEMSPEC.md +3 -3
  8. data/ext/java/nokogiri/HtmlElementDescription.java +1 -1
  9. data/ext/java/nokogiri/HtmlEntityLookup.java +1 -1
  10. data/ext/java/nokogiri/XmlComment.java +14 -5
  11. data/ext/java/nokogiri/XmlElement.java +1 -59
  12. data/ext/java/nokogiri/XmlNode.java +71 -19
  13. data/ext/java/nokogiri/XmlNodeSet.java +1 -1
  14. data/ext/java/nokogiri/XmlReader.java +48 -15
  15. data/ext/java/nokogiri/XmlSyntaxError.java +9 -4
  16. data/ext/java/nokogiri/XmlXpathContext.java +8 -7
  17. data/ext/java/nokogiri/internals/NokogiriHandler.java +7 -1
  18. data/ext/java/nokogiri/internals/NokogiriNamespaceCache.java +1 -5
  19. data/ext/java/nokogiri/internals/NokogiriNamespaceContext.java +1 -1
  20. data/ext/java/nokogiri/internals/NokogiriXPathVariableResolver.java +1 -1
  21. data/ext/java/nokogiri/internals/NokogiriXsltErrorListener.java +1 -1
  22. data/ext/java/nokogiri/internals/ParserContext.java +65 -104
  23. data/ext/java/nokogiri/internals/XmlDeclHandler.java +1 -1
  24. data/ext/java/nokogiri/internals/XmlDomParser.java +4 -6
  25. data/ext/java/nokogiri/internals/XmlDomParserContext.java +15 -12
  26. data/ext/nokogiri/xml_node.c +2 -2
  27. data/lib/nokogiri/css/parser.rb +75 -79
  28. data/lib/nokogiri/html/document.rb +1 -1
  29. data/lib/nokogiri/nokogiri.jar +0 -0
  30. data/lib/nokogiri/version.rb +1 -1
  31. data/lib/nokogiri/xml/node.rb +1 -1
  32. data/lib/nokogiri/xml/node/save_options.rb +1 -1
  33. data/test/html/test_document.rb +17 -0
  34. data/test/xml/test_document.rb +1 -1
  35. data/test/xml/test_dtd.rb +3 -7
  36. data/test/xml/test_entity_reference.rb +214 -0
  37. data/test/xml/test_node_reparenting.rb +9 -1
  38. data/test/xml/test_xpath.rb +28 -1
  39. metadata +17 -26
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * (The MIT License)
3
3
  *
4
- * Copyright (c) 2008 - 2011:
4
+ * Copyright (c) 2008 - 2012:
5
5
  *
6
6
  * * {Aaron Patterson}[http://tenderlovemaking.com]
7
7
  * * {Mike Dalessio}[http://mike.daless.io]
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * (The MIT License)
3
3
  *
4
- * Copyright (c) 2008 - 2011:
4
+ * Copyright (c) 2008 - 2012:
5
5
  *
6
6
  * * {Aaron Patterson}[http://tenderlovemaking.com]
7
7
  * * {Mike Dalessio}[http://mike.daless.io]
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * (The MIT License)
3
3
  *
4
- * Copyright (c) 2008 - 2011:
4
+ * Copyright (c) 2008 - 2012:
5
5
  *
6
6
  * * {Aaron Patterson}[http://tenderlovemaking.com]
7
7
  * * {Mike Dalessio}[http://mike.daless.io]
@@ -17,10 +17,10 @@
17
17
  * distribute, sublicense, and/or sell copies of the Software, and to
18
18
  * permit persons to whom the Software is furnished to do so, subject to
19
19
  * the following conditions:
20
- *
20
+ *
21
21
  * The above copyright notice and this permission notice shall be
22
22
  * included in all copies or substantial portions of the Software.
23
- *
23
+ *
24
24
  * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
25
25
  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26
26
  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -33,7 +33,6 @@
33
33
  package nokogiri.internals;
34
34
 
35
35
  import static nokogiri.internals.NokogiriHelpers.rubyStringToString;
36
- import static nokogiri.internals.NokogiriHelpers.adjustSystemIdIfNecessary;
37
36
  import static org.jruby.javasupport.util.RuntimeHelpers.invoke;
38
37
 
39
38
  import java.io.ByteArrayInputStream;
@@ -41,6 +40,7 @@ import java.io.File;
41
40
  import java.io.IOException;
42
41
  import java.io.InputStream;
43
42
  import java.io.StringReader;
43
+ import java.net.URI;
44
44
  import java.nio.charset.Charset;
45
45
  import java.nio.charset.UnsupportedCharsetException;
46
46
 
@@ -58,7 +58,6 @@ import org.jruby.util.ByteList;
58
58
  import org.jruby.util.TypeConverter;
59
59
  import org.xml.sax.InputSource;
60
60
  import org.xml.sax.SAXException;
61
- import org.xml.sax.ext.EntityResolver2;
62
61
 
63
62
  /**
64
63
  * Base class for the various parser contexts. Handles converting
@@ -72,22 +71,6 @@ public class ParserContext extends RubyObject {
72
71
  protected IRubyObject detected_encoding = null;
73
72
  protected int stringDataSize = -1;
74
73
 
75
- /**
76
- * Create a file base input source taking into account the current
77
- * directory of <code>runtime</code>.
78
- */
79
- public static InputSource resolveEntity(Ruby runtime, String publicId, String baseURI, String systemId)
80
- throws IOException {
81
- InputSource s = new InputSource();
82
- String adjusted = adjustSystemIdIfNecessary(runtime.getCurrentDirectory(), runtime.getInstanceConfig().getScriptFileName(), baseURI, systemId);
83
- if (adjusted == null && publicId == null) {
84
- throw runtime.newRuntimeError("SystemId \"" + systemId + "\" is not correct.");
85
- }
86
- s.setSystemId(adjusted);
87
- s.setPublicId(publicId);
88
- return s;
89
- }
90
-
91
74
  public ParserContext(Ruby runtime) {
92
75
  // default to class 'Object' because this class isn't exposed to Ruby
93
76
  super(runtime, runtime.getObject());
@@ -106,30 +89,17 @@ public class ParserContext extends RubyObject {
106
89
  * which may be an IO object, a String, or a StringIO.
107
90
  */
108
91
  public void setInputSource(ThreadContext context, IRubyObject data, IRubyObject url) {
92
+ source = new InputSource();
93
+
109
94
  Ruby ruby = context.getRuntime();
110
- String path = (String) url.toJava(String.class);
111
- if (data.getType().respondsTo("detect_encoding")) {
112
- // data is EnocodingReader
113
- try {
114
- data.callMethod(context, "read", RubyFixnum.newFixnum(context.getRuntime(), 1024));
115
- } catch (RaiseException e) {
116
- detected_encoding = e.getException().getInstanceVariable("@found_encoding");
117
- }
118
- }
119
95
 
120
- if (isAbsolutePath(path)) {
121
- returnWithSystemId(path);
122
- return;
123
- }
124
- // Dir.chdir might be called at some point before this.
125
- String currentDir = context.getRuntime().getCurrentDirectory();
126
- if (path != null && currentDir != null && currentDir.length() != 0) {
127
- String absPath = currentDir + "/" + path;
128
- if (isAbsolutePath(absPath)) {
129
- returnWithSystemId(absPath);
130
- return;
131
- }
132
- }
96
+ ParserContext.setUrl(context, source, url);
97
+
98
+ // if setEncoding returned true, then the stream is set
99
+ // to the EncodingReaderInputStream
100
+ if (setEncoding(context, data))
101
+ return;
102
+
133
103
  RubyString stringData = null;
134
104
  if (invoke(context, data, "respond_to?",
135
105
  ruby.newSymbol("to_io").to_sym()).isTrue()) {
@@ -138,17 +108,7 @@ public class ParserContext extends RubyObject {
138
108
  (RubyIO) TypeConverter.convertToType(data,
139
109
  ruby.getIO(),
140
110
  "to_io");
141
- source = new InputSource(io.getInStream());
142
- } else if (((RubyObject)data).getInstanceVariable("@io") != null) {
143
- // in case of EncodingReader is used
144
- // since EncodingReader won't respond to :to_io
145
- RubyObject dataObject = (RubyObject) ((RubyObject)data).getInstanceVariable("@io");
146
- if (dataObject instanceof RubyIO) {
147
- RubyIO io = (RubyIO)dataObject;
148
- source = new InputSource(io.getInStream());
149
- } else if (dataObject instanceof RubyStringIO) {
150
- stringData = (RubyString)((RubyStringIO)dataObject).string();
151
- }
111
+ source.setByteStream(io.getInStream());
152
112
  } else {
153
113
  if (invoke(context, data, "respond_to?",
154
114
  ruby.newSymbol("string").to_sym()).isTrue()) {
@@ -177,41 +137,64 @@ public class ParserContext extends RubyObject {
177
137
  ByteList bytes = stringData.getByteList();
178
138
  if (charset != null) {
179
139
  StringReader reader = new StringReader(new String(bytes.unsafeBytes(), bytes.begin(), bytes.length(), charset));
180
- source = new InputSource(reader);
140
+ source.setCharacterStream(reader);
181
141
  source.setEncoding(charset.name());
182
142
  } else {
183
143
  stringDataSize = bytes.length() - bytes.begin();
184
- source = new InputSource(new ByteArrayInputStream(bytes.unsafeBytes(), bytes.begin(), bytes.length()));
144
+ ByteArrayInputStream stream = new ByteArrayInputStream(bytes.unsafeBytes(), bytes.begin(), bytes.length());
145
+ source.setByteStream(stream);
185
146
  }
186
147
  }
187
148
  }
188
-
189
- private boolean isAbsolutePath(String url) {
190
- if (url == null) return false;
191
- return (new File(url)).isAbsolute();
149
+
150
+ public static void setUrl(ThreadContext context, InputSource source, IRubyObject url) {
151
+ String path = rubyStringToString(url);
152
+ // Dir.chdir might be called at some point before this.
153
+ if (path != null) {
154
+ try {
155
+ URI uri = URI.create(path);
156
+ source.setSystemId(uri.toURL().toString());
157
+ } catch (Exception ex) {
158
+ // fallback to the old behavior
159
+ File file = new File(path);
160
+ if (file.isAbsolute()) {
161
+ source.setSystemId(path);
162
+ } else {
163
+ String pwd = context.getRuntime().getCurrentDirectory();
164
+ String absolutePath;
165
+ try {
166
+ absolutePath = new File(pwd, path).getCanonicalPath();
167
+ } catch (IOException e) {
168
+ absolutePath = new File(pwd, path).getAbsolutePath();
169
+ }
170
+ source.setSystemId(absolutePath);
171
+ }
172
+ }
173
+ }
192
174
  }
193
-
194
- private void returnWithSystemId(String url) {
195
- source = new InputSource();
196
- if (detected_encoding != null) {
197
- source.setEncoding((String) detected_encoding.toJava(String.class));
175
+
176
+ private boolean setEncoding(ThreadContext context, IRubyObject data) {
177
+ if (data.getType().respondsTo("detect_encoding")) {
178
+ // in case of EncodingReader is used
179
+ // since EncodingReader won't respond to :to_io
180
+ NokogiriEncodingReaderWrapper reader = new NokogiriEncodingReaderWrapper(context, (RubyObject) data);
181
+ source.setByteStream(reader);
182
+ // data is EnocodingReader
183
+ if(reader.detectEncoding()) {
184
+ detected_encoding = reader.getEncoding();
185
+ source.setEncoding(detected_encoding.asJavaString());
186
+ }
187
+ return true;
198
188
  }
199
- source.setSystemId(url);
200
- return;
189
+ return false;
201
190
  }
202
191
 
203
192
  /**
204
193
  * Set the InputSource to read from <code>file</code>, a String filename.
205
194
  */
206
195
  public void setInputSourceFile(ThreadContext context, IRubyObject file) {
207
- String filename = rubyStringToString(file);
208
-
209
- try{
210
- source = resolveEntity(context.getRuntime(), null, null, filename);
211
- } catch (Exception e) {
212
- throw RaiseException.createNativeRaiseException(context.getRuntime(), e);
213
- }
214
-
196
+ source = new InputSource();
197
+ ParserContext.setUrl(context, source, file);
215
198
  }
216
199
 
217
200
  /**
@@ -287,41 +270,19 @@ public class ParserContext extends RubyObject {
287
270
  }
288
271
  }
289
272
 
290
- /**
291
- * An entity resolver aware of the fact that the Ruby runtime can
292
- * change directory but the JVM cannot. Thus any file based
293
- * entity resolution that uses relative paths must be translated
294
- * to be relative to the current directory of the Ruby runtime.
295
- */
296
- public static class ChdirEntityResolver implements EntityResolver2 {
297
- protected Ruby runtime;
298
-
299
- public ChdirEntityResolver(Ruby runtime) {
300
- super();
301
- this.runtime = runtime;
302
- }
303
-
304
- @Override
305
- public InputSource getExternalSubset(String name, String baseURI)
306
- throws SAXException, IOException {
307
- return null;
273
+ public static class NokogiriXInlcudeEntityResolver implements org.xml.sax.EntityResolver {
274
+ InputSource source;
275
+ public NokogiriXInlcudeEntityResolver(InputSource source) {
276
+ this.source = source;
308
277
  }
309
278
 
310
279
  @Override
311
280
  public InputSource resolveEntity(String publicId, String systemId)
312
- throws SAXException, IOException {
313
- return resolveEntity(null, publicId, null, systemId);
314
- }
315
-
316
- @Override
317
- public InputSource resolveEntity(String name,
318
- String publicId,
319
- String baseURI,
320
- String systemId)
321
- throws SAXException, IOException {
322
- return ParserContext.resolveEntity(runtime, publicId, baseURI, systemId);
281
+ throws SAXException, IOException {
282
+ if (systemId != null) source.setSystemId(systemId);
283
+ if (publicId != null) source.setPublicId(publicId);
284
+ return source;
323
285
  }
324
-
325
286
  }
326
287
 
327
288
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * (The MIT License)
3
3
  *
4
- * Copyright (c) 2008 - 2011:
4
+ * Copyright (c) 2008 - 2012:
5
5
  *
6
6
  * * {Aaron Patterson}[http://tenderlovemaking.com]
7
7
  * * {Mike Dalessio}[http://mike.daless.io]
@@ -35,18 +35,16 @@ package nokogiri.internals;
35
35
  import java.io.IOException;
36
36
 
37
37
  import nokogiri.XmlDocument;
38
- import nokogiri.internals.ParserContext.Options;
39
38
 
40
39
  import org.apache.xerces.parsers.DOMParser;
41
40
  import org.apache.xerces.parsers.XIncludeParserConfiguration;
42
- import org.apache.xerces.xni.XMLResourceIdentifier;
43
- import org.apache.xerces.xni.XNIException;
44
- import org.apache.xerces.xni.parser.XMLEntityResolver;
45
- import org.apache.xerces.xni.parser.XMLInputSource;
46
41
  import org.apache.xerces.xni.parser.XMLParserConfiguration;
47
42
  import org.cyberneko.dtd.DTDConfiguration;
48
43
  import org.w3c.dom.Document;
44
+ import org.xml.sax.Attributes;
45
+ import org.xml.sax.ContentHandler;
49
46
  import org.xml.sax.InputSource;
47
+ import org.xml.sax.Locator;
50
48
  import org.xml.sax.SAXException;
51
49
 
52
50
  /**
@@ -80,7 +78,7 @@ public class XmlDomParser extends DOMParser {
80
78
  public void parse(InputSource source) throws SAXException, IOException {
81
79
  dtd.reset();
82
80
  if (options.xInclude) {
83
- super.setEntityResolver(new NokogiriXInlcudeEntityResolver(source));
81
+ setEntityResolver(new NokogiriXInlcudeEntityResolver(source));
84
82
  }
85
83
  super.parse(source);
86
84
  Document doc = getDocument();
@@ -68,8 +68,12 @@ import org.xml.sax.SAXException;
68
68
  public class XmlDomParserContext extends ParserContext {
69
69
  protected static final String FEATURE_LOAD_EXTERNAL_DTD =
70
70
  "http://apache.org/xml/features/nonvalidating/load-external-dtd";
71
+ protected static final String FEATURE_LOAD_DTD_GRAMMAR =
72
+ "http://apache.org/xml/features/nonvalidating/load-dtd-grammar";
71
73
  protected static final String FEATURE_INCLUDE_IGNORABLE_WHITESPACE =
72
74
  "http://apache.org/xml/features/dom/include-ignorable-whitespace";
75
+ protected static final String FEATURE_NOT_EXPAND_ENTITY =
76
+ "http://apache.org/xml/features/dom/create-entity-ref-nodes";
73
77
  protected static final String FEATURE_VALIDATION = "http://xml.org/sax/features/validation";
74
78
  private static final String XINCLUDE_FEATURE_ID = "http://apache.org/xml/features/xinclude";
75
79
  private static final String SECURITY_MANAGER = "http://apache.org/xml/properties/security-manager";
@@ -120,22 +124,18 @@ public class XmlDomParserContext extends ParserContext {
120
124
  if (options.dtdValid) {
121
125
  setFeature(FEATURE_VALIDATION, true);
122
126
  }
127
+
128
+ if (!options.noEnt) {
129
+ setFeature(FEATURE_NOT_EXPAND_ENTITY, true);
130
+ }
123
131
  // If we turn off loading of external DTDs complete, we don't
124
132
  // getthe publicID. Instead of turning off completely, we use
125
133
  // an entity resolver that returns empty documents.
126
134
  if (options.dtdLoad) {
127
135
  setFeature(FEATURE_LOAD_EXTERNAL_DTD, true);
128
- parser.setEntityResolver(new ChdirEntityResolver(runtime));
129
- } else {
130
- parser.setEntityResolver(new EntityResolver() {
131
- public InputSource resolveEntity(String arg0, String arg1)
132
- throws SAXException, IOException {
133
- ByteArrayInputStream empty =
134
- new ByteArrayInputStream(new byte[0]);
135
- return new InputSource(empty);
136
- }
137
- });
136
+ setFeature(FEATURE_LOAD_DTD_GRAMMAR, true);
138
137
  }
138
+ parser.setEntityResolver(new NokogiriEntityResolver(runtime, errorHandler, options));
139
139
  }
140
140
 
141
141
  /**
@@ -210,8 +210,11 @@ public class XmlDomParserContext extends ParserContext {
210
210
  xmlDocument.setEncoding(ruby_encoding);
211
211
 
212
212
  if (options.dtdLoad) {
213
- XmlDtd xmlDtd = (XmlDtd) XmlDtd.newFromExternalSubset(context.getRuntime(), doc);
214
- doc.setUserData(XmlDocument.DTD_EXTERNAL_SUBSET, xmlDtd, null);
213
+ IRubyObject xmlDtdOrNil = XmlDtd.newFromExternalSubset(context.getRuntime(), doc);
214
+ if (!xmlDtdOrNil.isNil()) {
215
+ XmlDtd xmlDtd = (XmlDtd) xmlDtdOrNil;
216
+ doc.setUserData(XmlDocument.DTD_EXTERNAL_SUBSET, xmlDtd, null);
217
+ }
215
218
  }
216
219
  return xmlDocument;
217
220
  }
@@ -1329,8 +1329,8 @@ VALUE Nokogiri_wrap_xml_node(VALUE klass, xmlNodePtr node)
1329
1329
  return DOC_RUBY_OBJECT(node->doc);
1330
1330
 
1331
1331
  /* It's OK if the node doesn't have a fully-realized document (as in XML::Reader). */
1332
- /* see https://github.com/tenderlove/nokogiri/issues/95 */
1333
- /* and https://github.com/tenderlove/nokogiri/issues/439 */
1332
+ /* see https://github.com/sparklemotion/nokogiri/issues/95 */
1333
+ /* and https://github.com/sparklemotion/nokogiri/issues/439 */
1334
1334
  doc = node->doc;
1335
1335
  if (doc->type == XML_DOCUMENT_FRAG_NODE) doc = doc->doc;
1336
1336
  node_has_a_document = DOC_RUBY_OBJECT_TEST(doc);
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # DO NOT MODIFY!!!!
3
- # This file is automatically generated by Racc 1.4.7
3
+ # This file is automatically generated by Racc 1.4.8
4
4
  # from Racc grammer file "".
5
5
  #
6
6
 
@@ -14,100 +14,96 @@ module Nokogiri
14
14
  ##### State transition tables begin ###
15
15
 
16
16
  racc_action_table = [
17
- 6, 62, 7, 63, 14, 19, 23, 26, 20, 2,
18
- 71, 14, 6, 63, 85, 17, 14, 22, 25, 28,
19
- 83, 2, 7, 72, 11, 13, 15, -26, 20, 7,
20
- 49, 28, 13, 70, 7, 20, 11, 13, 15, 6,
21
- 20, 64, 65, 14, 19, 23, 26, 64, 2, 36,
22
- 59, 6, 60, 67, 17, 14, 22, 25, 28, 90,
23
- 2, 7, 6, 11, 13, 15, 14, 20, 66, 67,
24
- 28, 2, 91, 7, 14, 11, 13, 15, 14, 20,
25
- 69, 28, 6, 2, 7, 68, 11, 13, 15, 14,
26
- 20, 37, 7, 39, 94, 13, 7, 14, 20, 13,
27
- 15, 28, 20, 6, 49, 14, 11, 7, 36, 59,
28
- 13, 60, 53, 20, 14, 7, 36, 59, 13, 60,
29
- 95, 20, 28, 7, 101, 100, 13, 11, 49, 20,
30
- 74, 76, 7, 36, 31, 13, 33, 50, 20, 74,
31
- 76, 75, 77, 79, 98, 80, 32, 99, 42, 73,
32
- 75, 77, 79, 102, 80, 19, 23, 26, 73, 36,
33
- 59, -26, 60, 104, 105, 17, nil, 22, 25 ]
17
+ 21, 4, 5, 7, 29, 4, 5, 7, 30, 19,
18
+ -26, 6, 21, 9, 8, 6, 29, 9, 8, 22,
19
+ 31, 19, 20, 21, 23, 15, 17, 29, 24, 83,
20
+ 31, 22, 19, 84, 20, 21, 23, 15, 17, 29,
21
+ 24, 92, 22, 85, 19, 20, 21, 23, 15, 17,
22
+ 20, 24, 82, 90, 22, 59, 24, 20, 89, 23,
23
+ 15, 17, 21, 24, 88, 22, 29, 4, 5, 7,
24
+ 23, 19, 71, 29, 91, 29, 86, 6, 19, 9,
25
+ 8, 22, 29, 29, 20, 89, 23, 15, 17, 35,
26
+ 24, 20, 29, 20, 15, 17, 15, 24, 35, 24,
27
+ 20, 20, 29, 15, 15, 93, 24, 24, 21, 64,
28
+ 20, 95, 29, 15, 97, 96, 24, 43, -26, 46,
29
+ 20, 52, 53, 15, 51, 98, 24, 22, 79, 80,
30
+ 20, 99, 23, 15, 48, 42, 24, 79, 80, 75,
31
+ 76, 77, 101, 78, 87, 86, 41, 74, 75, 76,
32
+ 77, 35, 78, 104, 52, 56, 74, 55, 52, 56,
33
+ 105, 55, 52, 56, nil, 55, 52, 56, nil, 55 ]
34
34
 
35
35
  racc_action_check = [
36
- 0, 29, 21, 45, 0, 0, 0, 0, 21, 0,
37
- 38, 24, 63, 29, 45, 0, 63, 0, 0, 0,
38
- 42, 63, 0, 39, 0, 0, 0, 37, 0, 24,
39
- 47, 63, 24, 36, 63, 24, 63, 63, 63, 11,
40
- 63, 59, 31, 11, 11, 11, 11, 31, 11, 70,
41
- 70, 9, 70, 60, 11, 9, 11, 11, 11, 61,
42
- 9, 11, 44, 11, 11, 11, 44, 11, 33, 33,
43
- 9, 44, 62, 9, 87, 9, 9, 9, 49, 9,
44
- 35, 44, 7, 49, 44, 34, 44, 44, 44, 12,
45
- 44, 7, 87, 7, 65, 87, 49, 27, 87, 49,
46
- 49, 7, 49, 20, 12, 18, 7, 12, 64, 64,
47
- 12, 64, 20, 12, 1, 27, 28, 28, 27, 28,
48
- 66, 27, 20, 18, 81, 81, 18, 20, 16, 18,
49
- 41, 41, 1, 6, 6, 1, 6, 13, 1, 40,
50
- 40, 41, 41, 41, 71, 41, 6, 78, 8, 41,
51
- 40, 40, 40, 82, 40, 10, 10, 10, 40, 67,
52
- 67, 2, 67, 89, 95, 10, nil, 10, 10 ]
36
+ 0, 14, 14, 14, 0, 0, 0, 0, 1, 0,
37
+ 43, 14, 40, 14, 14, 0, 40, 0, 0, 0,
38
+ 1, 40, 0, 31, 0, 0, 0, 31, 0, 47,
39
+ 57, 40, 31, 49, 40, 13, 40, 40, 40, 13,
40
+ 40, 57, 31, 50, 13, 31, 24, 31, 31, 31,
41
+ 11, 31, 46, 53, 13, 24, 11, 13, 53, 13,
42
+ 13, 13, 23, 13, 52, 24, 23, 23, 23, 23,
43
+ 24, 23, 42, 35, 54, 28, 55, 23, 35, 23,
44
+ 23, 23, 27, 10, 23, 56, 23, 23, 23, 33,
45
+ 23, 35, 26, 28, 35, 35, 28, 35, 10, 28,
46
+ 27, 10, 25, 27, 10, 67, 27, 10, 20, 30,
47
+ 26, 72, 68, 26, 73, 73, 26, 20, 19, 20,
48
+ 25, 21, 21, 25, 21, 81, 25, 20, 45, 45,
49
+ 68, 83, 20, 68, 21, 18, 68, 44, 44, 45,
50
+ 45, 45, 87, 45, 51, 51, 15, 45, 44, 44,
51
+ 44, 12, 44, 90, 89, 89, 44, 89, 86, 86,
52
+ 101, 86, 88, 88, nil, 88, 22, 22, nil, 22 ]
53
53
 
54
54
  racc_action_pointer = [
55
- -2, 108, 132, nil, nil, nil, 123, 80, 119, 49,
56
- 148, 37, 83, 126, nil, nil, 107, nil, 99, nil,
57
- 101, -22, nil, nil, 5, nil, nil, 91, 106, 1,
58
- nil, 35, nil, 57, 62, 57, 21, -2, -19, -2,
59
- 136, 127, 9, nil, 60, -9, nil, 9, nil, 72,
60
- nil, nil, nil, nil, nil, nil, nil, nil, nil, 29,
61
- 41, 36, 72, 10, 98, 81, 113, 149, nil, nil,
62
- 39, 133, nil, nil, nil, nil, nil, nil, 122, nil,
63
- nil, 114, 128, nil, nil, nil, nil, 68, nil, 140,
64
- nil, nil, nil, nil, nil, 151, nil, nil, nil, nil,
65
- nil, nil, nil, nil, nil, nil ]
55
+ -2, 8, nil, nil, nil, nil, nil, nil, nil, nil,
56
+ 77, 26, 130, 33, -6, 135, nil, nil, 106, 89,
57
+ 106, 111, 156, 60, 44, 96, 86, 76, 69, nil,
58
+ 109, 21, nil, 68, nil, 67, nil, nil, nil, nil,
59
+ 10, nil, 61, -19, 134, 125, 27, 0, nil, 10,
60
+ 20, 133, 52, 46, 51, 64, 73, 18, nil, nil,
61
+ nil, nil, nil, nil, nil, nil, nil, 82, 106, nil,
62
+ nil, nil, 86, 104, nil, nil, nil, nil, nil, nil,
63
+ nil, 100, nil, 120, nil, nil, 148, 135, 152, 144,
64
+ 140, nil, nil, nil, nil, nil, nil, nil, nil, nil,
65
+ nil, 147, nil, nil, nil, nil ]
66
66
 
67
67
  racc_action_default = [
68
- -27, -56, -25, -3, -22, -2, -74, -27, -74, -27,
69
- -20, -27, -50, -74, -59, -23, -17, -6, -55, -4,
70
- -74, -13, -9, -5, -58, -8, -7, -57, -74, -74,
71
- -52, -43, -33, -41, -74, -74, -42, -32, -74, -74,
72
- -62, -62, -74, -18, -27, -74, -10, -49, -12, -27,
73
- -21, -16, -51, -48, -47, -14, -15, -54, -53, -43,
74
- -41, -74, -74, -27, -74, -74, -46, -74, -34, -35,
75
- -74, -74, -30, -63, -68, -64, -69, -65, -74, -66,
76
- -67, -74, -74, -24, -19, -37, -11, -71, -73, -74,
77
- -36, 106, -1, -40, -45, -74, -38, -39, -31, -28,
78
- -60, -61, -29, -72, -70, -44 ]
68
+ -27, -74, -2, -3, -4, -5, -6, -7, -8, -9,
69
+ -50, -13, -17, -27, -20, -74, -22, -23, -74, -25,
70
+ -27, -74, -74, -27, -74, -55, -56, -57, -58, -59,
71
+ -74, -27, -10, -49, -12, -27, -14, -15, -16, -18,
72
+ -27, -21, -74, -32, -62, -62, -74, -74, -33, -74,
73
+ -74, -41, -42, -43, -74, -41, -43, -74, -47, -48,
74
+ -51, -52, -53, -54, 106, -1, -11, -74, -71, -73,
75
+ -19, -24, -74, -74, -63, -64, -65, -66, -67, -68,
76
+ -69, -74, -30, -74, -34, -35, -74, -46, -74, -74,
77
+ -74, -36, -37, -70, -72, -28, -60, -61, -29, -31,
78
+ -38, -74, -39, -40, -45, -44 ]
79
79
 
80
80
  racc_goto_table = [
81
- 30, 43, 34, 48, 29, 41, 55, 51, 78, 82,
82
- 46, 47, 56, 38, 40, 45, 87, 52, 54, 44,
83
- 35, 89, nil, 57, 61, nil, 58, nil, nil, nil,
84
- nil, nil, nil, nil, nil, nil, 84, nil, 86, nil,
85
- nil, nil, nil, nil, nil, nil, nil, nil, 88, nil,
86
- nil, nil, nil, nil, nil, 92, nil, nil, nil, nil,
87
- 93, nil, nil, 96, nil, nil, 97, nil, nil, nil,
81
+ 49, 54, 33, 39, 36, 1, 34, 45, 38, 72,
82
+ 81, 58, 32, 37, 47, 44, 68, 60, 61, 62,
83
+ 63, 65, 40, 50, 67, nil, nil, 69, 57, 66,
84
+ 70, nil, nil, nil, nil, nil, nil, nil, nil, nil,
88
85
  nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
89
- nil, nil, nil, nil, nil, nil, 103 ]
86
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
87
+ 94, nil, nil, nil, nil, 100, nil, 102, 103 ]
90
88
 
91
89
  racc_goto_check = [
92
- 8, 2, 18, 9, 1, 10, 11, 9, 17, 17,
93
- 7, 8, 12, 15, 16, 1, 6, 8, 10, 4,
94
- 19, 22, nil, 8, 18, nil, 8, nil, nil, nil,
95
- nil, nil, nil, nil, nil, nil, 2, nil, 9, nil,
96
- nil, nil, nil, nil, nil, nil, nil, nil, 8, nil,
97
- nil, nil, nil, nil, nil, 2, nil, nil, nil, nil,
98
- 18, nil, nil, 18, nil, nil, 18, nil, nil, nil,
90
+ 18, 18, 8, 2, 11, 1, 9, 10, 9, 17,
91
+ 17, 10, 7, 12, 15, 16, 6, 8, 8, 8,
92
+ 8, 2, 4, 19, 22, nil, nil, 8, 1, 9,
93
+ 2, nil, nil, nil, nil, nil, nil, nil, nil, nil,
94
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
99
95
  nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
100
- nil, nil, nil, nil, nil, nil, 8 ]
96
+ 8, nil, nil, nil, nil, 18, nil, 18, 18 ]
101
97
 
102
98
  racc_goto_pointer = [
103
- nil, 4, -8, nil, 9, nil, -33, -2, -1, -9,
104
- -2, -15, -9, nil, nil, 6, 7, -32, -4, 14,
105
- nil, nil, -28 ]
99
+ nil, 5, -10, nil, 8, nil, -19, 2, -8, -4,
100
+ -13, -7, 2, nil, nil, -6, -5, -35, -21, 2,
101
+ nil, nil, -11 ]
106
102
 
107
103
  racc_goto_default = [
108
- nil, nil, 3, 5, 9, 10, 12, nil, 16, nil,
109
- 21, 24, 27, 1, 4, 8, nil, nil, nil, nil,
110
- 18, 81, nil ]
104
+ nil, nil, 3, 2, 13, 14, 10, nil, 12, nil,
105
+ 11, 28, 27, 26, 16, 18, nil, nil, nil, nil,
106
+ 25, 73, nil ]
111
107
 
112
108
  racc_reduce_table = [
113
109
  0, 0, :racc_error,