[Pkg-javascript-commits] [node-css-what] 01/04: Imported Upstream version 2.0.2

Thorsten Alteholz alteholz at moszumanska.debian.org
Sat Feb 6 16:36:30 UTC 2016


This is an automated email from the git hooks/post-receive script.

alteholz pushed a commit to branch master
in repository node-css-what.

commit 96f5064bb707bda96b2bea0a077342c48fe46e73
Author: Thorsten Alteholz <debian at alteholz.de>
Date:   Sat Feb 6 17:36:22 2016 +0100

    Imported Upstream version 2.0.2
---
 .travis.yml    |     8 +
 LICENSE        |    11 +
 index.js       |   262 +
 package.json   |    44 +
 readme.md      |    46 +
 stringify.js   |    55 +
 tests/out.json | 15740 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/test.js  |   392 ++
 8 files changed, 16558 insertions(+)

diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..a7d6054
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,8 @@
+sudo: false
+language: node_js
+node_js:
+  - 0.8
+  - "0.10"
+  - 0.11
+before_install:
+  - npm install -g npm
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..c464f86
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,11 @@
+Copyright (c) Felix Böhm
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR B [...]
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/index.js b/index.js
new file mode 100644
index 0000000..d5d813e
--- /dev/null
+++ b/index.js
@@ -0,0 +1,262 @@
+"use strict";
+
+module.exports = parse;
+
+var re_name = /^(?:\\.|[\w\-\u00c0-\uFFFF])+/,
+    re_escape = /\\([\da-f]{1,6}\s?|(\s)|.)/ig,
+    //modified version of https://github.com/jquery/sizzle/blob/master/src/sizzle.js#L87
+    re_attr = /^\s*((?:\\.|[\w\u00c0-\uFFFF\-])+)\s*(?:(\S?)=\s*(?:(['"])(.*?)\3|(#?(?:\\.|[\w\u00c0-\uFFFF\-])*)|)|)\s*(i)?\]/;
+
+var actionTypes = {
+	__proto__: null,
+	"undefined": "exists",
+	"":  "equals",
+	"~": "element",
+	"^": "start",
+	"$": "end",
+	"*": "any",
+	"!": "not",
+	"|": "hyphen"
+};
+
+var simpleSelectors = {
+	__proto__: null,
+	">": "child",
+	"<": "parent",
+	"~": "sibling",
+	"+": "adjacent"
+};
+
+var attribSelectors = {
+	__proto__: null,
+	"#": ["id", "equals"],
+	".": ["class", "element"]
+};
+
+//pseudos, whose data-property is parsed as well
+var unpackPseudos = {
+    __proto__: null,
+    "has": true,
+    "not": true,
+    "matches": true
+};
+
+var stripQuotesFromPseudos = {
+    __proto__: null,
+    "contains": true
+};
+
+var quotes = {
+    __proto__: null,
+    "\"": true,
+    "'": true
+};
+
+//unescape function taken from https://github.com/jquery/sizzle/blob/master/src/sizzle.js#L139
+function funescape( _, escaped, escapedWhitespace ) {
+	var high = "0x" + escaped - 0x10000;
+	// NaN means non-codepoint
+	// Support: Firefox
+	// Workaround erroneous numeric interpretation of +"0x"
+	return high !== high || escapedWhitespace ?
+		escaped :
+		// BMP codepoint
+		high < 0 ?
+			String.fromCharCode( high + 0x10000 ) :
+			// Supplemental Plane codepoint (surrogate pair)
+			String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
+}
+
+function unescapeCSS(str){
+	return str.replace(re_escape, funescape);
+}
+
+function isWhitespace(c){
+    return c === " " || c === "\n" || c === "\t" || c === "\f" || c === "\r";
+}
+
+function parse(selector, options){
+	var subselects = [];
+
+    selector = parseSelector(subselects, selector + "", options);
+
+    if(selector !== ""){
+        throw new SyntaxError("Unmatched selector: " + selector);
+    }
+
+    return subselects;
+}
+
+function parseSelector(subselects, selector, options){
+    var tokens = [],
+        sawWS = false,
+        data, firstChar, name, quot;
+
+	function getName(){
+		var sub = selector.match(re_name)[0];
+		selector = selector.substr(sub.length);
+		return unescapeCSS(sub);
+	}
+
+    function stripWhitespace(start){
+        while(isWhitespace(selector.charAt(start))) start++;
+        selector = selector.substr(start);
+    }
+
+    stripWhitespace(0);
+
+	while(selector !== ""){
+        firstChar = selector.charAt(0);
+
+        if(isWhitespace(firstChar)){
+			sawWS = true;
+            stripWhitespace(1);
+		} else if(firstChar in simpleSelectors){
+            tokens.push({type: simpleSelectors[firstChar]});
+            sawWS = false;
+
+            stripWhitespace(1);
+        } else if(firstChar === ","){
+            if(tokens.length === 0){
+                throw new SyntaxError("empty sub-selector");
+            }
+            subselects.push(tokens);
+            tokens = [];
+            sawWS = false;
+            stripWhitespace(1);
+        } else {
+			if(sawWS){
+                if(tokens.length > 0){
+                    tokens.push({type: "descendant"});
+                }
+				sawWS = false;
+			}
+
+            if(firstChar === "*"){
+                selector = selector.substr(1);
+				tokens.push({type: "universal"});
+			} else if(firstChar in attribSelectors){
+                selector = selector.substr(1);
+				tokens.push({
+					type: "attribute",
+					name: attribSelectors[firstChar][0],
+					action: attribSelectors[firstChar][1],
+					value: getName(),
+					ignoreCase: false
+				});
+			} else if(firstChar === "["){
+                selector = selector.substr(1);
+				data = selector.match(re_attr);
+				if(!data){
+					throw new SyntaxError("Malformed attribute selector: " + selector);
+				}
+				selector = selector.substr(data[0].length);
+				name = unescapeCSS(data[1]);
+
+				if(
+					!options || (
+						"lowerCaseAttributeNames" in options ?
+							options.lowerCaseAttributeNames :
+							!options.xmlMode
+					)
+				){
+					name = name.toLowerCase();
+				}
+
+				tokens.push({
+					type: "attribute",
+					name: name,
+					action: actionTypes[data[2]],
+					value: unescapeCSS(data[4] || data[5] || ""),
+					ignoreCase: !!data[6]
+				});
+
+			} else if(firstChar === ":"){
+				//if(selector.charAt(1) === ":"){} //TODO pseudo-element
+
+                selector = selector.substr(1);
+
+				name = getName().toLowerCase();
+				data = null;
+
+				if(selector.charAt(0) === "("){
+                    if(name in unpackPseudos){
+                        quot = selector.charAt(1);
+                        var quoted = quot in quotes;
+
+                        selector = selector.substr(quoted + 1);
+
+                        data = [];
+                        selector = parseSelector(data, selector, options);
+
+                        if(quoted){
+                            if(selector.charAt(0) !== quot){
+                                throw new SyntaxError("unmatched quotes in :" + name);
+                            } else {
+                                selector = selector.substr(1);
+                            }
+                        }
+
+                        if(selector.charAt(0) !== ")"){
+                            throw new SyntaxError("missing closing parenthesis in :" + name + " " + selector);
+                        }
+
+                        selector = selector.substr(1);
+                    } else {
+                        var pos = 1, counter = 1;
+
+                        for(; counter > 0 && pos < selector.length; pos++){
+                            if(selector.charAt(pos) === "(") counter++;
+                            else if(selector.charAt(pos) === ")") counter--;
+                        }
+
+                        if(counter){
+                            throw new SyntaxError("parenthesis not matched");
+                        }
+
+    					data = selector.substr(1, pos - 2);
+    					selector = selector.substr(pos);
+
+                        if(name in stripQuotesFromPseudos){
+                            quot = data.charAt(0);
+
+                        	if(quot === data.slice(-1) && quot in quotes){
+                        		data = data.slice(1, -1);
+                        	}
+
+                            data = unescapeCSS(data);
+                        }
+                    }
+				}
+
+				tokens.push({type: "pseudo", name: name, data: data});
+			} else if(re_name.test(selector)){
+    			name = getName();
+
+    			if(!options || ("lowerCaseTags" in options ? options.lowerCaseTags : !options.xmlMode)){
+    				name = name.toLowerCase();
+    			}
+
+    			tokens.push({type: "tag", name: name});
+    		} else {
+                if(tokens.length && tokens[tokens.length - 1].type === "descendant"){
+                    tokens.pop();
+                }
+                addToken(subselects, tokens);
+                return selector;
+			}
+		}
+	}
+
+    addToken(subselects, tokens);
+
+	return selector;
+}
+
+function addToken(subselects, tokens){
+    if(subselects.length > 0 && tokens.length === 0){
+    	throw new SyntaxError("empty sub-selector");
+    }
+
+	subselects.push(tokens);
+}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..85b30e6
--- /dev/null
+++ b/package.json
@@ -0,0 +1,44 @@
+{
+  "author": "Felix Böhm <me at feedic.com> (http://feedic.com)",
+  "name": "css-what",
+  "description": "a CSS selector parser",
+  "version": "2.0.2",
+  "repository": {
+    "url": "https://github.com/fb55/css-what"
+  },
+  "main": "./index.js",
+  "files": [
+    "index.js"
+  ],
+  "scripts": {
+    "test": "node tests/test.js && jshint *.js"
+  },
+  "dependencies": {},
+  "devDependencies": {
+    "jshint": "2"
+  },
+  "optionalDependencies": {},
+  "engines": {
+    "node": "*"
+  },
+  "license": "BSD-like",
+  "jshintConfig": {
+    "eqeqeq": true,
+    "freeze": true,
+    "latedef": "nofunc",
+    "noarg": true,
+    "nonbsp": true,
+    "quotmark": "double",
+    "undef": true,
+    "unused": true,
+    "trailing": true,
+    "eqnull": true,
+    "proto": true,
+    "smarttabs": true,
+    "node": true,
+    "globals": {
+      "describe": true,
+      "it": true
+    }
+  }
+}
diff --git a/readme.md b/readme.md
new file mode 100644
index 0000000..736e591
--- /dev/null
+++ b/readme.md
@@ -0,0 +1,46 @@
+# css-what [![Build Status](https://secure.travis-ci.org/fb55/css-what.svg?branch=master)](http://travis-ci.org/fb55/css-what)
+
+a CSS selector parser
+
+## Example
+
+```js
+require('css-what')('foo[bar]:baz')
+
+~> [ [ { type: 'tag', name: 'foo' },
+    { type: 'attribute',
+      name: 'bar',
+      action: 'exists',
+      value: '',
+      ignoreCase: false },
+    { type: 'pseudo',
+      name: 'baz',
+      data: null } ] ]
+```
+
+## API
+
+__`CSSwhat(selector, options)` - Parses `str`, with the passed `options`.__
+
+The function returns a two-dimensional array. The first array represents selectors separated by commas (eg. `sub1, sub2`), the second contains the relevant tokens for that selector. Possible token types are:
+
+name | attributes | example | output
+---- | ---------- | ------- | ------
+`tag`| `name`    | `div`   | `{ type: 'tag', name: 'div' }`
+`universal`| -   | `*`     | `{ type: 'universal' }`
+`pseudo`| `name`, `data`|`:name(data)`| `{ type: 'pseudo', name: 'name', data: 'data' }`
+`pseudo`| `name`, `data`|`:name`| `{ type: 'pseudo', name: 'name', data: null }`
+`attribute`|`name`, `action`, `value`, `ignoreCase`|`[attr]`|`{ type: 'attribute', name: 'attr', action: 'exists', value: '', ignoreCase: false }`
+`attribute`|`name`, `action`, `value`, `ignoreCase`|`[attr=val]`|`{ type: 'attribute', name: 'attr', action: 'equals', value: 'val', ignoreCase: false }`
+`attribute`|`name`, `action`, `value`, `ignoreCase`|`[attr^=val]`|`{ type: 'attribute', name: 'attr', action: 'start', value: 'val', ignoreCase: false }`
+`attribute`|`name`, `action`, `value`, `ignoreCase`|`[attr$=val]`|`{ type: 'attribute', name: 'attr', action: 'end', value: 'val', ignoreCase: false }`
+
+//TODO complete list
+
+__Options:__
+
+- `xmlMode`: When enabled, tag names will be case-sensitive (meaning they won't be lowercased).
+
+---
+
+License: BSD-like
diff --git a/stringify.js b/stringify.js
new file mode 100644
index 0000000..dff0db6
--- /dev/null
+++ b/stringify.js
@@ -0,0 +1,55 @@
+var actionTypes = {
+	"equals": "",
+	"element": "~",
+	"start": "^",
+	"end": "$",
+	"any": "*",
+	"not": "!",
+	"hyphen": "|"
+};
+
+var simpleSelectors = {
+	__proto__: null,
+	child: " > ",
+	parent: " < ",
+	sibling: " ~ ",
+	adjacent: " + ",
+    descendant: " ",
+    universal: "*"
+};
+
+module.exports = stringify;
+
+function stringify(token){
+    return token.map(stringifySubselector).join(", ");
+}
+
+function stringifySubselector(token){
+    return token.map(stringifyToken).join("");
+}
+
+function stringifyToken(token){
+    if(token.type in simpleSelectors) return simpleSelectors[token.type];
+
+    if(token.type === "tag") return escapeName(token.name);
+
+    if(token.type === "attribute"){
+        if(token.action === "exists") return "[" + escapeName(token.name) + "]";
+        if(token.name === "id" && token.action === "equals" && !token.ignoreCase) return "#" + escapeName(token.value);
+        if(token.name === "class" && token.action === "element" && !token.ignoreCase) return "." + escapeName(token.value);
+        return "[" +
+            escapeName(token.name) + actionTypes[token.action] + "='" +
+            escapeName(token.value) + "'" + (token.ignoreCase ? "i" : "") + "]";
+    }
+
+    if(token.type === "pseudo"){
+        if(token.data === null) return ":" + escapeName(token.name);
+        if(typeof token.data === "string") return ":" + escapeName(token.name) + "(" + token.data + ")";
+        return ":" + escapeName(token.name) + "(" + stringify(token.data) + ")";
+    }
+}
+
+function escapeName(str){
+    //TODO
+    return str;
+}
diff --git a/tests/out.json b/tests/out.json
new file mode 100644
index 0000000..1f18799
--- /dev/null
+++ b/tests/out.json
@@ -0,0 +1,15740 @@
+{
+  "": [
+    []
+  ],
+  "\t": [
+    []
+  ],
+  "\t#qunit-fixture p": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      }
+    ]
+  ],
+  "\n#qunit-fixture p": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      }
+    ]
+  ],
+  "\f#qunit-fixture p": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      }
+    ]
+  ],
+  "\r#qunit-fixture p": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      }
+    ]
+  ],
+  " ": [
+    []
+  ],
+  " #qunit-fixture p": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      }
+    ]
+  ],
+  " a ": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      }
+    ]
+  ],
+  " p ": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      }
+    ]
+  ],
+  "#__sizzle__": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "__sizzle__",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#ap :nth-last-of-type(0n+3)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "ap",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-of-type",
+        "data": "0n+3"
+      }
+    ]
+  ],
+  "#ap :nth-last-of-type(2n)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "ap",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-of-type",
+        "data": "2n"
+      }
+    ]
+  ],
+  "#ap :nth-last-of-type(2n+1)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "ap",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-of-type",
+        "data": "2n+1"
+      }
+    ]
+  ],
+  "#ap :nth-last-of-type(3)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "ap",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-of-type",
+        "data": "3"
+      }
+    ]
+  ],
+  "#ap :nth-last-of-type(even)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "ap",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-of-type",
+        "data": "even"
+      }
+    ]
+  ],
+  "#ap :nth-last-of-type(n)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "ap",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-of-type",
+        "data": "n"
+      }
+    ]
+  ],
+  "#ap :nth-last-of-type(odd)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "ap",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-of-type",
+        "data": "odd"
+      }
+    ]
+  ],
+  "#ap :nth-of-type(0n+3)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "ap",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-of-type",
+        "data": "0n+3"
+      }
+    ]
+  ],
+  "#ap :nth-of-type(2n)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "ap",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-of-type",
+        "data": "2n"
+      }
+    ]
+  ],
+  "#ap :nth-of-type(2n+1)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "ap",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-of-type",
+        "data": "2n+1"
+      }
+    ]
+  ],
+  "#ap :nth-of-type(3)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "ap",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-of-type",
+        "data": "3"
+      }
+    ]
+  ],
+  "#ap :nth-of-type(even)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "ap",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-of-type",
+        "data": "even"
+      }
+    ]
+  ],
+  "#ap :nth-of-type(n)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "ap",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-of-type",
+        "data": "n"
+      }
+    ]
+  ],
+  "#ap :nth-of-type(odd)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "ap",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-of-type",
+        "data": "odd"
+      }
+    ]
+  ],
+  "#ap a[hreflang!='en']": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "ap",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "hreflang",
+        "action": "not",
+        "value": "en",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#ap:has(*), #ap:has(*)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "ap",
+        "ignoreCase": false
+      },
+      {
+        "type": "pseudo",
+        "name": "has",
+        "data": [
+          [
+            {
+              "type": "universal"
+            }
+          ]
+        ]
+      }
+    ],
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "ap",
+        "ignoreCase": false
+      },
+      {
+        "type": "pseudo",
+        "name": "has",
+        "data": [
+          [
+            {
+              "type": "universal"
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#asdfasdf #foobar": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "asdfasdf",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "foobar",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#attr-child-boosh": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "attr-child-boosh",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#attributes a[href=\"#aname\"]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "attributes",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "href",
+        "action": "equals",
+        "value": "#aname",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#attributes div[test$=foo]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "attributes",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "test",
+        "action": "end",
+        "value": "foo",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#attributes div[test*=hree]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "attributes",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "test",
+        "action": "any",
+        "value": "hree",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#attributes div[test=\"two-foo\"]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "attributes",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "test",
+        "action": "equals",
+        "value": "two-foo",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#attributes div[test='two-foo']": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "attributes",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "test",
+        "action": "equals",
+        "value": "two-foo",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#attributes div[test=two-foo]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "attributes",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "test",
+        "action": "equals",
+        "value": "two-foo",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#attributes div[test^=two]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "attributes",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "test",
+        "action": "start",
+        "value": "two",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#attributes div[test|=\"two-foo\"]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "attributes",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "test",
+        "action": "hyphen",
+        "value": "two-foo",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#attributes div[test|=two]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "attributes",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "test",
+        "action": "hyphen",
+        "value": "two",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#attributes div[test~=three]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "attributes",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "test",
+        "action": "element",
+        "value": "three",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#attributes div[unique-test]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "attributes",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "unique-test",
+        "action": "exists",
+        "value": "",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#backslash\\\\foo": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "backslash\\foo",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#blargh": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "blargh",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#body": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "body",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#boosh": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "boosh",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#boosh #booshTest": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "boosh",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "booshTest",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#boosh *": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "boosh",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "universal"
+      }
+    ]
+  ],
+  "#boosh .a": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "boosh",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "a",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#boosh div": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "boosh",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      }
+    ]
+  ],
+  "#boosh div div": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "boosh",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      }
+    ]
+  ],
+  "#boosh div,#boosh span": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "boosh",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      }
+    ],
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "boosh",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "span"
+      }
+    ]
+  ],
+  "#boosh div.a": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "boosh",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "a",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#boosh div[test=fg]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "boosh",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "test",
+        "action": "equals",
+        "value": "fg",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#boosh div[test]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "boosh",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "test",
+        "action": "exists",
+        "value": "",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#boosh span": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "boosh",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "span"
+      }
+    ]
+  ],
+  "#boosh,#boosh": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "boosh",
+        "ignoreCase": false
+      }
+    ],
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "boosh",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#boosh,.apples,#boosh": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "boosh",
+        "ignoreCase": false
+      }
+    ],
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "apples",
+        "ignoreCase": false
+      }
+    ],
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "boosh",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#boosh>.a>#booshTest": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "boosh",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "a",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "booshTest",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#booshTest": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "booshTest",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#direct-descend > .direct-descend": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "direct-descend",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "direct-descend",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#direct-descend > .direct-descend > .lvl2": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "direct-descend",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "direct-descend",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "lvl2",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#dupContainer span": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "dupContainer",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "span"
+      }
+    ]
+  ],
+  "#dupL1": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "dupL1",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#dupL2": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "dupL2",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#emem": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "emem",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#first ~ div": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "first",
+        "ignoreCase": false
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      }
+    ]
+  ],
+  "#firstUL > *": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "firstUL",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "universal"
+      }
+    ]
+  ],
+  "#firstp #foobar": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "firstp",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "foobar",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#firstp #simon1": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "firstp",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "simon1",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#fixtures": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "fixtures",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#fixtures a *": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "fixtures",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "universal"
+      }
+    ]
+  ],
+  "#fixtures h1": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "fixtures",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "h1"
+      }
+    ]
+  ],
+  "#foo": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "foo",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#foo > *": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "foo",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "universal"
+      }
+    ]
+  ],
+  "#foo a:not(.blog)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "foo",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "attribute",
+              "name": "class",
+              "action": "element",
+              "value": "blog",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#foo a:not(.blog.link)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "foo",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "attribute",
+              "name": "class",
+              "action": "element",
+              "value": "blog",
+              "ignoreCase": false
+            },
+            {
+              "type": "attribute",
+              "name": "class",
+              "action": "element",
+              "value": "link",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#foo a:not(.link)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "foo",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "attribute",
+              "name": "class",
+              "action": "element",
+              "value": "link",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#foo\\:bar": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "foo:bar",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#foo\\:bar span:not(:input)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "foo:bar",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "span"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "input",
+              "data": null
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#form": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#form #first": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "first",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#form :checkbox": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "checkbox",
+        "data": null
+      }
+    ]
+  ],
+  "#form :checkbox:checked": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "checkbox",
+        "data": null
+      },
+      {
+        "type": "pseudo",
+        "name": "checked",
+        "data": null
+      }
+    ]
+  ],
+  "#form :input": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "input",
+        "data": null
+      }
+    ]
+  ],
+  "#form :radio": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "radio",
+        "data": null
+      }
+    ]
+  ],
+  "#form :radio:checked": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "radio",
+        "data": null
+      },
+      {
+        "type": "pseudo",
+        "name": "checked",
+        "data": null
+      }
+    ]
+  ],
+  "#form :radio:checked, #form :checkbox:checked": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "radio",
+        "data": null
+      },
+      {
+        "type": "pseudo",
+        "name": "checked",
+        "data": null
+      }
+    ],
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "checkbox",
+        "data": null
+      },
+      {
+        "type": "pseudo",
+        "name": "checked",
+        "data": null
+      }
+    ]
+  ],
+  "#form :text": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "text",
+        "data": null
+      }
+    ]
+  ],
+  "#form > #option1a": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "option1a",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#form > #radio1": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "radio1",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#form [for=action]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "for",
+        "action": "equals",
+        "value": "action",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#form input[type='radio'], #form input[type=\"hidden\"]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "type",
+        "action": "equals",
+        "value": "radio",
+        "ignoreCase": false
+      }
+    ],
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "type",
+        "action": "equals",
+        "value": "hidden",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#form input[type='radio'], #form input[type='hidden']": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "type",
+        "action": "equals",
+        "value": "radio",
+        "ignoreCase": false
+      }
+    ],
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "type",
+        "action": "equals",
+        "value": "hidden",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#form input[type='radio'], #form input[type=hidden]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "type",
+        "action": "equals",
+        "value": "radio",
+        "ignoreCase": false
+      }
+    ],
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "type",
+        "action": "equals",
+        "value": "hidden",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#form input[type=search]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "type",
+        "action": "equals",
+        "value": "search",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#form input[type=text]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "type",
+        "action": "equals",
+        "value": "text",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#form option:checked": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "checked",
+        "data": null
+      }
+    ]
+  ],
+  "#form option:not(:contains(Nothing),#option1b,:selected)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "contains",
+              "data": "Nothing"
+            }
+          ],
+          [
+            {
+              "type": "attribute",
+              "name": "id",
+              "action": "equals",
+              "value": "option1b",
+              "ignoreCase": false
+            }
+          ],
+          [
+            {
+              "type": "pseudo",
+              "name": "selected",
+              "data": null
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#form option:not(:not(:selected))[id^='option3']": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "not",
+              "data": [
+                [
+                  {
+                    "type": "pseudo",
+                    "name": "selected",
+                    "data": null
+                  }
+                ]
+              ]
+            }
+          ]
+        ]
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "start",
+        "value": "option3",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#form option:selected": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "selected",
+        "data": null
+      }
+    ]
+  ],
+  "#form select:has(option:first-child:contains('o'))": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "select"
+      },
+      {
+        "type": "pseudo",
+        "name": "has",
+        "data": [
+          [
+            {
+              "type": "tag",
+              "name": "option"
+            },
+            {
+              "type": "pseudo",
+              "name": "first-child",
+              "data": null
+            },
+            {
+              "type": "pseudo",
+              "name": "contains",
+              "data": "o"
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#form select:not(.select1):contains(Nothing) > option:not(option)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "select"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "attribute",
+              "name": "class",
+              "action": "element",
+              "value": "select1",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      },
+      {
+        "type": "pseudo",
+        "name": "contains",
+        "data": "Nothing"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "tag",
+              "name": "option"
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#form select:not([multiple])": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "select"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "attribute",
+              "name": "multiple",
+              "action": "exists",
+              "value": "",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#form select:not([name='select1'])": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "select"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "attribute",
+              "name": "name",
+              "action": "equals",
+              "value": "select1",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#form select:not([name=select1])": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "select"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "attribute",
+              "name": "name",
+              "action": "equals",
+              "value": "select1",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#grandfather > div:not(#uncle) #son": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "grandfather",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "attribute",
+              "name": "id",
+              "action": "equals",
+              "value": "uncle",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "son",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#groups ~ a": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "groups",
+        "ignoreCase": false
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      }
+    ]
+  ],
+  "#hidden1:enabled": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "hidden1",
+        "ignoreCase": false
+      },
+      {
+        "type": "pseudo",
+        "name": "enabled",
+        "data": null
+      }
+    ]
+  ],
+  "#hsoob": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "hsoob",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#hsoob #spanny": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "hsoob",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "spanny",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#hsoob .a": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "hsoob",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "a",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#hsoob > div > .h": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "hsoob",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "h",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#hsoob div": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "hsoob",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      }
+    ]
+  ],
+  "#hsoob div div": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "hsoob",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      }
+    ]
+  ],
+  "#hsoob div.a": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "hsoob",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "a",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#hsoob span": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "hsoob",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "span"
+      }
+    ]
+  ],
+  "#idTest": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "idTest",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#item_1": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "item_1",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#item_3": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "item_3",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#length ~ input": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "length",
+        "ignoreCase": false
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "tag",
+        "name": "input"
+      }
+    ]
+  ],
+  "#lengthtest": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "lengthtest",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#level1 *:first-child": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "universal"
+      },
+      {
+        "type": "pseudo",
+        "name": "first-child",
+        "data": null
+      }
+    ]
+  ],
+  "#level1 *:last-child": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "universal"
+      },
+      {
+        "type": "pseudo",
+        "name": "last-child",
+        "data": null
+      }
+    ]
+  ],
+  "#level1 *:only-child": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "universal"
+      },
+      {
+        "type": "pseudo",
+        "name": "only-child",
+        "data": null
+      }
+    ]
+  ],
+  "#level1 *[id$=\"_1\"]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "universal"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "end",
+        "value": "_1",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#level1 *[id$=_1]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "universal"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "end",
+        "value": "_1",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#level1 *[id*=\"2\"]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "universal"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "any",
+        "value": "2",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#level1 *[id^=\"level2_\"]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "universal"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "start",
+        "value": "level2_",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#level1 *[id^=level2_]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "universal"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "start",
+        "value": "level2_",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#level1 > span": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level1",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "span"
+      }
+    ]
+  ],
+  "#level1 div:last-child": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "pseudo",
+        "name": "last-child",
+        "data": null
+      }
+    ]
+  ],
+  "#level1 span:first-child": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "span"
+      },
+      {
+        "type": "pseudo",
+        "name": "first-child",
+        "data": null
+      }
+    ]
+  ],
+  "#level1:first-child": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level1",
+        "ignoreCase": false
+      },
+      {
+        "type": "pseudo",
+        "name": "first-child",
+        "data": null
+      }
+    ]
+  ],
+  "#level1:only-child": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level1",
+        "ignoreCase": false
+      },
+      {
+        "type": "pseudo",
+        "name": "only-child",
+        "data": null
+      }
+    ]
+  ],
+  "#level1>*:first-child": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level1",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "universal"
+      },
+      {
+        "type": "pseudo",
+        "name": "first-child",
+        "data": null
+      }
+    ]
+  ],
+  "#level1>*:last-child": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level1",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "universal"
+      },
+      {
+        "type": "pseudo",
+        "name": "last-child",
+        "data": null
+      }
+    ]
+  ],
+  "#level1>*:only-child": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level1",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "universal"
+      },
+      {
+        "type": "pseudo",
+        "name": "only-child",
+        "data": null
+      }
+    ]
+  ],
+  "#level1>div:first-child": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level1",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "pseudo",
+        "name": "first-child",
+        "data": null
+      }
+    ]
+  ],
+  "#level1>div:last-child": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level1",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "pseudo",
+        "name": "last-child",
+        "data": null
+      }
+    ]
+  ],
+  "#level1>span": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level1",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "span"
+      }
+    ]
+  ],
+  "#level1>span:last-child": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level1",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "span"
+      },
+      {
+        "type": "pseudo",
+        "name": "last-child",
+        "data": null
+      }
+    ]
+  ],
+  "#level2_1 + *": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level2_1",
+        "ignoreCase": false
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "universal"
+      }
+    ]
+  ],
+  "#level2_1 + span": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level2_1",
+        "ignoreCase": false
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "tag",
+        "name": "span"
+      }
+    ]
+  ],
+  "#level2_1 > *": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level2_1",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "universal"
+      }
+    ]
+  ],
+  "#level2_1 ~ *": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level2_1",
+        "ignoreCase": false
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "universal"
+      }
+    ]
+  ],
+  "#level2_1 ~ span": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level2_1",
+        "ignoreCase": false
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "tag",
+        "name": "span"
+      }
+    ]
+  ],
+  "#level2_1+span": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level2_1",
+        "ignoreCase": false
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "tag",
+        "name": "span"
+      }
+    ]
+  ],
+  "#level2_2 + span": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level2_2",
+        "ignoreCase": false
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "tag",
+        "name": "span"
+      }
+    ]
+  ],
+  "#level2_2 :only-child:not(:first-child)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level2_2",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "only-child",
+        "data": null
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "first-child",
+              "data": null
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#level2_2 :only-child:not(:last-child)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level2_2",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "only-child",
+        "data": null
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "last-child",
+              "data": null
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#level2_2 ~ span": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level2_2",
+        "ignoreCase": false
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "tag",
+        "name": "span"
+      }
+    ]
+  ],
+  "#level3_1 + *": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level3_1",
+        "ignoreCase": false
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "universal"
+      }
+    ]
+  ],
+  "#level3_1 + em": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level3_1",
+        "ignoreCase": false
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "tag",
+        "name": "em"
+      }
+    ]
+  ],
+  "#level3_1 + span": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level3_1",
+        "ignoreCase": false
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "tag",
+        "name": "span"
+      }
+    ]
+  ],
+  "#level3_1 ~ #level3_2": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level3_1",
+        "ignoreCase": false
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level3_2",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#level3_1 ~ em": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level3_1",
+        "ignoreCase": false
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "tag",
+        "name": "em"
+      }
+    ]
+  ],
+  "#level3_1:empty": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level3_1",
+        "ignoreCase": false
+      },
+      {
+        "type": "pseudo",
+        "name": "empty",
+        "data": null
+      }
+    ]
+  ],
+  "#level3_2 + *": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level3_2",
+        "ignoreCase": false
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "universal"
+      }
+    ]
+  ],
+  "#level3_2 ~ *": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level3_2",
+        "ignoreCase": false
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "universal"
+      }
+    ]
+  ],
+  "#link_2.internal": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "link_2",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "internal",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#link_2.internal.highlight": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "link_2",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "internal",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "highlight",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#link_2.internal.nonexistent": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "link_2",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "internal",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "nonexistent",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#list > li:nth-child(-n+2)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "list",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "li"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "-n+2"
+      }
+    ]
+  ],
+  "#list > li:nth-child(n+2)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "list",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "li"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "n+2"
+      }
+    ]
+  ],
+  "#list li:not(#item_1):not(#item_3)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "list",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "li"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "attribute",
+              "name": "id",
+              "action": "equals",
+              "value": "item_1",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "attribute",
+              "name": "id",
+              "action": "equals",
+              "value": "item_3",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#list>li": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "list",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "li"
+      }
+    ]
+  ],
+  "#listWithTabIndex": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "listWithTabIndex",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#liveHandlerOrder ~ div em:contains('1')": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "liveHandlerOrder",
+        "ignoreCase": false
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "em"
+      },
+      {
+        "type": "pseudo",
+        "name": "contains",
+        "data": "1"
+      }
+    ]
+  ],
+  "#lonelyBoosh": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "lonelyBoosh",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#lonelyHsoob": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "lonelyHsoob",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#moretests script[src]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "moretests",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "script"
+      },
+      {
+        "type": "attribute",
+        "name": "src",
+        "action": "exists",
+        "value": "",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#name\\+value": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "name+value",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#nonexistent:has(*), #ap:has(*)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "nonexistent",
+        "ignoreCase": false
+      },
+      {
+        "type": "pseudo",
+        "name": "has",
+        "data": [
+          [
+            {
+              "type": "universal"
+            }
+          ]
+        ]
+      }
+    ],
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "ap",
+        "ignoreCase": false
+      },
+      {
+        "type": "pseudo",
+        "name": "has",
+        "data": [
+          [
+            {
+              "type": "universal"
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#oooo": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "oooo",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#order-matters .order-matters": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "order-matters",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "order-matters",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#p *:nth-child(3)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "p",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "universal"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "3"
+      }
+    ]
+  ],
+  "#p a:first-of-type": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "p",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "first-of-type",
+        "data": null
+      }
+    ]
+  ],
+  "#p a:last-of-type": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "p",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "last-of-type",
+        "data": null
+      }
+    ]
+  ],
+  "#p a:not(:first-of-type)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "p",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "first-of-type",
+              "data": null
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#p a:not(:last-of-type)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "p",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "last-of-type",
+              "data": null
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#p a:not(:nth-last-of-type(1))": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "p",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "nth-last-of-type",
+              "data": "1"
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#p a:not(:nth-of-type(1))": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "p",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "nth-of-type",
+              "data": "1"
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#p a:not([rel$=\"nofollow\"]) > em": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "p",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "attribute",
+              "name": "rel",
+              "action": "end",
+              "value": "nofollow",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "em"
+      }
+    ]
+  ],
+  "#p a:not([rel$=\"nofollow\"]) em": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "p",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "attribute",
+              "name": "rel",
+              "action": "end",
+              "value": "nofollow",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "em"
+      }
+    ]
+  ],
+  "#p a:not([rel$=\"nofollow\"])>em": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "p",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "attribute",
+              "name": "rel",
+              "action": "end",
+              "value": "nofollow",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "em"
+      }
+    ]
+  ],
+  "#p a:not([rel$=nofollow])": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "p",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "attribute",
+              "name": "rel",
+              "action": "end",
+              "value": "nofollow",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#p a:not([rel^=external])": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "p",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "attribute",
+              "name": "rel",
+              "action": "start",
+              "value": "external",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#p a:not([rel~=nofollow])": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "p",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "attribute",
+              "name": "rel",
+              "action": "element",
+              "value": "nofollow",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#p a:nth-child(3)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "p",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "3"
+      }
+    ]
+  ],
+  "#p a:nth-last-of-type(1)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "p",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-of-type",
+        "data": "1"
+      }
+    ]
+  ],
+  "#p a:nth-of-type(1)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "p",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-of-type",
+        "data": "1"
+      }
+    ]
+  ],
+  "#p a:nth-of-type(2)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "p",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-of-type",
+        "data": "2"
+      }
+    ]
+  ],
+  "#pseudos :nth-child(+3n-2)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "+3n-2"
+      }
+    ]
+  ],
+  "#pseudos :nth-child(-n+5)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "-n+5"
+      }
+    ]
+  ],
+  "#pseudos :nth-child(-n+6)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "-n+6"
+      }
+    ]
+  ],
+  "#pseudos :nth-child(3n)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "3n"
+      }
+    ]
+  ],
+  "#pseudos :nth-child(3n+1)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "3n+1"
+      }
+    ]
+  ],
+  "#pseudos :nth-child(3n+2)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "3n+2"
+      }
+    ]
+  ],
+  "#pseudos :nth-child(odd)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "odd"
+      }
+    ]
+  ],
+  "#pseudos :nth-last-child(-n+5)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "-n+5"
+      }
+    ]
+  ],
+  "#pseudos :nth-last-child(-n+6)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "-n+6"
+      }
+    ]
+  ],
+  "#pseudos :nth-last-child(3n+1)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "3n+1"
+      }
+    ]
+  ],
+  "#pseudos :nth-last-child(3n+2)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "3n+2"
+      }
+    ]
+  ],
+  "#pseudos :nth-last-child(3n-2)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "3n-2"
+      }
+    ]
+  ],
+  "#pseudos :nth-last-child(odd)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "odd"
+      }
+    ]
+  ],
+  "#pseudos a:first-of-type": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "first-of-type",
+        "data": null
+      }
+    ]
+  ],
+  "#pseudos a:nth-last-of-type(3n+1)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-of-type",
+        "data": "3n+1"
+      }
+    ]
+  ],
+  "#pseudos a:nth-of-type(1)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-of-type",
+        "data": "1"
+      }
+    ]
+  ],
+  "#pseudos a:nth-of-type(3n)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-of-type",
+        "data": "3n"
+      }
+    ]
+  ],
+  "#pseudos a:nth-of-type(3n+1)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-of-type",
+        "data": "3n+1"
+      }
+    ]
+  ],
+  "#pseudos a:nth-of-type(odd)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-of-type",
+        "data": "odd"
+      }
+    ]
+  ],
+  "#pseudos a:only-of-type": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "only-of-type",
+        "data": null
+      }
+    ]
+  ],
+  "#pseudos div:first-child": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "pseudo",
+        "name": "first-child",
+        "data": null
+      }
+    ]
+  ],
+  "#pseudos div:last-child": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "pseudo",
+        "name": "last-child",
+        "data": null
+      }
+    ]
+  ],
+  "#pseudos div:last-of-type": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "pseudo",
+        "name": "last-of-type",
+        "data": null
+      }
+    ]
+  ],
+  "#pseudos div:nth-child(2)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "2"
+      }
+    ]
+  ],
+  "#pseudos div:nth-child(even)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "even"
+      }
+    ]
+  ],
+  "#pseudos div:nth-child(odd)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "odd"
+      }
+    ]
+  ],
+  "#pseudos div:nth-last-child(6)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "6"
+      }
+    ]
+  ],
+  "#pseudos div:nth-last-child(even)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "even"
+      }
+    ]
+  ],
+  "#pseudos div:nth-last-child(odd)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "odd"
+      }
+    ]
+  ],
+  "#pseudos div:nth-last-of-type(3n+1)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-of-type",
+        "data": "3n+1"
+      }
+    ]
+  ],
+  "#pseudos div:nth-last-of-type(5)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-of-type",
+        "data": "5"
+      }
+    ]
+  ],
+  "#pseudos div:nth-of-type(3n+1)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-of-type",
+        "data": "3n+1"
+      }
+    ]
+  ],
+  "#pseudos:target": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "pseudos",
+        "ignoreCase": false
+      },
+      {
+        "type": "pseudo",
+        "name": "target",
+        "data": null
+      }
+    ]
+  ],
+  "#qunit-fixture": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#qunit-fixture *[title]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "universal"
+      },
+      {
+        "type": "attribute",
+        "name": "title",
+        "action": "exists",
+        "value": "",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#qunit-fixture :not(:has(:has(*)))": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "has",
+              "data": [
+                [
+                  {
+                    "type": "pseudo",
+                    "name": "has",
+                    "data": [
+                      [
+                        {
+                          "type": "universal"
+                        }
+                      ]
+                    ]
+                  }
+                ]
+              ]
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#qunit-fixture > :nth-last-of-type(-n+2)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-of-type",
+        "data": "-n+2"
+      }
+    ]
+  ],
+  "#qunit-fixture > :nth-of-type(-n+2)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-of-type",
+        "data": "-n+2"
+      }
+    ]
+  ],
+  "#qunit-fixture > :only-of-type": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "pseudo",
+        "name": "only-of-type",
+        "data": null
+      }
+    ]
+  ],
+  "#qunit-fixture > p:first-of-type": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "first-of-type",
+        "data": null
+      }
+    ]
+  ],
+  "#qunit-fixture > p:last-of-type": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "last-of-type",
+        "data": null
+      }
+    ]
+  ],
+  "#qunit-fixture [title]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "title",
+        "action": "exists",
+        "value": "",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#qunit-fixture a + a": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      }
+    ]
+  ],
+  "#qunit-fixture a + a, code > a": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      }
+    ],
+    [
+      {
+        "type": "tag",
+        "name": "code"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      }
+    ]
+  ],
+  "#qunit-fixture a +a": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      }
+    ]
+  ],
+  "#qunit-fixture a+ a": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      }
+    ]
+  ],
+  "#qunit-fixture a+a": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      }
+    ]
+  ],
+  "#qunit-fixture a:last-child": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "last-child",
+        "data": null
+      }
+    ]
+  ],
+  "#qunit-fixture a:only-child": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "only-child",
+        "data": null
+      }
+    ]
+  ],
+  "#qunit-fixture a[ rel = 'bookmark' ]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "rel",
+        "action": "equals",
+        "value": "bookmark",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#qunit-fixture a[ title ]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "title",
+        "action": "exists",
+        "value": "",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#qunit-fixture a[TITLE]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "title",
+        "action": "exists",
+        "value": "",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#qunit-fixture a[href='http://www.google.com/']": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "href",
+        "action": "equals",
+        "value": "http://www.google.com/",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#qunit-fixture a[rel='bookmark']": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "rel",
+        "action": "equals",
+        "value": "bookmark",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#qunit-fixture a[rel=bookmark]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "rel",
+        "action": "equals",
+        "value": "bookmark",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#qunit-fixture a[title]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "title",
+        "action": "exists",
+        "value": "",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#qunit-fixture div:has(div:has(div:not([id])))": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "pseudo",
+        "name": "has",
+        "data": [
+          [
+            {
+              "type": "tag",
+              "name": "div"
+            },
+            {
+              "type": "pseudo",
+              "name": "has",
+              "data": [
+                [
+                  {
+                    "type": "tag",
+                    "name": "div"
+                  },
+                  {
+                    "type": "pseudo",
+                    "name": "not",
+                    "data": [
+                      [
+                        {
+                          "type": "attribute",
+                          "name": "id",
+                          "action": "exists",
+                          "value": "",
+                          "ignoreCase": false
+                        }
+                      ]
+                    ]
+                  }
+                ]
+              ]
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#qunit-fixture div[id]:not(:has(div, span)):not(:has(*))": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "exists",
+        "value": "",
+        "ignoreCase": false
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "has",
+              "data": [
+                [
+                  {
+                    "type": "tag",
+                    "name": "div"
+                  }
+                ],
+                [
+                  {
+                    "type": "tag",
+                    "name": "span"
+                  }
+                ]
+              ]
+            }
+          ]
+        ]
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "has",
+              "data": [
+                [
+                  {
+                    "type": "universal"
+                  }
+                ]
+              ]
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#qunit-fixture form#form > *:nth-child(2)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "form"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "universal"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "2"
+      }
+    ]
+  ],
+  "#qunit-fixture form#form > :nth-child(2)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "form"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "2"
+      }
+    ]
+  ],
+  "#qunit-fixture form[id]:not([action$='formaction']):not(:button)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "form"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "exists",
+        "value": "",
+        "ignoreCase": false
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "attribute",
+              "name": "action",
+              "action": "end",
+              "value": "formaction",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "button",
+              "data": null
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#qunit-fixture form[id]:not([action='form:action']):not(:button)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "form"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "exists",
+        "value": "",
+        "ignoreCase": false
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "attribute",
+              "name": "action",
+              "action": "equals",
+              "value": "form:action",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "button",
+              "data": null
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#qunit-fixture form[id]:not([action='form:action']:button):not(:input)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "form"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "exists",
+        "value": "",
+        "ignoreCase": false
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "attribute",
+              "name": "action",
+              "action": "equals",
+              "value": "form:action",
+              "ignoreCase": false
+            },
+            {
+              "type": "pseudo",
+              "name": "button",
+              "data": null
+            }
+          ]
+        ]
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "input",
+              "data": null
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#qunit-fixture li[tabIndex=-1]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "li"
+      },
+      {
+        "type": "attribute",
+        "name": "tabindex",
+        "action": "equals",
+        "value": "-1",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#qunit-fixture option[value=1]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "attribute",
+        "name": "value",
+        "action": "equals",
+        "value": "1",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#qunit-fixture p": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      }
+    ]
+  ],
+  "#qunit-fixture p\t": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      }
+    ]
+  ],
+  "#qunit-fixture p\n": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      }
+    ]
+  ],
+  "#qunit-fixture p\f": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      }
+    ]
+  ],
+  "#qunit-fixture p\r": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      }
+    ]
+  ],
+  "#qunit-fixture p ": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      }
+    ]
+  ],
+  "#qunit-fixture p ~ div": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      }
+    ]
+  ],
+  "#qunit-fixture p, #qunit-fixture p a": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      }
+    ],
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      }
+    ]
+  ],
+  "#qunit-fixture p:FIRST-CHILD": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "first-child",
+        "data": null
+      }
+    ]
+  ],
+  "#qunit-fixture p:first-child": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "first-child",
+        "data": null
+      }
+    ]
+  ],
+  "#qunit-fixture p:has(:contains(mark)):has(code)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "has",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "contains",
+              "data": "mark"
+            }
+          ]
+        ]
+      },
+      {
+        "type": "pseudo",
+        "name": "has",
+        "data": [
+          [
+            {
+              "type": "tag",
+              "name": "code"
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#qunit-fixture p:has(:contains(mark)):has(code):contains(This link)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "has",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "contains",
+              "data": "mark"
+            }
+          ]
+        ]
+      },
+      {
+        "type": "pseudo",
+        "name": "has",
+        "data": [
+          [
+            {
+              "type": "tag",
+              "name": "code"
+            }
+          ]
+        ]
+      },
+      {
+        "type": "pseudo",
+        "name": "contains",
+        "data": "This link"
+      }
+    ]
+  ],
+  "#qunit-fixture p:not( a )": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "tag",
+              "name": "a"
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#qunit-fixture p:not( p )": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "tag",
+              "name": "p"
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#qunit-fixture p:not(#blargh)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "attribute",
+              "name": "id",
+              "action": "equals",
+              "value": "blargh",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#qunit-fixture p:not(.foo)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "attribute",
+              "name": "class",
+              "action": "element",
+              "value": "foo",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#qunit-fixture p:not(:has(a), :nth-child(1))": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "has",
+              "data": [
+                [
+                  {
+                    "type": "tag",
+                    "name": "a"
+                  }
+                ]
+              ]
+            }
+          ],
+          [
+            {
+              "type": "pseudo",
+              "name": "nth-child",
+              "data": "1"
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#qunit-fixture p:not(:nth-child(1))": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "nth-child",
+              "data": "1"
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#qunit-fixture p:not(:nth-last-child(1))": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "nth-last-child",
+              "data": "1"
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#qunit-fixture p:not(a)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "tag",
+              "name": "a"
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#qunit-fixture p:not(a, b)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "tag",
+              "name": "a"
+            }
+          ],
+          [
+            {
+              "type": "tag",
+              "name": "b"
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#qunit-fixture p:not(a, b, div)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "tag",
+              "name": "a"
+            }
+          ],
+          [
+            {
+              "type": "tag",
+              "name": "b"
+            }
+          ],
+          [
+            {
+              "type": "tag",
+              "name": "div"
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#qunit-fixture p:not(div#blargh)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "tag",
+              "name": "div"
+            },
+            {
+              "type": "attribute",
+              "name": "id",
+              "action": "equals",
+              "value": "blargh",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#qunit-fixture p:not(div.foo)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "tag",
+              "name": "div"
+            },
+            {
+              "type": "attribute",
+              "name": "class",
+              "action": "element",
+              "value": "foo",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#qunit-fixture p:not(p#blargh)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "tag",
+              "name": "p"
+            },
+            {
+              "type": "attribute",
+              "name": "id",
+              "action": "equals",
+              "value": "blargh",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#qunit-fixture p:not(p.foo)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "tag",
+              "name": "p"
+            },
+            {
+              "type": "attribute",
+              "name": "class",
+              "action": "element",
+              "value": "foo",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "#qunit-fixture p:parent": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "parent",
+        "data": null
+      }
+    ]
+  ],
+  "#seite1": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "seite1",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#select1 *:nth-last-child(3)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "universal"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "3"
+      }
+    ]
+  ],
+  "#select1 :nth-last-child(3)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "3"
+      }
+    ]
+  ],
+  "#select1 option:NTH-child(3)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "3"
+      }
+    ]
+  ],
+  "#select1 option:NTH-last-child(3)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "3"
+      }
+    ]
+  ],
+  "#select1 option:nth-child(+2n + 1)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "+2n + 1"
+      }
+    ]
+  ],
+  "#select1 option:nth-child(-1)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "-1"
+      }
+    ]
+  ],
+  "#select1 option:nth-child(-1n + 3)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "-1n + 3"
+      }
+    ]
+  ],
+  "#select1 option:nth-child(-1n+3)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "-1n+3"
+      }
+    ]
+  ],
+  "#select1 option:nth-child(-n+3)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "-n+3"
+      }
+    ]
+  ],
+  "#select1 option:nth-child(1n)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "1n"
+      }
+    ]
+  ],
+  "#select1 option:nth-child(1n+0)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "1n+0"
+      }
+    ]
+  ],
+  "#select1 option:nth-child(2n + 1)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "2n + 1"
+      }
+    ]
+  ],
+  "#select1 option:nth-child(2n)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "2n"
+      }
+    ]
+  ],
+  "#select1 option:nth-child(2n+1)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "2n+1"
+      }
+    ]
+  ],
+  "#select1 option:nth-child(3)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "3"
+      }
+    ]
+  ],
+  "#select1 option:nth-child(3n)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "3n"
+      }
+    ]
+  ],
+  "#select1 option:nth-child(3n+0)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "3n+0"
+      }
+    ]
+  ],
+  "#select1 option:nth-child(3n+1)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "3n+1"
+      }
+    ]
+  ],
+  "#select1 option:nth-child(3n+2)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "3n+2"
+      }
+    ]
+  ],
+  "#select1 option:nth-child(3n+3)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "3n+3"
+      }
+    ]
+  ],
+  "#select1 option:nth-child(3n-1)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "3n-1"
+      }
+    ]
+  ],
+  "#select1 option:nth-child(3n-2)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "3n-2"
+      }
+    ]
+  ],
+  "#select1 option:nth-child(3n-3)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "3n-3"
+      }
+    ]
+  ],
+  "#select1 option:nth-child(even)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "even"
+      }
+    ]
+  ],
+  "#select1 option:nth-child(n)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "n"
+      }
+    ]
+  ],
+  "#select1 option:nth-child(odd)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "odd"
+      }
+    ]
+  ],
+  "#select1 option:nth-last-child(+2n + 1)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "+2n + 1"
+      }
+    ]
+  ],
+  "#select1 option:nth-last-child(-1)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "-1"
+      }
+    ]
+  ],
+  "#select1 option:nth-last-child(-1n + 3)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "-1n + 3"
+      }
+    ]
+  ],
+  "#select1 option:nth-last-child(-1n+3)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "-1n+3"
+      }
+    ]
+  ],
+  "#select1 option:nth-last-child(-n+3)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "-n+3"
+      }
+    ]
+  ],
+  "#select1 option:nth-last-child(1n)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "1n"
+      }
+    ]
+  ],
+  "#select1 option:nth-last-child(1n+0)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "1n+0"
+      }
+    ]
+  ],
+  "#select1 option:nth-last-child(2n + 1)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "2n + 1"
+      }
+    ]
+  ],
+  "#select1 option:nth-last-child(2n)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "2n"
+      }
+    ]
+  ],
+  "#select1 option:nth-last-child(2n+1)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "2n+1"
+      }
+    ]
+  ],
+  "#select1 option:nth-last-child(3)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "3"
+      }
+    ]
+  ],
+  "#select1 option:nth-last-child(3n)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "3n"
+      }
+    ]
+  ],
+  "#select1 option:nth-last-child(3n+0)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "3n+0"
+      }
+    ]
+  ],
+  "#select1 option:nth-last-child(3n+1)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "3n+1"
+      }
+    ]
+  ],
+  "#select1 option:nth-last-child(3n+2)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "3n+2"
+      }
+    ]
+  ],
+  "#select1 option:nth-last-child(3n+3)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "3n+3"
+      }
+    ]
+  ],
+  "#select1 option:nth-last-child(3n-1)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "3n-1"
+      }
+    ]
+  ],
+  "#select1 option:nth-last-child(3n-2)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "3n-2"
+      }
+    ]
+  ],
+  "#select1 option:nth-last-child(3n-3)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "3n-3"
+      }
+    ]
+  ],
+  "#select1 option:nth-last-child(even)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "even"
+      }
+    ]
+  ],
+  "#select1 option:nth-last-child(n)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "n"
+      }
+    ]
+  ],
+  "#select1 option:nth-last-child(odd)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "odd"
+      }
+    ]
+  ],
+  "#select1 option:selected": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "selected",
+        "data": null
+      }
+    ]
+  ],
+  "#select1 option[value!='']": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "attribute",
+        "name": "value",
+        "action": "not",
+        "value": "",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#select1 option[value='']": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "attribute",
+        "name": "value",
+        "action": "equals",
+        "value": "",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#select2 option:selected": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select2",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "selected",
+        "data": null
+      }
+    ]
+  ],
+  "#select2 option[selected='selected']": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select2",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "attribute",
+        "name": "selected",
+        "action": "equals",
+        "value": "selected",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#select2 option[selected]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select2",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "attribute",
+        "name": "selected",
+        "action": "exists",
+        "value": "",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#select3 option:selected": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select3",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "selected",
+        "data": null
+      }
+    ]
+  ],
+  "#sep": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "sep",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#sibling-selector + .sibling-selector": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "sibling-selector",
+        "ignoreCase": false
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "sibling-selector",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#sibling-selector + div.sibling-selector": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "sibling-selector",
+        "ignoreCase": false
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "sibling-selector",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#sibling-selector ~ .sibling-selector": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "sibling-selector",
+        "ignoreCase": false
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "sibling-selector",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#sibling-selector ~ div.sibling-selector": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "sibling-selector",
+        "ignoreCase": false
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "sibling-selector",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#siblingTest > em *": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "siblingTest",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "em"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "universal"
+      }
+    ]
+  ],
+  "#siblingTest > em:contains('x') + em ~ span": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "siblingTest",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "em"
+      },
+      {
+        "type": "pseudo",
+        "name": "contains",
+        "data": "x"
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "tag",
+        "name": "em"
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "tag",
+        "name": "span"
+      }
+    ]
+  ],
+  "#siblingTest > em:first-child + em ~ span": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "siblingTest",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "em"
+      },
+      {
+        "type": "pseudo",
+        "name": "first-child",
+        "data": null
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "tag",
+        "name": "em"
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "tag",
+        "name": "span"
+      }
+    ]
+  ],
+  "#siblingTest em *": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "siblingTest",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "em"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "universal"
+      }
+    ]
+  ],
+  "#siblingTest em ~ em ~ em ~ span": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "siblingTest",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "em"
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "tag",
+        "name": "em"
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "tag",
+        "name": "em"
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "tag",
+        "name": "span"
+      }
+    ]
+  ],
+  "#siblingfirst ~ em": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "siblingfirst",
+        "ignoreCase": false
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "tag",
+        "name": "em"
+      }
+    ]
+  ],
+  "#spaced-tokens    p    em    a": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "spaced-tokens",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "em"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      }
+    ]
+  ],
+  "#spanny": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "spanny",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#tName1": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "tName1",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#tName1 span": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "tName1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "span"
+      }
+    ]
+  ],
+  "#tName1-span": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "tName1-span",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#tName2": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "tName2",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#tName2 span": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "tName2",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "span"
+      }
+    ]
+  ],
+  "#tName2ID": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "tName2ID",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#test\\.foo\\[5\\]bar": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "test.foo[5]bar",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#tmp_input :button": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "tmp_input",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "button",
+        "data": null
+      }
+    ]
+  ],
+  "#tmp_input :reset": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "tmp_input",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "reset",
+        "data": null
+      }
+    ]
+  ],
+  "#tmp_input :submit": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "tmp_input",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "submit",
+        "data": null
+      }
+    ]
+  ],
+  "#token-four": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "token-four",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#troubleForm": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "troubleForm",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#troubleForm *:checked": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "troubleForm",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "universal"
+      },
+      {
+        "type": "pseudo",
+        "name": "checked",
+        "data": null
+      }
+    ]
+  ],
+  "#troubleForm *[type=radio]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "troubleForm",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "universal"
+      },
+      {
+        "type": "attribute",
+        "name": "type",
+        "action": "equals",
+        "value": "radio",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#troubleForm *[type]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "troubleForm",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "universal"
+      },
+      {
+        "type": "attribute",
+        "name": "type",
+        "action": "exists",
+        "value": "",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#troubleForm > p > *:disabled": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "troubleForm",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "universal"
+      },
+      {
+        "type": "pseudo",
+        "name": "disabled",
+        "data": null
+      }
+    ]
+  ],
+  "#troubleForm [type=radio]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "troubleForm",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "type",
+        "action": "equals",
+        "value": "radio",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#troubleForm [type]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "troubleForm",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "type",
+        "action": "exists",
+        "value": "",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#troubleForm2 input[name=\"brackets[5][]\"]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "troubleForm2",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "name",
+        "action": "equals",
+        "value": "brackets[5][]",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#troubleForm2 input[name=\"brackets[5][]\"]:checked": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "troubleForm2",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "name",
+        "action": "equals",
+        "value": "brackets[5][]",
+        "ignoreCase": false
+      },
+      {
+        "type": "pseudo",
+        "name": "checked",
+        "data": null
+      }
+    ]
+  ],
+  "#troubleForm2 input[name=\"brackets[5][]\"][value=\"2\"]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "troubleForm2",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "name",
+        "action": "equals",
+        "value": "brackets[5][]",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "value",
+        "action": "equals",
+        "value": "2",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#types_all": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "types_all",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#uncle": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "uncle",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#台北Táiběi": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "台北Táiběi",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "#台北Táiběi, #台北": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "台北Táiběi",
+        "ignoreCase": false
+      }
+    ],
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "台北",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "*": [
+    [
+      {
+        "type": "universal"
+      }
+    ]
+  ],
+  "* :not(*) foo": [
+    [
+      {
+        "type": "universal"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "universal"
+            }
+          ]
+        ]
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "foo"
+      }
+    ]
+  ],
+  "* < *": [
+    [
+      {
+        "type": "universal"
+      },
+      {
+        "type": "parent"
+      },
+      {
+        "type": "universal"
+      }
+    ]
+  ],
+  "*, foo": [
+    [
+      {
+        "type": "universal"
+      }
+    ],
+    [
+      {
+        "type": "tag",
+        "name": "foo"
+      }
+    ]
+  ],
+  "*,:contains(!)": [
+    [
+      {
+        "type": "universal"
+      }
+    ],
+    [
+      {
+        "type": "pseudo",
+        "name": "contains",
+        "data": "!"
+      }
+    ]
+  ],
+  "*:contains(humans)": [
+    [
+      {
+        "type": "universal"
+      },
+      {
+        "type": "pseudo",
+        "name": "contains",
+        "data": "humans"
+      }
+    ]
+  ],
+  "*[id]": [
+    [
+      {
+        "type": "universal"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "exists",
+        "value": "",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "*[name=iframe]": [
+    [
+      {
+        "type": "universal"
+      },
+      {
+        "type": "attribute",
+        "name": "name",
+        "action": "equals",
+        "value": "iframe",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "*[type=checkbox]": [
+    [
+      {
+        "type": "universal"
+      },
+      {
+        "type": "attribute",
+        "name": "type",
+        "action": "equals",
+        "value": "checkbox",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".GROUPS": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "GROUPS",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".a": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "a",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".a #booshTest #spanny": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "a",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "booshTest",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "spanny",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".a #spanny": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "a",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "spanny",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".a .d + .sib": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "a",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "d",
+        "ignoreCase": false
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "sib",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".a .d ~ .sib[test=\"f g\"]": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "a",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "d",
+        "ignoreCase": false
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "sib",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "test",
+        "action": "equals",
+        "value": "f g",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".a > #booshTest": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "a",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "booshTest",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".a span": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "a",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "span"
+      }
+    ]
+  ],
+  ".a.b #booshTest": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "a",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "b",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "booshTest",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".a>#booshTest": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "a",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "booshTest",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".blog": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "blog",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".blog.link": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "blog",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "link",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".brothers": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "brothers",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".class-with-dashes": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "class-with-dashes",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".component": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "component",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".container div:not(.excluded) div": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "container",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "attribute",
+              "name": "class",
+              "action": "element",
+              "value": "excluded",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      }
+    ]
+  ],
+  ".d #oooo #emem": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "d",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "oooo",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "emem",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".d ~ .sib": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "d",
+        "ignoreCase": false
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "sib",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".d.i #emem": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "d",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "i",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "emem",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".direct-descend > .direct-descend .lvl2": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "direct-descend",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "direct-descend",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "lvl2",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".direct-descend > .direct-descend > .direct-descend ~ .lvl2": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "direct-descend",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "direct-descend",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "direct-descend",
+        "ignoreCase": false
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "lvl2",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".direct-descend > .direct-descend div": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "direct-descend",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "direct-descend",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      }
+    ]
+  ],
+  ".e": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "e",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".e.hasOwnProperty.toString": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "e",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "hasOwnProperty",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "toString",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".excluded": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "excluded",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".first": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "first",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".foo": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "foo",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".foo\\:bar": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "foo:bar",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".fototab > .thumbnails > a": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "fototab",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "thumbnails",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      }
+    ]
+  ],
+  ".internal#link_2": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "internal",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "link_2",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".link": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "link",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".nothiddendiv div:first-child": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "nothiddendiv",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "pseudo",
+        "name": "first-child",
+        "data": null
+      }
+    ]
+  ],
+  ".null": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "null",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".null div": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "null",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      }
+    ]
+  ],
+  ".odd:not(div)": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "odd",
+        "ignoreCase": false
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "tag",
+              "name": "div"
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  ".parent .middle + .sibling": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "parent",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "middle",
+        "ignoreCase": false
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "sibling",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".parent .middle + h2": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "parent",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "middle",
+        "ignoreCase": false
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "tag",
+        "name": "h2"
+      }
+    ]
+  ],
+  ".parent .middle + h3": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "parent",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "middle",
+        "ignoreCase": false
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "tag",
+        "name": "h3"
+      }
+    ]
+  ],
+  ".parent .middle + h4": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "parent",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "middle",
+        "ignoreCase": false
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "tag",
+        "name": "h4"
+      }
+    ]
+  ],
+  ".parent .middle ~ .sibling": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "parent",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "middle",
+        "ignoreCase": false
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "sibling",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".parent .middle ~ h2": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "parent",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "middle",
+        "ignoreCase": false
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "tag",
+        "name": "h2"
+      }
+    ]
+  ],
+  ".parent .middle ~ h3": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "parent",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "middle",
+        "ignoreCase": false
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "tag",
+        "name": "h3"
+      }
+    ]
+  ],
+  ".parent .middle ~ h4": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "parent",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "middle",
+        "ignoreCase": false
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "tag",
+        "name": "h4"
+      }
+    ]
+  ],
+  ".parent .middle ~ h4.younger": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "parent",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "middle",
+        "ignoreCase": false
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "tag",
+        "name": "h4"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "younger",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".parent .oldest + .sibling": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "parent",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "oldest",
+        "ignoreCase": false
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "sibling",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".parent .oldest ~ .sibling": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "parent",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "oldest",
+        "ignoreCase": false
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "sibling",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".parent .youngest + .sibling": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "parent",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "youngest",
+        "ignoreCase": false
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "sibling",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".parent .youngest ~ .sibling": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "parent",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "youngest",
+        "ignoreCase": false
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "sibling",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".second": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "second",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".select1": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "select1",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".test\\.foo\\[5\\]bar": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "test.foo[5]bar",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".台北": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "台北",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".台北Táiběi": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "台北Táiběi",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".台北Táiběi, .台北": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "台北Táiběi",
+        "ignoreCase": false
+      }
+    ],
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "台北",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ".台北Táiběi.台北": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "台北Táiběi",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "台北",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ":Header": [
+    [
+      {
+        "type": "pseudo",
+        "name": "header",
+        "data": null
+      }
+    ]
+  ],
+  ":button": [
+    [
+      {
+        "type": "pseudo",
+        "name": "button",
+        "data": null
+      }
+    ]
+  ],
+  ":contains(Nothing),#option1b,:selected": [
+    [
+      {
+        "type": "pseudo",
+        "name": "contains",
+        "data": "Nothing"
+      }
+    ],
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "option1b",
+        "ignoreCase": false
+      }
+    ],
+    [
+      {
+        "type": "pseudo",
+        "name": "selected",
+        "data": null
+      }
+    ]
+  ],
+  ":contains(foo)": [
+    [
+      {
+        "type": "pseudo",
+        "name": "contains",
+        "data": "foo"
+      }
+    ]
+  ],
+  ":contains(humans)": [
+    [
+      {
+        "type": "pseudo",
+        "name": "contains",
+        "data": "humans"
+      }
+    ]
+  ],
+  ":contains(mark)": [
+    [
+      {
+        "type": "pseudo",
+        "name": "contains",
+        "data": "mark"
+      }
+    ]
+  ],
+  ":empty": [
+    [
+      {
+        "type": "pseudo",
+        "name": "empty",
+        "data": null
+      }
+    ]
+  ],
+  ":first-child": [
+    [
+      {
+        "type": "pseudo",
+        "name": "first-child",
+        "data": null
+      }
+    ]
+  ],
+  ":first-child(n)": [
+    [
+      {
+        "type": "pseudo",
+        "name": "first-child",
+        "data": "n"
+      }
+    ]
+  ],
+  ":first-last-child": [
+    [
+      {
+        "type": "pseudo",
+        "name": "first-last-child",
+        "data": null
+      }
+    ]
+  ],
+  ":first-of-type": [
+    [
+      {
+        "type": "pseudo",
+        "name": "first-of-type",
+        "data": null
+      }
+    ]
+  ],
+  ":has(*)": [
+    [
+      {
+        "type": "pseudo",
+        "name": "has",
+        "data": [
+          [
+            {
+              "type": "universal"
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  ":has(*,:contains(!)),:contains(!)": [
+    [
+      {
+        "type": "pseudo",
+        "name": "has",
+        "data": [
+          [
+            {
+              "type": "universal"
+            }
+          ],
+          [
+            {
+              "type": "pseudo",
+              "name": "contains",
+              "data": "!"
+            }
+          ]
+        ]
+      }
+    ],
+    [
+      {
+        "type": "pseudo",
+        "name": "contains",
+        "data": "!"
+      }
+    ]
+  ],
+  ":has(:has(*))": [
+    [
+      {
+        "type": "pseudo",
+        "name": "has",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "has",
+              "data": [
+                [
+                  {
+                    "type": "universal"
+                  }
+                ]
+              ]
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  ":has(:nth-child(-1n-1))": [
+    [
+      {
+        "type": "pseudo",
+        "name": "has",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "nth-child",
+              "data": "-1n-1"
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  ":has(a),:nth-child(1)": [
+    [
+      {
+        "type": "pseudo",
+        "name": "has",
+        "data": [
+          [
+            {
+              "type": "tag",
+              "name": "a"
+            }
+          ]
+        ]
+      }
+    ],
+    [
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "1"
+      }
+    ]
+  ],
+  ":has(div,span)": [
+    [
+      {
+        "type": "pseudo",
+        "name": "has",
+        "data": [
+          [
+            {
+              "type": "tag",
+              "name": "div"
+            }
+          ],
+          [
+            {
+              "type": "tag",
+              "name": "span"
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  ":has(option)": [
+    [
+      {
+        "type": "pseudo",
+        "name": "has",
+        "data": [
+          [
+            {
+              "type": "tag",
+              "name": "option"
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  ":header": [
+    [
+      {
+        "type": "pseudo",
+        "name": "header",
+        "data": null
+      }
+    ]
+  ],
+  ":humanoid": [
+    [
+      {
+        "type": "pseudo",
+        "name": "humanoid",
+        "data": null
+      }
+    ]
+  ],
+  ":image,:input,:submit": [
+    [
+      {
+        "type": "pseudo",
+        "name": "image",
+        "data": null
+      }
+    ],
+    [
+      {
+        "type": "pseudo",
+        "name": "input",
+        "data": null
+      }
+    ],
+    [
+      {
+        "type": "pseudo",
+        "name": "submit",
+        "data": null
+      }
+    ]
+  ],
+  ":input": [
+    [
+      {
+        "type": "pseudo",
+        "name": "input",
+        "data": null
+      }
+    ]
+  ],
+  ":input:not(:image,:input,:submit)": [
+    [
+      {
+        "type": "pseudo",
+        "name": "input",
+        "data": null
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "image",
+              "data": null
+            }
+          ],
+          [
+            {
+              "type": "pseudo",
+              "name": "input",
+              "data": null
+            }
+          ],
+          [
+            {
+              "type": "pseudo",
+              "name": "submit",
+              "data": null
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  ":input[data-pos=':first']": [
+    [
+      {
+        "type": "pseudo",
+        "name": "input",
+        "data": null
+      },
+      {
+        "type": "attribute",
+        "name": "data-pos",
+        "action": "equals",
+        "value": ":first",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  ":last-child": [
+    [
+      {
+        "type": "pseudo",
+        "name": "last-child",
+        "data": null
+      }
+    ]
+  ],
+  ":last-child(n)": [
+    [
+      {
+        "type": "pseudo",
+        "name": "last-child",
+        "data": "n"
+      }
+    ]
+  ],
+  ":last-last-child": [
+    [
+      {
+        "type": "pseudo",
+        "name": "last-last-child",
+        "data": null
+      }
+    ]
+  ],
+  ":last-of-type": [
+    [
+      {
+        "type": "pseudo",
+        "name": "last-of-type",
+        "data": null
+      }
+    ]
+  ],
+  ":not(*)": [
+    [
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "universal"
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  ":not(:not(*))": [
+    [
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "not",
+              "data": [
+                [
+                  {
+                    "type": "universal"
+                  }
+                ]
+              ]
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  ":not(:not(:not(*)))": [
+    [
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "not",
+              "data": [
+                [
+                  {
+                    "type": "pseudo",
+                    "name": "not",
+                    "data": [
+                      [
+                        {
+                          "type": "universal"
+                        }
+                      ]
+                    ]
+                  }
+                ]
+              ]
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  ":not(:nth-child(-1n-1))": [
+    [
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "nth-child",
+              "data": "-1n-1"
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  ":not(:selected)": [
+    [
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "selected",
+              "data": null
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  ":not(code)": [
+    [
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "tag",
+              "name": "code"
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  ":nth-child": [
+    [
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": null
+      }
+    ]
+  ],
+  ":nth-child(- 1n)": [
+    [
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "- 1n"
+      }
+    ]
+  ],
+  ":nth-child(-)": [
+    [
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "-"
+      }
+    ]
+  ],
+  ":nth-child(-1 n)": [
+    [
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "-1 n"
+      }
+    ]
+  ],
+  ":nth-child(-1n-1)": [
+    [
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "-1n-1"
+      }
+    ]
+  ],
+  ":nth-child(1)": [
+    [
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "1"
+      }
+    ]
+  ],
+  ":nth-child(2+0)": [
+    [
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "2+0"
+      }
+    ]
+  ],
+  ":nth-child(2n+-0)": [
+    [
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "2n+-0"
+      }
+    ]
+  ],
+  ":nth-child(asdf)": [
+    [
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "asdf"
+      }
+    ]
+  ],
+  ":nth-last-child(1)": [
+    [
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "1"
+      }
+    ]
+  ],
+  ":nth-last-last-child(1)": [
+    [
+      {
+        "type": "pseudo",
+        "name": "nth-last-last-child",
+        "data": "1"
+      }
+    ]
+  ],
+  ":nth-last-of-type(-1)": [
+    [
+      {
+        "type": "pseudo",
+        "name": "nth-last-of-type",
+        "data": "-1"
+      }
+    ]
+  ],
+  ":nth-last-of-type(1)": [
+    [
+      {
+        "type": "pseudo",
+        "name": "nth-last-of-type",
+        "data": "1"
+      }
+    ]
+  ],
+  ":nth-of-type(-1)": [
+    [
+      {
+        "type": "pseudo",
+        "name": "nth-of-type",
+        "data": "-1"
+      }
+    ]
+  ],
+  ":nth-of-type(1)": [
+    [
+      {
+        "type": "pseudo",
+        "name": "nth-of-type",
+        "data": "1"
+      }
+    ]
+  ],
+  ":only-child(n)": [
+    [
+      {
+        "type": "pseudo",
+        "name": "only-child",
+        "data": "n"
+      }
+    ]
+  ],
+  ":only-last-child": [
+    [
+      {
+        "type": "pseudo",
+        "name": "only-last-child",
+        "data": null
+      }
+    ]
+  ],
+  ":parent": [
+    [
+      {
+        "type": "pseudo",
+        "name": "parent",
+        "data": null
+      }
+    ]
+  ],
+  ":reset": [
+    [
+      {
+        "type": "pseudo",
+        "name": "reset",
+        "data": null
+      }
+    ]
+  ],
+  ":root": [
+    [
+      {
+        "type": "pseudo",
+        "name": "root",
+        "data": null
+      }
+    ]
+  ],
+  ":selected": [
+    [
+      {
+        "type": "pseudo",
+        "name": "selected",
+        "data": null
+      }
+    ]
+  ],
+  ":submit": [
+    [
+      {
+        "type": "pseudo",
+        "name": "submit",
+        "data": null
+      }
+    ]
+  ],
+  ":visble": [
+    [
+      {
+        "type": "pseudo",
+        "name": "visble",
+        "data": null
+      }
+    ]
+  ],
+  ">.a>#booshTest": [
+    [
+      {
+        "type": "child"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "a",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "booshTest",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[action$='formaction']": [
+    [
+      {
+        "type": "attribute",
+        "name": "action",
+        "action": "end",
+        "value": "formaction",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[action='form:action']": [
+    [
+      {
+        "type": "attribute",
+        "name": "action",
+        "action": "equals",
+        "value": "form:action",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[action='form:action']:button": [
+    [
+      {
+        "type": "attribute",
+        "name": "action",
+        "action": "equals",
+        "value": "form:action",
+        "ignoreCase": false
+      },
+      {
+        "type": "pseudo",
+        "name": "button",
+        "data": null
+      }
+    ]
+  ],
+  "[attr=boosh]": [
+    [
+      {
+        "type": "attribute",
+        "name": "attr",
+        "action": "equals",
+        "value": "boosh",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[attr=foo]": [
+    [
+      {
+        "type": "attribute",
+        "name": "attr",
+        "action": "equals",
+        "value": "foo",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[attr]": [
+    [
+      {
+        "type": "attribute",
+        "name": "attr",
+        "action": "exists",
+        "value": "",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[class*=component]": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "any",
+        "value": "component",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[class~=brothers]": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "brothers",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[class~=internal]": [
+    [
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "internal",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[constructor='foo']": [
+    [
+      {
+        "type": "attribute",
+        "name": "constructor",
+        "action": "equals",
+        "value": "foo",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[constructor]": [
+    [
+      {
+        "type": "attribute",
+        "name": "constructor",
+        "action": "exists",
+        "value": "",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[foo]": [
+    [
+      {
+        "type": "attribute",
+        "name": "foo",
+        "action": "exists",
+        "value": "",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[foo^=\"bar\"]": [
+    [
+      {
+        "type": "attribute",
+        "name": "foo",
+        "action": "start",
+        "value": "bar",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[href=\"#\"]": [
+    [
+      {
+        "type": "attribute",
+        "name": "href",
+        "action": "equals",
+        "value": "#",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[href]": [
+    [
+      {
+        "type": "attribute",
+        "name": "href",
+        "action": "exists",
+        "value": "",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[id*=option1]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "any",
+        "value": "option1",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[id*=option1][type!=checkbox]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "any",
+        "value": "option1",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "type",
+        "action": "not",
+        "value": "checkbox",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[id='select1'] *:not(:last-child), [id='select2'] *:not(:last-child)": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "universal"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "last-child",
+              "data": null
+            }
+          ]
+        ]
+      }
+    ],
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "select2",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "universal"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "last-child",
+              "data": null
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "[id=option1a]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "option1a",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[id]": [
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "exists",
+        "value": "",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[multiple]": [
+    [
+      {
+        "type": "attribute",
+        "name": "multiple",
+        "action": "exists",
+        "value": "",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[name='id']": [
+    [
+      {
+        "type": "attribute",
+        "name": "name",
+        "action": "equals",
+        "value": "id",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[name='select1']": [
+    [
+      {
+        "type": "attribute",
+        "name": "name",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[name=div]": [
+    [
+      {
+        "type": "attribute",
+        "name": "name",
+        "action": "equals",
+        "value": "div",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[name=example]": [
+    [
+      {
+        "type": "attribute",
+        "name": "name",
+        "action": "equals",
+        "value": "example",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[name=prop2]": [
+    [
+      {
+        "type": "attribute",
+        "name": "name",
+        "action": "equals",
+        "value": "prop2",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[name=select1]": [
+    [
+      {
+        "type": "attribute",
+        "name": "name",
+        "action": "equals",
+        "value": "select1",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[name=tName1]": [
+    [
+      {
+        "type": "attribute",
+        "name": "name",
+        "action": "equals",
+        "value": "tName1",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[name=tName2]": [
+    [
+      {
+        "type": "attribute",
+        "name": "name",
+        "action": "equals",
+        "value": "tName2",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[rel$=\"nofollow\"]": [
+    [
+      {
+        "type": "attribute",
+        "name": "rel",
+        "action": "end",
+        "value": "nofollow",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[rel$=nofollow]": [
+    [
+      {
+        "type": "attribute",
+        "name": "rel",
+        "action": "end",
+        "value": "nofollow",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[rel^=external]": [
+    [
+      {
+        "type": "attribute",
+        "name": "rel",
+        "action": "start",
+        "value": "external",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[rel~=nofollow]": [
+    [
+      {
+        "type": "attribute",
+        "name": "rel",
+        "action": "element",
+        "value": "nofollow",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[test=]": [
+    [
+      {
+        "type": "attribute",
+        "name": "test",
+        "action": "equals",
+        "value": "",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[test^='']": [
+    [
+      {
+        "type": "attribute",
+        "name": "test",
+        "action": "start",
+        "value": "",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[title]": [
+    [
+      {
+        "type": "attribute",
+        "name": "title",
+        "action": "exists",
+        "value": "",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[type=checkbox]": [
+    [
+      {
+        "type": "attribute",
+        "name": "type",
+        "action": "equals",
+        "value": "checkbox",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[type=radio]": [
+    [
+      {
+        "type": "attribute",
+        "name": "type",
+        "action": "equals",
+        "value": "radio",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[watch='bar']": [
+    [
+      {
+        "type": "attribute",
+        "name": "watch",
+        "action": "equals",
+        "value": "bar",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[watch]": [
+    [
+      {
+        "type": "attribute",
+        "name": "watch",
+        "action": "exists",
+        "value": "",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "[xml\\:test]": [
+    [
+      {
+        "type": "attribute",
+        "name": "xml:test",
+        "action": "exists",
+        "value": "",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "a": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      }
+    ]
+  ],
+  "a#link_2.internal": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "link_2",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "internal",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "a,b": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      }
+    ],
+    [
+      {
+        "type": "tag",
+        "name": "b"
+      }
+    ]
+  ],
+  "a,b,div": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      }
+    ],
+    [
+      {
+        "type": "tag",
+        "name": "b"
+      }
+    ],
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      }
+    ]
+  ],
+  "a,p": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      }
+    ],
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      }
+    ]
+  ],
+  "a,p,b": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      }
+    ],
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      }
+    ],
+    [
+      {
+        "type": "tag",
+        "name": "b"
+      }
+    ]
+  ],
+  "a.GROUPS + code + a": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "GROUPS",
+        "ignoreCase": false
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "tag",
+        "name": "code"
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      }
+    ]
+  ],
+  "a.blog": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "blog",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "a.blog:not(.link)": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "blog",
+        "ignoreCase": false
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "attribute",
+              "name": "class",
+              "action": "element",
+              "value": "link",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "a.highlight.internal": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "highlight",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "internal",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "a.highlight.internal.nonexistent": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "highlight",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "internal",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "nonexistent",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "a.internal": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "internal",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "a.internal#link_2": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "internal",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "link_2",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "a.internal.highlight": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "internal",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "highlight",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "a.odd": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "odd",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "a:contains(\"(Link)\")": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "contains",
+        "data": "(Link)"
+      }
+    ]
+  ],
+  "a:contains('')": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "contains",
+        "data": ""
+      }
+    ]
+  ],
+  "a:contains('Google Groups (Link)')": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "contains",
+        "data": "Google Groups (Link)"
+      }
+    ]
+  ],
+  "a:contains((Link))": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "contains",
+        "data": "(Link)"
+      }
+    ]
+  ],
+  "a:contains(Google Groups (Link))": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "contains",
+        "data": "Google Groups (Link)"
+      }
+    ]
+  ],
+  "a:contains(Google Groups)": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "contains",
+        "data": "Google Groups"
+      }
+    ]
+  ],
+  "a:contains(Google)": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "contains",
+        "data": "Google"
+      }
+    ]
+  ],
+  "a:not([href=\"#\"])": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "attribute",
+              "name": "href",
+              "action": "equals",
+              "value": "#",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "a[class*=blog]:not(:has(*, :contains(!)), :contains(!)), br:contains(]), p:contains(]), :not(:empty):not(:parent)": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "any",
+        "value": "blog",
+        "ignoreCase": false
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "has",
+              "data": [
+                [
+                  {
+                    "type": "universal"
+                  }
+                ],
+                [
+                  {
+                    "type": "pseudo",
+                    "name": "contains",
+                    "data": "!"
+                  }
+                ]
+              ]
+            }
+          ],
+          [
+            {
+              "type": "pseudo",
+              "name": "contains",
+              "data": "!"
+            }
+          ]
+        ]
+      }
+    ],
+    [
+      {
+        "type": "tag",
+        "name": "br"
+      },
+      {
+        "type": "pseudo",
+        "name": "contains",
+        "data": "]"
+      }
+    ],
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "contains",
+        "data": "]"
+      }
+    ],
+    [
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "empty",
+              "data": null
+            }
+          ]
+        ]
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "parent",
+              "data": null
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "a[class~=\"internal\"]": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "internal",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "a[class~=external]:not([href=\"#\"])": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "external",
+        "ignoreCase": false
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "attribute",
+              "name": "href",
+              "action": "equals",
+              "value": "#",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "a[class~=external][href=\"#\"]": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "external",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "href",
+        "action": "equals",
+        "value": "#",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "a[class~=internal]": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "internal",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "a[href $= 'org/']": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "href",
+        "action": "end",
+        "value": "org/",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "a[href *= 'google']": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "href",
+        "action": "any",
+        "value": "google",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "a[href ^= 'http://www']": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "href",
+        "action": "start",
+        "value": "http://www",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "a[href*=#]": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "href",
+        "action": "any",
+        "value": "#",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "a[href=\"#\"]": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "href",
+        "action": "equals",
+        "value": "#",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "a[href]": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "href",
+        "action": "exists",
+        "value": "",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "a[rel^=\"external\"]": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "rel",
+        "action": "start",
+        "value": "external",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "a[rel^='external']": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "rel",
+        "action": "start",
+        "value": "external",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "a[rel^=external]": [
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "rel",
+        "action": "start",
+        "value": "external",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "body": [
+    [
+      {
+        "type": "tag",
+        "name": "body"
+      }
+    ]
+  ],
+  "body div div div": [
+    [
+      {
+        "type": "tag",
+        "name": "body"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      }
+    ]
+  ],
+  "body#body": [
+    [
+      {
+        "type": "tag",
+        "name": "body"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "body",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "body>div div div": [
+    [
+      {
+        "type": "tag",
+        "name": "body"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      }
+    ]
+  ],
+  "cite[title=\"hello world!\"]": [
+    [
+      {
+        "type": "tag",
+        "name": "cite"
+      },
+      {
+        "type": "attribute",
+        "name": "title",
+        "action": "equals",
+        "value": "hello world!",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "code": [
+    [
+      {
+        "type": "tag",
+        "name": "code"
+      }
+    ]
+  ],
+  "code > *": [
+    [
+      {
+        "type": "tag",
+        "name": "code"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "universal"
+      }
+    ]
+  ],
+  "component": [
+    [
+      {
+        "type": "tag",
+        "name": "component"
+      }
+    ]
+  ],
+  "component#seite1": [
+    [
+      {
+        "type": "tag",
+        "name": "component"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "seite1",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "div": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      }
+    ]
+  ],
+  "div #foo\\:bar": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "foo:bar",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "div #test\\.foo\\[5\\]bar": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "test.foo[5]bar",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "div #台北": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "台北",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "div .foo\\:bar": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "foo:bar",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "div .test\\.foo\\[5\\]bar": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "test.foo[5]bar",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "div .tokens[title=\"one two three #%\"]": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "tokens",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "title",
+        "action": "equals",
+        "value": "one two three #%",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "div .tokens[title=\"one two three #%\"] a[href$=foo] div": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "tokens",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "title",
+        "action": "equals",
+        "value": "one two three #%",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "href",
+        "action": "end",
+        "value": "foo",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      }
+    ]
+  ],
+  "div .tokens[title=\"one two\"]": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "tokens",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "title",
+        "action": "equals",
+        "value": "one two",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "div .tokens[title=\"one\"]": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "tokens",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "title",
+        "action": "equals",
+        "value": "one",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "div .tokens[title='one two three #%'] a": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "tokens",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "title",
+        "action": "equals",
+        "value": "one two three #%",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      }
+    ]
+  ],
+  "div .台北Táiběi": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "台北Táiběi",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "div > #nonexistent": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "nonexistent",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "div > div #tName1": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "tName1",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "div > span": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "span"
+      }
+    ]
+  ],
+  "div ~ #level2_3": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level2_3",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "div ~ #level3_2": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level3_2",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "div#attr-child-boosh[attr=boosh]": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "attr-child-boosh",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "attr",
+        "action": "equals",
+        "value": "boosh",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "div#attr-test3.found.you[title=\"whatup duders\"]": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "attr-test3",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "found",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "you",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "title",
+        "action": "equals",
+        "value": "whatup duders",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "div#blargh": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "blargh",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "div#fixtures > div a": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "fixtures",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      }
+    ]
+  ],
+  "div#fixtures div ~ a div": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "fixtures",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      }
+    ]
+  ],
+  "div#fixtures p": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "fixtures",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      }
+    ]
+  ],
+  "div#fixtures>div a": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "fixtures",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      }
+    ]
+  ],
+  "div#form": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "form",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "div#grandfather > div": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "grandfather",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      }
+    ]
+  ],
+  "div,span": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      }
+    ],
+    [
+      {
+        "type": "tag",
+        "name": "span"
+      }
+    ]
+  ],
+  "div.blah > p > a": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "blah",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      }
+    ]
+  ],
+  "div.brothers": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "brothers",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "div.brothers + div": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "brothers",
+        "ignoreCase": false
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      }
+    ]
+  ],
+  "div.brothers + div.brothers": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "brothers",
+        "ignoreCase": false
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "brothers",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "div.brothers:not(.brothers)": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "brothers",
+        "ignoreCase": false
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "attribute",
+              "name": "class",
+              "action": "element",
+              "value": "brothers",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "div.foo": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "foo",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "div.foo > span > a": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "foo",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "span"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      }
+    ]
+  ],
+  "div:has(div:not([id]))": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "pseudo",
+        "name": "has",
+        "data": [
+          [
+            {
+              "type": "tag",
+              "name": "div"
+            },
+            {
+              "type": "pseudo",
+              "name": "not",
+              "data": [
+                [
+                  {
+                    "type": "attribute",
+                    "name": "id",
+                    "action": "exists",
+                    "value": "",
+                    "ignoreCase": false
+                  }
+                ]
+              ]
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "div:not(.brothers)": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "attribute",
+              "name": "class",
+              "action": "element",
+              "value": "brothers",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "div:not([class~=brothers])": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "attribute",
+              "name": "class",
+              "action": "element",
+              "value": "brothers",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "div:not([id])": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "attribute",
+              "name": "id",
+              "action": "exists",
+              "value": "",
+              "ignoreCase": false
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "div[class$=men]": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "end",
+        "value": "men",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "div[class*=\"ers m\"]": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "any",
+        "value": "ers m",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "div[class^=bro]": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "start",
+        "value": "bro",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "div[class~=brothers]": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "brothers",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "div[class~=brothers].brothers": [
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "brothers",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "brothers",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "dl\tol": [
+    [
+      {
+        "type": "tag",
+        "name": "dl"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "ol"
+      }
+    ]
+  ],
+  "dl ol": [
+    [
+      {
+        "type": "tag",
+        "name": "dl"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "ol"
+      }
+    ]
+  ],
+  "elem:not(:has(*))": [
+    [
+      {
+        "type": "tag",
+        "name": "elem"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "has",
+              "data": [
+                [
+                  {
+                    "type": "universal"
+                  }
+                ]
+              ]
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "em[nopass~=\"copyright\"]": [
+    [
+      {
+        "type": "tag",
+        "name": "em"
+      },
+      {
+        "type": "attribute",
+        "name": "nopass",
+        "action": "element",
+        "value": "copyright",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "em[rel~=\"copyright\"]": [
+    [
+      {
+        "type": "tag",
+        "name": "em"
+      },
+      {
+        "type": "attribute",
+        "name": "rel",
+        "action": "element",
+        "value": "copyright",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "foo_bar": [
+    [
+      {
+        "type": "tag",
+        "name": "foo_bar"
+      }
+    ]
+  ],
+  "form": [
+    [
+      {
+        "type": "tag",
+        "name": "form"
+      }
+    ]
+  ],
+  "form > #foo\\:bar": [
+    [
+      {
+        "type": "tag",
+        "name": "form"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "foo:bar",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "form > #test\\.foo\\[5\\]bar": [
+    [
+      {
+        "type": "tag",
+        "name": "form"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "test.foo[5]bar",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "form > #台北": [
+    [
+      {
+        "type": "tag",
+        "name": "form"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "台北",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "form > .foo\\:bar": [
+    [
+      {
+        "type": "tag",
+        "name": "form"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "foo:bar",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "form > .test\\.foo\\[5\\]bar": [
+    [
+      {
+        "type": "tag",
+        "name": "form"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "test.foo[5]bar",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "form > .台北Táiběi": [
+    [
+      {
+        "type": "tag",
+        "name": "form"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "台北Táiběi",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "form label[for]": [
+    [
+      {
+        "type": "tag",
+        "name": "form"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "label"
+      },
+      {
+        "type": "attribute",
+        "name": "for",
+        "action": "exists",
+        "value": "",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "form:nth-last-child( 5 )": [
+    [
+      {
+        "type": "tag",
+        "name": "form"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": " 5 "
+      }
+    ]
+  ],
+  "form:nth-last-child(5)": [
+    [
+      {
+        "type": "tag",
+        "name": "form"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "5"
+      }
+    ]
+  ],
+  "form[title*=\"commas,\"], input[value=\"#commaOne,#commaTwo\"]": [
+    [
+      {
+        "type": "tag",
+        "name": "form"
+      },
+      {
+        "type": "attribute",
+        "name": "title",
+        "action": "any",
+        "value": "commas,",
+        "ignoreCase": false
+      }
+    ],
+    [
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "value",
+        "action": "equals",
+        "value": "#commaOne,#commaTwo",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "h1": [
+    [
+      {
+        "type": "tag",
+        "name": "h1"
+      }
+    ]
+  ],
+  "h1 ~ ul": [
+    [
+      {
+        "type": "tag",
+        "name": "h1"
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "tag",
+        "name": "ul"
+      }
+    ]
+  ],
+  "h1[CLASS]": [
+    [
+      {
+        "type": "tag",
+        "name": "h1"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "exists",
+        "value": "",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "h1[class]": [
+    [
+      {
+        "type": "tag",
+        "name": "h1"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "exists",
+        "value": "",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "h2\t,\r#qunit-fixture p\n": [
+    [
+      {
+        "type": "tag",
+        "name": "h2"
+      }
+    ],
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      }
+    ]
+  ],
+  "h2 , #qunit-fixture p": [
+    [
+      {
+        "type": "tag",
+        "name": "h2"
+      }
+    ],
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      }
+    ]
+  ],
+  "h2, #qunit-fixture p": [
+    [
+      {
+        "type": "tag",
+        "name": "h2"
+      }
+    ],
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      }
+    ]
+  ],
+  "h2, h1": [
+    [
+      {
+        "type": "tag",
+        "name": "h2"
+      }
+    ],
+    [
+      {
+        "type": "tag",
+        "name": "h1"
+      }
+    ]
+  ],
+  "h2,#qunit-fixture p": [
+    [
+      {
+        "type": "tag",
+        "name": "h2"
+      }
+    ],
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      }
+    ]
+  ],
+  "h2,#qunit-fixture p ": [
+    [
+      {
+        "type": "tag",
+        "name": "h2"
+      }
+    ],
+    [
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "qunit-fixture",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      }
+    ]
+  ],
+  "html": [
+    [
+      {
+        "type": "tag",
+        "name": "html"
+      }
+    ]
+  ],
+  "input": [
+    [
+      {
+        "type": "tag",
+        "name": "input"
+      }
+    ]
+  ],
+  "input[data-attr='\\01D306A']": [
+    [
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "data-attr",
+        "action": "equals",
+        "value": "𝌆A",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "input[data-comma=\"0,1\"]": [
+    [
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "data-comma",
+        "action": "equals",
+        "value": "0,1",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "input[data-comma='0,1']": [
+    [
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "data-comma",
+        "action": "equals",
+        "value": "0,1",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "input[data-pos=':first']": [
+    [
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "data-pos",
+        "action": "equals",
+        "value": ":first",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "input[data-pos=\\:first]": [
+    [
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "data-pos",
+        "action": "equals",
+        "value": ":first",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "input[id='idTest']": [
+    [
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "idTest",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "input[id=types_all]": [
+    [
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "types_all",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "input[name$='[bar]']": [
+    [
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "name",
+        "action": "end",
+        "value": "[bar]",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "input[name$='bar]']": [
+    [
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "name",
+        "action": "end",
+        "value": "bar]",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "input[name$='foo[bar]']": [
+    [
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "name",
+        "action": "end",
+        "value": "foo[bar]",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "input[name*='[bar]']": [
+    [
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "name",
+        "action": "any",
+        "value": "[bar]",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "input[name*='foo[bar]']": [
+    [
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "name",
+        "action": "any",
+        "value": "foo[bar]",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "input[name=\"action\"]": [
+    [
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "name",
+        "action": "equals",
+        "value": "action",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "input[name='action']": [
+    [
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "name",
+        "action": "equals",
+        "value": "action",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "input[name='foo[bar]']": [
+    [
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "name",
+        "action": "equals",
+        "value": "foo[bar]",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "input[name='types[]']": [
+    [
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "name",
+        "action": "equals",
+        "value": "types[]",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "input[name=action]": [
+    [
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "name",
+        "action": "equals",
+        "value": "action",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "input[name=foo\\ bar]": [
+    [
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "name",
+        "action": "equals",
+        "value": "foo bar",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "input[name=foo\\.baz]": [
+    [
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "name",
+        "action": "equals",
+        "value": "foo.baz",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "input[name=foo\\[baz\\]]": [
+    [
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "name",
+        "action": "equals",
+        "value": "foo[baz]",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "input[name^='foo[']": [
+    [
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "name",
+        "action": "start",
+        "value": "foo[",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "input[name^='foo[bar]']": [
+    [
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "name",
+        "action": "start",
+        "value": "foo[bar]",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "input[title=\"Don't click me\"]": [
+    [
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "title",
+        "action": "equals",
+        "value": "Don't click me",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "input[value=Test]": [
+    [
+      {
+        "type": "tag",
+        "name": "input"
+      },
+      {
+        "type": "attribute",
+        "name": "value",
+        "action": "equals",
+        "value": "Test",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "li": [
+    [
+      {
+        "type": "tag",
+        "name": "li"
+      }
+    ]
+  ],
+  "li ~ li": [
+    [
+      {
+        "type": "tag",
+        "name": "li"
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "tag",
+        "name": "li"
+      }
+    ]
+  ],
+  "li#attr-child-boosh[attr=boosh]": [
+    [
+      {
+        "type": "tag",
+        "name": "li"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "attr-child-boosh",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "attr",
+        "action": "equals",
+        "value": "boosh",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "li#item_1.first": [
+    [
+      {
+        "type": "tag",
+        "name": "li"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "item_1",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "first",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "li#item_1.first.nonexistent": [
+    [
+      {
+        "type": "tag",
+        "name": "li"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "item_1",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "first",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "nonexistent",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "li#item_1.nonexistent": [
+    [
+      {
+        "type": "tag",
+        "name": "li"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "item_1",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "nonexistent",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "li#item_3[class]": [
+    [
+      {
+        "type": "tag",
+        "name": "li"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "item_3",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "exists",
+        "value": "",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "li:contains(hello)": [
+    [
+      {
+        "type": "tag",
+        "name": "li"
+      },
+      {
+        "type": "pseudo",
+        "name": "contains",
+        "data": "hello"
+      }
+    ]
+  ],
+  "li:contains(human)": [
+    [
+      {
+        "type": "tag",
+        "name": "li"
+      },
+      {
+        "type": "pseudo",
+        "name": "contains",
+        "data": "human"
+      }
+    ]
+  ],
+  "li:contains(humans)": [
+    [
+      {
+        "type": "tag",
+        "name": "li"
+      },
+      {
+        "type": "pseudo",
+        "name": "contains",
+        "data": "humans"
+      }
+    ]
+  ],
+  "li:not(:first-child)": [
+    [
+      {
+        "type": "tag",
+        "name": "li"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "pseudo",
+              "name": "first-child",
+              "data": null
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "meta property thing": [
+    [
+      {
+        "type": "tag",
+        "name": "meta"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "property"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "thing"
+      }
+    ]
+  ],
+  "nonexistent": [
+    [
+      {
+        "type": "tag",
+        "name": "nonexistent"
+      }
+    ]
+  ],
+  "ol > li[attr=\"boosh\"]:last-child": [
+    [
+      {
+        "type": "tag",
+        "name": "ol"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "li"
+      },
+      {
+        "type": "attribute",
+        "name": "attr",
+        "action": "equals",
+        "value": "boosh",
+        "ignoreCase": false
+      },
+      {
+        "type": "pseudo",
+        "name": "last-child",
+        "data": null
+      }
+    ]
+  ],
+  "ol li": [
+    [
+      {
+        "type": "tag",
+        "name": "ol"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "li"
+      }
+    ]
+  ],
+  "ol ol li#attr-child-boosh[attr=boosh]": [
+    [
+      {
+        "type": "tag",
+        "name": "ol"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "ol"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "li"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "attr-child-boosh",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "attr",
+        "action": "equals",
+        "value": "boosh",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "ol#list li#attr-child-boosh[attr=boosh]": [
+    [
+      {
+        "type": "tag",
+        "name": "ol"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "list",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "li"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "attr-child-boosh",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "attr",
+        "action": "equals",
+        "value": "boosh",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "ol#list>li#attr-child-boosh[attr=boosh]": [
+    [
+      {
+        "type": "tag",
+        "name": "ol"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "list",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "li"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "attr-child-boosh",
+        "ignoreCase": false
+      },
+      {
+        "type": "attribute",
+        "name": "attr",
+        "action": "equals",
+        "value": "boosh",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "ol:contains(human)": [
+    [
+      {
+        "type": "tag",
+        "name": "ol"
+      },
+      {
+        "type": "pseudo",
+        "name": "contains",
+        "data": "human"
+      }
+    ]
+  ],
+  "ol:contains(humans)": [
+    [
+      {
+        "type": "tag",
+        "name": "ol"
+      },
+      {
+        "type": "pseudo",
+        "name": "contains",
+        "data": "humans"
+      }
+    ]
+  ],
+  "ol:empty": [
+    [
+      {
+        "type": "tag",
+        "name": "ol"
+      },
+      {
+        "type": "pseudo",
+        "name": "empty",
+        "data": null
+      }
+    ]
+  ],
+  "ol>li": [
+    [
+      {
+        "type": "tag",
+        "name": "ol"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "li"
+      }
+    ]
+  ],
+  "ol>li+li": [
+    [
+      {
+        "type": "tag",
+        "name": "ol"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "li"
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "tag",
+        "name": "li"
+      }
+    ]
+  ],
+  "option": [
+    [
+      {
+        "type": "tag",
+        "name": "option"
+      }
+    ]
+  ],
+  "option:first-child:contains('o')": [
+    [
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "first-child",
+        "data": null
+      },
+      {
+        "type": "pseudo",
+        "name": "contains",
+        "data": "o"
+      }
+    ]
+  ],
+  "p": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      }
+    ]
+  ],
+  "p + p": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      }
+    ]
+  ],
+  "p .blog": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "blog",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "p < div": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "parent"
+      },
+      {
+        "type": "tag",
+        "name": "div"
+      }
+    ]
+  ],
+  "p > * > *": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "universal"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "universal"
+      }
+    ]
+  ],
+  "p > a": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      }
+    ]
+  ],
+  "p > a.blog": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "blog",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "p >a": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      }
+    ]
+  ],
+  "p a[href*=#]": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "href",
+        "action": "any",
+        "value": "#",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "p a[href^=#]": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      },
+      {
+        "type": "attribute",
+        "name": "href",
+        "action": "start",
+        "value": "#",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "p#blargh": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "blargh",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "p#firstp + p": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "firstp",
+        "ignoreCase": false
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      }
+    ]
+  ],
+  "p#strong": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "strong",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "p, div p": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      }
+    ],
+    [
+      {
+        "type": "tag",
+        "name": "div"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      }
+    ]
+  ],
+  "p,a": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      }
+    ],
+    [
+      {
+        "type": "tag",
+        "name": "a"
+      }
+    ]
+  ],
+  "p.first > a": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "first",
+        "ignoreCase": false
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      }
+    ]
+  ],
+  "p.foo": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "foo",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "p.odd": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "odd",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "p:contains(bar)": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "contains",
+        "data": "bar"
+      }
+    ]
+  ],
+  "p:contains(id=\"foo\")[id!=')']": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "contains",
+        "data": "id=\"foo\""
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "not",
+        "value": ")",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "p:contains(id=\"foo\")[id!=\\)]": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "contains",
+        "data": "id=\"foo\""
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "not",
+        "value": ")",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "p:first-child": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "first-child",
+        "data": null
+      }
+    ]
+  ],
+  "p:has( a )": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "has",
+        "data": [
+          [
+            {
+              "type": "tag",
+              "name": "a"
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "p:has(a)": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "has",
+        "data": [
+          [
+            {
+              "type": "tag",
+              "name": "a"
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "p:last-child": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "last-child",
+        "data": null
+      }
+    ]
+  ],
+  "p:not(a,p)": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "tag",
+              "name": "a"
+            }
+          ],
+          [
+            {
+              "type": "tag",
+              "name": "p"
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "p:not(a,p,b)": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "tag",
+              "name": "a"
+            }
+          ],
+          [
+            {
+              "type": "tag",
+              "name": "p"
+            }
+          ],
+          [
+            {
+              "type": "tag",
+              "name": "b"
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "p:not(p)": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "tag",
+              "name": "p"
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "p:not(p,a)": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "not",
+        "data": [
+          [
+            {
+              "type": "tag",
+              "name": "p"
+            }
+          ],
+          [
+            {
+              "type": "tag",
+              "name": "a"
+            }
+          ]
+        ]
+      }
+    ]
+  ],
+  "p:nth-child( 1 )": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": " 1 "
+      }
+    ]
+  ],
+  "p:nth-child(1)": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "1"
+      }
+    ]
+  ],
+  "p:nth-child(2)": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "2"
+      }
+    ]
+  ],
+  "p> a": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      }
+    ]
+  ],
+  "p>a": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "a"
+      }
+    ]
+  ],
+  "p[lang=en] + p": [
+    [
+      {
+        "type": "tag",
+        "name": "p"
+      },
+      {
+        "type": "attribute",
+        "name": "lang",
+        "action": "equals",
+        "value": "en",
+        "ignoreCase": false
+      },
+      {
+        "type": "adjacent"
+      },
+      {
+        "type": "tag",
+        "name": "p"
+      }
+    ]
+  ],
+  "param": [
+    [
+      {
+        "type": "tag",
+        "name": "param"
+      }
+    ]
+  ],
+  "property[name=prop2]": [
+    [
+      {
+        "type": "tag",
+        "name": "property"
+      },
+      {
+        "type": "attribute",
+        "name": "name",
+        "action": "equals",
+        "value": "prop2",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "select": [
+    [
+      {
+        "type": "tag",
+        "name": "select"
+      }
+    ]
+  ],
+  "select[name='select2'] option:selected": [
+    [
+      {
+        "type": "tag",
+        "name": "select"
+      },
+      {
+        "type": "attribute",
+        "name": "name",
+        "action": "equals",
+        "value": "select2",
+        "ignoreCase": false
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "option"
+      },
+      {
+        "type": "pseudo",
+        "name": "selected",
+        "data": null
+      }
+    ]
+  ],
+  "soap\\:Envelope": [
+    [
+      {
+        "type": "tag",
+        "name": "soap:envelope"
+      }
+    ]
+  ],
+  "span": [
+    [
+      {
+        "type": "tag",
+        "name": "span"
+      }
+    ]
+  ],
+  "span > span": [
+    [
+      {
+        "type": "tag",
+        "name": "span"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "span"
+      }
+    ]
+  ],
+  "span span": [
+    [
+      {
+        "type": "tag",
+        "name": "span"
+      },
+      {
+        "type": "descendant"
+      },
+      {
+        "type": "tag",
+        "name": "span"
+      }
+    ]
+  ],
+  "span ~ #level3_2": [
+    [
+      {
+        "type": "tag",
+        "name": "span"
+      },
+      {
+        "type": "sibling"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "level3_2",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "span#dupL1": [
+    [
+      {
+        "type": "tag",
+        "name": "span"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "dupL1",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "span.span_bar": [
+    [
+      {
+        "type": "tag",
+        "name": "span"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "span_bar",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "span.span_foo": [
+    [
+      {
+        "type": "tag",
+        "name": "span"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "span_foo",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "span.span_wtf": [
+    [
+      {
+        "type": "tag",
+        "name": "span"
+      },
+      {
+        "type": "attribute",
+        "name": "class",
+        "action": "element",
+        "value": "span_wtf",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "span:empty > *": [
+    [
+      {
+        "type": "tag",
+        "name": "span"
+      },
+      {
+        "type": "pseudo",
+        "name": "empty",
+        "data": null
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "universal"
+      }
+    ]
+  ],
+  "span:first-child": [
+    [
+      {
+        "type": "tag",
+        "name": "span"
+      },
+      {
+        "type": "pseudo",
+        "name": "first-child",
+        "data": null
+      }
+    ]
+  ],
+  "span:nth-child(5)": [
+    [
+      {
+        "type": "tag",
+        "name": "span"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "5"
+      }
+    ]
+  ],
+  "span[lang=中文]": [
+    [
+      {
+        "type": "tag",
+        "name": "span"
+      },
+      {
+        "type": "attribute",
+        "name": "lang",
+        "action": "equals",
+        "value": "中文",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "strong": [
+    [
+      {
+        "type": "tag",
+        "name": "strong"
+      }
+    ]
+  ],
+  "strong#strong": [
+    [
+      {
+        "type": "tag",
+        "name": "strong"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "strong",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "tostring#toString": [
+    [
+      {
+        "type": "tag",
+        "name": "tostring"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "toString",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "ul > li": [
+    [
+      {
+        "type": "tag",
+        "name": "ul"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "li"
+      }
+    ]
+  ],
+  "ul > li:first-child": [
+    [
+      {
+        "type": "tag",
+        "name": "ul"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "li"
+      },
+      {
+        "type": "pseudo",
+        "name": "first-child",
+        "data": null
+      }
+    ]
+  ],
+  "ul > li:last-child": [
+    [
+      {
+        "type": "tag",
+        "name": "ul"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "li"
+      },
+      {
+        "type": "pseudo",
+        "name": "last-child",
+        "data": null
+      }
+    ]
+  ],
+  "ul > li:nth-child(1)": [
+    [
+      {
+        "type": "tag",
+        "name": "ul"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "li"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "1"
+      }
+    ]
+  ],
+  "ul > li:nth-child(2n)": [
+    [
+      {
+        "type": "tag",
+        "name": "ul"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "li"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "2n"
+      }
+    ]
+  ],
+  "ul > li:nth-child(2n+1)": [
+    [
+      {
+        "type": "tag",
+        "name": "ul"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "li"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "2n+1"
+      }
+    ]
+  ],
+  "ul > li:nth-child(even)": [
+    [
+      {
+        "type": "tag",
+        "name": "ul"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "li"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "even"
+      }
+    ]
+  ],
+  "ul > li:nth-child(n)": [
+    [
+      {
+        "type": "tag",
+        "name": "ul"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "li"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "n"
+      }
+    ]
+  ],
+  "ul > li:nth-child(n-128)": [
+    [
+      {
+        "type": "tag",
+        "name": "ul"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "li"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "n-128"
+      }
+    ]
+  ],
+  "ul > li:nth-child(odd)": [
+    [
+      {
+        "type": "tag",
+        "name": "ul"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "li"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-child",
+        "data": "odd"
+      }
+    ]
+  ],
+  "ul > li:nth-last-child(1)": [
+    [
+      {
+        "type": "tag",
+        "name": "ul"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "li"
+      },
+      {
+        "type": "pseudo",
+        "name": "nth-last-child",
+        "data": "1"
+      }
+    ]
+  ],
+  "ul#first": [
+    [
+      {
+        "type": "tag",
+        "name": "ul"
+      },
+      {
+        "type": "attribute",
+        "name": "id",
+        "action": "equals",
+        "value": "first",
+        "ignoreCase": false
+      }
+    ]
+  ],
+  "ul:empty": [
+    [
+      {
+        "type": "tag",
+        "name": "ul"
+      },
+      {
+        "type": "pseudo",
+        "name": "empty",
+        "data": null
+      }
+    ]
+  ],
+  "ul>li": [
+    [
+      {
+        "type": "tag",
+        "name": "ul"
+      },
+      {
+        "type": "child"
+      },
+      {
+        "type": "tag",
+        "name": "li"
+      }
+    ]
+  ]
+}
\ No newline at end of file
diff --git a/tests/test.js b/tests/test.js
new file mode 100644
index 0000000..aa34b70
--- /dev/null
+++ b/tests/test.js
@@ -0,0 +1,392 @@
+var assert = require("assert"),
+    parse = require("../");
+
+var tests = [
+	//tag names
+	[
+		"div",
+		[
+			[
+				{
+					"type": "tag",
+					"name": "div"
+				}
+			]
+		],
+		"simple tag"
+	],
+	[
+		"*",
+		[
+			[
+				{
+					"type": "universal"
+				}
+			]
+		],
+		"universal"
+	],
+
+	//traversal
+	[
+		"div div",
+		[
+			[
+				{
+					"type": "tag",
+					"name": "div"
+				},
+				{
+					"type": "descendant"
+				},
+				{
+					"type": "tag",
+					"name": "div"
+				}
+			]
+		],
+		"descendant"
+	],
+	[
+		"div\t \n \tdiv",
+		[
+			[
+				{
+					"type": "tag",
+					"name": "div"
+				},
+				{
+					"type": "descendant"
+				},
+				{
+					"type": "tag",
+					"name": "div"
+				}
+			]
+		],
+		"descendant /w whitespace"
+	],
+	[
+		"div + div",
+		[
+			[
+				{
+					"type": "tag",
+					"name": "div"
+				},
+				{
+					"type": "adjacent"
+				},
+				{
+					"type": "tag",
+					"name": "div"
+				}
+			]
+		],
+		"adjacent"
+	],
+	[
+		"div ~ div",
+		[
+			[
+				{
+					"type": "tag",
+					"name": "div"
+				},
+				{
+					"type": "sibling"
+				},
+				{
+					"type": "tag",
+					"name": "div"
+				}
+			]
+		],
+		"sibling"
+	],
+	[
+		"p < div",
+		[
+			[
+				{
+					"type": "tag",
+					"name": "p"
+				},
+				{
+					"type": "parent"
+				},
+				{
+					"type": "tag",
+					"name": "div"
+				}
+			]
+		],
+		"parent"
+	],
+
+
+	//Escaped whitespace
+	[
+		"#\\  > a ",
+		[
+			[
+				{
+					"type": "attribute",
+					"action": "equals",
+					"name": "id",
+					"value": " ",
+					"ignoreCase": false
+				},
+				{
+					"type": "child"
+				},
+				{
+					"type": "tag",
+					"name": "a"
+				}
+			]
+		],
+		"Space between escaped space and combinator"
+	],
+	[
+		".\\  ",
+		[
+			[
+				{
+					"type": "attribute",
+					"name": "class",
+					"action": "element",
+					"value": " ",
+					"ignoreCase": false
+				}
+			]
+		],
+		"Space after escaped space"
+	],
+	[
+		"\\61 ",
+		[
+			[
+				{
+					"type": "tag",
+					"name": "a"
+				}
+			]
+		],
+		"Numeric escape with space (BMP)"
+	],
+	[
+		"\\1d306\\01d306",
+		[
+			[
+				{
+					"type": "tag",
+					"name": "\uD834\uDF06\uD834\uDF06"
+				}
+			]
+		],
+		"Numeric escape (outside BMP)"
+	],
+
+
+	//attributes
+	[
+		"[name^=\"foo[\"]",
+		[
+			[
+				{
+					"type": "attribute",
+					"name": "name",
+					"action": "start",
+					"value": "foo[",
+					"ignoreCase": false
+				}
+			]
+		],
+		"quoted attribute"
+	],
+	[
+		"[name^=\"foo[bar]\"]",
+		[
+			[
+				{
+					"type": "attribute",
+					"name": "name",
+					"action": "start",
+					"value": "foo[bar]",
+					"ignoreCase": false
+				}
+			]
+		],
+		"quoted attribute"
+	],
+	[
+		"[name$=\"[bar]\"]",
+		[
+			[
+				{
+					"type": "attribute",
+					"name": "name",
+					"action": "end",
+					"value": "[bar]",
+					"ignoreCase": false
+				}
+			]
+		],
+		"quoted attribute"
+	],
+	[
+		"[href *= \"google\"]",
+		[
+			[
+				{
+					"type": "attribute",
+					"name": "href",
+					"action": "any",
+					"value": "google",
+					"ignoreCase": false
+				}
+			]
+		],
+		"quoted attribute with spaces"
+	],
+	[
+		"[name=foo\\.baz]",
+		[
+			[
+				{
+					"type": "attribute",
+					"name": "name",
+					"action": "equals",
+					"value": "foo.baz",
+					"ignoreCase": false
+				}
+			]
+		],
+		"attribute with escaped dot"
+	],
+	[
+		"[name=foo\\[bar\\]]",
+		[
+			[
+				{
+					"type": "attribute",
+					"name": "name",
+					"action": "equals",
+					"value": "foo[bar]",
+					"ignoreCase": false
+				}
+			]
+		],
+		"attribute with escaped square brackets"
+	],
+	[
+		"[xml\\:test]",
+		[
+			[
+				{
+					"type": "attribute",
+					"name": "xml:test",
+					"action": "exists",
+					"value": "",
+					"ignoreCase": false
+				}
+			]
+		],
+		"escaped attribute"
+	],
+	[
+		"[name='foo ~ < > , bar' i]",
+		[
+			[
+				{
+					"type": "attribute",
+					"name": "name",
+					"action": "equals",
+					"value": "foo ~ < > , bar",
+					"ignoreCase": true
+				}
+			]
+		],
+		"attribute with previously normalized characters"
+	],
+
+
+
+	//pseudo selectors
+	[
+		":foo",
+		[
+			[
+				{
+					"type": "pseudo",
+					"name": "foo",
+					"data": null
+				}
+			]
+		],
+		"pseudo selector without any data"
+	],
+	[
+		":bar(baz)",
+		[
+			[
+				{
+					"type": "pseudo",
+					"name": "bar",
+					"data": "baz"
+				}
+			]
+		],
+		"pseudo selector with data"
+	],
+	[
+		":contains(\"(foo)\")",
+		[
+			[
+				{
+					"type": "pseudo",
+					"name": "contains",
+					"data": "(foo)"
+				}
+			]
+		],
+		"pseudo selector with data"
+	],
+
+	//multiple selectors
+	[
+		"a , b",
+		[
+			[
+				{
+					"type": "tag",
+					"name": "a"
+				}
+			],
+			[
+				{
+					"type": "tag",
+					"name": "b"
+				}
+			]
+		],
+		"multiple selectors"
+	]
+];
+
+tests.forEach(function(arr, i){
+	arr[0] = parse(arr[0]);
+	assert.deepEqual.apply(null, arr);
+	console.log("\t%d: '%s' passed", i + 1, arr[2]);
+});
+
+console.log("\nCollected selectors (qwery, sizzle, nwmatcher)...");
+
+var out = require("./out.json");
+
+Object.keys(out).forEach(function(s){
+	assert.deepEqual(parse(s), out[s], s);
+});
+
+console.log("Passed!");

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-css-what.git



More information about the Pkg-javascript-commits mailing list