nokogiri 1.8.2 → 1.8.3
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.
- checksums.yaml +4 -4
- data/.travis.yml +14 -14
- data/CHANGELOG.md +43 -1
- data/LICENSE.md +2 -1
- data/Manifest.txt +3 -0
- data/README.md +20 -21
- data/Rakefile +2 -8
- data/SECURITY.md +19 -0
- data/build_all +2 -2
- data/dependencies.yml +11 -11
- data/ext/nokogiri/extconf.rb +1 -1
- data/ext/nokogiri/html_element_description.c +14 -14
- data/ext/nokogiri/xml_cdata.c +6 -4
- data/ext/nokogiri/xml_document.c +2 -3
- data/ext/nokogiri/xml_dtd.c +2 -2
- data/ext/nokogiri/xml_io.c +1 -0
- data/ext/nokogiri/xml_namespace.c +3 -9
- data/ext/nokogiri/xml_namespace.h +2 -0
- data/ext/nokogiri/xml_node.c +23 -15
- data/ext/nokogiri/xml_node_set.c +5 -4
- data/ext/nokogiri/xml_node_set.h +0 -1
- data/ext/nokogiri/xslt_stylesheet.c +2 -2
- data/lib/nokogiri/css/parser.rb +108 -90
- data/lib/nokogiri/css/parser.y +13 -2
- data/lib/nokogiri/css/tokenizer.rb +1 -1
- data/lib/nokogiri/css/tokenizer.rex +4 -4
- data/lib/nokogiri/css/xpath_visitor.rb +10 -3
- data/lib/nokogiri/html/document_fragment.rb +11 -1
- data/lib/nokogiri/version.rb +1 -1
- data/lib/nokogiri/xml/node.rb +58 -0
- data/lib/nokogiri/xml/node_set.rb +32 -18
- data/patches/libxml2/0001-Revert-Do-not-URI-escape-in-server-side-includes.patch +78 -0
- data/ports/archives/libxml2-2.9.8.tar.gz +0 -0
- data/test/css/test_nthiness.rb +21 -21
- data/test/css/test_parser.rb +17 -0
- data/test/html/test_attributes.rb +85 -0
- data/test/html/test_document_fragment.rb +7 -1
- data/test/test_css_cache.rb +5 -3
- data/test/xml/sax/test_parser.rb +9 -1
- data/test/xml/sax/test_push_parser.rb +60 -0
- data/test/xml/test_cdata.rb +1 -1
- data/test/xml/test_document.rb +5 -5
- data/test/xml/test_dtd.rb +4 -4
- data/test/xml/test_node.rb +89 -6
- data/test/xml/test_node_attributes.rb +3 -3
- data/test/xml/test_node_reparenting.rb +18 -0
- data/test/xml/test_node_set.rb +31 -4
- data/test/xml/test_reader.rb +13 -1
- data/test/xml/test_syntax_error.rb +3 -3
- data/test/xml/test_xpath.rb +8 -0
- metadata +25 -4
- data/ports/archives/libxml2-2.9.7.tar.gz +0 -0
data/ext/nokogiri/xml_cdata.c
CHANGED
@@ -17,15 +17,17 @@ static VALUE new(int argc, VALUE *argv, VALUE klass)
|
|
17
17
|
VALUE content;
|
18
18
|
VALUE rest;
|
19
19
|
VALUE rb_node;
|
20
|
-
|
21
|
-
int content_str_len;
|
20
|
+
xmlChar *content_str = NULL;
|
21
|
+
int content_str_len = 0;
|
22
22
|
|
23
23
|
rb_scan_args(argc, argv, "2*", &doc, &content, &rest);
|
24
24
|
|
25
25
|
Data_Get_Struct(doc, xmlDoc, xml_doc);
|
26
26
|
|
27
|
-
|
28
|
-
|
27
|
+
if (!NIL_P(content)) {
|
28
|
+
content_str = (xmlChar *)StringValuePtr(content);
|
29
|
+
content_str_len = RSTRING_LEN(content);
|
30
|
+
}
|
29
31
|
|
30
32
|
node = xmlNewCDataBlock(xml_doc->doc, content_str, content_str_len);
|
31
33
|
|
data/ext/nokogiri/xml_document.c
CHANGED
@@ -179,7 +179,7 @@ static VALUE set_encoding(VALUE self, VALUE encoding)
|
|
179
179
|
Data_Get_Struct(self, xmlDoc, doc);
|
180
180
|
|
181
181
|
if (doc->encoding)
|
182
|
-
free((char *) doc->encoding); /*
|
182
|
+
free((char *)(uintptr_t) doc->encoding); /* avoid gcc cast warning */
|
183
183
|
|
184
184
|
doc->encoding = xmlStrdup((xmlChar *)StringValueCStr(encoding));
|
185
185
|
|
@@ -531,8 +531,7 @@ static VALUE canonicalize(int argc, VALUE* argv, VALUE self)
|
|
531
531
|
ns = calloc((size_t)ns_len+1, sizeof(xmlChar *));
|
532
532
|
for (i = 0 ; i < ns_len ; i++) {
|
533
533
|
VALUE entry = rb_ary_entry(incl_ns, i);
|
534
|
-
|
535
|
-
ns[i] = (xmlChar*) ptr;
|
534
|
+
ns[i] = (xmlChar*)StringValueCStr(entry);
|
536
535
|
}
|
537
536
|
}
|
538
537
|
|
data/ext/nokogiri/xml_dtd.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#include <xml_dtd.h>
|
2
2
|
|
3
|
-
static void notation_copier(void *payload, void *data, xmlChar *name)
|
3
|
+
static void notation_copier(void *payload, void *data, const xmlChar *name)
|
4
4
|
{
|
5
5
|
VALUE hash = (VALUE)data;
|
6
6
|
VALUE klass = rb_const_get(mNokogiriXml, rb_intern("Notation"));
|
@@ -17,7 +17,7 @@ static void notation_copier(void *payload, void *data, xmlChar *name)
|
|
17
17
|
rb_hash_aset(hash, NOKOGIRI_STR_NEW2(name),notation);
|
18
18
|
}
|
19
19
|
|
20
|
-
static void element_copier(void *_payload, void *data, xmlChar *name)
|
20
|
+
static void element_copier(void *_payload, void *data, const xmlChar *name)
|
21
21
|
{
|
22
22
|
VALUE hash = (VALUE)data;
|
23
23
|
xmlNodePtr payload = (xmlNodePtr)_payload;
|
data/ext/nokogiri/xml_io.c
CHANGED
@@ -21,6 +21,7 @@ int io_read_callback(void * ctx, char * buffer, int len) {
|
|
21
21
|
|
22
22
|
if (NIL_P(string)) return 0;
|
23
23
|
if (string == Qundef) return -1;
|
24
|
+
if (TYPE(string) != T_STRING) return -1;
|
24
25
|
|
25
26
|
str_len = (size_t)RSTRING_LEN(string);
|
26
27
|
safe_len = str_len > (size_t)len ? (size_t)len : str_len;
|
@@ -14,22 +14,16 @@ static void dealloc_namespace(xmlNsPtr ns)
|
|
14
14
|
*/
|
15
15
|
NOKOGIRI_DEBUG_START(ns) ;
|
16
16
|
if (ns->href) {
|
17
|
-
xmlFree((xmlChar *)ns->href);
|
17
|
+
xmlFree((xmlChar *)(uintptr_t)ns->href);
|
18
18
|
}
|
19
19
|
if (ns->prefix) {
|
20
|
-
xmlFree((xmlChar *)ns->prefix);
|
20
|
+
xmlFree((xmlChar *)(uintptr_t)ns->prefix);
|
21
21
|
}
|
22
22
|
xmlFree(ns);
|
23
23
|
NOKOGIRI_DEBUG_END(ns) ;
|
24
24
|
}
|
25
25
|
|
26
26
|
|
27
|
-
int Nokogiri_namespace_eh(xmlNodePtr node)
|
28
|
-
{
|
29
|
-
return (node->type == XML_NAMESPACE_DECL);
|
30
|
-
}
|
31
|
-
|
32
|
-
|
33
27
|
/*
|
34
28
|
* call-seq:
|
35
29
|
* prefix
|
@@ -64,7 +58,7 @@ static VALUE href(VALUE self)
|
|
64
58
|
|
65
59
|
static int part_of_an_xpath_node_set_eh(xmlNsPtr node)
|
66
60
|
{
|
67
|
-
return (node->next && !
|
61
|
+
return (node->next && ! NOKOGIRI_NAMESPACE_EH(node->next));
|
68
62
|
}
|
69
63
|
|
70
64
|
VALUE Nokogiri_wrap_xml_namespace(xmlDocPtr doc, xmlNsPtr node)
|
@@ -10,4 +10,6 @@ extern VALUE cNokogiriXmlNamespace ;
|
|
10
10
|
VALUE Nokogiri_wrap_xml_namespace(xmlDocPtr doc, xmlNsPtr node) ;
|
11
11
|
VALUE Nokogiri_wrap_xml_namespace2(VALUE document, xmlNsPtr node) ;
|
12
12
|
|
13
|
+
#define NOKOGIRI_NAMESPACE_EH(node) ((node)->type == XML_NAMESPACE_DECL)
|
14
|
+
|
13
15
|
#endif
|
data/ext/nokogiri/xml_node.c
CHANGED
@@ -168,18 +168,20 @@ static VALUE reparent_node_with(VALUE pivot_obj, VALUE reparentee_obj, pivot_rep
|
|
168
168
|
case XML_DOCUMENT_NODE:
|
169
169
|
case XML_HTML_DOCUMENT_NODE:
|
170
170
|
switch (reparentee->type) {
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
171
|
+
case XML_ELEMENT_NODE:
|
172
|
+
case XML_PI_NODE:
|
173
|
+
case XML_COMMENT_NODE:
|
174
|
+
case XML_DOCUMENT_TYPE_NODE:
|
175
|
+
/*
|
176
|
+
* The DOM specification says no to adding text-like nodes
|
177
|
+
* directly to a document, but we allow it for compatibility.
|
178
|
+
*/
|
179
|
+
case XML_TEXT_NODE:
|
180
|
+
case XML_CDATA_SECTION_NODE:
|
181
|
+
case XML_ENTITY_REF_NODE:
|
182
|
+
goto ok;
|
183
|
+
default:
|
184
|
+
break;
|
183
185
|
}
|
184
186
|
break;
|
185
187
|
case XML_DOCUMENT_FRAG_NODE:
|
@@ -193,6 +195,8 @@ static VALUE reparent_node_with(VALUE pivot_obj, VALUE reparentee_obj, pivot_rep
|
|
193
195
|
case XML_CDATA_SECTION_NODE:
|
194
196
|
case XML_ENTITY_REF_NODE:
|
195
197
|
goto ok;
|
198
|
+
default:
|
199
|
+
break;
|
196
200
|
}
|
197
201
|
break;
|
198
202
|
case XML_ATTRIBUTE_NODE:
|
@@ -200,6 +204,8 @@ static VALUE reparent_node_with(VALUE pivot_obj, VALUE reparentee_obj, pivot_rep
|
|
200
204
|
case XML_TEXT_NODE:
|
201
205
|
case XML_ENTITY_REF_NODE:
|
202
206
|
goto ok;
|
207
|
+
default:
|
208
|
+
break;
|
203
209
|
}
|
204
210
|
break;
|
205
211
|
case XML_TEXT_NODE:
|
@@ -210,6 +216,8 @@ static VALUE reparent_node_with(VALUE pivot_obj, VALUE reparentee_obj, pivot_rep
|
|
210
216
|
* operation, we should inhibit it.
|
211
217
|
*/
|
212
218
|
break;
|
219
|
+
default:
|
220
|
+
break;
|
213
221
|
}
|
214
222
|
|
215
223
|
rb_raise(rb_eArgError, "cannot reparent %s there", rb_obj_classname(reparentee_obj));
|
@@ -833,10 +841,10 @@ static VALUE set(VALUE self, VALUE property, VALUE value)
|
|
833
841
|
static VALUE get(VALUE self, VALUE rattribute)
|
834
842
|
{
|
835
843
|
xmlNodePtr node;
|
836
|
-
|
844
|
+
xmlChar *value = 0;
|
837
845
|
VALUE rvalue;
|
838
846
|
xmlChar *colon;
|
839
|
-
|
847
|
+
xmlChar *attribute, *attr_name, *prefix;
|
840
848
|
xmlNsPtr ns;
|
841
849
|
|
842
850
|
if (NIL_P(rattribute)) return Qnil;
|
@@ -844,7 +852,7 @@ static VALUE get(VALUE self, VALUE rattribute)
|
|
844
852
|
Data_Get_Struct(self, xmlNode, node);
|
845
853
|
attribute = xmlCharStrdup(StringValueCStr(rattribute));
|
846
854
|
|
847
|
-
colon = (xmlChar *)xmlStrchr(attribute, (const xmlChar)':');
|
855
|
+
colon = (xmlChar *)(uintptr_t)xmlStrchr(attribute, (const xmlChar)':');
|
848
856
|
if (colon) {
|
849
857
|
/* split the attribute string into separate prefix and name by
|
850
858
|
* null-terminating the prefix at the colon */
|
data/ext/nokogiri/xml_node_set.c
CHANGED
@@ -50,7 +50,8 @@ static VALUE allocate(VALUE klass)
|
|
50
50
|
* call-seq:
|
51
51
|
* dup
|
52
52
|
*
|
53
|
-
* Duplicate this
|
53
|
+
* Duplicate this NodeSet. Note that the Nodes contained in the NodeSet are not
|
54
|
+
* duplicated (similar to how Array and other Enumerable classes work).
|
54
55
|
*/
|
55
56
|
static VALUE duplicate(VALUE self)
|
56
57
|
{
|
@@ -350,7 +351,7 @@ static VALUE unlink_nodeset(VALUE self)
|
|
350
351
|
|
351
352
|
nodeNr = node_set->nodeNr ;
|
352
353
|
for (j = 0 ; j < nodeNr ; j++) {
|
353
|
-
if (!
|
354
|
+
if (! NOKOGIRI_NAMESPACE_EH(node_set->nodeTab[j])) {
|
354
355
|
VALUE node ;
|
355
356
|
xmlNodePtr node_ptr;
|
356
357
|
node = Nokogiri_wrap_xml_node(Qnil, node_set->nodeTab[j]);
|
@@ -388,7 +389,7 @@ static void reify_node_set_namespaces(VALUE self)
|
|
388
389
|
namespace_cache = rb_iv_get(self, "@namespace_cache");
|
389
390
|
|
390
391
|
for (j = 0 ; j < node_set->nodeNr ; j++) {
|
391
|
-
if (
|
392
|
+
if (NOKOGIRI_NAMESPACE_EH(node_set->nodeTab[j])) {
|
392
393
|
rb_ary_push(namespace_cache, Nokogiri_wrap_xml_node_set_node(node_set->nodeTab[j], self));
|
393
394
|
}
|
394
395
|
}
|
@@ -420,7 +421,7 @@ VALUE Nokogiri_wrap_xml_node_set_node(xmlNodePtr node, VALUE node_set)
|
|
420
421
|
{
|
421
422
|
xmlDocPtr document ;
|
422
423
|
|
423
|
-
if (
|
424
|
+
if (NOKOGIRI_NAMESPACE_EH(node)) {
|
424
425
|
Data_Get_Struct(rb_iv_get(node_set, "@document"), xmlDoc, document);
|
425
426
|
return Nokogiri_wrap_xml_namespace(document, (xmlNsPtr)node);
|
426
427
|
} else {
|
data/ext/nokogiri/xml_node_set.h
CHANGED
@@ -8,6 +8,5 @@ extern VALUE cNokogiriXmlNodeSet ;
|
|
8
8
|
VALUE Nokogiri_wrap_xml_node_set(xmlNodeSetPtr node_set, VALUE document) ;
|
9
9
|
VALUE Nokogiri_wrap_xml_node_set_node(xmlNodePtr node, VALUE node_set) ;
|
10
10
|
VALUE Nokogiri_wrap_xml_node_set_namespace(xmlNsPtr node, VALUE node_set) ;
|
11
|
-
int Nokogiri_namespace_eh(xmlNodePtr node) ;
|
12
11
|
|
13
12
|
#endif
|
@@ -214,7 +214,7 @@ static void * initFunc(xsltTransformContextPtr ctxt, const xmlChar *uri)
|
|
214
214
|
(unsigned char *)StringValueCStr(method_name), uri, method_caller);
|
215
215
|
}
|
216
216
|
|
217
|
-
Data_Get_Struct(ctxt->style->_private, nokogiriXsltStylesheetTuple,
|
217
|
+
Data_Get_Struct((VALUE)ctxt->style->_private, nokogiriXsltStylesheetTuple,
|
218
218
|
wrapper);
|
219
219
|
inst = rb_class_new_instance(0, NULL, obj);
|
220
220
|
rb_ary_push(wrapper->func_instances, inst);
|
@@ -227,7 +227,7 @@ static void shutdownFunc(xsltTransformContextPtr ctxt,
|
|
227
227
|
{
|
228
228
|
nokogiriXsltStylesheetTuple *wrapper;
|
229
229
|
|
230
|
-
Data_Get_Struct(ctxt->style->_private, nokogiriXsltStylesheetTuple,
|
230
|
+
Data_Get_Struct((VALUE)ctxt->style->_private, nokogiriXsltStylesheetTuple,
|
231
231
|
wrapper);
|
232
232
|
|
233
233
|
rb_ary_clear(wrapper->func_instances);
|
data/lib/nokogiri/css/parser.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#
|
2
2
|
# DO NOT MODIFY!!!!
|
3
|
-
# This file is automatically generated by Racc 1.4.
|
3
|
+
# This file is automatically generated by Racc 1.4.14
|
4
4
|
# from Racc grammer file "".
|
5
5
|
#
|
6
6
|
|
@@ -17,103 +17,115 @@ module Nokogiri
|
|
17
17
|
def unescape_css_identifier(identifier)
|
18
18
|
identifier.gsub(/\\(?:([^0-9a-fA-F])|([0-9a-fA-F]{1,6})\s?)/){ |m| $1 || [$2.hex].pack('U') }
|
19
19
|
end
|
20
|
+
|
21
|
+
def unescape_css_string(str)
|
22
|
+
str.gsub(/\\(?:([^0-9a-fA-F])|([0-9a-fA-F]{1,6})\s?)/) do |m|
|
23
|
+
if $1=="\n"
|
24
|
+
''
|
25
|
+
else
|
26
|
+
$1 || [$2.hex].pack('U')
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
20
30
|
##### State transition tables begin ###
|
21
31
|
|
22
32
|
racc_action_table = [
|
23
33
|
24, 93, 56, 57, 33, 55, 94, 23, 24, 22,
|
24
|
-
12, 93, 33, 27,
|
25
|
-
|
34
|
+
12, 93, 33, 27, 89, 52, 92, 22, -23, 25,
|
35
|
+
109, 98, 23, 33, 26, 18, 20, 25, 27, -23,
|
26
36
|
23, 24, 26, 18, 20, 33, 27, 11, 39, 24,
|
27
|
-
22, 23,
|
28
|
-
25,
|
29
|
-
|
30
|
-
|
31
|
-
87, 25, 60,
|
32
|
-
27, 39,
|
33
|
-
27,
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
37
|
+
22, 23, 95, 33, 18, 91, 90, 27, 22, 12,
|
38
|
+
25, 90, 96, 23, 33, 26, 18, 20, 25, 27,
|
39
|
+
-23, 23, 24, 26, 18, 20, 33, 27, 74, 39,
|
40
|
+
99, 22, 23, 45, 24, 18, 33, 103, 27, 56,
|
41
|
+
87, 25, 60, 46, 23, 49, 26, 18, 20, 104,
|
42
|
+
27, 39, 24, 51, 23, 93, 44, 18, 26, 33,
|
43
|
+
27, 66, 106, 56, 58, 110, 60, 33, 85, 33,
|
44
|
+
86, 51, 56, 87, 39, 60, 26, 23, 88, 33,
|
45
|
+
18, 20, 39, 27, 39, 23, 35, 23, 18, 33,
|
46
|
+
18, 27, nil, 27, 39, nil, 33, 23, nil, nil,
|
47
|
+
18, 22, nil, 27, 39, 101, 100, 23, 102, nil,
|
48
|
+
18, 39, nil, 27, 23, 82, 83, 18, 20, nil,
|
49
|
+
27, nil, nil, nil, 82, 83, 78, 79, 80, nil,
|
50
|
+
81, nil, nil, nil, 77, 78, 79, 80, nil, 81,
|
51
|
+
4, 5, 43, 77, 4, 5, 10, nil, 56, 87,
|
52
|
+
6, 60, 8, 7, 6, nil, 8, 7, 4, 5,
|
53
|
+
10, 56, 87, nil, 60, nil, nil, nil, 6, nil,
|
54
|
+
8, 7 ]
|
45
55
|
|
46
56
|
racc_action_check = [
|
47
|
-
|
48
|
-
64, 57,
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
12,
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
47, nil, nil, nil,
|
65
|
-
|
66
|
-
17, 17,
|
67
|
-
|
68
|
-
|
57
|
+
3, 58, 24, 24, 3, 24, 57, 15, 42, 3,
|
58
|
+
64, 57, 42, 15, 54, 24, 56, 42, 58, 3,
|
59
|
+
94, 64, 3, 31, 3, 3, 3, 42, 3, 22,
|
60
|
+
42, 9, 42, 42, 42, 9, 42, 1, 31, 43,
|
61
|
+
9, 31, 59, 43, 31, 55, 55, 31, 43, 1,
|
62
|
+
9, 60, 61, 9, 30, 9, 9, 9, 43, 9,
|
63
|
+
46, 43, 12, 43, 43, 43, 12, 43, 45, 30,
|
64
|
+
75, 12, 30, 21, 23, 30, 29, 84, 30, 93,
|
65
|
+
93, 12, 93, 23, 12, 23, 12, 12, 12, 86,
|
66
|
+
12, 29, 27, 23, 29, 87, 18, 29, 23, 25,
|
67
|
+
29, 27, 91, 25, 25, 106, 25, 28, 49, 62,
|
68
|
+
50, 27, 51, 51, 25, 51, 27, 25, 53, 14,
|
69
|
+
25, 25, 28, 25, 62, 28, 11, 62, 28, 32,
|
70
|
+
62, 28, nil, 62, 14, nil, 39, 14, nil, nil,
|
71
|
+
14, 39, nil, 14, 32, 76, 76, 32, 76, nil,
|
72
|
+
32, 39, nil, 32, 39, 47, 47, 39, 39, nil,
|
73
|
+
39, nil, nil, nil, 48, 48, 47, 47, 47, nil,
|
74
|
+
47, nil, nil, nil, 47, 48, 48, 48, nil, 48,
|
75
|
+
17, 17, 17, 48, 0, 0, 0, nil, 90, 90,
|
76
|
+
17, 90, 17, 17, 0, nil, 0, 0, 26, 26,
|
77
|
+
26, 92, 92, nil, 92, nil, nil, nil, 26, nil,
|
78
|
+
26, 26 ]
|
69
79
|
|
70
80
|
racc_action_pointer = [
|
71
|
-
|
72
|
-
nil,
|
73
|
-
nil,
|
74
|
-
|
75
|
-
nil, nil,
|
76
|
-
|
77
|
-
|
78
|
-
nil, nil, nil, nil, nil,
|
79
|
-
nil, nil, nil, nil,
|
80
|
-
|
81
|
-
nil, nil, nil, nil, nil,
|
81
|
+
177, 37, nil, -2, nil, nil, nil, nil, nil, 29,
|
82
|
+
nil, 126, 60, nil, 113, -17, nil, 173, 85, nil,
|
83
|
+
nil, 44, 0, 72, -8, 93, 191, 90, 101, 70,
|
84
|
+
48, 17, 123, nil, nil, nil, nil, nil, nil, 130,
|
85
|
+
nil, nil, 6, 37, nil, 57, 31, 152, 161, 83,
|
86
|
+
81, 102, nil, 95, -9, 34, 4, -1, -11, 19,
|
87
|
+
39, 29, 103, nil, -2, nil, nil, nil, nil, nil,
|
88
|
+
nil, nil, nil, nil, nil, 45, 135, nil, nil, nil,
|
89
|
+
nil, nil, nil, nil, 52, nil, 78, 83, nil, nil,
|
90
|
+
178, 95, 191, 69, 7, nil, nil, nil, nil, nil,
|
91
|
+
nil, nil, nil, nil, nil, nil, 92, nil, nil, nil,
|
92
|
+
nil ]
|
82
93
|
|
83
94
|
racc_action_default = [
|
84
|
-
-
|
85
|
-
-
|
86
|
-
-20, -
|
87
|
-
-55, -56, -57, -58, -14,
|
88
|
-
-11, -12, -24, -24, -18, -
|
89
|
-
-
|
90
|
-
-38, -
|
91
|
-
-51, -52, -15, -16, -21, -
|
92
|
-
-
|
93
|
-
-
|
94
|
-
-59, -60, -26, -28, -35, -
|
95
|
+
-75, -76, -2, -24, -4, -5, -6, -7, -8, -24,
|
96
|
+
-74, -76, -24, -3, -47, -10, -13, -17, -76, -19,
|
97
|
+
-20, -76, -22, -24, -76, -24, -75, -76, -53, -54,
|
98
|
+
-55, -56, -57, -58, -14, 111, -1, -9, -46, -24,
|
99
|
+
-11, -12, -24, -24, -18, -76, -29, -62, -62, -76,
|
100
|
+
-76, -76, -30, -76, -76, -38, -39, -40, -22, -76,
|
101
|
+
-38, -76, -71, -73, -76, -44, -45, -48, -49, -50,
|
102
|
+
-51, -52, -15, -16, -21, -76, -76, -63, -64, -65,
|
103
|
+
-66, -67, -68, -69, -76, -27, -76, -40, -31, -32,
|
104
|
+
-76, -43, -76, -76, -76, -33, -70, -72, -34, -25,
|
105
|
+
-59, -60, -61, -26, -28, -35, -76, -36, -37, -42,
|
106
|
+
-41 ]
|
95
107
|
|
96
108
|
racc_goto_table = [
|
97
|
-
53, 38, 13, 1,
|
98
|
-
|
99
|
-
62,
|
109
|
+
53, 38, 13, 1, 54, 48, 62, 42, 34, 65,
|
110
|
+
37, 36, 63, 75, 84, 67, 68, 69, 70, 71,
|
111
|
+
62, 40, 41, 50, 47, nil, 63, nil, nil, 64,
|
100
112
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
101
113
|
nil, 72, 73, nil, nil, nil, nil, nil, nil, 97,
|
102
114
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
103
|
-
nil, nil, nil, nil, nil, nil,
|
115
|
+
nil, nil, nil, nil, nil, nil, 105, nil, 107, 108 ]
|
104
116
|
|
105
117
|
racc_goto_check = [
|
106
|
-
18, 12, 2, 1,
|
107
|
-
|
108
|
-
7,
|
118
|
+
18, 12, 2, 1, 19, 9, 7, 5, 2, 9,
|
119
|
+
8, 2, 12, 17, 17, 12, 12, 12, 12, 12,
|
120
|
+
7, 10, 11, 15, 16, nil, 12, nil, nil, 1,
|
109
121
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
110
122
|
nil, 2, 2, nil, nil, nil, nil, nil, nil, 12,
|
111
123
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
112
124
|
nil, nil, nil, nil, nil, nil, 18, nil, 18, 18 ]
|
113
125
|
|
114
126
|
racc_goto_pointer = [
|
115
|
-
nil, 3, -1, nil, nil,
|
116
|
-
|
127
|
+
nil, 3, -1, nil, nil, -10, nil, -19, -4, -18,
|
128
|
+
6, 7, -13, nil, nil, 0, 1, -34, -24, -20,
|
117
129
|
nil, nil, nil, nil ]
|
118
130
|
|
119
131
|
racc_goto_default = [
|
@@ -183,24 +195,25 @@ racc_reduce_table = [
|
|
183
195
|
1, 51, :_reduce_58,
|
184
196
|
2, 48, :_reduce_59,
|
185
197
|
2, 48, :_reduce_60,
|
198
|
+
2, 48, :_reduce_61,
|
186
199
|
0, 48, :_reduce_none,
|
187
|
-
1, 53, :_reduce_62,
|
188
200
|
1, 53, :_reduce_63,
|
189
201
|
1, 53, :_reduce_64,
|
190
202
|
1, 53, :_reduce_65,
|
191
203
|
1, 53, :_reduce_66,
|
192
204
|
1, 53, :_reduce_67,
|
193
205
|
1, 53, :_reduce_68,
|
194
|
-
|
206
|
+
1, 53, :_reduce_69,
|
207
|
+
3, 52, :_reduce_70,
|
195
208
|
1, 54, :_reduce_none,
|
196
209
|
2, 54, :_reduce_none,
|
197
210
|
1, 54, :_reduce_none,
|
198
211
|
1, 35, :_reduce_none,
|
199
212
|
0, 35, :_reduce_none ]
|
200
213
|
|
201
|
-
racc_reduce_n =
|
214
|
+
racc_reduce_n = 76
|
202
215
|
|
203
|
-
racc_shift_n =
|
216
|
+
racc_shift_n = 111
|
204
217
|
|
205
218
|
racc_token_table = {
|
206
219
|
false => 0,
|
@@ -661,60 +674,63 @@ def _reduce_58(val, _values, result)
|
|
661
674
|
end
|
662
675
|
|
663
676
|
def _reduce_59(val, _values, result)
|
664
|
-
result = [val.first, val[1]]
|
677
|
+
result = [val.first, unescape_css_identifier(val[1])]
|
665
678
|
result
|
666
679
|
end
|
667
680
|
|
668
681
|
def _reduce_60(val, _values, result)
|
682
|
+
result = [val.first, unescape_css_string(val[1])]
|
683
|
+
result
|
684
|
+
end
|
685
|
+
|
686
|
+
def _reduce_61(val, _values, result)
|
669
687
|
result = [val.first, val[1]]
|
670
688
|
result
|
671
689
|
end
|
672
690
|
|
673
|
-
# reduce
|
691
|
+
# reduce 62 omitted
|
674
692
|
|
675
|
-
def
|
693
|
+
def _reduce_63(val, _values, result)
|
676
694
|
result = :equal
|
677
695
|
result
|
678
696
|
end
|
679
697
|
|
680
|
-
def
|
698
|
+
def _reduce_64(val, _values, result)
|
681
699
|
result = :prefix_match
|
682
700
|
result
|
683
701
|
end
|
684
702
|
|
685
|
-
def
|
703
|
+
def _reduce_65(val, _values, result)
|
686
704
|
result = :suffix_match
|
687
705
|
result
|
688
706
|
end
|
689
707
|
|
690
|
-
def
|
708
|
+
def _reduce_66(val, _values, result)
|
691
709
|
result = :substring_match
|
692
710
|
result
|
693
711
|
end
|
694
712
|
|
695
|
-
def
|
713
|
+
def _reduce_67(val, _values, result)
|
696
714
|
result = :not_equal
|
697
715
|
result
|
698
716
|
end
|
699
717
|
|
700
|
-
def
|
718
|
+
def _reduce_68(val, _values, result)
|
701
719
|
result = :includes
|
702
720
|
result
|
703
721
|
end
|
704
722
|
|
705
|
-
def
|
723
|
+
def _reduce_69(val, _values, result)
|
706
724
|
result = :dash_match
|
707
725
|
result
|
708
726
|
end
|
709
727
|
|
710
|
-
def
|
728
|
+
def _reduce_70(val, _values, result)
|
711
729
|
result = Node.new(:NOT, [val[1]])
|
712
730
|
|
713
731
|
result
|
714
732
|
end
|
715
733
|
|
716
|
-
# reduce 70 omitted
|
717
|
-
|
718
734
|
# reduce 71 omitted
|
719
735
|
|
720
736
|
# reduce 72 omitted
|
@@ -723,6 +739,8 @@ end
|
|
723
739
|
|
724
740
|
# reduce 74 omitted
|
725
741
|
|
742
|
+
# reduce 75 omitted
|
743
|
+
|
726
744
|
def _reduce_none(val, _values, result)
|
727
745
|
val[0]
|
728
746
|
end
|