nokogiri 1.5.0 → 1.5.1.rc1

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 (61) hide show
  1. data/CHANGELOG.ja.rdoc +39 -12
  2. data/CHANGELOG.rdoc +28 -0
  3. data/C_CODING_STYLE.rdoc +27 -0
  4. data/Manifest.txt +4 -0
  5. data/README.rdoc +11 -7
  6. data/Rakefile +42 -29
  7. data/bin/nokogiri +10 -2
  8. data/ext/nokogiri/extconf.rb +9 -1
  9. data/ext/nokogiri/html_document.c +16 -0
  10. data/ext/nokogiri/html_sax_parser_context.c +59 -37
  11. data/ext/nokogiri/html_sax_push_parser.c +87 -0
  12. data/ext/nokogiri/html_sax_push_parser.h +9 -0
  13. data/ext/nokogiri/nokogiri.c +6 -8
  14. data/ext/nokogiri/nokogiri.h +3 -0
  15. data/ext/nokogiri/xml_document.c +101 -3
  16. data/ext/nokogiri/xml_document.h +3 -3
  17. data/ext/nokogiri/xml_node.c +150 -58
  18. data/ext/nokogiri/xml_node_set.c +169 -120
  19. data/ext/nokogiri/xml_node_set.h +5 -0
  20. data/ext/nokogiri/xml_sax_parser_context.c +64 -41
  21. data/ext/nokogiri/xml_text.c +2 -0
  22. data/ext/nokogiri/xml_xpath_context.c +30 -24
  23. data/ext/nokogiri/xslt_stylesheet.c +62 -16
  24. data/ext/nokogiri/xslt_stylesheet.h +5 -0
  25. data/lib/nokogiri/css/parser.rb +165 -159
  26. data/lib/nokogiri/css/parser.y +6 -3
  27. data/lib/nokogiri/css/tokenizer.rb +1 -1
  28. data/lib/nokogiri/css/tokenizer.rex +1 -1
  29. data/lib/nokogiri/html.rb +1 -0
  30. data/lib/nokogiri/html/document.rb +82 -42
  31. data/lib/nokogiri/html/sax/push_parser.rb +16 -0
  32. data/lib/nokogiri/version.rb +1 -1
  33. data/lib/nokogiri/xml.rb +6 -0
  34. data/lib/nokogiri/xml/builder.rb +7 -1
  35. data/lib/nokogiri/xml/document.rb +32 -17
  36. data/lib/nokogiri/xml/document_fragment.rb +6 -1
  37. data/lib/nokogiri/xml/node.rb +40 -9
  38. data/lib/nokogiri/xslt.rb +5 -1
  39. data/tasks/cross_compile.rb +1 -0
  40. data/tasks/nokogiri.org.rb +6 -0
  41. data/tasks/test.rb +1 -0
  42. data/test/css/test_xpath_visitor.rb +6 -0
  43. data/test/helper.rb +1 -0
  44. data/test/html/test_document.rb +26 -0
  45. data/test/html/test_document_fragment.rb +1 -2
  46. data/test/test_memory_leak.rb +81 -1
  47. data/test/test_xslt_transforms.rb +152 -123
  48. data/test/xml/test_builder.rb +24 -2
  49. data/test/xml/test_c14n.rb +151 -0
  50. data/test/xml/test_document.rb +48 -0
  51. data/test/xml/test_namespace.rb +5 -0
  52. data/test/xml/test_node.rb +82 -1
  53. data/test/xml/test_node_attributes.rb +19 -0
  54. data/test/xml/test_node_inheritance.rb +32 -0
  55. data/test/xml/test_node_reparenting.rb +32 -0
  56. data/test/xml/test_node_set.rb +16 -8
  57. data/test/xml/test_reader_encoding.rb +16 -0
  58. data/test/xml/test_unparented_node.rb +24 -0
  59. data/test/xml/test_xinclude.rb +83 -0
  60. data/test/xml/test_xpath.rb +22 -0
  61. metadata +208 -241
@@ -19,20 +19,22 @@ static void deallocate(xmlParserCtxtPtr ctxt)
19
19
  *
20
20
  * Parse +io+ object with +encoding+
21
21
  */
22
- static VALUE parse_io(VALUE klass, VALUE io, VALUE encoding)
22
+ static VALUE
23
+ parse_io(VALUE klass, VALUE io, VALUE encoding)
23
24
  {
24
- xmlCharEncoding enc = (xmlCharEncoding)NUM2INT(encoding);
25
-
26
- xmlParserCtxtPtr ctxt = xmlCreateIOParserCtxt(
27
- NULL,
28
- NULL,
29
- (xmlInputReadCallback)io_read_callback,
30
- (xmlInputCloseCallback)io_close_callback,
31
- (void *)io,
32
- enc
33
- );
34
-
35
- return Data_Wrap_Struct(klass, NULL, deallocate, ctxt);
25
+ xmlParserCtxtPtr ctxt;
26
+ xmlCharEncoding enc = (xmlCharEncoding)NUM2INT(encoding);
27
+
28
+ ctxt = xmlCreateIOParserCtxt(NULL, NULL,
29
+ (xmlInputReadCallback)io_read_callback,
30
+ (xmlInputCloseCallback)io_close_callback,
31
+ (void *)io, enc);
32
+ if (ctxt->sax) {
33
+ xmlFree(ctxt->sax);
34
+ ctxt->sax = NULL;
35
+ }
36
+
37
+ return Data_Wrap_Struct(klass, NULL, deallocate, ctxt);
36
38
  }
37
39
 
38
40
  /*
@@ -53,20 +55,44 @@ static VALUE parse_file(VALUE klass, VALUE filename)
53
55
  *
54
56
  * Parse the XML stored in memory in +data+
55
57
  */
56
- static VALUE parse_memory(VALUE klass, VALUE data)
58
+ static VALUE
59
+ parse_memory(VALUE klass, VALUE data)
57
60
  {
58
- xmlParserCtxtPtr ctxt;
61
+ xmlParserCtxtPtr ctxt;
59
62
 
60
- if(NIL_P(data)) rb_raise(rb_eArgError, "data cannot be nil");
61
- if(!(int)RSTRING_LEN(data))
62
- rb_raise(rb_eRuntimeError, "data cannot be empty");
63
+ if (NIL_P(data))
64
+ rb_raise(rb_eArgError, "data cannot be nil");
65
+ if (!(int)RSTRING_LEN(data))
66
+ rb_raise(rb_eRuntimeError, "data cannot be empty");
63
67
 
64
- ctxt = xmlCreateMemoryParserCtxt(
65
- StringValuePtr(data),
66
- (int)RSTRING_LEN(data)
67
- );
68
+ ctxt = xmlCreateMemoryParserCtxt(StringValuePtr(data),
69
+ (int)RSTRING_LEN(data));
70
+ if (ctxt->sax) {
71
+ xmlFree(ctxt->sax);
72
+ ctxt->sax = NULL;
73
+ }
68
74
 
69
- return Data_Wrap_Struct(klass, NULL, deallocate, ctxt);
75
+ return Data_Wrap_Struct(klass, NULL, deallocate, ctxt);
76
+ }
77
+
78
+ static VALUE
79
+ parse_doc(VALUE ctxt_val)
80
+ {
81
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr)ctxt_val;
82
+ xmlParseDocument(ctxt);
83
+ return Qnil;
84
+ }
85
+
86
+ static VALUE
87
+ parse_doc_finalize(VALUE ctxt_val)
88
+ {
89
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr)ctxt_val;
90
+
91
+ if (NULL != ctxt->myDoc)
92
+ xmlFreeDoc(ctxt->myDoc);
93
+
94
+ NOKOGIRI_SAX_TUPLE_DESTROY(ctxt->userData);
95
+ return Qnil;
70
96
  }
71
97
 
72
98
  /*
@@ -75,31 +101,28 @@ static VALUE parse_memory(VALUE klass, VALUE data)
75
101
  *
76
102
  * Use +sax_handler+ and parse the current document
77
103
  */
78
- static VALUE parse_with(VALUE self, VALUE sax_handler)
104
+ static VALUE
105
+ parse_with(VALUE self, VALUE sax_handler)
79
106
  {
80
- xmlParserCtxtPtr ctxt;
81
- xmlSAXHandlerPtr sax;
82
-
83
- if(!rb_obj_is_kind_of(sax_handler, cNokogiriXmlSaxParser))
84
- rb_raise(rb_eArgError, "argument must be a Nokogiri::XML::SAX::Parser");
85
-
86
- Data_Get_Struct(self, xmlParserCtxt, ctxt);
87
- Data_Get_Struct(sax_handler, xmlSAXHandler, sax);
107
+ xmlParserCtxtPtr ctxt;
108
+ xmlSAXHandlerPtr sax;
88
109
 
89
- /* Free the sax handler since we'll assign our own */
90
- if(ctxt->sax && ctxt->sax != (xmlSAXHandlerPtr)&xmlDefaultSAXHandler)
91
- xmlFree(ctxt->sax);
110
+ if (!rb_obj_is_kind_of(sax_handler, cNokogiriXmlSaxParser))
111
+ rb_raise(rb_eArgError, "argument must be a Nokogiri::XML::SAX::Parser");
92
112
 
93
- ctxt->sax = sax;
94
- ctxt->userData = (void *)NOKOGIRI_SAX_TUPLE_NEW(ctxt, sax_handler);
113
+ Data_Get_Struct(self, xmlParserCtxt, ctxt);
114
+ Data_Get_Struct(sax_handler, xmlSAXHandler, sax);
95
115
 
96
- xmlParseDocument(ctxt);
116
+ /* Free the sax handler since we'll assign our own */
117
+ if (ctxt->sax && ctxt->sax != (xmlSAXHandlerPtr)&xmlDefaultSAXHandler)
118
+ xmlFree(ctxt->sax);
97
119
 
98
- if(NULL != ctxt->myDoc) xmlFreeDoc(ctxt->myDoc);
120
+ ctxt->sax = sax;
121
+ ctxt->userData = (void *)NOKOGIRI_SAX_TUPLE_NEW(ctxt, sax_handler);
99
122
 
100
- NOKOGIRI_SAX_TUPLE_DESTROY(ctxt->userData);
123
+ rb_ensure(parse_doc, (VALUE)ctxt, parse_doc_finalize, (VALUE)ctxt);
101
124
 
102
- return Qnil ;
125
+ return Qnil;
103
126
  }
104
127
 
105
128
  /*
@@ -22,6 +22,8 @@ static VALUE new(int argc, VALUE *argv, VALUE klass)
22
22
  node = xmlNewText((xmlChar *)StringValuePtr(string));
23
23
  node->doc = doc->doc;
24
24
 
25
+ NOKOGIRI_ROOT_NODE(node);
26
+
25
27
  rb_node = Nokogiri_wrap_xml_node(klass, node) ;
26
28
  rb_obj_call_init(rb_node, argc, argv);
27
29
 
@@ -59,6 +59,7 @@ static void ruby_funcall(xmlXPathParserContextPtr ctx, int nargs)
59
59
  xmlNodeSetPtr xml_node_set = NULL;
60
60
  xmlXPathObjectPtr obj;
61
61
  int i;
62
+ nokogiriNodeSetTuple *node_set_tuple;
62
63
 
63
64
  assert(ctx);
64
65
  assert(ctx->context);
@@ -75,27 +76,29 @@ static void ruby_funcall(xmlXPathParserContextPtr ctx, int nargs)
75
76
 
76
77
  doc = DOC_RUBY_OBJECT(ctx->context->doc);
77
78
 
78
- i = nargs - 1;
79
- do {
80
- obj = valuePop(ctx);
81
- switch(obj->type) {
82
- case XPATH_STRING:
83
- argv[i] = NOKOGIRI_STR_NEW2(obj->stringval);
84
- break;
85
- case XPATH_BOOLEAN:
86
- argv[i] = obj->boolval == 1 ? Qtrue : Qfalse;
87
- break;
88
- case XPATH_NUMBER:
89
- argv[i] = rb_float_new(obj->floatval);
90
- break;
91
- case XPATH_NODESET:
92
- argv[i] = Nokogiri_wrap_xml_node_set(obj->nodesetval, doc);
93
- break;
94
- default:
95
- argv[i] = NOKOGIRI_STR_NEW2(xmlXPathCastToString(obj));
96
- }
97
- xmlXPathFreeNodeSetList(obj);
98
- } while(i-- > 0);
79
+ if (nargs > 0) {
80
+ i = nargs - 1;
81
+ do {
82
+ obj = valuePop(ctx);
83
+ switch(obj->type) {
84
+ case XPATH_STRING:
85
+ argv[i] = NOKOGIRI_STR_NEW2(obj->stringval);
86
+ break;
87
+ case XPATH_BOOLEAN:
88
+ argv[i] = obj->boolval == 1 ? Qtrue : Qfalse;
89
+ break;
90
+ case XPATH_NUMBER:
91
+ argv[i] = rb_float_new(obj->floatval);
92
+ break;
93
+ case XPATH_NODESET:
94
+ argv[i] = Nokogiri_wrap_xml_node_set(obj->nodesetval, doc);
95
+ break;
96
+ default:
97
+ argv[i] = NOKOGIRI_STR_NEW2(xmlXPathCastToString(obj));
98
+ }
99
+ xmlXPathFreeNodeSetList(obj);
100
+ } while(i-- > 0);
101
+ }
99
102
 
100
103
  result = rb_funcall2(
101
104
  xpath_handler,
@@ -118,7 +121,7 @@ static void ruby_funcall(xmlXPathParserContextPtr ctx, int nargs)
118
121
  case T_STRING:
119
122
  xmlXPathReturnString(
120
123
  ctx,
121
- (xmlChar *)xmlXPathWrapCString(StringValuePtr(result))
124
+ xmlCharStrdup(StringValuePtr(result))
122
125
  );
123
126
  break;
124
127
  case T_TRUE:
@@ -135,13 +138,15 @@ static void ruby_funcall(xmlXPathParserContextPtr ctx, int nargs)
135
138
  args[0] = doc;
136
139
  args[1] = result;
137
140
  node_set = rb_class_new_instance(2, args, cNokogiriXmlNodeSet);
138
- Data_Get_Struct(node_set, xmlNodeSet, xml_node_set);
141
+ Data_Get_Struct(node_set, nokogiriNodeSetTuple, node_set_tuple);
142
+ xml_node_set = node_set_tuple->node_set;
139
143
  xmlXPathReturnNodeSet(ctx, xmlXPathNodeSetMerge(NULL, xml_node_set));
140
144
  }
141
145
  break;
142
146
  case T_DATA:
143
147
  if(rb_obj_is_kind_of(result, cNokogiriXmlNodeSet)) {
144
- Data_Get_Struct(result, xmlNodeSet, xml_node_set);
148
+ Data_Get_Struct(result, nokogiriNodeSetTuple, node_set_tuple);
149
+ xml_node_set = node_set_tuple->node_set;
145
150
  /* Copy the node set, otherwise it will get GC'd. */
146
151
  xmlXPathReturnNodeSet(ctx, xmlXPathNodeSetMerge(NULL, xml_node_set));
147
152
  break;
@@ -236,6 +241,7 @@ static VALUE evaluate(int argc, VALUE *argv, VALUE self)
236
241
  switch(xpath->type) {
237
242
  case XPATH_STRING:
238
243
  thing = NOKOGIRI_STR_NEW2(xpath->stringval);
244
+ xmlFree(xpath->stringval);
239
245
  break;
240
246
  case XPATH_NODESET:
241
247
  if(NULL == xpath->nodesetval) {
@@ -10,27 +10,49 @@ VALUE xslt;
10
10
  int vasprintf (char **strp, const char *fmt, va_list ap);
11
11
  void vasprintf_free (void *p);
12
12
 
13
- static void dealloc(xsltStylesheetPtr doc)
13
+ static void mark(nokogiriXsltStylesheetTuple *wrapper)
14
14
  {
15
+ rb_gc_mark(wrapper->func_instances);
16
+ }
17
+
18
+ static void dealloc(nokogiriXsltStylesheetTuple *wrapper)
19
+ {
20
+ xsltStylesheetPtr doc = wrapper->ss;
21
+
15
22
  NOKOGIRI_DEBUG_START(doc);
16
23
  xsltFreeStylesheet(doc); /* commented out for now. */
17
24
  NOKOGIRI_DEBUG_END(doc);
25
+
26
+ free(wrapper);
18
27
  }
19
28
 
20
- NORETURN(static void xslt_generic_error_handler(void * ctx, const char *msg, ...));
21
29
  static void xslt_generic_error_handler(void * ctx, const char *msg, ...)
22
30
  {
23
31
  char * message;
24
- VALUE exception;
25
32
 
26
33
  va_list args;
27
34
  va_start(args, msg);
28
35
  vasprintf(&message, msg, args);
29
36
  va_end(args);
30
37
 
31
- exception = rb_exc_new2(rb_eRuntimeError, message);
38
+ rb_str_cat2((VALUE)ctx, message);
39
+
32
40
  vasprintf_free(message);
33
- rb_exc_raise(exception);
41
+ }
42
+
43
+ VALUE Nokogiri_wrap_xslt_stylesheet(xsltStylesheetPtr ss)
44
+ {
45
+ VALUE self;
46
+ nokogiriXsltStylesheetTuple *wrapper;
47
+
48
+ self = Data_Make_Struct(cNokogiriXsltStylesheet, nokogiriXsltStylesheetTuple,
49
+ mark, dealloc, wrapper);
50
+
51
+ ss->_private = (void *)self;
52
+ wrapper->ss = ss;
53
+ wrapper->func_instances = rb_ary_new();
54
+
55
+ return self;
34
56
  }
35
57
 
36
58
  /*
@@ -41,18 +63,27 @@ static void xslt_generic_error_handler(void * ctx, const char *msg, ...)
41
63
  */
42
64
  static VALUE parse_stylesheet_doc(VALUE klass, VALUE xmldocobj)
43
65
  {
44
- xmlDocPtr xml ;
66
+ xmlDocPtr xml, xml_cpy;
67
+ VALUE errstr, exception;
45
68
  xsltStylesheetPtr ss ;
46
69
  Data_Get_Struct(xmldocobj, xmlDoc, xml);
47
70
  exsltRegisterAll();
48
71
 
49
- xsltSetGenericErrorFunc(NULL, xslt_generic_error_handler);
72
+ errstr = rb_str_new(0, 0);
73
+ xsltSetGenericErrorFunc((void *)errstr, xslt_generic_error_handler);
50
74
 
51
- ss = xsltParseStylesheetDoc(xmlCopyDoc(xml, 1)); /* 1 => recursive */
75
+ xml_cpy = xmlCopyDoc(xml, 1); /* 1 => recursive */
76
+ ss = xsltParseStylesheetDoc(xml_cpy);
52
77
 
53
78
  xsltSetGenericErrorFunc(NULL, NULL);
54
79
 
55
- return Data_Wrap_Struct(klass, NULL, dealloc, ss);
80
+ if (!ss) {
81
+ xmlFreeDoc(xml_cpy);
82
+ exception = rb_exc_new3(rb_eRuntimeError, errstr);
83
+ rb_exc_raise(exception);
84
+ }
85
+
86
+ return Nokogiri_wrap_xslt_stylesheet(ss);
56
87
  }
57
88
 
58
89
 
@@ -65,14 +96,14 @@ static VALUE parse_stylesheet_doc(VALUE klass, VALUE xmldocobj)
65
96
  static VALUE serialize(VALUE self, VALUE xmlobj)
66
97
  {
67
98
  xmlDocPtr xml ;
68
- xsltStylesheetPtr ss ;
99
+ nokogiriXsltStylesheetTuple *wrapper;
69
100
  xmlChar* doc_ptr ;
70
101
  int doc_len ;
71
102
  VALUE rval ;
72
103
 
73
104
  Data_Get_Struct(xmlobj, xmlDoc, xml);
74
- Data_Get_Struct(self, xsltStylesheet, ss);
75
- xsltSaveResultToString(&doc_ptr, &doc_len, xml, ss);
105
+ Data_Get_Struct(self, nokogiriXsltStylesheetTuple, wrapper);
106
+ xsltSaveResultToString(&doc_ptr, &doc_len, xml, wrapper->ss);
76
107
  rval = NOKOGIRI_STR_NEW(doc_ptr, doc_len);
77
108
  xmlFree(doc_ptr);
78
109
  return rval ;
@@ -98,7 +129,7 @@ static VALUE transform(int argc, VALUE* argv, VALUE self)
98
129
  VALUE xmldoc, paramobj ;
99
130
  xmlDocPtr xml ;
100
131
  xmlDocPtr result ;
101
- xsltStylesheetPtr ss ;
132
+ nokogiriXsltStylesheetTuple *wrapper;
102
133
  const char** params ;
103
134
  long param_len, j ;
104
135
 
@@ -116,7 +147,7 @@ static VALUE transform(int argc, VALUE* argv, VALUE self)
116
147
  Check_Type(paramobj, T_ARRAY);
117
148
 
118
149
  Data_Get_Struct(xmldoc, xmlDoc, xml);
119
- Data_Get_Struct(self, xsltStylesheet, ss);
150
+ Data_Get_Struct(self, nokogiriXsltStylesheetTuple, wrapper);
120
151
 
121
152
  param_len = RARRAY_LEN(paramobj);
122
153
  params = calloc((size_t)param_len+1, sizeof(char*));
@@ -127,7 +158,7 @@ static VALUE transform(int argc, VALUE* argv, VALUE self)
127
158
  }
128
159
  params[param_len] = 0 ;
129
160
 
130
- result = xsltApplyStylesheet(ss, xml, params);
161
+ result = xsltApplyStylesheet(wrapper->ss, xml, params);
131
162
  free(params);
132
163
 
133
164
  if (!result) rb_raise(rb_eRuntimeError, "could not perform xslt transform on document");
@@ -178,8 +209,10 @@ static void method_caller(xmlXPathParserContextPtr ctxt, int nargs)
178
209
  rb_raise(rb_eRuntimeError, "do not handle type: %d", xpath->type);
179
210
  }
180
211
  args[i] = thing;
212
+ xmlFree(xpath);
181
213
  }
182
214
  result = rb_funcall3(obj, rb_intern((const char *)function), (int)count, args);
215
+ free(args);
183
216
  switch(TYPE(result)) {
184
217
  case T_FLOAT:
185
218
  case T_BIGNUM:
@@ -211,6 +244,8 @@ static void * initFunc(xsltTransformContextPtr ctxt, const xmlChar *uri)
211
244
  VALUE obj = rb_hash_aref(modules, rb_str_new2((const char *)uri));
212
245
  VALUE args = { Qfalse };
213
246
  VALUE methods = rb_funcall(obj, rb_intern("instance_methods"), 1, args);
247
+ VALUE inst;
248
+ nokogiriXsltStylesheetTuple *wrapper;
214
249
  int i;
215
250
 
216
251
  for(i = 0; i < RARRAY_LEN(methods); i++) {
@@ -219,12 +254,23 @@ static void * initFunc(xsltTransformContextPtr ctxt, const xmlChar *uri)
219
254
  (unsigned char *)StringValuePtr(method_name), uri, method_caller);
220
255
  }
221
256
 
222
- return (void *)rb_class_new_instance(0, NULL, obj);
257
+ Data_Get_Struct(ctxt->style->_private, nokogiriXsltStylesheetTuple,
258
+ wrapper);
259
+ inst = rb_class_new_instance(0, NULL, obj);
260
+ rb_ary_push(wrapper->func_instances, inst);
261
+
262
+ return (void *)inst;
223
263
  }
224
264
 
225
265
  static void shutdownFunc(xsltTransformContextPtr ctxt,
226
266
  const xmlChar *uri, void *data)
227
267
  {
268
+ nokogiriXsltStylesheetTuple *wrapper;
269
+
270
+ Data_Get_Struct(ctxt->style->_private, nokogiriXsltStylesheetTuple,
271
+ wrapper);
272
+
273
+ rb_ary_clear(wrapper->func_instances);
228
274
  }
229
275
 
230
276
  /*
@@ -6,4 +6,9 @@
6
6
  void init_xslt_stylesheet();
7
7
 
8
8
  extern VALUE cNokogiriXsltStylesheet ;
9
+
10
+ typedef struct _nokogiriXsltStylesheetTuple {
11
+ xsltStylesheetPtr ss;
12
+ VALUE func_instances;
13
+ } nokogiriXsltStylesheetTuple;
9
14
  #endif
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # DO NOT MODIFY!!!!
3
- # This file is automatically generated by Racc 1.4.6
3
+ # This file is automatically generated by Racc 1.4.7
4
4
  # from Racc grammer file "".
5
5
  #
6
6
 
@@ -14,90 +14,92 @@ module Nokogiri
14
14
  ##### State transition tables begin ###
15
15
 
16
16
  racc_action_table = [
17
- 4, 56, 27, 22, 12, 24, 57, 4, 65, 1,
18
- 41, 12, 75, 57, 4, 23, 1, 82, 12, 19,
19
- 93, 92, 5, 1, 9, 10, 19, 13, 16, 5,
20
- 12, 9, 10, 19, 13, 16, 5, 5, 9, 10,
21
- 4, 13, 16, 16, 12, 41, 64, 4, 5, 1,
22
- 60, 10, 12, 59, 16, 59, 28, 1, 29, 19,
23
- 12, 12, 5, 62, 9, 10, 19, 13, 16, 12,
24
- 5, 9, 83, 10, 12, 13, 16, 84, 5, 5,
25
- 63, 10, 10, 12, 16, 16, 58, 5, 61, 62,
26
- 10, 4, 5, 16, 87, 10, 27, 53, 16, 54,
27
- 49, 5, 88, 41, 10, 68, 70, 16, 27, 53,
28
- 19, 54, 44, 91, 21, 9, 69, 71, 72, 94,
29
- 74, 68, 70, -23, 66, 33, 35, 37, 27, 53,
30
- 96, 54, 69, 71, 72, 32, 74, 34, 36, 97,
31
- 66, 27, 53, nil, 54 ]
17
+ 13, 22, 47, 48, 21, 46, 84, 23, 13, 11,
18
+ 12, 83, 21, 23, 66, 43, 16, 11, 86, 14,
19
+ 21, 79, 12, 77, 15, 7, 9, 14, 16, 82,
20
+ 12, 13, 15, 7, 9, 21, 16, 78, 12, 13,
21
+ 11, 7, 85, 21, 16, 80, 47, 51, 11, 50,
22
+ 14, 83, 21, 12, 21, 15, 7, 9, 14, 16,
23
+ 27, 12, 21, 15, 7, 9, 21, 16, 87, 27,
24
+ 12, 11, 12, 7, 21, 7, 16, 59, 16, 21,
25
+ 12, 89, 13, 7, 12, 13, 16, 7, 9, -24,
26
+ 16, 11, 12, 42, 54, 7, 92, 12, 16, 39,
27
+ 7, 14, 94, 16, 14, 38, 15, 74, 75, 15,
28
+ 91, 90, 74, 75, 47, 51, 27, 50, 70, 71,
29
+ 72, 97, 73, 70, 71, 72, 69, 73, 31, 32,
30
+ 34, 69, 47, 51, 98, 50, 47, 51, 33, 50,
31
+ 36, 35, 81, 80 ]
32
32
 
33
33
  racc_action_check = [
34
- 0, 20, 4, 4, 0, 4, 43, 9, 27, 0,
35
- 39, 9, 29, 20, 31, 4, 9, 43, 31, 0,
36
- 73, 73, 0, 31, 0, 0, 9, 0, 0, 9,
37
- 7, 9, 9, 31, 9, 9, 31, 14, 31, 31,
38
- 57, 31, 31, 14, 57, 7, 26, 5, 7, 57,
39
- 22, 7, 41, 53, 7, 22, 5, 41, 5, 57,
40
- 8, 79, 57, 54, 57, 57, 5, 57, 57, 18,
41
- 41, 5, 55, 41, 17, 41, 41, 56, 8, 79,
42
- 25, 8, 79, 15, 8, 79, 21, 18, 24, 24,
43
- 18, 16, 17, 18, 60, 17, 59, 59, 17, 59,
44
- 16, 15, 61, 11, 15, 30, 30, 15, 19, 19,
45
- 16, 19, 10, 67, 2, 16, 30, 30, 30, 76,
46
- 30, 28, 28, 1, 30, 6, 6, 6, 62, 62,
47
- 81, 62, 28, 28, 28, 6, 28, 6, 6, 88,
48
- 28, 65, 65, nil, 65 ]
34
+ 0, 1, 13, 13, 0, 13, 48, 52, 37, 0,
35
+ 4, 48, 37, 1, 39, 13, 4, 37, 52, 0,
36
+ 63, 45, 0, 42, 0, 0, 0, 37, 0, 47,
37
+ 37, 23, 37, 37, 37, 23, 37, 44, 63, 15,
38
+ 23, 63, 49, 15, 63, 50, 14, 14, 15, 14,
39
+ 23, 51, 19, 23, 3, 23, 23, 23, 15, 23,
40
+ 25, 15, 18, 15, 15, 15, 27, 15, 62, 3,
41
+ 19, 27, 3, 19, 17, 3, 19, 22, 3, 20,
42
+ 18, 67, 12, 18, 27, 16, 18, 27, 27, 11,
43
+ 27, 12, 17, 12, 16, 17, 76, 20, 17, 10,
44
+ 20, 12, 81, 20, 16, 7, 12, 40, 40, 16,
45
+ 68, 68, 41, 41, 83, 83, 5, 83, 40, 40,
46
+ 40, 84, 40, 41, 41, 41, 40, 41, 6, 6,
47
+ 6, 41, 82, 82, 94, 82, 80, 80, 6, 80,
48
+ 6, 6, 46, 46 ]
49
49
 
50
50
  racc_action_pointer = [
51
- -2, 95, 86, nil, -8, 45, 118, 24, 54, 5,
52
- 101, 82, nil, nil, 13, 77, 89, 68, 63, 98,
53
- 1, 75, 43, nil, 77, 57, 23, -4, 118, -13,
54
- 102, 12, nil, nil, nil, nil, nil, nil, nil, -11,
55
- nil, 46, nil, -6, nil, nil, nil, nil, nil, nil,
56
- nil, nil, nil, 41, 51, 49, 77, 38, nil, 86,
57
- 81, 95, 118, nil, nil, 131, nil, 88, nil, nil,
58
- nil, nil, nil, 10, nil, nil, 94, nil, nil, 55,
59
- nil, 107, nil, nil, nil, nil, nil, nil, 126, nil,
60
- nil, nil, nil, nil, nil, nil, nil, nil ]
51
+ -2, 1, nil, 48, -14, 95, 121, 94, nil, nil,
52
+ 70, 60, 80, -8, 36, 37, 83, 68, 56, 46,
53
+ 73, nil, 77, 29, nil, 39, nil, 60, nil, nil,
54
+ nil, nil, nil, nil, nil, nil, nil, 6, nil, 3,
55
+ 104, 109, -2, nil, 14, -2, 131, 17, -1, 19,
56
+ 33, 39, -5, nil, nil, nil, nil, nil, nil, nil,
57
+ nil, nil, 45, 14, nil, nil, nil, 56, 100, nil,
58
+ nil, nil, nil, nil, nil, nil, 71, nil, nil, nil,
59
+ 126, 95, 122, 104, 108, nil, nil, nil, nil, nil,
60
+ nil, nil, nil, nil, 121, nil, nil, nil, nil ]
61
61
 
62
62
  racc_action_default = [
63
- -24, -21, -69, -2, -69, -69, -18, -45, -50, -24,
64
- -69, -16, -54, -22, -12, -53, -69, -52, -51, -69,
65
- -69, -69, -38, -28, -36, -69, -69, -37, -57, -69,
66
- -57, -24, -5, -3, -8, -4, -7, -6, -9, -44,
67
- -11, -24, -46, -69, -19, -15, -13, -14, -49, -43,
68
- -42, -48, -47, -38, -36, -69, -69, -24, -20, -69,
69
- -69, -41, -69, -29, -30, -69, -58, -69, -63, -59,
70
- -64, -60, -61, -69, -62, -27, -69, -17, -10, -66,
71
- -68, -69, -32, -31, 98, -1, -35, -40, -69, -33,
72
- -34, -25, -55, -56, -26, -67, -65, -39 ]
63
+ -25, -70, -2, -46, -12, -16, -18, -70, -20, -21,
64
+ -70, -23, -25, -70, -70, -25, -70, -51, -52, -53,
65
+ -54, -55, -70, -25, -9, -45, -11, -25, -13, -14,
66
+ -15, -3, -4, -5, -6, -7, -8, -25, -19, -70,
67
+ -58, -58, -70, -29, -70, -70, -37, -38, -39, -70,
68
+ -37, -39, -70, -43, -44, -47, -48, -49, -50, 99,
69
+ -1, -10, -70, -67, -69, -17, -22, -70, -70, -59,
70
+ -60, -61, -62, -63, -64, -65, -70, -28, -30, -31,
71
+ -70, -42, -70, -70, -70, -32, -33, -66, -68, -26,
72
+ -56, -57, -27, -34, -70, -35, -36, -41, -40 ]
73
73
 
74
74
  racc_goto_table = [
75
- 39, 42, 25, 40, 77, 30, 20, 45, 48, 79,
76
- 51, 52, 67, 46, 76, 43, 50, 55, 47, 38,
77
- 31, 26, 81, nil, nil, nil, nil, nil, nil, nil,
78
- 85, nil, nil, nil, 80, 78, nil, nil, nil, nil,
75
+ 44, 49, 25, 26, 40, 30, 1, 41, 60, 67,
76
+ 76, 53, 28, 29, 63, 24, 55, 56, 57, 58,
77
+ 37, 52, 65, 45, 62, 61, 64, nil, nil, nil,
79
78
  nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
80
- nil, nil, nil, nil, nil, nil, nil, 86, nil, nil,
81
- 89, nil, nil, 90, nil, nil, nil, nil, nil, nil,
82
- nil, nil, 95 ]
79
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
80
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
81
+ nil, nil, 88, nil, nil, nil, nil, 93, nil, 95,
82
+ 96 ]
83
83
 
84
84
  racc_goto_check = [
85
- 7, 7, 15, 8, 2, 9, 1, 8, 7, 5,
86
- 7, 7, 14, 10, 14, 1, 9, 15, 11, 6,
87
- 3, 16, 19, nil, nil, nil, nil, nil, nil, nil,
88
- 2, nil, nil, nil, 7, 8, nil, nil, nil, nil,
85
+ 16, 16, 7, 8, 13, 8, 1, 9, 2, 15,
86
+ 15, 9, 10, 11, 5, 6, 7, 7, 7, 7,
87
+ 3, 1, 2, 17, 20, 8, 7, nil, nil, nil,
88
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
89
89
  nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
90
- nil, nil, nil, nil, nil, nil, nil, 15, nil, nil,
91
- 15, nil, nil, 15, nil, nil, nil, nil, nil, nil,
92
- nil, nil, 7 ]
90
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
91
+ nil, nil, 7, nil, nil, nil, nil, 16, nil, 16,
92
+ 16 ]
93
93
 
94
94
  racc_goto_pointer = [
95
- nil, 6, -27, 14, nil, -32, 12, -7, -4, 0,
96
- -1, 4, nil, nil, -16, -2, 17, nil, nil, -19 ]
95
+ nil, 6, -15, 14, nil, -13, 12, -1, 0, -5,
96
+ 8, 9, nil, -8, nil, -31, -13, 10, nil, nil,
97
+ -3 ]
97
98
 
98
99
  racc_goto_default = [
99
- nil, nil, 3, nil, 6, 7, nil, 11, nil, 14,
100
- 15, 17, 18, 2, nil, nil, nil, 8, 73, nil ]
100
+ nil, nil, 2, nil, 6, 3, nil, 5, nil, 4,
101
+ 20, 19, 18, 8, 10, nil, nil, nil, 17, 68,
102
+ nil ]
101
103
 
102
104
  racc_reduce_table = [
103
105
  0, 0, :racc_error,
@@ -120,59 +122,60 @@ racc_reduce_table = [
120
122
  3, 33, :_reduce_17,
121
123
  1, 33, :_reduce_none,
122
124
  2, 43, :_reduce_19,
123
- 3, 36, :_reduce_20,
125
+ 1, 36, :_reduce_none,
124
126
  1, 36, :_reduce_21,
125
- 1, 36, :_reduce_22,
127
+ 3, 44, :_reduce_22,
126
128
  1, 44, :_reduce_23,
127
- 0, 44, :_reduce_none,
128
- 4, 42, :_reduce_25,
129
+ 1, 45, :_reduce_24,
130
+ 0, 45, :_reduce_none,
129
131
  4, 42, :_reduce_26,
130
- 3, 42, :_reduce_27,
131
- 2, 40, :_reduce_28,
132
- 3, 40, :_reduce_29,
132
+ 4, 42, :_reduce_27,
133
+ 3, 42, :_reduce_28,
134
+ 2, 40, :_reduce_29,
133
135
  3, 40, :_reduce_30,
134
136
  3, 40, :_reduce_31,
135
137
  3, 40, :_reduce_32,
136
- 3, 46, :_reduce_33,
137
- 3, 46, :_reduce_34,
138
- 3, 46, :_reduce_35,
139
- 1, 46, :_reduce_none,
140
- 1, 46, :_reduce_none,
141
- 1, 46, :_reduce_38,
142
- 4, 47, :_reduce_39,
143
- 3, 47, :_reduce_40,
144
- 2, 47, :_reduce_41,
145
- 2, 41, :_reduce_42,
138
+ 3, 40, :_reduce_33,
139
+ 3, 47, :_reduce_34,
140
+ 3, 47, :_reduce_35,
141
+ 3, 47, :_reduce_36,
142
+ 1, 47, :_reduce_none,
143
+ 1, 47, :_reduce_none,
144
+ 1, 47, :_reduce_39,
145
+ 4, 48, :_reduce_40,
146
+ 3, 48, :_reduce_41,
147
+ 2, 48, :_reduce_42,
146
148
  2, 41, :_reduce_43,
149
+ 2, 41, :_reduce_44,
147
150
  1, 37, :_reduce_none,
148
151
  0, 37, :_reduce_none,
149
- 2, 38, :_reduce_46,
150
152
  2, 38, :_reduce_47,
151
153
  2, 38, :_reduce_48,
152
154
  2, 38, :_reduce_49,
155
+ 2, 38, :_reduce_50,
153
156
  1, 38, :_reduce_none,
154
157
  1, 38, :_reduce_none,
155
158
  1, 38, :_reduce_none,
156
159
  1, 38, :_reduce_none,
157
- 1, 48, :_reduce_54,
158
- 2, 45, :_reduce_55,
159
- 2, 45, :_reduce_56,
160
- 0, 45, :_reduce_none,
161
- 1, 49, :_reduce_58,
162
- 1, 49, :_reduce_59,
163
- 1, 49, :_reduce_60,
164
- 1, 49, :_reduce_61,
165
- 1, 49, :_reduce_62,
166
- 1, 49, :_reduce_63,
167
- 1, 49, :_reduce_64,
168
- 3, 39, :_reduce_65,
169
- 1, 50, :_reduce_none,
170
- 2, 50, :_reduce_none,
171
- 1, 50, :_reduce_none ]
172
-
173
- racc_reduce_n = 69
174
-
175
- racc_shift_n = 98
160
+ 1, 49, :_reduce_55,
161
+ 2, 46, :_reduce_56,
162
+ 2, 46, :_reduce_57,
163
+ 0, 46, :_reduce_none,
164
+ 1, 50, :_reduce_59,
165
+ 1, 50, :_reduce_60,
166
+ 1, 50, :_reduce_61,
167
+ 1, 50, :_reduce_62,
168
+ 1, 50, :_reduce_63,
169
+ 1, 50, :_reduce_64,
170
+ 1, 50, :_reduce_65,
171
+ 3, 39, :_reduce_66,
172
+ 1, 51, :_reduce_none,
173
+ 2, 51, :_reduce_none,
174
+ 1, 51, :_reduce_none ]
175
+
176
+ racc_reduce_n = 70
177
+
178
+ racc_shift_n = 99
176
179
 
177
180
  racc_token_table = {
178
181
  false => 0,
@@ -203,8 +206,8 @@ racc_token_table = {
203
206
  :RSQUARE => 25,
204
207
  :HAS => 26,
205
208
  "." => 27,
206
- "|" => 28,
207
- "*" => 29,
209
+ "*" => 28,
210
+ "|" => 29,
208
211
  ":" => 30 }
209
212
 
210
213
  racc_nt_base = 31
@@ -256,8 +259,8 @@ Racc_token_to_s_table = [
256
259
  "RSQUARE",
257
260
  "HAS",
258
261
  "\".\"",
259
- "\"|\"",
260
262
  "\"*\"",
263
+ "\"|\"",
261
264
  "\":\"",
262
265
  "$start",
263
266
  "selector",
@@ -272,6 +275,7 @@ Racc_token_to_s_table = [
272
275
  "pseudo",
273
276
  "attrib",
274
277
  "class",
278
+ "namespaced_ident",
275
279
  "namespace",
276
280
  "attrib_val_0or1",
277
281
  "expr",
@@ -400,7 +404,14 @@ def _reduce_19(val, _values, result)
400
404
  result
401
405
  end
402
406
 
403
- def _reduce_20(val, _values, result)
407
+ # reduce 20 omitted
408
+
409
+ def _reduce_21(val, _values, result)
410
+ result = Node.new(:ELEMENT_NAME, val)
411
+ result
412
+ end
413
+
414
+ def _reduce_22(val, _values, result)
404
415
  result = Node.new(:ELEMENT_NAME,
405
416
  [[val.first, val.last].compact.join(':')]
406
417
  )
@@ -408,34 +419,29 @@ def _reduce_20(val, _values, result)
408
419
  result
409
420
  end
410
421
 
411
- def _reduce_21(val, _values, result)
422
+ def _reduce_23(val, _values, result)
412
423
  name = @namespaces.key?('xmlns') ? "xmlns:#{val.first}" : val.first
413
424
  result = Node.new(:ELEMENT_NAME, [name])
414
425
 
415
426
  result
416
427
  end
417
428
 
418
- def _reduce_22(val, _values, result)
419
- result = Node.new(:ELEMENT_NAME, val)
420
- result
421
- end
422
-
423
- def _reduce_23(val, _values, result)
429
+ def _reduce_24(val, _values, result)
424
430
  result = val[0]
425
431
  result
426
432
  end
427
433
 
428
- # reduce 24 omitted
434
+ # reduce 25 omitted
429
435
 
430
- def _reduce_25(val, _values, result)
436
+ def _reduce_26(val, _values, result)
431
437
  result = Node.new(:ATTRIBUTE_CONDITION,
432
- [Node.new(:ELEMENT_NAME, [val[1]])] + (val[2] || [])
438
+ [val[1]] + (val[2] || [])
433
439
  )
434
440
 
435
441
  result
436
442
  end
437
443
 
438
- def _reduce_26(val, _values, result)
444
+ def _reduce_27(val, _values, result)
439
445
  result = Node.new(:ATTRIBUTE_CONDITION,
440
446
  [val[1]] + (val[2] || [])
441
447
  )
@@ -443,7 +449,7 @@ def _reduce_26(val, _values, result)
443
449
  result
444
450
  end
445
451
 
446
- def _reduce_27(val, _values, result)
452
+ def _reduce_28(val, _values, result)
447
453
  # Non standard, but hpricot supports it.
448
454
  result = Node.new(:PSEUDO_CLASS,
449
455
  [Node.new(:FUNCTION, ['nth-child(', val[1]])]
@@ -452,14 +458,8 @@ def _reduce_27(val, _values, result)
452
458
  result
453
459
  end
454
460
 
455
- def _reduce_28(val, _values, result)
456
- result = Node.new(:FUNCTION, [val.first.strip])
457
-
458
- result
459
- end
460
-
461
461
  def _reduce_29(val, _values, result)
462
- result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten)
462
+ result = Node.new(:FUNCTION, [val.first.strip])
463
463
 
464
464
  result
465
465
  end
@@ -483,7 +483,8 @@ def _reduce_32(val, _values, result)
483
483
  end
484
484
 
485
485
  def _reduce_33(val, _values, result)
486
- result = [val.first, val.last]
486
+ result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten)
487
+
487
488
  result
488
489
  end
489
490
 
@@ -497,11 +498,16 @@ def _reduce_35(val, _values, result)
497
498
  result
498
499
  end
499
500
 
500
- # reduce 36 omitted
501
+ def _reduce_36(val, _values, result)
502
+ result = [val.first, val.last]
503
+ result
504
+ end
501
505
 
502
506
  # reduce 37 omitted
503
507
 
504
- def _reduce_38(val, _values, result)
508
+ # reduce 38 omitted
509
+
510
+ def _reduce_39(val, _values, result)
505
511
  if val[0] == 'even'
506
512
  val = ["2","n","+","0"]
507
513
  result = Node.new(:AN_PLUS_B, val)
@@ -519,7 +525,7 @@ def _reduce_38(val, _values, result)
519
525
  result
520
526
  end
521
527
 
522
- def _reduce_39(val, _values, result)
528
+ def _reduce_40(val, _values, result)
523
529
  if val[1] == 'n'
524
530
  result = Node.new(:AN_PLUS_B, val)
525
531
  else
@@ -529,7 +535,7 @@ def _reduce_39(val, _values, result)
529
535
  result
530
536
  end
531
537
 
532
- def _reduce_40(val, _values, result)
538
+ def _reduce_41(val, _values, result)
533
539
  # n+3, -n+3
534
540
  if val[0] == 'n'
535
541
  val.unshift("1")
@@ -545,7 +551,7 @@ def _reduce_40(val, _values, result)
545
551
  result
546
552
  end
547
553
 
548
- def _reduce_41(val, _values, result)
554
+ def _reduce_42(val, _values, result)
549
555
  if val[1] == 'n'
550
556
  val << "+"
551
557
  val << "0"
@@ -557,26 +563,20 @@ def _reduce_41(val, _values, result)
557
563
  result
558
564
  end
559
565
 
560
- def _reduce_42(val, _values, result)
566
+ def _reduce_43(val, _values, result)
561
567
  result = Node.new(:PSEUDO_CLASS, [val[1]])
562
568
 
563
569
  result
564
570
  end
565
571
 
566
- def _reduce_43(val, _values, result)
572
+ def _reduce_44(val, _values, result)
567
573
  result = Node.new(:PSEUDO_CLASS, [val[1]])
568
574
  result
569
575
  end
570
576
 
571
- # reduce 44 omitted
572
-
573
577
  # reduce 45 omitted
574
578
 
575
- def _reduce_46(val, _values, result)
576
- result = Node.new(:COMBINATOR, val)
577
-
578
- result
579
- end
579
+ # reduce 46 omitted
580
580
 
581
581
  def _reduce_47(val, _values, result)
582
582
  result = Node.new(:COMBINATOR, val)
@@ -596,7 +596,11 @@ def _reduce_49(val, _values, result)
596
596
  result
597
597
  end
598
598
 
599
- # reduce 50 omitted
599
+ def _reduce_50(val, _values, result)
600
+ result = Node.new(:COMBINATOR, val)
601
+
602
+ result
603
+ end
600
604
 
601
605
  # reduce 51 omitted
602
606
 
@@ -604,70 +608,72 @@ end
604
608
 
605
609
  # reduce 53 omitted
606
610
 
607
- def _reduce_54(val, _values, result)
611
+ # reduce 54 omitted
612
+
613
+ def _reduce_55(val, _values, result)
608
614
  result = Node.new(:ID, val)
609
615
  result
610
616
  end
611
617
 
612
- def _reduce_55(val, _values, result)
618
+ def _reduce_56(val, _values, result)
613
619
  result = [val.first, val[1]]
614
620
  result
615
621
  end
616
622
 
617
- def _reduce_56(val, _values, result)
623
+ def _reduce_57(val, _values, result)
618
624
  result = [val.first, val[1]]
619
625
  result
620
626
  end
621
627
 
622
- # reduce 57 omitted
628
+ # reduce 58 omitted
623
629
 
624
- def _reduce_58(val, _values, result)
630
+ def _reduce_59(val, _values, result)
625
631
  result = :equal
626
632
  result
627
633
  end
628
634
 
629
- def _reduce_59(val, _values, result)
635
+ def _reduce_60(val, _values, result)
630
636
  result = :prefix_match
631
637
  result
632
638
  end
633
639
 
634
- def _reduce_60(val, _values, result)
640
+ def _reduce_61(val, _values, result)
635
641
  result = :suffix_match
636
642
  result
637
643
  end
638
644
 
639
- def _reduce_61(val, _values, result)
645
+ def _reduce_62(val, _values, result)
640
646
  result = :substring_match
641
647
  result
642
648
  end
643
649
 
644
- def _reduce_62(val, _values, result)
650
+ def _reduce_63(val, _values, result)
645
651
  result = :not_equal
646
652
  result
647
653
  end
648
654
 
649
- def _reduce_63(val, _values, result)
655
+ def _reduce_64(val, _values, result)
650
656
  result = :includes
651
657
  result
652
658
  end
653
659
 
654
- def _reduce_64(val, _values, result)
660
+ def _reduce_65(val, _values, result)
655
661
  result = :dash_match
656
662
  result
657
663
  end
658
664
 
659
- def _reduce_65(val, _values, result)
665
+ def _reduce_66(val, _values, result)
660
666
  result = Node.new(:NOT, [val[1]])
661
667
 
662
668
  result
663
669
  end
664
670
 
665
- # reduce 66 omitted
666
-
667
671
  # reduce 67 omitted
668
672
 
669
673
  # reduce 68 omitted
670
674
 
675
+ # reduce 69 omitted
676
+
671
677
  def _reduce_none(val, _values, result)
672
678
  val[0]
673
679
  end