Module: Hpricot
- Defined in:
- lib/hpricot/blankslate.rb,
lib/hpricot/tag.rb,
lib/hpricot/tags.rb,
lib/hpricot/parse.rb,
lib/hpricot/xchar.rb,
lib/hpricot/builder.rb,
lib/hpricot/inspect.rb,
lib/hpricot/modules.rb,
lib/hpricot/elements.rb,
lib/hpricot/htmlinfo.rb,
lib/hpricot/traverse.rb,
ext/hpricot_scan/hpricot_scan.c
Overview
Permission is granted for use, copying, modification, distribution, and distribution of modified versions of this work as long as the above copyright notice is included. ++
Defined Under Namespace
Modules: Builder, Container, Leaf, Node, Tag, Traverse, XChar Classes: Attributes, BlankSlate, BogusETag, CData, Comment, Context, CssProxy, Doc, DocType, ETag, Elem, Elements, EncodingError, Error, Name, ParseError, ProcIns, Text, XHTMLStrict, XHTMLTransitional, XMLDecl
Constant Summary collapse
- FORM_TAGS =
[ :form, :input, :select, :textarea ]
- SELF_CLOSING_TAGS =
[ :base, :meta, :link, :hr, :br, :param, :img, :area, :input, :col ]
- AttrCore =
Common sets of attributes.
[:id, :class, :style, :title]
- AttrI18n =
[:lang, 'xml:lang'.intern, :dir]
- AttrEvents =
[:onclick, :ondblclick, :onmousedown, :onmouseup, :onmouseover, :onmousemove, :onmouseout, :onkeypress, :onkeydown, :onkeyup]
- AttrFocus =
[:accesskey, :tabindex, :onfocus, :onblur]
- AttrHAlign =
[:align, :char, :charoff]
- AttrVAlign =
[:valign]
- Attrs =
AttrCore + AttrI18n + AttrEvents
- NamedCharacters =
:stopdoc:
{"AElig"=>198, "Aacute"=>193, "Acirc"=>194, "Agrave"=>192, "Alpha"=>913, "Aring"=>197, "Atilde"=>195, "Auml"=>196, "Beta"=>914, "Ccedil"=>199, "Chi"=>935, "Dagger"=>8225, "Delta"=>916, "ETH"=>208, "Eacute"=>201, "Ecirc"=>202, "Egrave"=>200, "Epsilon"=>917, "Eta"=>919, "Euml"=>203, "Gamma"=>915, "Iacute"=>205, "Icirc"=>206, "Igrave"=>204, "Iota"=>921, "Iuml"=>207, "Kappa"=>922, "Lambda"=>923, "Mu"=>924, "Ntilde"=>209, "Nu"=>925, "OElig"=>338, "Oacute"=>211, "Ocirc"=>212, "Ograve"=>210, "Omega"=>937, "Omicron"=>927, "Oslash"=>216, "Otilde"=>213, "Ouml"=>214, "Phi"=>934, "Pi"=>928, "Prime"=>8243, "Psi"=>936, "Rho"=>929, "Scaron"=>352, "Sigma"=>931, "THORN"=>222, "Tau"=>932, "Theta"=>920, "Uacute"=>218, "Ucirc"=>219, "Ugrave"=>217, "Upsilon"=>933, "Uuml"=>220, "Xi"=>926, "Yacute"=>221, "Yuml"=>376, "Zeta"=>918, "aacute"=>225, "acirc"=>226, "acute"=>180, "aelig"=>230, "agrave"=>224, "alefsym"=>8501, "alpha"=>945, "amp"=>38, "and"=>8743, "ang"=>8736, "apos"=>39, "aring"=>229, "asymp"=>8776, "atilde"=>227, "auml"=>228, "bdquo"=>8222, "beta"=>946, "brvbar"=>166, "bull"=>8226, "cap"=>8745, "ccedil"=>231, "cedil"=>184, "cent"=>162, "chi"=>967, "circ"=>710, "clubs"=>9827, "cong"=>8773, "copy"=>169, "crarr"=>8629, "cup"=>8746, "curren"=>164, "dArr"=>8659, "dagger"=>8224, "darr"=>8595, "deg"=>176, "delta"=>948, "diams"=>9830, "divide"=>247, "eacute"=>233, "ecirc"=>234, "egrave"=>232, "empty"=>8709, "emsp"=>8195, "ensp"=>8194, "epsilon"=>949, "equiv"=>8801, "eta"=>951, "eth"=>240, "euml"=>235, "euro"=>8364, "exist"=>8707, "fnof"=>402, "forall"=>8704, "frac12"=>189, "frac14"=>188, "frac34"=>190, "frasl"=>8260, "gamma"=>947, "ge"=>8805, "gt"=>62, "hArr"=>8660, "harr"=>8596, "hearts"=>9829, "hellip"=>8230, "iacute"=>237, "icirc"=>238, "iexcl"=>161, "igrave"=>236, "image"=>8465, "infin"=>8734, "int"=>8747, "iota"=>953, "iquest"=>191, "isin"=>8712, "iuml"=>239, "kappa"=>954, "lArr"=>8656, "lambda"=>955, "lang"=>9001, "laquo"=>171, "larr"=>8592, "lceil"=>8968, "ldquo"=>8220, "le"=>8804, "lfloor"=>8970, "lowast"=>8727, "loz"=>9674, "lrm"=>8206, "lsaquo"=>8249, "lsquo"=>8216, "lt"=>60, "macr"=>175, "mdash"=>8212, "micro"=>181, "middot"=>183, "minus"=>8722, "mu"=>956, "nabla"=>8711, "nbsp"=>160, "ndash"=>8211, "ne"=>8800, "ni"=>8715, "not"=>172, "notin"=>8713, "nsub"=>8836, "ntilde"=>241, "nu"=>957, "oacute"=>243, "ocirc"=>244, "oelig"=>339, "ograve"=>242, "oline"=>8254, "omega"=>969, "omicron"=>959, "oplus"=>8853, "or"=>8744, "ordf"=>170, "ordm"=>186, "oslash"=>248, "otilde"=>245, "otimes"=>8855, "ouml"=>246, "para"=>182, "part"=>8706, "permil"=>8240, "perp"=>8869, "phi"=>966, "pi"=>960, "piv"=>982, "plusmn"=>177, "pound"=>163, "prime"=>8242, "prod"=>8719, "prop"=>8733, "psi"=>968, "quot"=>34, "rArr"=>8658, "radic"=>8730, "rang"=>9002, "raquo"=>187, "rarr"=>8594, "rceil"=>8969, "rdquo"=>8221, "real"=>8476, "reg"=>174, "rfloor"=>8971, "rho"=>961, "rlm"=>8207, "rsaquo"=>8250, "rsquo"=>8217, "sbquo"=>8218, "scaron"=>353, "sdot"=>8901, "sect"=>167, "shy"=>173, "sigma"=>963, "sigmaf"=>962, "sim"=>8764, "spades"=>9824, "sub"=>8834, "sube"=>8838, "sum"=>8721, "sup"=>8835, "sup1"=>185, "sup2"=>178, "sup3"=>179, "supe"=>8839, "szlig"=>223, "tau"=>964, "there4"=>8756, "theta"=>952, "thetasym"=>977, "thinsp"=>8201, "thorn"=>254, "tilde"=>732, "times"=>215, "trade"=>8482, "uArr"=>8657, "uacute"=>250, "uarr"=>8593, "ucirc"=>251, "ugrave"=>249, "uml"=>168, "upsih"=>978, "upsilon"=>965, "uuml"=>252, "weierp"=>8472, "xi"=>958, "yacute"=>253, "yen"=>165, "yuml"=>255, "zeta"=>950, "zwj"=>8205, "zwnj"=>8204}
- NamedCharactersPattern =
/\A(?-mix:AElig|Aacute|Acirc|Agrave|Alpha|Aring|Atilde|Auml|Beta|Ccedil|Chi|Dagger|Delta|ETH|Eacute|Ecirc|Egrave|Epsilon|Eta|Euml|Gamma|Iacute|Icirc|Igrave|Iota|Iuml|Kappa|Lambda|Mu|Ntilde|Nu|OElig|Oacute|Ocirc|Ograve|Omega|Omicron|Oslash|Otilde|Ouml|Phi|Pi|Prime|Psi|Rho|Scaron|Sigma|THORN|Tau|Theta|Uacute|Ucirc|Ugrave|Upsilon|Uuml|Xi|Yacute|Yuml|Zeta|aacute|acirc|acute|aelig|agrave|alefsym|alpha|amp|and|ang|apos|aring|asymp|atilde|auml|bdquo|beta|brvbar|bull|cap|ccedil|cedil|cent|chi|circ|clubs|cong|copy|crarr|cup|curren|dArr|dagger|darr|deg|delta|diams|divide|eacute|ecirc|egrave|empty|emsp|ensp|epsilon|equiv|eta|eth|euml|euro|exist|fnof|forall|frac12|frac14|frac34|frasl|gamma|ge|gt|hArr|harr|hearts|hellip|iacute|icirc|iexcl|igrave|image|infin|int|iota|iquest|isin|iuml|kappa|lArr|lambda|lang|laquo|larr|lceil|ldquo|le|lfloor|lowast|loz|lrm|lsaquo|lsquo|lt|macr|mdash|micro|middot|minus|mu|nabla|nbsp|ndash|ne|ni|not|notin|nsub|ntilde|nu|oacute|ocirc|oelig|ograve|oline|omega|omicron|oplus|or|ordf|ordm|oslash|otilde|otimes|ouml|para|part|permil|perp|phi|pi|piv|plusmn|pound|prime|prod|prop|psi|quot|rArr|radic|rang|raquo|rarr|rceil|rdquo|real|reg|rfloor|rho|rlm|rsaquo|rsquo|sbquo|scaron|sdot|sect|shy|sigma|sigmaf|sim|spades|sub|sube|sum|sup|sup1|sup2|sup3|supe|szlig|tau|there4|theta|thetasym|thinsp|thorn|tilde|times|trade|uArr|uacute|uarr|ucirc|ugrave|uml|upsih|upsilon|uuml|weierp|xi|yacute|yen|yuml|zeta|zwj|zwnj)\z/
- ElementContent =
{"h6"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "object"=> ["a", "abbr", "acronym", "address", "applet", "b", "basefont", "bdo", "big", "blockquote", "br", "button", "center", "cite", "code", "dfn", "dir", "div", "dl", "em", "fieldset", "font", "form", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "iframe", "img", "input", "isindex", "kbd", "label", "map", "menu", "noframes", "noscript", "object", "ol", "p", "param", "pre", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "table", "textarea", "tt", "u", "ul", "var"], "dl"=>["dd", "dt"], "p"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "acronym"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "code"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "ul"=>["li"], "tt"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "label"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "form"=> ["a", "abbr", "acronym", "address", "applet", "b", "basefont", "bdo", "big", "blockquote", "br", "button", "center", "cite", "code", "dfn", "dir", "div", "dl", "em", "fieldset", "font", "form", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "iframe", "img", "input", "isindex", "kbd", "label", "map", "menu", "noframes", "noscript", "object", "ol", "p", "pre", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "table", "textarea", "tt", "u", "ul", "var"], "q"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "thead"=>["tr"], "area"=>:EMPTY, "td"=> ["a", "abbr", "acronym", "address", "applet", "b", "basefont", "bdo", "big", "blockquote", "br", "button", "center", "cite", "code", "dfn", "dir", "div", "dl", "em", "fieldset", "font", "form", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "iframe", "img", "input", "isindex", "kbd", "label", "map", "menu", "noframes", "noscript", "object", "ol", "p", "pre", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "table", "textarea", "tt", "u", "ul", "var"], "title"=>[], "dir"=>["li"], "s"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "ol"=>["li"], "hr"=>:EMPTY, "applet"=> ["a", "abbr", "acronym", "address", "applet", "b", "basefont", "bdo", "big", "blockquote", "br", "button", "center", "cite", "code", "dfn", "dir", "div", "dl", "em", "fieldset", "font", "form", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "iframe", "img", "input", "isindex", "kbd", "label", "map", "menu", "noframes", "noscript", "object", "ol", "p", "param", "pre", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "table", "textarea", "tt", "u", "ul", "var"], "table"=>["caption", "col", "colgroup", "tbody", "tfoot", "thead", "tr"], "legend"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "cite"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "a"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "html"=> ["a", "abbr", "acronym", "address", "applet", "b", "base", "basefont", "bdo", "big", "blockquote", "body", "br", "button", "center", "cite", "code", "dfn", "dir", "div", "dl", "em", "fieldset", "font", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "hr", "i", "iframe", "img", "input", "isindex", "kbd", "label", "map", "menu", "noframes", "noscript", "object", "ol", "p", "pre", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "table", "textarea", "title", "tt", "u", "ul", "var"], "u"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "blockquote"=> ["a", "abbr", "acronym", "address", "applet", "b", "basefont", "bdo", "big", "blockquote", "br", "button", "center", "cite", "code", "dfn", "dir", "div", "dl", "em", "fieldset", "font", "form", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "iframe", "img", "input", "isindex", "kbd", "label", "map", "menu", "noframes", "noscript", "object", "ol", "p", "pre", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "table", "textarea", "tt", "u", "ul", "var"], "center"=> ["a", "abbr", "acronym", "address", "applet", "b", "basefont", "bdo", "big", "blockquote", "br", "button", "center", "cite", "code", "dfn", "dir", "div", "dl", "em", "fieldset", "font", "form", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "iframe", "img", "input", "isindex", "kbd", "label", "map", "menu", "noframes", "noscript", "object", "ol", "p", "pre", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "table", "textarea", "tt", "u", "ul", "var"], "b"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "base"=>:EMPTY, "th"=> ["a", "abbr", "acronym", "address", "applet", "b", "basefont", "bdo", "big", "blockquote", "br", "button", "center", "cite", "code", "dfn", "dir", "div", "dl", "em", "fieldset", "font", "form", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "iframe", "img", "input", "isindex", "kbd", "label", "map", "menu", "noframes", "noscript", "object", "ol", "p", "pre", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "table", "textarea", "tt", "u", "ul", "var"], "link"=>:EMPTY, "var"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "samp"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "div"=> ["a", "abbr", "acronym", "address", "applet", "b", "basefont", "bdo", "big", "blockquote", "br", "button", "center", "cite", "code", "dfn", "dir", "div", "dl", "em", "fieldset", "font", "form", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "iframe", "img", "input", "isindex", "kbd", "label", "map", "menu", "noframes", "noscript", "object", "ol", "p", "pre", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "table", "textarea", "tt", "u", "ul", "var"], "textarea"=>[], "pre"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "head"=>["base", "isindex", "title"], "span"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "br"=>:EMPTY, "script"=>:CDATA, "noframes"=> ["a", "abbr", "acronym", "address", "applet", "b", "basefont", "bdo", "big", "blockquote", "br", "button", "center", "cite", "code", "dfn", "dir", "div", "dl", "em", "fieldset", "font", "form", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "iframe", "img", "input", "isindex", "kbd", "label", "map", "menu", "noframes", "noscript", "object", "ol", "p", "pre", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "table", "textarea", "tt", "u", "ul", "var"], "style"=>:CDATA, "meta"=>:EMPTY, "dt"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "option"=>[], "kbd"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "big"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "tfoot"=>["tr"], "sup"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "bdo"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "isindex"=>:EMPTY, "dfn"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "fieldset"=> ["a", "abbr", "acronym", "address", "applet", "b", "basefont", "bdo", "big", "blockquote", "br", "button", "center", "cite", "code", "dfn", "dir", "div", "dl", "em", "fieldset", "font", "form", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "iframe", "img", "input", "isindex", "kbd", "label", "legend", "map", "menu", "noframes", "noscript", "object", "ol", "p", "pre", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "table", "textarea", "tt", "u", "ul", "var"], "em"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "font"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "tbody"=>["tr"], "noscript"=> ["a", "abbr", "acronym", "address", "applet", "b", "basefont", "bdo", "big", "blockquote", "br", "button", "center", "cite", "code", "dfn", "dir", "div", "dl", "em", "fieldset", "font", "form", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "iframe", "img", "input", "isindex", "kbd", "label", "map", "menu", "noframes", "noscript", "object", "ol", "p", "pre", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "table", "textarea", "tt", "u", "ul", "var"], "li"=> ["a", "abbr", "acronym", "address", "applet", "b", "basefont", "bdo", "big", "blockquote", "br", "button", "center", "cite", "code", "dfn", "dir", "div", "dl", "em", "fieldset", "font", "form", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "iframe", "img", "input", "isindex", "kbd", "label", "map", "menu", "noframes", "noscript", "object", "ol", "p", "pre", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "table", "textarea", "tt", "u", "ul", "var"], "col"=>:EMPTY, "small"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "dd"=> ["a", "abbr", "acronym", "address", "applet", "b", "basefont", "bdo", "big", "blockquote", "br", "button", "center", "cite", "code", "dfn", "dir", "div", "dl", "em", "fieldset", "font", "form", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "iframe", "img", "input", "isindex", "kbd", "label", "map", "menu", "noframes", "noscript", "object", "ol", "p", "pre", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "table", "textarea", "tt", "u", "ul", "var"], "i"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "menu"=>["li"], "strong"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "basefont"=>:EMPTY, "img"=>:EMPTY, "optgroup"=>["option"], "map"=> ["address", "area", "blockquote", "center", "dir", "div", "dl", "fieldset", "form", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "isindex", "menu", "noframes", "noscript", "ol", "p", "pre", "table", "ul"], "h1"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "address"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "p", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "sub"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "param"=>:EMPTY, "input"=>:EMPTY, "h2"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "abbr"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "h3"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "strike"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "body"=> ["a", "abbr", "acronym", "address", "applet", "b", "basefont", "bdo", "big", "blockquote", "br", "button", "center", "cite", "code", "dfn", "dir", "div", "dl", "em", "fieldset", "font", "form", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "iframe", "img", "input", "isindex", "kbd", "label", "map", "menu", "noframes", "noscript", "object", "ol", "p", "pre", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "table", "textarea", "tt", "u", "ul", "var"], "ins"=> ["a", "abbr", "acronym", "address", "applet", "b", "basefont", "bdo", "big", "blockquote", "br", "button", "center", "cite", "code", "dfn", "dir", "div", "dl", "em", "fieldset", "font", "form", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "iframe", "img", "input", "isindex", "kbd", "label", "map", "menu", "noframes", "noscript", "object", "ol", "p", "pre", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "table", "textarea", "tt", "u", "ul", "var"], "button"=> ["a", "abbr", "acronym", "address", "applet", "b", "basefont", "bdo", "big", "blockquote", "br", "button", "center", "cite", "code", "dfn", "dir", "div", "dl", "em", "fieldset", "font", "form", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "iframe", "img", "input", "isindex", "kbd", "label", "map", "menu", "noframes", "noscript", "object", "ol", "p", "pre", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "table", "textarea", "tt", "u", "ul", "var"], "h4"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "select"=>["optgroup", "option"], "caption"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "colgroup"=>["col"], "tr"=>["td", "th"], "del"=> ["a", "abbr", "acronym", "address", "applet", "b", "basefont", "bdo", "big", "blockquote", "br", "button", "center", "cite", "code", "dfn", "dir", "div", "dl", "em", "fieldset", "font", "form", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "iframe", "img", "input", "isindex", "kbd", "label", "map", "menu", "noframes", "noscript", "object", "ol", "p", "pre", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "table", "textarea", "tt", "u", "ul", "var"], "h5"=> ["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "dfn", "em", "font", "i", "iframe", "img", "input", "kbd", "label", "map", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "textarea", "tt", "u", "var"], "iframe"=> ["a", "abbr", "acronym", "address", "applet", "b", "basefont", "bdo", "big", "blockquote", "br", "button", "center", "cite", "code", "dfn", "dir", "div", "dl", "em", "fieldset", "font", "form", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "iframe", "img", "input", "isindex", "kbd", "label", "map", "menu", "noframes", "noscript", "object", "ol", "p", "pre", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "table", "textarea", "tt", "u", "ul", "var"]}
- ElementInclusions =
{"head"=>["link", "meta", "object", "script", "style" , "noscript"], "body"=>["del", "ins"]}
- ElementExclusions =
{"button"=> ["a", "button", "fieldset", "form", "iframe", "input", "isindex", "label", "select", "textarea"], "a"=>["a"], "dir"=> ["address", "blockquote", "center", "dir", "div", "dl", "fieldset", "form", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "isindex", "menu", "noframes", "noscript", "ol", "p", "pre", "table", "ul"], "title"=>["link", "meta", "object", "script", "style"], "pre"=> ["applet", "basefont", "big", "font", "img", "object", "small", "sub", "sup"], "form"=>["form"], "menu"=> ["address", "blockquote", "center", "dir", "div", "dl", "fieldset", "form", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "isindex", "menu", "noframes", "noscript", "ol", "p", "pre", "table", "ul"], "label"=>["label"]}
- OmittedAttrName =
{"h6"=> {"center"=>"align", "justify"=>"align", "left"=>"align", "ltr"=>"dir", "right"=>"align", "rtl"=>"dir"}, "object"=> {"bottom"=>"align", "declare"=>"declare", "left"=>"align", "ltr"=>"dir", "middle"=>"align", "right"=>"align", "rtl"=>"dir", "top"=>"align"}, "dl"=>{"compact"=>"compact", "ltr"=>"dir", "rtl"=>"dir"}, "p"=> {"center"=>"align", "justify"=>"align", "left"=>"align", "ltr"=>"dir", "right"=>"align", "rtl"=>"dir"}, "acronym"=>{"ltr"=>"dir", "rtl"=>"dir"}, "code"=>{"ltr"=>"dir", "rtl"=>"dir"}, "ul"=> {"circle"=>"type", "compact"=>"compact", "disc"=>"type", "ltr"=>"dir", "rtl"=>"dir", "square"=>"type"}, "tt"=>{"ltr"=>"dir", "rtl"=>"dir"}, "label"=>{"ltr"=>"dir", "rtl"=>"dir"}, "form"=>{"get"=>"method", "ltr"=>"dir", "post"=>"method", "rtl"=>"dir"}, "q"=>{"ltr"=>"dir", "rtl"=>"dir"}, "thead"=> {"baseline"=>"valign", "bottom"=>"valign", "center"=>"align", "char"=>"align", "justify"=>"align", "left"=>"align", "ltr"=>"dir", "middle"=>"valign", "right"=>"align", "rtl"=>"dir", "top"=>"valign"}, "area"=> {"circle"=>"shape", "default"=>"shape", "ltr"=>"dir", "nohref"=>"nohref", "poly"=>"shape", "rect"=>"shape", "rtl"=>"dir"}, "td"=> {"baseline"=>"valign", "bottom"=>"valign", "center"=>"align", "char"=>"align", "col"=>"scope", "colgroup"=>"scope", "justify"=>"align", "left"=>"align", "ltr"=>"dir", "middle"=>"valign", "nowrap"=>"nowrap", "right"=>"align", "row"=>"scope", "rowgroup"=>"scope", "rtl"=>"dir", "top"=>"valign"}, "title"=>{"ltr"=>"dir", "rtl"=>"dir"}, "dir"=>{"compact"=>"compact", "ltr"=>"dir", "rtl"=>"dir"}, "s"=>{"ltr"=>"dir", "rtl"=>"dir"}, "ol"=>{"compact"=>"compact", "ltr"=>"dir", "rtl"=>"dir"}, "hr"=> {"center"=>"align", "left"=>"align", "ltr"=>"dir", "noshade"=>"noshade", "right"=>"align", "rtl"=>"dir"}, "applet"=> {"bottom"=>"align", "left"=>"align", "middle"=>"align", "right"=>"align", "top"=>"align"}, "table"=> {"above"=>"frame", "all"=>"rules", "below"=>"frame", "border"=>"frame", "box"=>"frame", "center"=>"align", "cols"=>"rules", "groups"=>"rules", "hsides"=>"frame", "left"=>"align", "lhs"=>"frame", "ltr"=>"dir", "none"=>"rules", "rhs"=>"frame", "right"=>"align", "rows"=>"rules", "rtl"=>"dir", "void"=>"frame", "vsides"=>"frame"}, "legend"=> {"bottom"=>"align", "left"=>"align", "ltr"=>"dir", "right"=>"align", "rtl"=>"dir", "top"=>"align"}, "cite"=>{"ltr"=>"dir", "rtl"=>"dir"}, "a"=> {"circle"=>"shape", "default"=>"shape", "ltr"=>"dir", "poly"=>"shape", "rect"=>"shape", "rtl"=>"dir"}, "html"=>{"ltr"=>"dir", "rtl"=>"dir"}, "u"=>{"ltr"=>"dir", "rtl"=>"dir"}, "blockquote"=>{"ltr"=>"dir", "rtl"=>"dir"}, "center"=>{"ltr"=>"dir", "rtl"=>"dir"}, "b"=>{"ltr"=>"dir", "rtl"=>"dir"}, "th"=> {"baseline"=>"valign", "bottom"=>"valign", "center"=>"align", "char"=>"align", "col"=>"scope", "colgroup"=>"scope", "justify"=>"align", "left"=>"align", "ltr"=>"dir", "middle"=>"valign", "nowrap"=>"nowrap", "right"=>"align", "row"=>"scope", "rowgroup"=>"scope", "rtl"=>"dir", "top"=>"valign"}, "link"=>{"ltr"=>"dir", "rtl"=>"dir"}, "var"=>{"ltr"=>"dir", "rtl"=>"dir"}, "samp"=>{"ltr"=>"dir", "rtl"=>"dir"}, "div"=> {"center"=>"align", "justify"=>"align", "left"=>"align", "ltr"=>"dir", "right"=>"align", "rtl"=>"dir"}, "textarea"=> {"disabled"=>"disabled", "ltr"=>"dir", "readonly"=>"readonly", "rtl"=>"dir"}, "pre"=>{"ltr"=>"dir", "rtl"=>"dir"}, "head"=>{"ltr"=>"dir", "rtl"=>"dir"}, "span"=>{"ltr"=>"dir", "rtl"=>"dir"}, "br"=>{"all"=>"clear", "left"=>"clear", "none"=>"clear", "right"=>"clear"}, "script"=>{"defer"=>"defer"}, "noframes"=>{"ltr"=>"dir", "rtl"=>"dir"}, "style"=>{"ltr"=>"dir", "rtl"=>"dir"}, "meta"=>{"ltr"=>"dir", "rtl"=>"dir"}, "dt"=>{"ltr"=>"dir", "rtl"=>"dir"}, "option"=> {"disabled"=>"disabled", "ltr"=>"dir", "rtl"=>"dir", "selected"=>"selected"}, "kbd"=>{"ltr"=>"dir", "rtl"=>"dir"}, "big"=>{"ltr"=>"dir", "rtl"=>"dir"}, "tfoot"=> {"baseline"=>"valign", "bottom"=>"valign", "center"=>"align", "char"=>"align", "justify"=>"align", "left"=>"align", "ltr"=>"dir", "middle"=>"valign", "right"=>"align", "rtl"=>"dir", "top"=>"valign"}, "sup"=>{"ltr"=>"dir", "rtl"=>"dir"}, "bdo"=>{"ltr"=>"dir", "rtl"=>"dir"}, "isindex"=>{"ltr"=>"dir", "rtl"=>"dir"}, "dfn"=>{"ltr"=>"dir", "rtl"=>"dir"}, "fieldset"=>{"ltr"=>"dir", "rtl"=>"dir"}, "em"=>{"ltr"=>"dir", "rtl"=>"dir"}, "font"=>{"ltr"=>"dir", "rtl"=>"dir"}, "tbody"=> {"baseline"=>"valign", "bottom"=>"valign", "center"=>"align", "char"=>"align", "justify"=>"align", "left"=>"align", "ltr"=>"dir", "middle"=>"valign", "right"=>"align", "rtl"=>"dir", "top"=>"valign"}, "noscript"=>{"ltr"=>"dir", "rtl"=>"dir"}, "li"=>{"ltr"=>"dir", "rtl"=>"dir"}, "col"=> {"baseline"=>"valign", "bottom"=>"valign", "center"=>"align", "char"=>"align", "justify"=>"align", "left"=>"align", "ltr"=>"dir", "middle"=>"valign", "right"=>"align", "rtl"=>"dir", "top"=>"valign"}, "small"=>{"ltr"=>"dir", "rtl"=>"dir"}, "dd"=>{"ltr"=>"dir", "rtl"=>"dir"}, "i"=>{"ltr"=>"dir", "rtl"=>"dir"}, "menu"=>{"compact"=>"compact", "ltr"=>"dir", "rtl"=>"dir"}, "strong"=>{"ltr"=>"dir", "rtl"=>"dir"}, "img"=> {"bottom"=>"align", "ismap"=>"ismap", "left"=>"align", "ltr"=>"dir", "middle"=>"align", "right"=>"align", "rtl"=>"dir", "top"=>"align"}, "optgroup"=>{"disabled"=>"disabled", "ltr"=>"dir", "rtl"=>"dir"}, "map"=>{"ltr"=>"dir", "rtl"=>"dir"}, "address"=>{"ltr"=>"dir", "rtl"=>"dir"}, "h1"=> {"center"=>"align", "justify"=>"align", "left"=>"align", "ltr"=>"dir", "right"=>"align", "rtl"=>"dir"}, "sub"=>{"ltr"=>"dir", "rtl"=>"dir"}, "param"=>{"data"=>"valuetype", "object"=>"valuetype", "ref"=>"valuetype"}, "input"=> {"bottom"=>"align", "button"=>"type", "checkbox"=>"type", "checked"=>"checked", "disabled"=>"disabled", "file"=>"type", "hidden"=>"type", "image"=>"type", "ismap"=>"ismap", "left"=>"align", "ltr"=>"dir", "middle"=>"align", "password"=>"type", "radio"=>"type", "readonly"=>"readonly", "reset"=>"type", "right"=>"align", "rtl"=>"dir", "submit"=>"type", "text"=>"type", "top"=>"align"}, "h2"=> {"center"=>"align", "justify"=>"align", "left"=>"align", "ltr"=>"dir", "right"=>"align", "rtl"=>"dir"}, "abbr"=>{"ltr"=>"dir", "rtl"=>"dir"}, "h3"=> {"center"=>"align", "justify"=>"align", "left"=>"align", "ltr"=>"dir", "right"=>"align", "rtl"=>"dir"}, "strike"=>{"ltr"=>"dir", "rtl"=>"dir"}, "body"=>{"ltr"=>"dir", "rtl"=>"dir"}, "ins"=>{"ltr"=>"dir", "rtl"=>"dir"}, "button"=> {"button"=>"type", "disabled"=>"disabled", "ltr"=>"dir", "reset"=>"type", "rtl"=>"dir", "submit"=>"type"}, "h4"=> {"center"=>"align", "justify"=>"align", "left"=>"align", "ltr"=>"dir", "right"=>"align", "rtl"=>"dir"}, "select"=> {"disabled"=>"disabled", "ltr"=>"dir", "multiple"=>"multiple", "rtl"=>"dir"}, "caption"=> {"bottom"=>"align", "left"=>"align", "ltr"=>"dir", "right"=>"align", "rtl"=>"dir", "top"=>"align"}, "colgroup"=> {"baseline"=>"valign", "bottom"=>"valign", "center"=>"align", "char"=>"align", "justify"=>"align", "left"=>"align", "ltr"=>"dir", "middle"=>"valign", "right"=>"align", "rtl"=>"dir", "top"=>"valign"}, "tr"=> {"baseline"=>"valign", "bottom"=>"valign", "center"=>"align", "char"=>"align", "justify"=>"align", "left"=>"align", "ltr"=>"dir", "middle"=>"valign", "right"=>"align", "rtl"=>"dir", "top"=>"valign"}, "del"=>{"ltr"=>"dir", "rtl"=>"dir"}, "h5"=> {"center"=>"align", "justify"=>"align", "left"=>"align", "ltr"=>"dir", "right"=>"align", "rtl"=>"dir"}, "iframe"=> {"0"=>"frameborder", "1"=>"frameborder", "auto"=>"scrolling", "bottom"=>"align", "left"=>"align", "middle"=>"align", "no"=>"scrolling", "right"=>"align", "top"=>"align", "yes"=>"scrolling"}}
Class Method Summary collapse
- .build(ele = Doc.new, assigns = {}, &blk) ⇒ Object
- .css ⇒ Object
-
.make(input = nil, opts = {}, &blk) ⇒ Object
:stopdoc:.
-
.parse(input = nil, opts = {}, &blk) ⇒ Object
Hpricot.parse parses input and return a document tree.
- .scan(*args) ⇒ Object
-
.uxs(str) ⇒ Object
XML unescape.
-
.xchr(str) ⇒ Object
XML escaped version of chr.
-
.XML(input = nil, opts = {}, &blk) ⇒ Object
Hpricot::XML parses input, disregarding all the HTML rules and returning a document tree.
-
.xs(str) ⇒ Object
XML escaped version of to_s.
Class Method Details
.build(ele = Doc.new, assigns = {}, &blk) ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/hpricot/builder.rb', line 15 def self.build(ele = Doc.new, assigns = {}, &blk) ele.extend Builder assigns.each do |k, v| ele.instance_variable_set("@#{k}", v) end ele.instance_eval(&blk) ele end |
.css ⇒ Object
25 |
# File 'ext/hpricot_scan/hpricot_scan.c', line 25 VALUE hpricot_css(VALUE, VALUE, VALUE, VALUE, VALUE); |
.make(input = nil, opts = {}, &blk) ⇒ Object
:stopdoc:
27 28 29 30 31 32 33 34 35 |
# File 'lib/hpricot/parse.rb', line 27 def Hpricot.make(input = nil, opts = {}, &blk) if blk doc = Hpricot.build(&blk) doc.instance_variable_set("@options", opts) doc else Hpricot.scan(input, opts) end end |
.parse(input = nil, opts = {}, &blk) ⇒ Object
Hpricot.parse parses input and return a document tree. represented by Hpricot::Doc.
14 15 16 |
# File 'lib/hpricot/parse.rb', line 14 def Hpricot.parse(input = nil, opts = {}, &blk) make(input, opts, &blk) end |
.scan(*args) ⇒ Object
446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 |
# File 'ext/hpricot_scan/hpricot_scan.c', line 446
VALUE hpricot_scan(int argc, VALUE *argv, VALUE self)
{
int cs, act, have = 0, nread = 0, curline = 1, text = 0, io = 0;
char *ts = 0, *te = 0, *buf = NULL, *eof = NULL;
hpricot_state *S = NULL;
VALUE port, opts;
VALUE attr = Qnil, tag = Qnil, akey = Qnil, aval = Qnil, bufsize = Qnil;
char *mark_tag = 0, *mark_akey = 0, *mark_aval = 0;
int done = 0, ele_open = 0, buffer_size = 0, taint = 0;
#ifdef HAVE_RUBY_ENCODING_H
int encoding_index = rb_enc_to_index(rb_default_external_encoding());
#endif
rb_scan_args(argc, argv, "11", &port, &opts);
taint = OBJ_TAINTED(port);
io = rb_respond_to(port, s_read);
if (!io)
{
if (rb_respond_to(port, s_to_str))
{
port = rb_funcall(port, s_to_str, 0);
StringValue(port);
}
else
{
rb_raise(rb_eArgError, "an Hpricot document must be built from an input source (a String or IO object.)");
}
}
if (TYPE(opts) != T_HASH)
opts = Qnil;
if (!rb_block_given_p())
{
S = ALLOC(hpricot_state);
S->doc = rb_obj_alloc(cDoc);
rb_gc_register_address(&S->doc);
S->focus = S->doc;
S->last = Qnil;
S->xml = OPT(opts, xml);
S->strict = OPT(opts, xhtml_strict);
S->fixup = OPT(opts, fixup_tags);
if (S->strict) S->fixup = 1;
rb_ivar_set(S->doc, rb_intern("@options"), opts);
S->EC = rb_const_get(mHpricot, s_ElementContent);
}
buffer_size = BUFSIZE;
if (rb_ivar_defined(self, rb_intern("@buffer_size")) == Qtrue) {
bufsize = rb_ivar_get(self, rb_intern("@buffer_size"));
if (!NIL_P(bufsize)) {
buffer_size = NUM2INT(bufsize);
}
}
if (io)
buf = ALLOC_N(char, buffer_size);
#line 508 "hpricot_scan.c"
{
cs = hpricot_scan_start;
ts = 0;
te = 0;
act = 0;
}
#line 550 "hpricot_scan.rl"
while (!done) {
VALUE str;
char *p, *pe;
int len, space = buffer_size - have, tokstart_diff, tokend_diff, mark_tag_diff, mark_akey_diff, mark_aval_diff;
if (io)
{
if (space == 0) {
/* We've used up the entire buffer storing an already-parsed token
* prefix that must be preserved. Likely caused by super-long attributes.
* Increase buffer size and continue */
tokstart_diff = ts - buf;
tokend_diff = te - buf;
mark_tag_diff = mark_tag - buf;
mark_akey_diff = mark_akey - buf;
mark_aval_diff = mark_aval - buf;
buffer_size += BUFSIZE;
REALLOC_N(buf, char, buffer_size);
space = buffer_size - have;
ts = buf + tokstart_diff;
te = buf + tokend_diff;
mark_tag = buf + mark_tag_diff;
mark_akey = buf + mark_akey_diff;
mark_aval = buf + mark_aval_diff;
}
p = buf + have;
str = rb_funcall(port, s_read, 1, INT2FIX(space));
len = RSTRING_LEN(str);
memcpy(p, StringValuePtr(str), len);
}
else
{
p = RSTRING_PTR(port);
len = RSTRING_LEN(port) + 1;
done = 1;
}
nread += len;
/* If this is the last buffer, tack on an EOF. */
if (io && len < space) {
p[len++] = 0;
done = 1;
}
pe = p + len;
#line 569 "hpricot_scan.c"
{
if ( p == pe )
goto _test_eof;
switch ( cs )
{
tr0:
#line 73 "hpricot_common.rl"
{{p = ((te))-1;}{ TEXT_PASS(); }}
goto st198;
tr4:
#line 71 "hpricot_common.rl"
{te = p+1;{ {goto st208;} }}
goto st198;
tr15:
#line 136 "hpricot_scan.rl"
{ SET(tag, p); }
#line 66 "hpricot_common.rl"
{te = p+1;{ ELE(doctype); }}
goto st198;
tr18:
#line 66 "hpricot_common.rl"
{te = p+1;{ ELE(doctype); }}
goto st198;
tr39:
#line 1 "NONE"
{ switch( act ) {
case 8:
{{p = ((te))-1;} ELE(doctype); }
break;
case 10:
{{p = ((te))-1;} ELE(stag); }
break;
case 12:
{{p = ((te))-1;} ELE(emptytag); }
break;
case 15:
{{p = ((te))-1;} TEXT_PASS(); }
break;
}
}
goto st198;
tr93:
#line 72 "hpricot_common.rl"
{te = p+1;{ {goto st210;} }}
goto st198;
tr97:
#line 136 "hpricot_scan.rl"
{ SET(tag, p); }
#line 69 "hpricot_common.rl"
{te = p+1;{ ELE(etag); }}
goto st198;
tr99:
#line 69 "hpricot_common.rl"
{te = p+1;{ ELE(etag); }}
goto st198;
tr103:
#line 136 "hpricot_scan.rl"
{ SET(tag, p); }
#line 68 "hpricot_common.rl"
{te = p+1;{ ELE(stag); }}
goto st198;
tr107:
#line 68 "hpricot_common.rl"
{te = p+1;{ ELE(stag); }}
goto st198;
tr112:
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 68 "hpricot_common.rl"
{te = p+1;{ ELE(stag); }}
goto st198;
tr117:
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 68 "hpricot_common.rl"
{te = p+1;{ ELE(stag); }}
goto st198;
tr118:
#line 70 "hpricot_common.rl"
{te = p+1;{ ELE(emptytag); }}
goto st198;
tr129:
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 68 "hpricot_common.rl"
{te = p+1;{ ELE(stag); }}
goto st198;
tr133:
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
#line 68 "hpricot_common.rl"
{te = p+1;{ ELE(stag); }}
goto st198;
tr139:
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 68 "hpricot_common.rl"
{te = p+1;{ ELE(stag); }}
goto st198;
tr335:
#line 67 "hpricot_common.rl"
{{p = ((te))-1;}{ {goto st212;} }}
goto st198;
tr349:
#line 65 "hpricot_common.rl"
{te = p+1;{ ELE(xmldecl); }}
goto st198;
tr397:
#line 73 "hpricot_common.rl"
{te = p+1;{ TEXT_PASS(); }}
goto st198;
tr398:
#line 9 "hpricot_common.rl"
{curline += 1;}
#line 73 "hpricot_common.rl"
{te = p+1;{ TEXT_PASS(); }}
goto st198;
tr400:
#line 73 "hpricot_common.rl"
{te = p;p--;{ TEXT_PASS(); }}
goto st198;
tr405:
#line 66 "hpricot_common.rl"
{te = p;p--;{ ELE(doctype); }}
goto st198;
tr406:
#line 67 "hpricot_common.rl"
{te = p;p--;{ {goto st212;} }}
goto st198;
st198:
#line 1 "NONE"
{ts = 0;}
if ( ++p == pe )
goto _test_eof198;
case 198:
#line 1 "NONE"
{ts = p;}
#line 746 "hpricot_scan.c"
switch( (*p) ) {
case 10: goto tr398;
case 60: goto tr399;
}
goto tr397;
tr399:
#line 1 "NONE"
{te = p+1;}
#line 121 "hpricot_scan.rl"
{
if (text == 1) {
CAT(tag, p);
ELE(text);
text = 0;
}
attr = Qnil;
tag = Qnil;
mark_tag = NULL;
ele_open = 1;
}
#line 73 "hpricot_common.rl"
{act = 15;}
goto st199;
st199:
if ( ++p == pe )
goto _test_eof199;
case 199:
#line 774 "hpricot_scan.c"
switch( (*p) ) {
case 33: goto st0;
case 47: goto st59;
case 58: goto tr403;
case 63: goto st139;
case 95: goto tr403;
}
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr403;
} else if ( (*p) >= 65 )
goto tr403;
goto tr400;
st0:
if ( ++p == pe )
goto _test_eof0;
case 0:
switch( (*p) ) {
case 45: goto st1;
case 68: goto st2;
case 91: goto st53;
}
goto tr0;
st1:
if ( ++p == pe )
goto _test_eof1;
case 1:
if ( (*p) == 45 )
goto tr4;
goto tr0;
st2:
if ( ++p == pe )
goto _test_eof2;
case 2:
if ( (*p) == 79 )
goto st3;
goto tr0;
st3:
if ( ++p == pe )
goto _test_eof3;
case 3:
if ( (*p) == 67 )
goto st4;
goto tr0;
st4:
if ( ++p == pe )
goto _test_eof4;
case 4:
if ( (*p) == 84 )
goto st5;
goto tr0;
st5:
if ( ++p == pe )
goto _test_eof5;
case 5:
if ( (*p) == 89 )
goto st6;
goto tr0;
st6:
if ( ++p == pe )
goto _test_eof6;
case 6:
if ( (*p) == 80 )
goto st7;
goto tr0;
st7:
if ( ++p == pe )
goto _test_eof7;
case 7:
if ( (*p) == 69 )
goto st8;
goto tr0;
st8:
if ( ++p == pe )
goto _test_eof8;
case 8:
if ( (*p) == 32 )
goto st9;
if ( 9 <= (*p) && (*p) <= 13 )
goto st9;
goto tr0;
st9:
if ( ++p == pe )
goto _test_eof9;
case 9:
switch( (*p) ) {
case 32: goto st9;
case 58: goto tr12;
case 95: goto tr12;
}
if ( (*p) < 65 ) {
if ( 9 <= (*p) && (*p) <= 13 )
goto st9;
} else if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr12;
} else
goto tr12;
goto tr0;
tr12:
#line 133 "hpricot_scan.rl"
{ mark_tag = p; }
goto st10;
st10:
if ( ++p == pe )
goto _test_eof10;
case 10:
#line 882 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto tr13;
case 62: goto tr15;
case 63: goto st10;
case 91: goto tr16;
case 95: goto st10;
}
if ( (*p) < 48 ) {
if ( (*p) > 13 ) {
if ( 45 <= (*p) && (*p) <= 46 )
goto st10;
} else if ( (*p) >= 9 )
goto tr13;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto st10;
} else if ( (*p) >= 65 )
goto st10;
} else
goto st10;
goto tr0;
tr13:
#line 136 "hpricot_scan.rl"
{ SET(tag, p); }
goto st11;
st11:
if ( ++p == pe )
goto _test_eof11;
case 11:
#line 913 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto st11;
case 62: goto tr18;
case 80: goto st12;
case 83: goto st48;
case 91: goto st26;
}
if ( 9 <= (*p) && (*p) <= 13 )
goto st11;
goto tr0;
st12:
if ( ++p == pe )
goto _test_eof12;
case 12:
if ( (*p) == 85 )
goto st13;
goto tr0;
st13:
if ( ++p == pe )
goto _test_eof13;
case 13:
if ( (*p) == 66 )
goto st14;
goto tr0;
st14:
if ( ++p == pe )
goto _test_eof14;
case 14:
if ( (*p) == 76 )
goto st15;
goto tr0;
st15:
if ( ++p == pe )
goto _test_eof15;
case 15:
if ( (*p) == 73 )
goto st16;
goto tr0;
st16:
if ( ++p == pe )
goto _test_eof16;
case 16:
if ( (*p) == 67 )
goto st17;
goto tr0;
st17:
if ( ++p == pe )
goto _test_eof17;
case 17:
if ( (*p) == 32 )
goto st18;
if ( 9 <= (*p) && (*p) <= 13 )
goto st18;
goto tr0;
st18:
if ( ++p == pe )
goto _test_eof18;
case 18:
switch( (*p) ) {
case 32: goto st18;
case 34: goto st19;
case 39: goto st30;
}
if ( 9 <= (*p) && (*p) <= 13 )
goto st18;
goto tr0;
st19:
if ( ++p == pe )
goto _test_eof19;
case 19:
switch( (*p) ) {
case 9: goto tr30;
case 34: goto tr31;
case 61: goto tr30;
case 95: goto tr30;
}
if ( (*p) < 39 ) {
if ( 32 <= (*p) && (*p) <= 37 )
goto tr30;
} else if ( (*p) > 59 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr30;
} else if ( (*p) >= 63 )
goto tr30;
} else
goto tr30;
goto tr0;
tr30:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st20;
st20:
if ( ++p == pe )
goto _test_eof20;
case 20:
#line 1010 "hpricot_scan.c"
switch( (*p) ) {
case 9: goto st20;
case 34: goto tr33;
case 61: goto st20;
case 95: goto st20;
}
if ( (*p) < 39 ) {
if ( 32 <= (*p) && (*p) <= 37 )
goto st20;
} else if ( (*p) > 59 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto st20;
} else if ( (*p) >= 63 )
goto st20;
} else
goto st20;
goto tr0;
tr31:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 158 "hpricot_scan.rl"
{ SET(aval, p); ATTR(ID2SYM(rb_intern("public_id")), aval); }
goto st21;
tr33:
#line 158 "hpricot_scan.rl"
{ SET(aval, p); ATTR(ID2SYM(rb_intern("public_id")), aval); }
goto st21;
st21:
if ( ++p == pe )
goto _test_eof21;
case 21:
#line 1043 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto st22;
case 62: goto tr18;
case 91: goto st26;
}
if ( 9 <= (*p) && (*p) <= 13 )
goto st22;
goto tr0;
st22:
if ( ++p == pe )
goto _test_eof22;
case 22:
switch( (*p) ) {
case 32: goto st22;
case 34: goto st23;
case 39: goto st28;
case 62: goto tr18;
case 91: goto st26;
}
if ( 9 <= (*p) && (*p) <= 13 )
goto st22;
goto tr0;
st23:
if ( ++p == pe )
goto _test_eof23;
case 23:
if ( (*p) == 34 )
goto tr38;
goto tr37;
tr37:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st24;
st24:
if ( ++p == pe )
goto _test_eof24;
case 24:
#line 1081 "hpricot_scan.c"
if ( (*p) == 34 )
goto tr41;
goto st24;
tr38:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 159 "hpricot_scan.rl"
{ SET(aval, p); ATTR(ID2SYM(rb_intern("system_id")), aval); }
goto st25;
tr41:
#line 159 "hpricot_scan.rl"
{ SET(aval, p); ATTR(ID2SYM(rb_intern("system_id")), aval); }
goto st25;
st25:
if ( ++p == pe )
goto _test_eof25;
case 25:
#line 1099 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto st25;
case 62: goto tr18;
case 91: goto st26;
}
if ( 9 <= (*p) && (*p) <= 13 )
goto st25;
goto tr39;
tr16:
#line 136 "hpricot_scan.rl"
{ SET(tag, p); }
goto st26;
st26:
if ( ++p == pe )
goto _test_eof26;
case 26:
#line 1116 "hpricot_scan.c"
if ( (*p) == 93 )
goto st27;
goto st26;
st27:
if ( ++p == pe )
goto _test_eof27;
case 27:
switch( (*p) ) {
case 32: goto st27;
case 62: goto tr18;
}
if ( 9 <= (*p) && (*p) <= 13 )
goto st27;
goto tr39;
st28:
if ( ++p == pe )
goto _test_eof28;
case 28:
if ( (*p) == 39 )
goto tr38;
goto tr44;
tr44:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st29;
st29:
if ( ++p == pe )
goto _test_eof29;
case 29:
#line 1146 "hpricot_scan.c"
if ( (*p) == 39 )
goto tr41;
goto st29;
st30:
if ( ++p == pe )
goto _test_eof30;
case 30:
switch( (*p) ) {
case 9: goto tr46;
case 39: goto tr47;
case 61: goto tr46;
case 95: goto tr46;
}
if ( (*p) < 40 ) {
if ( (*p) > 33 ) {
if ( 35 <= (*p) && (*p) <= 37 )
goto tr46;
} else if ( (*p) >= 32 )
goto tr46;
} else if ( (*p) > 59 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr46;
} else if ( (*p) >= 63 )
goto tr46;
} else
goto tr46;
goto tr0;
tr46:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st31;
st31:
if ( ++p == pe )
goto _test_eof31;
case 31:
#line 1183 "hpricot_scan.c"
switch( (*p) ) {
case 9: goto st31;
case 39: goto tr49;
case 61: goto st31;
case 95: goto st31;
}
if ( (*p) < 40 ) {
if ( (*p) > 33 ) {
if ( 35 <= (*p) && (*p) <= 37 )
goto st31;
} else if ( (*p) >= 32 )
goto st31;
} else if ( (*p) > 59 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto st31;
} else if ( (*p) >= 63 )
goto st31;
} else
goto st31;
goto tr0;
tr47:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 158 "hpricot_scan.rl"
{ SET(aval, p); ATTR(ID2SYM(rb_intern("public_id")), aval); }
goto st32;
tr49:
#line 158 "hpricot_scan.rl"
{ SET(aval, p); ATTR(ID2SYM(rb_intern("public_id")), aval); }
goto st32;
tr55:
#line 158 "hpricot_scan.rl"
{ SET(aval, p); ATTR(ID2SYM(rb_intern("public_id")), aval); }
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 159 "hpricot_scan.rl"
{ SET(aval, p); ATTR(ID2SYM(rb_intern("system_id")), aval); }
goto st32;
tr82:
#line 158 "hpricot_scan.rl"
{ SET(aval, p); ATTR(ID2SYM(rb_intern("public_id")), aval); }
#line 159 "hpricot_scan.rl"
{ SET(aval, p); ATTR(ID2SYM(rb_intern("system_id")), aval); }
goto st32;
st32:
if ( ++p == pe )
goto _test_eof32;
case 32:
#line 1233 "hpricot_scan.c"
switch( (*p) ) {
case 9: goto st33;
case 32: goto st33;
case 33: goto st31;
case 39: goto tr49;
case 62: goto tr18;
case 91: goto st26;
case 95: goto st31;
}
if ( (*p) < 40 ) {
if ( (*p) > 13 ) {
if ( 35 <= (*p) && (*p) <= 37 )
goto st31;
} else if ( (*p) >= 10 )
goto st22;
} else if ( (*p) > 59 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto st31;
} else if ( (*p) >= 61 )
goto st31;
} else
goto st31;
goto tr0;
st33:
if ( ++p == pe )
goto _test_eof33;
case 33:
switch( (*p) ) {
case 9: goto st33;
case 32: goto st33;
case 34: goto st23;
case 39: goto tr51;
case 62: goto tr18;
case 91: goto st26;
case 95: goto st31;
}
if ( (*p) < 40 ) {
if ( (*p) > 13 ) {
if ( 33 <= (*p) && (*p) <= 37 )
goto st31;
} else if ( (*p) >= 10 )
goto st22;
} else if ( (*p) > 59 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto st31;
} else if ( (*p) >= 61 )
goto st31;
} else
goto st31;
goto tr0;
tr51:
#line 158 "hpricot_scan.rl"
{ SET(aval, p); ATTR(ID2SYM(rb_intern("public_id")), aval); }
goto st34;
tr62:
#line 158 "hpricot_scan.rl"
{ SET(aval, p); ATTR(ID2SYM(rb_intern("public_id")), aval); }
#line 159 "hpricot_scan.rl"
{ SET(aval, p); ATTR(ID2SYM(rb_intern("system_id")), aval); }
goto st34;
st34:
if ( ++p == pe )
goto _test_eof34;
case 34:
#line 1300 "hpricot_scan.c"
switch( (*p) ) {
case 9: goto tr52;
case 32: goto tr52;
case 33: goto tr54;
case 39: goto tr55;
case 62: goto tr56;
case 91: goto tr57;
case 95: goto tr54;
}
if ( (*p) < 40 ) {
if ( (*p) > 13 ) {
if ( 35 <= (*p) && (*p) <= 37 )
goto tr54;
} else if ( (*p) >= 10 )
goto tr53;
} else if ( (*p) > 59 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr54;
} else if ( (*p) >= 61 )
goto tr54;
} else
goto tr54;
goto tr44;
tr52:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st35;
st35:
if ( ++p == pe )
goto _test_eof35;
case 35:
#line 1333 "hpricot_scan.c"
switch( (*p) ) {
case 9: goto st35;
case 32: goto st35;
case 34: goto st37;
case 39: goto tr62;
case 62: goto tr63;
case 91: goto st40;
case 95: goto st47;
}
if ( (*p) < 40 ) {
if ( (*p) > 13 ) {
if ( 33 <= (*p) && (*p) <= 37 )
goto st47;
} else if ( (*p) >= 10 )
goto st36;
} else if ( (*p) > 59 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto st47;
} else if ( (*p) >= 61 )
goto st47;
} else
goto st47;
goto st29;
tr53:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st36;
st36:
if ( ++p == pe )
goto _test_eof36;
case 36:
#line 1366 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto st36;
case 34: goto st37;
case 39: goto tr65;
case 62: goto tr63;
case 91: goto st40;
}
if ( 9 <= (*p) && (*p) <= 13 )
goto st36;
goto st29;
st37:
if ( ++p == pe )
goto _test_eof37;
case 37:
switch( (*p) ) {
case 34: goto tr67;
case 39: goto tr68;
}
goto tr66;
tr66:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st38;
st38:
if ( ++p == pe )
goto _test_eof38;
case 38:
#line 1394 "hpricot_scan.c"
switch( (*p) ) {
case 34: goto tr70;
case 39: goto tr71;
}
goto st38;
tr81:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st39;
tr67:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 159 "hpricot_scan.rl"
{ SET(aval, p); ATTR(ID2SYM(rb_intern("system_id")), aval); }
goto st39;
tr70:
#line 159 "hpricot_scan.rl"
{ SET(aval, p); ATTR(ID2SYM(rb_intern("system_id")), aval); }
goto st39;
st39:
if ( ++p == pe )
goto _test_eof39;
case 39:
#line 1418 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto st39;
case 39: goto tr41;
case 62: goto tr63;
case 91: goto st40;
}
if ( 9 <= (*p) && (*p) <= 13 )
goto st39;
goto st29;
tr56:
#line 1 "NONE"
{te = p+1;}
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 66 "hpricot_common.rl"
{act = 8;}
goto st200;
tr63:
#line 1 "NONE"
{te = p+1;}
#line 66 "hpricot_common.rl"
{act = 8;}
goto st200;
st200:
if ( ++p == pe )
goto _test_eof200;
case 200:
#line 1446 "hpricot_scan.c"
if ( (*p) == 39 )
goto tr41;
goto st29;
tr57:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st40;
st40:
if ( ++p == pe )
goto _test_eof40;
case 40:
#line 1458 "hpricot_scan.c"
switch( (*p) ) {
case 39: goto tr73;
case 93: goto st42;
}
goto st40;
tr73:
#line 159 "hpricot_scan.rl"
{ SET(aval, p); ATTR(ID2SYM(rb_intern("system_id")), aval); }
goto st41;
st41:
if ( ++p == pe )
goto _test_eof41;
case 41:
#line 1472 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto st41;
case 62: goto tr76;
case 93: goto st27;
}
if ( 9 <= (*p) && (*p) <= 13 )
goto st41;
goto st26;
tr76:
#line 1 "NONE"
{te = p+1;}
#line 66 "hpricot_common.rl"
{act = 8;}
goto st201;
st201:
if ( ++p == pe )
goto _test_eof201;
case 201:
#line 1491 "hpricot_scan.c"
if ( (*p) == 93 )
goto st27;
goto st26;
st42:
if ( ++p == pe )
goto _test_eof42;
case 42:
switch( (*p) ) {
case 32: goto st42;
case 39: goto tr41;
case 62: goto tr63;
}
if ( 9 <= (*p) && (*p) <= 13 )
goto st42;
goto st29;
tr68:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 159 "hpricot_scan.rl"
{ SET(aval, p); ATTR(ID2SYM(rb_intern("system_id")), aval); }
goto st43;
tr71:
#line 159 "hpricot_scan.rl"
{ SET(aval, p); ATTR(ID2SYM(rb_intern("system_id")), aval); }
goto st43;
st43:
if ( ++p == pe )
goto _test_eof43;
case 43:
#line 1521 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto st43;
case 34: goto tr41;
case 62: goto tr78;
case 91: goto st44;
}
if ( 9 <= (*p) && (*p) <= 13 )
goto st43;
goto st24;
tr78:
#line 1 "NONE"
{te = p+1;}
#line 66 "hpricot_common.rl"
{act = 8;}
goto st202;
st202:
if ( ++p == pe )
goto _test_eof202;
case 202:
#line 1541 "hpricot_scan.c"
if ( (*p) == 34 )
goto tr41;
goto st24;
st44:
if ( ++p == pe )
goto _test_eof44;
case 44:
switch( (*p) ) {
case 34: goto tr73;
case 93: goto st45;
}
goto st44;
st45:
if ( ++p == pe )
goto _test_eof45;
case 45:
switch( (*p) ) {
case 32: goto st45;
case 34: goto tr41;
case 62: goto tr78;
}
if ( 9 <= (*p) && (*p) <= 13 )
goto st45;
goto st24;
tr65:
#line 159 "hpricot_scan.rl"
{ SET(aval, p); ATTR(ID2SYM(rb_intern("system_id")), aval); }
goto st46;
st46:
if ( ++p == pe )
goto _test_eof46;
case 46:
#line 1574 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto tr81;
case 39: goto tr38;
case 62: goto tr56;
case 91: goto tr57;
}
if ( 9 <= (*p) && (*p) <= 13 )
goto tr81;
goto tr44;
tr54:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st47;
st47:
if ( ++p == pe )
goto _test_eof47;
case 47:
#line 1592 "hpricot_scan.c"
switch( (*p) ) {
case 9: goto st47;
case 39: goto tr82;
case 61: goto st47;
case 95: goto st47;
}
if ( (*p) < 40 ) {
if ( (*p) > 33 ) {
if ( 35 <= (*p) && (*p) <= 37 )
goto st47;
} else if ( (*p) >= 32 )
goto st47;
} else if ( (*p) > 59 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto st47;
} else if ( (*p) >= 63 )
goto st47;
} else
goto st47;
goto st29;
st48:
if ( ++p == pe )
goto _test_eof48;
case 48:
if ( (*p) == 89 )
goto st49;
goto tr0;
st49:
if ( ++p == pe )
goto _test_eof49;
case 49:
if ( (*p) == 83 )
goto st50;
goto tr0;
st50:
if ( ++p == pe )
goto _test_eof50;
case 50:
if ( (*p) == 84 )
goto st51;
goto tr0;
st51:
if ( ++p == pe )
goto _test_eof51;
case 51:
if ( (*p) == 69 )
goto st52;
goto tr0;
st52:
if ( ++p == pe )
goto _test_eof52;
case 52:
if ( (*p) == 77 )
goto st21;
goto tr0;
st53:
if ( ++p == pe )
goto _test_eof53;
case 53:
if ( (*p) == 67 )
goto st54;
goto tr0;
st54:
if ( ++p == pe )
goto _test_eof54;
case 54:
if ( (*p) == 68 )
goto st55;
goto tr0;
st55:
if ( ++p == pe )
goto _test_eof55;
case 55:
if ( (*p) == 65 )
goto st56;
goto tr0;
st56:
if ( ++p == pe )
goto _test_eof56;
case 56:
if ( (*p) == 84 )
goto st57;
goto tr0;
st57:
if ( ++p == pe )
goto _test_eof57;
case 57:
if ( (*p) == 65 )
goto st58;
goto tr0;
st58:
if ( ++p == pe )
goto _test_eof58;
case 58:
if ( (*p) == 91 )
goto tr93;
goto tr0;
st59:
if ( ++p == pe )
goto _test_eof59;
case 59:
switch( (*p) ) {
case 58: goto tr94;
case 95: goto tr94;
}
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr94;
} else if ( (*p) >= 65 )
goto tr94;
goto tr0;
tr94:
#line 133 "hpricot_scan.rl"
{ mark_tag = p; }
goto st60;
st60:
if ( ++p == pe )
goto _test_eof60;
case 60:
#line 1713 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto tr95;
case 62: goto tr97;
case 63: goto st60;
case 95: goto st60;
}
if ( (*p) < 48 ) {
if ( (*p) > 13 ) {
if ( 45 <= (*p) && (*p) <= 46 )
goto st60;
} else if ( (*p) >= 9 )
goto tr95;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto st60;
} else if ( (*p) >= 65 )
goto st60;
} else
goto st60;
goto tr0;
tr95:
#line 136 "hpricot_scan.rl"
{ SET(tag, p); }
goto st61;
st61:
if ( ++p == pe )
goto _test_eof61;
case 61:
#line 1743 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto st61;
case 62: goto tr99;
}
if ( 9 <= (*p) && (*p) <= 13 )
goto st61;
goto tr0;
tr403:
#line 133 "hpricot_scan.rl"
{ mark_tag = p; }
goto st62;
st62:
if ( ++p == pe )
goto _test_eof62;
case 62:
#line 1759 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto tr100;
case 47: goto tr102;
case 62: goto tr103;
case 63: goto st62;
case 95: goto st62;
}
if ( (*p) < 45 ) {
if ( 9 <= (*p) && (*p) <= 13 )
goto tr100;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto st62;
} else if ( (*p) >= 65 )
goto st62;
} else
goto st62;
goto tr0;
tr100:
#line 136 "hpricot_scan.rl"
{ SET(tag, p); }
goto st63;
st63:
if ( ++p == pe )
goto _test_eof63;
case 63:
#line 1787 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto st63;
case 47: goto st66;
case 62: goto tr107;
case 63: goto tr105;
case 95: goto tr105;
}
if ( (*p) < 45 ) {
if ( 9 <= (*p) && (*p) <= 13 )
goto st63;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr105;
} else if ( (*p) >= 65 )
goto tr105;
} else
goto tr105;
goto tr0;
tr105:
#line 161 "hpricot_scan.rl"
{
akey = Qnil;
aval = Qnil;
mark_akey = NULL;
mark_aval = NULL;
}
#line 135 "hpricot_scan.rl"
{ mark_akey = p; }
goto st64;
tr114:
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 161 "hpricot_scan.rl"
{
akey = Qnil;
aval = Qnil;
mark_akey = NULL;
mark_aval = NULL;
}
#line 135 "hpricot_scan.rl"
{ mark_akey = p; }
goto st64;
st64:
if ( ++p == pe )
goto _test_eof64;
case 64:
#line 1839 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto tr108;
case 47: goto tr110;
case 61: goto tr111;
case 62: goto tr112;
case 63: goto st64;
case 95: goto st64;
}
if ( (*p) < 45 ) {
if ( 9 <= (*p) && (*p) <= 13 )
goto tr108;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto st64;
} else if ( (*p) >= 65 )
goto st64;
} else
goto st64;
goto tr39;
tr108:
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
goto st65;
tr140:
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st65;
tr134:
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st65;
st65:
if ( ++p == pe )
goto _test_eof65;
case 65:
#line 1884 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto st65;
case 47: goto tr115;
case 61: goto st67;
case 62: goto tr117;
case 63: goto tr114;
case 95: goto tr114;
}
if ( (*p) < 45 ) {
if ( 9 <= (*p) && (*p) <= 13 )
goto st65;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr114;
} else if ( (*p) >= 65 )
goto tr114;
} else
goto tr114;
goto tr39;
tr102:
#line 136 "hpricot_scan.rl"
{ SET(tag, p); }
goto st66;
tr110:
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
goto st66;
tr115:
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
goto st66;
st66:
if ( ++p == pe )
goto _test_eof66;
case 66:
#line 1931 "hpricot_scan.c"
if ( (*p) == 62 )
goto tr118;
goto tr39;
tr111:
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
goto st67;
st67:
if ( ++p == pe )
goto _test_eof67;
case 67:
#line 1943 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr120;
case 32: goto tr120;
case 34: goto st136;
case 39: goto st137;
case 47: goto tr124;
case 60: goto tr39;
case 62: goto tr117;
}
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr121;
} else if ( (*p) >= 9 )
goto tr120;
goto tr119;
tr119:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st68;
st68:
if ( ++p == pe )
goto _test_eof68;
case 68:
#line 1967 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr126;
case 32: goto tr126;
case 47: goto tr128;
case 60: goto tr39;
case 62: goto tr129;
}
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr127;
} else if ( (*p) >= 9 )
goto tr126;
goto st68;
tr126:
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st69;
tr319:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 138 "hpricot_scan.rl"
{ SET(aval, p); }
goto st69;
tr167:
#line 138 "hpricot_scan.rl"
{ SET(aval, p); }
goto st69;
st69:
if ( ++p == pe )
goto _test_eof69;
case 69:
#line 2002 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto st69;
case 47: goto tr115;
case 62: goto tr117;
case 63: goto tr114;
case 95: goto tr114;
}
if ( (*p) < 45 ) {
if ( 9 <= (*p) && (*p) <= 13 )
goto st69;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr114;
} else if ( (*p) >= 65 )
goto tr114;
} else
goto tr114;
goto tr39;
tr127:
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st70;
tr155:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 138 "hpricot_scan.rl"
{ SET(aval, p); }
goto st70;
tr162:
#line 138 "hpricot_scan.rl"
{ SET(aval, p); }
goto st70;
st70:
if ( ++p == pe )
goto _test_eof70;
case 70:
#line 2043 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr126;
case 32: goto tr126;
case 47: goto tr132;
case 60: goto tr39;
case 62: goto tr133;
case 63: goto tr131;
case 95: goto tr131;
}
if ( (*p) < 45 ) {
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr127;
} else if ( (*p) >= 9 )
goto tr126;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr131;
} else if ( (*p) >= 65 )
goto tr131;
} else
goto tr131;
goto st68;
tr131:
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 161 "hpricot_scan.rl"
{
akey = Qnil;
aval = Qnil;
mark_akey = NULL;
mark_aval = NULL;
}
#line 135 "hpricot_scan.rl"
{ mark_akey = p; }
goto st71;
tr150:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 161 "hpricot_scan.rl"
{
akey = Qnil;
aval = Qnil;
mark_akey = NULL;
mark_aval = NULL;
}
#line 135 "hpricot_scan.rl"
{ mark_akey = p; }
goto st71;
st71:
if ( ++p == pe )
goto _test_eof71;
case 71:
#line 2108 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr134;
case 32: goto tr134;
case 47: goto tr137;
case 60: goto tr39;
case 61: goto tr138;
case 62: goto tr139;
case 63: goto st71;
case 95: goto st71;
}
if ( (*p) < 45 ) {
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr135;
} else if ( (*p) >= 9 )
goto tr134;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto st71;
} else if ( (*p) >= 65 )
goto st71;
} else
goto st71;
goto st68;
tr141:
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st72;
tr135:
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st72;
st72:
if ( ++p == pe )
goto _test_eof72;
case 72:
#line 2154 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr140;
case 32: goto tr140;
case 47: goto tr132;
case 60: goto tr39;
case 61: goto st74;
case 62: goto tr133;
case 63: goto tr131;
case 95: goto tr131;
}
if ( (*p) < 45 ) {
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr141;
} else if ( (*p) >= 9 )
goto tr140;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr131;
} else if ( (*p) >= 65 )
goto tr131;
} else
goto tr131;
goto st68;
tr124:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
goto st73;
tr128:
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
goto st73;
tr132:
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st73;
tr137:
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
goto st73;
tr147:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
goto st73;
tr151:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st73;
st73:
if ( ++p == pe )
goto _test_eof73;
case 73:
#line 2265 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr126;
case 32: goto tr126;
case 47: goto tr128;
case 60: goto tr39;
case 62: goto tr129;
}
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr127;
} else if ( (*p) >= 9 )
goto tr126;
goto st68;
tr121:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st74;
tr138:
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
goto st74;
st74:
if ( ++p == pe )
goto _test_eof74;
case 74:
#line 2291 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr143;
case 32: goto tr143;
case 34: goto st77;
case 39: goto st135;
case 47: goto tr147;
case 60: goto tr39;
case 62: goto tr129;
}
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr144;
} else if ( (*p) >= 9 )
goto tr143;
goto tr119;
tr148:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st75;
tr143:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st75;
st75:
if ( ++p == pe )
goto _test_eof75;
case 75:
#line 2324 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr148;
case 32: goto tr148;
case 34: goto st136;
case 39: goto st137;
case 47: goto tr124;
case 60: goto tr39;
case 62: goto tr117;
case 63: goto tr150;
case 95: goto tr150;
}
if ( (*p) < 45 ) {
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr149;
} else if ( (*p) >= 9 )
goto tr148;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr150;
} else if ( (*p) >= 65 )
goto tr150;
} else
goto tr150;
goto tr119;
tr149:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st76;
tr144:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st76;
st76:
if ( ++p == pe )
goto _test_eof76;
case 76:
#line 2368 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr143;
case 32: goto tr143;
case 34: goto st77;
case 39: goto st135;
case 47: goto tr151;
case 60: goto tr39;
case 62: goto tr133;
case 63: goto tr150;
case 95: goto tr150;
}
if ( (*p) < 45 ) {
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr144;
} else if ( (*p) >= 9 )
goto tr143;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr150;
} else if ( (*p) >= 65 )
goto tr150;
} else
goto tr150;
goto tr119;
st77:
if ( ++p == pe )
goto _test_eof77;
case 77:
switch( (*p) ) {
case 13: goto tr153;
case 32: goto tr153;
case 34: goto tr155;
case 47: goto tr156;
case 60: goto tr157;
case 62: goto tr158;
}
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr154;
} else if ( (*p) >= 9 )
goto tr153;
goto tr152;
tr152:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st78;
st78:
if ( ++p == pe )
goto _test_eof78;
case 78:
#line 2421 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr160;
case 32: goto tr160;
case 34: goto tr162;
case 47: goto tr163;
case 60: goto st80;
case 62: goto tr165;
}
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr161;
} else if ( (*p) >= 9 )
goto tr160;
goto st78;
tr323:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st79;
tr160:
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st79;
tr153:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st79;
tr306:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 138 "hpricot_scan.rl"
{ SET(aval, p); }
goto st79;
tr223:
#line 138 "hpricot_scan.rl"
{ SET(aval, p); }
goto st79;
st79:
if ( ++p == pe )
goto _test_eof79;
case 79:
#line 2470 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto st79;
case 34: goto tr167;
case 47: goto tr169;
case 62: goto tr170;
case 63: goto tr168;
case 95: goto tr168;
}
if ( (*p) < 45 ) {
if ( 9 <= (*p) && (*p) <= 13 )
goto st79;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr168;
} else if ( (*p) >= 65 )
goto tr168;
} else
goto tr168;
goto st80;
tr157:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st80;
st80:
if ( ++p == pe )
goto _test_eof80;
case 80:
#line 2499 "hpricot_scan.c"
if ( (*p) == 34 )
goto tr167;
goto st80;
tr168:
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 161 "hpricot_scan.rl"
{
akey = Qnil;
aval = Qnil;
mark_akey = NULL;
mark_aval = NULL;
}
#line 135 "hpricot_scan.rl"
{ mark_akey = p; }
goto st81;
tr324:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 161 "hpricot_scan.rl"
{
akey = Qnil;
aval = Qnil;
mark_akey = NULL;
mark_aval = NULL;
}
#line 135 "hpricot_scan.rl"
{ mark_akey = p; }
goto st81;
st81:
if ( ++p == pe )
goto _test_eof81;
case 81:
#line 2543 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto tr171;
case 34: goto tr167;
case 47: goto tr173;
case 61: goto tr174;
case 62: goto tr175;
case 63: goto st81;
case 95: goto st81;
}
if ( (*p) < 45 ) {
if ( 9 <= (*p) && (*p) <= 13 )
goto tr171;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto st81;
} else if ( (*p) >= 65 )
goto st81;
} else
goto st81;
goto st80;
tr171:
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
goto st82;
tr202:
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st82;
tr196:
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st82;
st82:
if ( ++p == pe )
goto _test_eof82;
case 82:
#line 2589 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto st82;
case 34: goto tr167;
case 47: goto tr169;
case 61: goto st84;
case 62: goto tr170;
case 63: goto tr168;
case 95: goto tr168;
}
if ( (*p) < 45 ) {
if ( 9 <= (*p) && (*p) <= 13 )
goto st82;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr168;
} else if ( (*p) >= 65 )
goto tr168;
} else
goto tr168;
goto st80;
tr173:
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
goto st83;
tr169:
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
goto st83;
tr325:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
goto st83;
st83:
if ( ++p == pe )
goto _test_eof83;
case 83:
#line 2643 "hpricot_scan.c"
switch( (*p) ) {
case 34: goto tr167;
case 62: goto tr178;
}
goto st80;
tr158:
#line 1 "NONE"
{te = p+1;}
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 68 "hpricot_common.rl"
{act = 10;}
goto st203;
tr165:
#line 1 "NONE"
{te = p+1;}
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 68 "hpricot_common.rl"
{act = 10;}
goto st203;
tr170:
#line 1 "NONE"
{te = p+1;}
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 68 "hpricot_common.rl"
{act = 10;}
goto st203;
tr175:
#line 1 "NONE"
{te = p+1;}
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 68 "hpricot_common.rl"
{act = 10;}
goto st203;
tr178:
#line 1 "NONE"
{te = p+1;}
#line 70 "hpricot_common.rl"
{act = 12;}
goto st203;
tr192:
#line 1 "NONE"
{te = p+1;}
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
#line 68 "hpricot_common.rl"
{act = 10;}
goto st203;
tr193:
#line 1 "NONE"
{te = p+1;}
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
#line 68 "hpricot_common.rl"
{act = 10;}
goto st203;
tr201:
#line 1 "NONE"
{te = p+1;}
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 68 "hpricot_common.rl"
{act = 10;}
goto st203;
tr326:
#line 1 "NONE"
{te = p+1;}
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 68 "hpricot_common.rl"
{act = 10;}
goto st203;
st203:
if ( ++p == pe )
goto _test_eof203;
case 203:
#line 2790 "hpricot_scan.c"
if ( (*p) == 34 )
goto tr167;
goto st80;
tr174:
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
goto st84;
st84:
if ( ++p == pe )
goto _test_eof84;
case 84:
#line 2802 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr179;
case 32: goto tr179;
case 34: goto tr181;
case 39: goto st134;
case 47: goto tr183;
case 60: goto st80;
case 62: goto tr170;
}
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr180;
} else if ( (*p) >= 9 )
goto tr179;
goto tr152;
tr179:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st85;
st85:
if ( ++p == pe )
goto _test_eof85;
case 85:
#line 2826 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr184;
case 32: goto tr184;
case 34: goto tr181;
case 39: goto st134;
case 47: goto tr183;
case 60: goto st80;
case 62: goto tr170;
}
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr185;
} else if ( (*p) >= 9 )
goto tr184;
goto tr152;
tr184:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st86;
tr187:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st86;
st86:
if ( ++p == pe )
goto _test_eof86;
case 86:
#line 2859 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr184;
case 32: goto tr184;
case 34: goto tr181;
case 39: goto st134;
case 47: goto tr183;
case 60: goto st80;
case 62: goto tr170;
case 63: goto tr186;
case 95: goto tr186;
}
if ( (*p) < 45 ) {
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr185;
} else if ( (*p) >= 9 )
goto tr184;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr186;
} else if ( (*p) >= 65 )
goto tr186;
} else
goto tr186;
goto tr152;
tr185:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st87;
tr188:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st87;
st87:
if ( ++p == pe )
goto _test_eof87;
case 87:
#line 2903 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr187;
case 32: goto tr187;
case 34: goto tr189;
case 39: goto st94;
case 47: goto tr191;
case 60: goto st80;
case 62: goto tr192;
case 63: goto tr186;
case 95: goto tr186;
}
if ( (*p) < 45 ) {
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr188;
} else if ( (*p) >= 9 )
goto tr187;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr186;
} else if ( (*p) >= 65 )
goto tr186;
} else
goto tr186;
goto tr152;
tr189:
#line 138 "hpricot_scan.rl"
{ SET(aval, p); }
goto st88;
st88:
if ( ++p == pe )
goto _test_eof88;
case 88:
#line 2938 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr153;
case 32: goto tr153;
case 34: goto tr155;
case 47: goto tr191;
case 60: goto tr157;
case 62: goto tr193;
case 63: goto tr186;
case 95: goto tr186;
}
if ( (*p) < 45 ) {
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr154;
} else if ( (*p) >= 9 )
goto tr153;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr186;
} else if ( (*p) >= 65 )
goto tr186;
} else
goto tr186;
goto tr152;
tr161:
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st89;
tr154:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st89;
tr209:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 138 "hpricot_scan.rl"
{ SET(aval, p); }
goto st89;
tr217:
#line 138 "hpricot_scan.rl"
{ SET(aval, p); }
goto st89;
st89:
if ( ++p == pe )
goto _test_eof89;
case 89:
#line 2994 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr160;
case 32: goto tr160;
case 34: goto tr162;
case 47: goto tr195;
case 60: goto st80;
case 62: goto tr192;
case 63: goto tr194;
case 95: goto tr194;
}
if ( (*p) < 45 ) {
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr161;
} else if ( (*p) >= 9 )
goto tr160;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr194;
} else if ( (*p) >= 65 )
goto tr194;
} else
goto tr194;
goto st78;
tr194:
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 161 "hpricot_scan.rl"
{
akey = Qnil;
aval = Qnil;
mark_akey = NULL;
mark_aval = NULL;
}
#line 135 "hpricot_scan.rl"
{ mark_akey = p; }
goto st90;
tr186:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 161 "hpricot_scan.rl"
{
akey = Qnil;
aval = Qnil;
mark_akey = NULL;
mark_aval = NULL;
}
#line 135 "hpricot_scan.rl"
{ mark_akey = p; }
goto st90;
st90:
if ( ++p == pe )
goto _test_eof90;
case 90:
#line 3060 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr196;
case 32: goto tr196;
case 34: goto tr162;
case 47: goto tr199;
case 60: goto st80;
case 61: goto tr200;
case 62: goto tr201;
case 63: goto st90;
case 95: goto st90;
}
if ( (*p) < 45 ) {
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr197;
} else if ( (*p) >= 9 )
goto tr196;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto st90;
} else if ( (*p) >= 65 )
goto st90;
} else
goto st90;
goto st78;
tr203:
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st91;
tr197:
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st91;
st91:
if ( ++p == pe )
goto _test_eof91;
case 91:
#line 3107 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr202;
case 32: goto tr202;
case 34: goto tr162;
case 47: goto tr195;
case 60: goto st80;
case 61: goto st93;
case 62: goto tr192;
case 63: goto tr194;
case 95: goto tr194;
}
if ( (*p) < 45 ) {
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr203;
} else if ( (*p) >= 9 )
goto tr202;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr194;
} else if ( (*p) >= 65 )
goto tr194;
} else
goto tr194;
goto st78;
tr183:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
goto st92;
tr163:
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
goto st92;
tr195:
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st92;
tr199:
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
goto st92;
tr156:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
goto st92;
tr191:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st92;
st92:
if ( ++p == pe )
goto _test_eof92;
case 92:
#line 3219 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr160;
case 32: goto tr160;
case 34: goto tr162;
case 47: goto tr163;
case 60: goto st80;
case 62: goto tr165;
}
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr161;
} else if ( (*p) >= 9 )
goto tr160;
goto st78;
tr180:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st93;
tr200:
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
goto st93;
st93:
if ( ++p == pe )
goto _test_eof93;
case 93:
#line 3246 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr187;
case 32: goto tr187;
case 34: goto tr189;
case 39: goto st94;
case 47: goto tr156;
case 60: goto st80;
case 62: goto tr165;
}
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr188;
} else if ( (*p) >= 9 )
goto tr187;
goto tr152;
st94:
if ( ++p == pe )
goto _test_eof94;
case 94:
switch( (*p) ) {
case 13: goto tr206;
case 32: goto tr206;
case 34: goto tr208;
case 39: goto tr209;
case 47: goto tr210;
case 60: goto tr211;
case 62: goto tr212;
}
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr207;
} else if ( (*p) >= 9 )
goto tr206;
goto tr205;
tr205:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st95;
st95:
if ( ++p == pe )
goto _test_eof95;
case 95:
#line 3289 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr214;
case 32: goto tr214;
case 34: goto tr216;
case 39: goto tr217;
case 47: goto tr218;
case 60: goto st97;
case 62: goto tr220;
}
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr215;
} else if ( (*p) >= 9 )
goto tr214;
goto st95;
tr304:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st96;
tr214:
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st96;
tr206:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st96;
st96:
if ( ++p == pe )
goto _test_eof96;
case 96:
#line 3329 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto st96;
case 34: goto tr222;
case 39: goto tr223;
case 47: goto tr225;
case 62: goto tr226;
case 63: goto tr224;
case 95: goto tr224;
}
if ( (*p) < 45 ) {
if ( 9 <= (*p) && (*p) <= 13 )
goto st96;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr224;
} else if ( (*p) >= 65 )
goto tr224;
} else
goto tr224;
goto st97;
tr211:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st97;
st97:
if ( ++p == pe )
goto _test_eof97;
case 97:
#line 3359 "hpricot_scan.c"
switch( (*p) ) {
case 34: goto tr222;
case 39: goto tr223;
}
goto st97;
tr318:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st98;
tr247:
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st98;
tr314:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st98;
tr305:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 138 "hpricot_scan.rl"
{ SET(aval, p); }
goto st98;
tr222:
#line 138 "hpricot_scan.rl"
{ SET(aval, p); }
goto st98;
tr310:
#line 138 "hpricot_scan.rl"
{ SET(aval, p); }
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st98;
st98:
if ( ++p == pe )
goto _test_eof98;
case 98:
#line 3405 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto st98;
case 39: goto tr167;
case 47: goto tr230;
case 62: goto tr231;
case 63: goto tr229;
case 95: goto tr229;
}
if ( (*p) < 45 ) {
if ( 9 <= (*p) && (*p) <= 13 )
goto st98;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr229;
} else if ( (*p) >= 65 )
goto tr229;
} else
goto tr229;
goto st99;
tr316:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st99;
st99:
if ( ++p == pe )
goto _test_eof99;
case 99:
#line 3434 "hpricot_scan.c"
if ( (*p) == 39 )
goto tr167;
goto st99;
tr229:
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 161 "hpricot_scan.rl"
{
akey = Qnil;
aval = Qnil;
mark_akey = NULL;
mark_aval = NULL;
}
#line 135 "hpricot_scan.rl"
{ mark_akey = p; }
goto st100;
tr320:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 161 "hpricot_scan.rl"
{
akey = Qnil;
aval = Qnil;
mark_akey = NULL;
mark_aval = NULL;
}
#line 135 "hpricot_scan.rl"
{ mark_akey = p; }
goto st100;
st100:
if ( ++p == pe )
goto _test_eof100;
case 100:
#line 3478 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto tr232;
case 39: goto tr167;
case 47: goto tr234;
case 61: goto tr235;
case 62: goto tr236;
case 63: goto st100;
case 95: goto st100;
}
if ( (*p) < 45 ) {
if ( 9 <= (*p) && (*p) <= 13 )
goto tr232;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto st100;
} else if ( (*p) >= 65 )
goto st100;
} else
goto st100;
goto st99;
tr232:
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
goto st101;
tr260:
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st101;
tr254:
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st101;
st101:
if ( ++p == pe )
goto _test_eof101;
case 101:
#line 3524 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto st101;
case 39: goto tr167;
case 47: goto tr230;
case 61: goto st103;
case 62: goto tr231;
case 63: goto tr229;
case 95: goto tr229;
}
if ( (*p) < 45 ) {
if ( 9 <= (*p) && (*p) <= 13 )
goto st101;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr229;
} else if ( (*p) >= 65 )
goto tr229;
} else
goto tr229;
goto st99;
tr234:
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
goto st102;
tr230:
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
goto st102;
tr321:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
goto st102;
st102:
if ( ++p == pe )
goto _test_eof102;
case 102:
#line 3578 "hpricot_scan.c"
switch( (*p) ) {
case 39: goto tr167;
case 62: goto tr239;
}
goto st99;
tr327:
#line 1 "NONE"
{te = p+1;}
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 68 "hpricot_common.rl"
{act = 10;}
goto st204;
tr250:
#line 1 "NONE"
{te = p+1;}
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 68 "hpricot_common.rl"
{act = 10;}
goto st204;
tr231:
#line 1 "NONE"
{te = p+1;}
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 68 "hpricot_common.rl"
{act = 10;}
goto st204;
tr236:
#line 1 "NONE"
{te = p+1;}
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 68 "hpricot_common.rl"
{act = 10;}
goto st204;
tr239:
#line 1 "NONE"
{te = p+1;}
#line 70 "hpricot_common.rl"
{act = 12;}
goto st204;
tr253:
#line 1 "NONE"
{te = p+1;}
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
#line 68 "hpricot_common.rl"
{act = 10;}
goto st204;
tr317:
#line 1 "NONE"
{te = p+1;}
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
#line 68 "hpricot_common.rl"
{act = 10;}
goto st204;
tr259:
#line 1 "NONE"
{te = p+1;}
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 68 "hpricot_common.rl"
{act = 10;}
goto st204;
tr322:
#line 1 "NONE"
{te = p+1;}
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 68 "hpricot_common.rl"
{act = 10;}
goto st204;
st204:
if ( ++p == pe )
goto _test_eof204;
case 204:
#line 3725 "hpricot_scan.c"
if ( (*p) == 39 )
goto tr167;
goto st99;
tr235:
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
goto st103;
st103:
if ( ++p == pe )
goto _test_eof103;
case 103:
#line 3737 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr241;
case 32: goto tr241;
case 34: goto st130;
case 39: goto tr244;
case 47: goto tr245;
case 60: goto st99;
case 62: goto tr231;
}
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr242;
} else if ( (*p) >= 9 )
goto tr241;
goto tr240;
tr240:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st104;
st104:
if ( ++p == pe )
goto _test_eof104;
case 104:
#line 3761 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr247;
case 32: goto tr247;
case 39: goto tr162;
case 47: goto tr249;
case 60: goto st99;
case 62: goto tr250;
}
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr248;
} else if ( (*p) >= 9 )
goto tr247;
goto st104;
tr248:
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st105;
tr315:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st105;
tr272:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 138 "hpricot_scan.rl"
{ SET(aval, p); }
goto st105;
tr216:
#line 138 "hpricot_scan.rl"
{ SET(aval, p); }
goto st105;
tr208:
#line 138 "hpricot_scan.rl"
{ SET(aval, p); }
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st105;
st105:
if ( ++p == pe )
goto _test_eof105;
case 105:
#line 3812 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr247;
case 32: goto tr247;
case 39: goto tr162;
case 47: goto tr252;
case 60: goto st99;
case 62: goto tr253;
case 63: goto tr251;
case 95: goto tr251;
}
if ( (*p) < 45 ) {
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr248;
} else if ( (*p) >= 9 )
goto tr247;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr251;
} else if ( (*p) >= 65 )
goto tr251;
} else
goto tr251;
goto st104;
tr251:
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 161 "hpricot_scan.rl"
{
akey = Qnil;
aval = Qnil;
mark_akey = NULL;
mark_aval = NULL;
}
#line 135 "hpricot_scan.rl"
{ mark_akey = p; }
goto st106;
tr270:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 161 "hpricot_scan.rl"
{
akey = Qnil;
aval = Qnil;
mark_akey = NULL;
mark_aval = NULL;
}
#line 135 "hpricot_scan.rl"
{ mark_akey = p; }
goto st106;
st106:
if ( ++p == pe )
goto _test_eof106;
case 106:
#line 3878 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr254;
case 32: goto tr254;
case 39: goto tr162;
case 47: goto tr257;
case 60: goto st99;
case 61: goto tr258;
case 62: goto tr259;
case 63: goto st106;
case 95: goto st106;
}
if ( (*p) < 45 ) {
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr255;
} else if ( (*p) >= 9 )
goto tr254;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto st106;
} else if ( (*p) >= 65 )
goto st106;
} else
goto st106;
goto st104;
tr261:
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st107;
tr255:
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st107;
st107:
if ( ++p == pe )
goto _test_eof107;
case 107:
#line 3925 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr260;
case 32: goto tr260;
case 39: goto tr162;
case 47: goto tr252;
case 60: goto st99;
case 61: goto st109;
case 62: goto tr253;
case 63: goto tr251;
case 95: goto tr251;
}
if ( (*p) < 45 ) {
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr261;
} else if ( (*p) >= 9 )
goto tr260;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr251;
} else if ( (*p) >= 65 )
goto tr251;
} else
goto tr251;
goto st104;
tr245:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
goto st108;
tr249:
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
goto st108;
tr252:
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st108;
tr257:
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
goto st108;
tr267:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
goto st108;
tr271:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st108;
st108:
if ( ++p == pe )
goto _test_eof108;
case 108:
#line 4037 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr247;
case 32: goto tr247;
case 39: goto tr162;
case 47: goto tr249;
case 60: goto st99;
case 62: goto tr250;
}
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr248;
} else if ( (*p) >= 9 )
goto tr247;
goto st104;
tr242:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st109;
tr258:
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
goto st109;
st109:
if ( ++p == pe )
goto _test_eof109;
case 109:
#line 4064 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr263;
case 32: goto tr263;
case 34: goto st112;
case 39: goto tr266;
case 47: goto tr267;
case 60: goto st99;
case 62: goto tr250;
}
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr264;
} else if ( (*p) >= 9 )
goto tr263;
goto tr240;
tr268:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st110;
tr263:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st110;
st110:
if ( ++p == pe )
goto _test_eof110;
case 110:
#line 4097 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr268;
case 32: goto tr268;
case 34: goto st130;
case 39: goto tr244;
case 47: goto tr245;
case 60: goto st99;
case 62: goto tr231;
case 63: goto tr270;
case 95: goto tr270;
}
if ( (*p) < 45 ) {
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr269;
} else if ( (*p) >= 9 )
goto tr268;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr270;
} else if ( (*p) >= 65 )
goto tr270;
} else
goto tr270;
goto tr240;
tr269:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st111;
tr264:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st111;
st111:
if ( ++p == pe )
goto _test_eof111;
case 111:
#line 4141 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr263;
case 32: goto tr263;
case 34: goto st112;
case 39: goto tr266;
case 47: goto tr271;
case 60: goto st99;
case 62: goto tr253;
case 63: goto tr270;
case 95: goto tr270;
}
if ( (*p) < 45 ) {
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr264;
} else if ( (*p) >= 9 )
goto tr263;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr270;
} else if ( (*p) >= 65 )
goto tr270;
} else
goto tr270;
goto tr240;
st112:
if ( ++p == pe )
goto _test_eof112;
case 112:
switch( (*p) ) {
case 13: goto tr206;
case 32: goto tr206;
case 34: goto tr272;
case 39: goto tr209;
case 47: goto tr210;
case 60: goto tr211;
case 62: goto tr212;
}
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr207;
} else if ( (*p) >= 9 )
goto tr206;
goto tr205;
tr215:
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st113;
tr207:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st113;
st113:
if ( ++p == pe )
goto _test_eof113;
case 113:
#line 4207 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr214;
case 32: goto tr214;
case 34: goto tr216;
case 39: goto tr217;
case 47: goto tr274;
case 60: goto st97;
case 62: goto tr275;
case 63: goto tr273;
case 95: goto tr273;
}
if ( (*p) < 45 ) {
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr215;
} else if ( (*p) >= 9 )
goto tr214;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr273;
} else if ( (*p) >= 65 )
goto tr273;
} else
goto tr273;
goto st95;
tr273:
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 161 "hpricot_scan.rl"
{
akey = Qnil;
aval = Qnil;
mark_akey = NULL;
mark_aval = NULL;
}
#line 135 "hpricot_scan.rl"
{ mark_akey = p; }
goto st114;
tr297:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 161 "hpricot_scan.rl"
{
akey = Qnil;
aval = Qnil;
mark_akey = NULL;
mark_aval = NULL;
}
#line 135 "hpricot_scan.rl"
{ mark_akey = p; }
goto st114;
st114:
if ( ++p == pe )
goto _test_eof114;
case 114:
#line 4274 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr276;
case 32: goto tr276;
case 34: goto tr216;
case 39: goto tr217;
case 47: goto tr279;
case 60: goto st97;
case 61: goto tr280;
case 62: goto tr281;
case 63: goto st114;
case 95: goto st114;
}
if ( (*p) < 45 ) {
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr277;
} else if ( (*p) >= 9 )
goto tr276;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto st114;
} else if ( (*p) >= 65 )
goto st114;
} else
goto st114;
goto st95;
tr284:
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
goto st115;
tr311:
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st115;
tr276:
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st115;
st115:
if ( ++p == pe )
goto _test_eof115;
case 115:
#line 4326 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto st115;
case 34: goto tr222;
case 39: goto tr223;
case 47: goto tr225;
case 61: goto st118;
case 62: goto tr226;
case 63: goto tr224;
case 95: goto tr224;
}
if ( (*p) < 45 ) {
if ( 9 <= (*p) && (*p) <= 13 )
goto st115;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr224;
} else if ( (*p) >= 65 )
goto tr224;
} else
goto tr224;
goto st97;
tr224:
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 161 "hpricot_scan.rl"
{
akey = Qnil;
aval = Qnil;
mark_akey = NULL;
mark_aval = NULL;
}
#line 135 "hpricot_scan.rl"
{ mark_akey = p; }
goto st116;
tr307:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 161 "hpricot_scan.rl"
{
akey = Qnil;
aval = Qnil;
mark_akey = NULL;
mark_aval = NULL;
}
#line 135 "hpricot_scan.rl"
{ mark_akey = p; }
goto st116;
st116:
if ( ++p == pe )
goto _test_eof116;
case 116:
#line 4389 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto tr284;
case 34: goto tr222;
case 39: goto tr223;
case 47: goto tr286;
case 61: goto tr287;
case 62: goto tr288;
case 63: goto st116;
case 95: goto st116;
}
if ( (*p) < 45 ) {
if ( 9 <= (*p) && (*p) <= 13 )
goto tr284;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto st116;
} else if ( (*p) >= 65 )
goto st116;
} else
goto st116;
goto st97;
tr286:
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
goto st117;
tr225:
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
goto st117;
tr308:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
goto st117;
st117:
if ( ++p == pe )
goto _test_eof117;
case 117:
#line 4444 "hpricot_scan.c"
switch( (*p) ) {
case 34: goto tr222;
case 39: goto tr223;
case 62: goto tr289;
}
goto st97;
tr212:
#line 1 "NONE"
{te = p+1;}
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 68 "hpricot_common.rl"
{act = 10;}
goto st205;
tr220:
#line 1 "NONE"
{te = p+1;}
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 68 "hpricot_common.rl"
{act = 10;}
goto st205;
tr226:
#line 1 "NONE"
{te = p+1;}
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 68 "hpricot_common.rl"
{act = 10;}
goto st205;
tr288:
#line 1 "NONE"
{te = p+1;}
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 68 "hpricot_common.rl"
{act = 10;}
goto st205;
tr289:
#line 1 "NONE"
{te = p+1;}
#line 70 "hpricot_common.rl"
{act = 12;}
goto st205;
tr275:
#line 1 "NONE"
{te = p+1;}
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
#line 68 "hpricot_common.rl"
{act = 10;}
goto st205;
tr303:
#line 1 "NONE"
{te = p+1;}
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
#line 68 "hpricot_common.rl"
{act = 10;}
goto st205;
tr281:
#line 1 "NONE"
{te = p+1;}
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 68 "hpricot_common.rl"
{act = 10;}
goto st205;
tr309:
#line 1 "NONE"
{te = p+1;}
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 68 "hpricot_common.rl"
{act = 10;}
goto st205;
st205:
if ( ++p == pe )
goto _test_eof205;
case 205:
#line 4592 "hpricot_scan.c"
switch( (*p) ) {
case 34: goto tr222;
case 39: goto tr223;
}
goto st97;
tr287:
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
goto st118;
st118:
if ( ++p == pe )
goto _test_eof118;
case 118:
#line 4606 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr290;
case 32: goto tr290;
case 34: goto tr292;
case 39: goto tr293;
case 47: goto tr294;
case 60: goto st97;
case 62: goto tr226;
}
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr291;
} else if ( (*p) >= 9 )
goto tr290;
goto tr205;
tr290:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st119;
st119:
if ( ++p == pe )
goto _test_eof119;
case 119:
#line 4630 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr295;
case 32: goto tr295;
case 34: goto tr292;
case 39: goto tr293;
case 47: goto tr294;
case 60: goto st97;
case 62: goto tr226;
}
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr296;
} else if ( (*p) >= 9 )
goto tr295;
goto tr205;
tr295:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st120;
tr298:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st120;
st120:
if ( ++p == pe )
goto _test_eof120;
case 120:
#line 4663 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr295;
case 32: goto tr295;
case 34: goto tr292;
case 39: goto tr293;
case 47: goto tr294;
case 60: goto st97;
case 62: goto tr226;
case 63: goto tr297;
case 95: goto tr297;
}
if ( (*p) < 45 ) {
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr296;
} else if ( (*p) >= 9 )
goto tr295;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr297;
} else if ( (*p) >= 65 )
goto tr297;
} else
goto tr297;
goto tr205;
tr296:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st121;
tr299:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st121;
st121:
if ( ++p == pe )
goto _test_eof121;
case 121:
#line 4707 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr298;
case 32: goto tr298;
case 34: goto tr300;
case 39: goto tr301;
case 47: goto tr302;
case 60: goto st97;
case 62: goto tr275;
case 63: goto tr297;
case 95: goto tr297;
}
if ( (*p) < 45 ) {
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr299;
} else if ( (*p) >= 9 )
goto tr298;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr297;
} else if ( (*p) >= 65 )
goto tr297;
} else
goto tr297;
goto tr205;
tr300:
#line 138 "hpricot_scan.rl"
{ SET(aval, p); }
goto st122;
st122:
if ( ++p == pe )
goto _test_eof122;
case 122:
#line 4742 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr206;
case 32: goto tr206;
case 34: goto tr272;
case 39: goto tr209;
case 47: goto tr302;
case 60: goto tr211;
case 62: goto tr303;
case 63: goto tr297;
case 95: goto tr297;
}
if ( (*p) < 45 ) {
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr207;
} else if ( (*p) >= 9 )
goto tr206;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr297;
} else if ( (*p) >= 65 )
goto tr297;
} else
goto tr297;
goto tr205;
tr294:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
goto st123;
tr218:
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
goto st123;
tr274:
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st123;
tr279:
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
goto st123;
tr210:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
goto st123;
tr302:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
#line 168 "hpricot_scan.rl"
{
if (!S->xml && !NIL_P(akey))
akey = rb_funcall(akey, s_downcase, 0);
ATTR(akey, aval);
}
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st123;
st123:
if ( ++p == pe )
goto _test_eof123;
case 123:
#line 4854 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr214;
case 32: goto tr214;
case 34: goto tr216;
case 39: goto tr217;
case 47: goto tr218;
case 60: goto st97;
case 62: goto tr220;
}
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr215;
} else if ( (*p) >= 9 )
goto tr214;
goto st95;
tr301:
#line 138 "hpricot_scan.rl"
{ SET(aval, p); }
goto st124;
st124:
if ( ++p == pe )
goto _test_eof124;
case 124:
#line 4878 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr206;
case 32: goto tr206;
case 34: goto tr208;
case 39: goto tr209;
case 47: goto tr302;
case 60: goto tr211;
case 62: goto tr303;
case 63: goto tr297;
case 95: goto tr297;
}
if ( (*p) < 45 ) {
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr207;
} else if ( (*p) >= 9 )
goto tr206;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr297;
} else if ( (*p) >= 65 )
goto tr297;
} else
goto tr297;
goto tr205;
tr292:
#line 138 "hpricot_scan.rl"
{ SET(aval, p); }
goto st125;
st125:
if ( ++p == pe )
goto _test_eof125;
case 125:
#line 4913 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto tr304;
case 34: goto tr305;
case 39: goto tr306;
case 47: goto tr308;
case 62: goto tr309;
case 63: goto tr307;
case 95: goto tr307;
}
if ( (*p) < 45 ) {
if ( 9 <= (*p) && (*p) <= 13 )
goto tr304;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr307;
} else if ( (*p) >= 65 )
goto tr307;
} else
goto tr307;
goto tr211;
tr293:
#line 138 "hpricot_scan.rl"
{ SET(aval, p); }
goto st126;
st126:
if ( ++p == pe )
goto _test_eof126;
case 126:
#line 4943 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto tr304;
case 34: goto tr310;
case 39: goto tr306;
case 47: goto tr308;
case 62: goto tr309;
case 63: goto tr307;
case 95: goto tr307;
}
if ( (*p) < 45 ) {
if ( 9 <= (*p) && (*p) <= 13 )
goto tr304;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr307;
} else if ( (*p) >= 65 )
goto tr307;
} else
goto tr307;
goto tr211;
tr291:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st127;
tr280:
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
goto st127;
st127:
if ( ++p == pe )
goto _test_eof127;
case 127:
#line 4977 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr298;
case 32: goto tr298;
case 34: goto tr300;
case 39: goto tr301;
case 47: goto tr210;
case 60: goto st97;
case 62: goto tr220;
}
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr299;
} else if ( (*p) >= 9 )
goto tr298;
goto tr205;
tr312:
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st128;
tr277:
#line 143 "hpricot_scan.rl"
{ SET(akey, p); }
#line 139 "hpricot_scan.rl"
{
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
else { SET(aval, p); }
}
goto st128;
st128:
if ( ++p == pe )
goto _test_eof128;
case 128:
#line 5013 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr311;
case 32: goto tr311;
case 34: goto tr216;
case 39: goto tr217;
case 47: goto tr274;
case 60: goto st97;
case 61: goto st127;
case 62: goto tr275;
case 63: goto tr273;
case 95: goto tr273;
}
if ( (*p) < 45 ) {
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr312;
} else if ( (*p) >= 9 )
goto tr311;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr273;
} else if ( (*p) >= 65 )
goto tr273;
} else
goto tr273;
goto st95;
tr266:
#line 138 "hpricot_scan.rl"
{ SET(aval, p); }
goto st129;
st129:
if ( ++p == pe )
goto _test_eof129;
case 129:
#line 5049 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr314;
case 32: goto tr314;
case 39: goto tr155;
case 47: goto tr271;
case 60: goto tr316;
case 62: goto tr317;
case 63: goto tr270;
case 95: goto tr270;
}
if ( (*p) < 45 ) {
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr315;
} else if ( (*p) >= 9 )
goto tr314;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr270;
} else if ( (*p) >= 65 )
goto tr270;
} else
goto tr270;
goto tr240;
st130:
if ( ++p == pe )
goto _test_eof130;
case 130:
switch( (*p) ) {
case 34: goto tr305;
case 39: goto tr306;
}
goto tr211;
tr244:
#line 138 "hpricot_scan.rl"
{ SET(aval, p); }
goto st131;
st131:
if ( ++p == pe )
goto _test_eof131;
case 131:
#line 5092 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto tr318;
case 39: goto tr319;
case 47: goto tr321;
case 62: goto tr322;
case 63: goto tr320;
case 95: goto tr320;
}
if ( (*p) < 45 ) {
if ( 9 <= (*p) && (*p) <= 13 )
goto tr318;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr320;
} else if ( (*p) >= 65 )
goto tr320;
} else
goto tr320;
goto tr316;
tr241:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st132;
st132:
if ( ++p == pe )
goto _test_eof132;
case 132:
#line 5121 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr268;
case 32: goto tr268;
case 34: goto st130;
case 39: goto tr244;
case 47: goto tr245;
case 60: goto st99;
case 62: goto tr231;
}
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr269;
} else if ( (*p) >= 9 )
goto tr268;
goto tr240;
tr181:
#line 138 "hpricot_scan.rl"
{ SET(aval, p); }
goto st133;
st133:
if ( ++p == pe )
goto _test_eof133;
case 133:
#line 5145 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto tr323;
case 34: goto tr319;
case 47: goto tr325;
case 62: goto tr326;
case 63: goto tr324;
case 95: goto tr324;
}
if ( (*p) < 45 ) {
if ( 9 <= (*p) && (*p) <= 13 )
goto tr323;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr324;
} else if ( (*p) >= 65 )
goto tr324;
} else
goto tr324;
goto tr157;
st134:
if ( ++p == pe )
goto _test_eof134;
case 134:
switch( (*p) ) {
case 34: goto tr310;
case 39: goto tr306;
}
goto tr211;
st135:
if ( ++p == pe )
goto _test_eof135;
case 135:
switch( (*p) ) {
case 13: goto tr314;
case 32: goto tr314;
case 39: goto tr155;
case 47: goto tr267;
case 60: goto tr316;
case 62: goto tr327;
}
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr315;
} else if ( (*p) >= 9 )
goto tr314;
goto tr240;
st136:
if ( ++p == pe )
goto _test_eof136;
case 136:
if ( (*p) == 34 )
goto tr319;
goto tr157;
st137:
if ( ++p == pe )
goto _test_eof137;
case 137:
if ( (*p) == 39 )
goto tr319;
goto tr316;
tr120:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st138;
st138:
if ( ++p == pe )
goto _test_eof138;
case 138:
#line 5215 "hpricot_scan.c"
switch( (*p) ) {
case 13: goto tr148;
case 32: goto tr148;
case 34: goto st136;
case 39: goto st137;
case 47: goto tr124;
case 60: goto tr39;
case 62: goto tr117;
}
if ( (*p) > 10 ) {
if ( 11 <= (*p) && (*p) <= 12 )
goto tr149;
} else if ( (*p) >= 9 )
goto tr148;
goto tr119;
st139:
if ( ++p == pe )
goto _test_eof139;
case 139:
switch( (*p) ) {
case 58: goto tr328;
case 95: goto tr328;
case 120: goto tr329;
}
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr328;
} else if ( (*p) >= 65 )
goto tr328;
goto tr0;
tr328:
#line 46 "hpricot_common.rl"
{ TEXT_PASS(); }
goto st140;
st140:
if ( ++p == pe )
goto _test_eof140;
case 140:
#line 5254 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto st206;
case 63: goto st140;
case 95: goto st140;
}
if ( (*p) < 48 ) {
if ( (*p) > 13 ) {
if ( 45 <= (*p) && (*p) <= 46 )
goto st140;
} else if ( (*p) >= 9 )
goto st206;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto st140;
} else if ( (*p) >= 65 )
goto st140;
} else
goto st140;
goto tr0;
st206:
if ( ++p == pe )
goto _test_eof206;
case 206:
if ( (*p) == 32 )
goto st206;
if ( 9 <= (*p) && (*p) <= 13 )
goto st206;
goto tr406;
tr329:
#line 46 "hpricot_common.rl"
{ TEXT_PASS(); }
goto st141;
st141:
if ( ++p == pe )
goto _test_eof141;
case 141:
#line 5292 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto st206;
case 63: goto st140;
case 95: goto st140;
case 109: goto st142;
}
if ( (*p) < 48 ) {
if ( (*p) > 13 ) {
if ( 45 <= (*p) && (*p) <= 46 )
goto st140;
} else if ( (*p) >= 9 )
goto st206;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto st140;
} else if ( (*p) >= 65 )
goto st140;
} else
goto st140;
goto tr0;
st142:
if ( ++p == pe )
goto _test_eof142;
case 142:
switch( (*p) ) {
case 32: goto st206;
case 63: goto st140;
case 95: goto st140;
case 108: goto st143;
}
if ( (*p) < 48 ) {
if ( (*p) > 13 ) {
if ( 45 <= (*p) && (*p) <= 46 )
goto st140;
} else if ( (*p) >= 9 )
goto st206;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto st140;
} else if ( (*p) >= 65 )
goto st140;
} else
goto st140;
goto tr0;
st143:
if ( ++p == pe )
goto _test_eof143;
case 143:
switch( (*p) ) {
case 32: goto tr334;
case 63: goto st140;
case 95: goto st140;
}
if ( (*p) < 48 ) {
if ( (*p) > 13 ) {
if ( 45 <= (*p) && (*p) <= 46 )
goto st140;
} else if ( (*p) >= 9 )
goto tr334;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto st140;
} else if ( (*p) >= 65 )
goto st140;
} else
goto st140;
goto tr0;
tr334:
#line 1 "NONE"
{te = p+1;}
goto st207;
st207:
if ( ++p == pe )
goto _test_eof207;
case 207:
#line 5371 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto tr334;
case 118: goto st144;
}
if ( 9 <= (*p) && (*p) <= 13 )
goto tr334;
goto tr406;
st144:
if ( ++p == pe )
goto _test_eof144;
case 144:
if ( (*p) == 101 )
goto st145;
goto tr335;
st145:
if ( ++p == pe )
goto _test_eof145;
case 145:
if ( (*p) == 114 )
goto st146;
goto tr335;
st146:
if ( ++p == pe )
goto _test_eof146;
case 146:
if ( (*p) == 115 )
goto st147;
goto tr335;
st147:
if ( ++p == pe )
goto _test_eof147;
case 147:
if ( (*p) == 105 )
goto st148;
goto tr335;
st148:
if ( ++p == pe )
goto _test_eof148;
case 148:
if ( (*p) == 111 )
goto st149;
goto tr335;
st149:
if ( ++p == pe )
goto _test_eof149;
case 149:
if ( (*p) == 110 )
goto st150;
goto tr335;
st150:
if ( ++p == pe )
goto _test_eof150;
case 150:
switch( (*p) ) {
case 32: goto st150;
case 61: goto st151;
}
if ( 9 <= (*p) && (*p) <= 13 )
goto st150;
goto tr335;
st151:
if ( ++p == pe )
goto _test_eof151;
case 151:
switch( (*p) ) {
case 32: goto st151;
case 34: goto st152;
case 39: goto st194;
}
if ( 9 <= (*p) && (*p) <= 13 )
goto st151;
goto tr335;
st152:
if ( ++p == pe )
goto _test_eof152;
case 152:
if ( (*p) == 95 )
goto tr345;
if ( (*p) < 48 ) {
if ( 45 <= (*p) && (*p) <= 46 )
goto tr345;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr345;
} else if ( (*p) >= 65 )
goto tr345;
} else
goto tr345;
goto tr335;
tr345:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st153;
st153:
if ( ++p == pe )
goto _test_eof153;
case 153:
#line 5470 "hpricot_scan.c"
switch( (*p) ) {
case 34: goto tr346;
case 95: goto st153;
}
if ( (*p) < 48 ) {
if ( 45 <= (*p) && (*p) <= 46 )
goto st153;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto st153;
} else if ( (*p) >= 65 )
goto st153;
} else
goto st153;
goto tr335;
tr346:
#line 144 "hpricot_scan.rl"
{ SET(aval, p); ATTR(ID2SYM(rb_intern("version")), aval); }
goto st154;
st154:
if ( ++p == pe )
goto _test_eof154;
case 154:
#line 5495 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto st155;
case 62: goto tr349;
case 63: goto st156;
}
if ( 9 <= (*p) && (*p) <= 13 )
goto st155;
goto tr335;
st155:
if ( ++p == pe )
goto _test_eof155;
case 155:
switch( (*p) ) {
case 32: goto st155;
case 62: goto tr349;
case 63: goto st156;
case 101: goto st157;
case 115: goto st170;
}
if ( 9 <= (*p) && (*p) <= 13 )
goto st155;
goto tr335;
st156:
if ( ++p == pe )
goto _test_eof156;
case 156:
if ( (*p) == 62 )
goto tr349;
goto tr335;
st157:
if ( ++p == pe )
goto _test_eof157;
case 157:
if ( (*p) == 110 )
goto st158;
goto tr335;
st158:
if ( ++p == pe )
goto _test_eof158;
case 158:
if ( (*p) == 99 )
goto st159;
goto tr335;
st159:
if ( ++p == pe )
goto _test_eof159;
case 159:
if ( (*p) == 111 )
goto st160;
goto tr335;
st160:
if ( ++p == pe )
goto _test_eof160;
case 160:
if ( (*p) == 100 )
goto st161;
goto tr335;
st161:
if ( ++p == pe )
goto _test_eof161;
case 161:
if ( (*p) == 105 )
goto st162;
goto tr335;
st162:
if ( ++p == pe )
goto _test_eof162;
case 162:
if ( (*p) == 110 )
goto st163;
goto tr335;
st163:
if ( ++p == pe )
goto _test_eof163;
case 163:
if ( (*p) == 103 )
goto st164;
goto tr335;
st164:
if ( ++p == pe )
goto _test_eof164;
case 164:
switch( (*p) ) {
case 32: goto st164;
case 61: goto st165;
}
if ( 9 <= (*p) && (*p) <= 13 )
goto st164;
goto tr335;
st165:
if ( ++p == pe )
goto _test_eof165;
case 165:
switch( (*p) ) {
case 32: goto st165;
case 34: goto st166;
case 39: goto st192;
}
if ( 9 <= (*p) && (*p) <= 13 )
goto st165;
goto tr335;
st166:
if ( ++p == pe )
goto _test_eof166;
case 166:
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr363;
} else if ( (*p) >= 65 )
goto tr363;
goto tr335;
tr363:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st167;
st167:
if ( ++p == pe )
goto _test_eof167;
case 167:
#line 5615 "hpricot_scan.c"
switch( (*p) ) {
case 34: goto tr364;
case 95: goto st167;
}
if ( (*p) < 48 ) {
if ( 45 <= (*p) && (*p) <= 46 )
goto st167;
} else if ( (*p) > 57 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto st167;
} else if ( (*p) >= 65 )
goto st167;
} else
goto st167;
goto tr335;
tr364:
#line 145 "hpricot_scan.rl"
{
#ifdef HAVE_RUBY_ENCODING_H
if (mark_aval < p) {
char psave = *p;
*p = '\0';
encoding_index = rb_enc_find_index(mark_aval);
*p = psave;
}
#endif
SET(aval, p);
ATTR(ID2SYM(rb_intern("encoding")), aval);
}
goto st168;
st168:
if ( ++p == pe )
goto _test_eof168;
case 168:
#line 5651 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto st169;
case 62: goto tr349;
case 63: goto st156;
}
if ( 9 <= (*p) && (*p) <= 13 )
goto st169;
goto tr335;
st169:
if ( ++p == pe )
goto _test_eof169;
case 169:
switch( (*p) ) {
case 32: goto st169;
case 62: goto tr349;
case 63: goto st156;
case 115: goto st170;
}
if ( 9 <= (*p) && (*p) <= 13 )
goto st169;
goto tr335;
st170:
if ( ++p == pe )
goto _test_eof170;
case 170:
if ( (*p) == 116 )
goto st171;
goto tr335;
st171:
if ( ++p == pe )
goto _test_eof171;
case 171:
if ( (*p) == 97 )
goto st172;
goto tr335;
st172:
if ( ++p == pe )
goto _test_eof172;
case 172:
if ( (*p) == 110 )
goto st173;
goto tr335;
st173:
if ( ++p == pe )
goto _test_eof173;
case 173:
if ( (*p) == 100 )
goto st174;
goto tr335;
st174:
if ( ++p == pe )
goto _test_eof174;
case 174:
if ( (*p) == 97 )
goto st175;
goto tr335;
st175:
if ( ++p == pe )
goto _test_eof175;
case 175:
if ( (*p) == 108 )
goto st176;
goto tr335;
st176:
if ( ++p == pe )
goto _test_eof176;
case 176:
if ( (*p) == 111 )
goto st177;
goto tr335;
st177:
if ( ++p == pe )
goto _test_eof177;
case 177:
if ( (*p) == 110 )
goto st178;
goto tr335;
st178:
if ( ++p == pe )
goto _test_eof178;
case 178:
if ( (*p) == 101 )
goto st179;
goto tr335;
st179:
if ( ++p == pe )
goto _test_eof179;
case 179:
switch( (*p) ) {
case 32: goto st179;
case 61: goto st180;
}
if ( 9 <= (*p) && (*p) <= 13 )
goto st179;
goto tr335;
st180:
if ( ++p == pe )
goto _test_eof180;
case 180:
switch( (*p) ) {
case 32: goto st180;
case 34: goto st181;
case 39: goto st187;
}
if ( 9 <= (*p) && (*p) <= 13 )
goto st180;
goto tr335;
st181:
if ( ++p == pe )
goto _test_eof181;
case 181:
switch( (*p) ) {
case 110: goto tr379;
case 121: goto tr380;
}
goto tr335;
tr379:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st182;
st182:
if ( ++p == pe )
goto _test_eof182;
case 182:
#line 5776 "hpricot_scan.c"
if ( (*p) == 111 )
goto st183;
goto tr335;
st183:
if ( ++p == pe )
goto _test_eof183;
case 183:
if ( (*p) == 34 )
goto tr382;
goto tr335;
tr382:
#line 157 "hpricot_scan.rl"
{ SET(aval, p); ATTR(ID2SYM(rb_intern("standalone")), aval); }
goto st184;
st184:
if ( ++p == pe )
goto _test_eof184;
case 184:
#line 5795 "hpricot_scan.c"
switch( (*p) ) {
case 32: goto st184;
case 62: goto tr349;
case 63: goto st156;
}
if ( 9 <= (*p) && (*p) <= 13 )
goto st184;
goto tr335;
tr380:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st185;
st185:
if ( ++p == pe )
goto _test_eof185;
case 185:
#line 5812 "hpricot_scan.c"
if ( (*p) == 101 )
goto st186;
goto tr335;
st186:
if ( ++p == pe )
goto _test_eof186;
case 186:
if ( (*p) == 115 )
goto st183;
goto tr335;
st187:
if ( ++p == pe )
goto _test_eof187;
case 187:
switch( (*p) ) {
case 110: goto tr385;
case 121: goto tr386;
}
goto tr335;
tr385:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st188;
st188:
if ( ++p == pe )
goto _test_eof188;
case 188:
#line 5840 "hpricot_scan.c"
if ( (*p) == 111 )
goto st189;
goto tr335;
st189:
if ( ++p == pe )
goto _test_eof189;
case 189:
if ( (*p) == 39 )
goto tr382;
goto tr335;
tr386:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st190;
st190:
if ( ++p == pe )
goto _test_eof190;
case 190:
#line 5859 "hpricot_scan.c"
if ( (*p) == 101 )
goto st191;
goto tr335;
st191:
if ( ++p == pe )
goto _test_eof191;
case 191:
if ( (*p) == 115 )
goto st189;
goto tr335;
st192:
if ( ++p == pe )
goto _test_eof192;
case 192:
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr389;
} else if ( (*p) >= 65 )
goto tr389;
goto tr335;
tr389:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st193;
st193:
if ( ++p == pe )
goto _test_eof193;
case 193:
#line 5888 "hpricot_scan.c"
switch( (*p) ) {
case 39: goto tr364;
case 95: goto st193;
}
if ( (*p) < 48 ) {
if ( 45 <= (*p) && (*p) <= 46 )
goto st193;
} else if ( (*p) > 57 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto st193;
} else if ( (*p) >= 65 )
goto st193;
} else
goto st193;
goto tr335;
st194:
if ( ++p == pe )
goto _test_eof194;
case 194:
if ( (*p) == 95 )
goto tr391;
if ( (*p) < 48 ) {
if ( 45 <= (*p) && (*p) <= 46 )
goto tr391;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto tr391;
} else if ( (*p) >= 65 )
goto tr391;
} else
goto tr391;
goto tr335;
tr391:
#line 134 "hpricot_scan.rl"
{ mark_aval = p; }
goto st195;
st195:
if ( ++p == pe )
goto _test_eof195;
case 195:
#line 5931 "hpricot_scan.c"
switch( (*p) ) {
case 39: goto tr346;
case 95: goto st195;
}
if ( (*p) < 48 ) {
if ( 45 <= (*p) && (*p) <= 46 )
goto st195;
} else if ( (*p) > 58 ) {
if ( (*p) > 90 ) {
if ( 97 <= (*p) && (*p) <= 122 )
goto st195;
} else if ( (*p) >= 65 )
goto st195;
} else
goto st195;
goto tr335;
tr393:
#line 51 "hpricot_common.rl"
{{p = ((te))-1;}{ TEXT_PASS(); }}
goto st208;
tr394:
#line 50 "hpricot_common.rl"
{ EBLK(comment, 3); {goto st198;} }
#line 50 "hpricot_common.rl"
{te = p+1;}
goto st208;
tr408:
#line 51 "hpricot_common.rl"
{te = p+1;{ TEXT_PASS(); }}
goto st208;
tr409:
#line 9 "hpricot_common.rl"
{curline += 1;}
#line 51 "hpricot_common.rl"
{te = p+1;{ TEXT_PASS(); }}
goto st208;
tr411:
#line 51 "hpricot_common.rl"
{te = p;p--;{ TEXT_PASS(); }}
goto st208;
st208:
#line 1 "NONE"
{ts = 0;}
if ( ++p == pe )
goto _test_eof208;
case 208:
#line 1 "NONE"
{ts = p;}
#line 5980 "hpricot_scan.c"
switch( (*p) ) {
case 10: goto tr409;
case 45: goto tr410;
}
goto tr408;
tr410:
#line 1 "NONE"
{te = p+1;}
goto st209;
st209:
if ( ++p == pe )
goto _test_eof209;
case 209:
#line 5994 "hpricot_scan.c"
if ( (*p) == 45 )
goto st196;
goto tr411;
st196:
if ( ++p == pe )
goto _test_eof196;
case 196:
if ( (*p) == 62 )
goto tr394;
goto tr393;
tr395:
#line 56 "hpricot_common.rl"
{{p = ((te))-1;}{ TEXT_PASS(); }}
goto st210;
tr396:
#line 55 "hpricot_common.rl"
{ EBLK(cdata, 3); {goto st198;} }
#line 55 "hpricot_common.rl"
{te = p+1;}
goto st210;
tr413:
#line 56 "hpricot_common.rl"
{te = p+1;{ TEXT_PASS(); }}
goto st210;
tr414:
#line 9 "hpricot_common.rl"
{curline += 1;}
#line 56 "hpricot_common.rl"
{te = p+1;{ TEXT_PASS(); }}
goto st210;
tr416:
#line 56 "hpricot_common.rl"
{te = p;p--;{ TEXT_PASS(); }}
goto st210;
st210:
#line 1 "NONE"
{ts = 0;}
if ( ++p == pe )
goto _test_eof210;
case 210:
#line 1 "NONE"
{ts = p;}
#line 6037 "hpricot_scan.c"
switch( (*p) ) {
case 10: goto tr414;
case 93: goto tr415;
}
goto tr413;
tr415:
#line 1 "NONE"
{te = p+1;}
goto st211;
st211:
if ( ++p == pe )
goto _test_eof211;
case 211:
#line 6051 "hpricot_scan.c"
if ( (*p) == 93 )
goto st197;
goto tr416;
st197:
if ( ++p == pe )
goto _test_eof197;
case 197:
if ( (*p) == 62 )
goto tr396;
goto tr395;
tr418:
#line 61 "hpricot_common.rl"
{te = p+1;{ TEXT_PASS(); }}
goto st212;
tr419:
#line 9 "hpricot_common.rl"
{curline += 1;}
#line 61 "hpricot_common.rl"
{te = p+1;{ TEXT_PASS(); }}
goto st212;
tr420:
#line 60 "hpricot_common.rl"
{ EBLK(procins, 2); {goto st198;} }
#line 60 "hpricot_common.rl"
{te = p+1;}
goto st212;
tr422:
#line 61 "hpricot_common.rl"
{te = p;p--;{ TEXT_PASS(); }}
goto st212;
st212:
#line 1 "NONE"
{ts = 0;}
if ( ++p == pe )
goto _test_eof212;
case 212:
#line 1 "NONE"
{ts = p;}
#line 6090 "hpricot_scan.c"
switch( (*p) ) {
case 10: goto tr419;
case 62: goto tr420;
case 63: goto st213;
}
goto tr418;
st213:
if ( ++p == pe )
goto _test_eof213;
case 213:
if ( (*p) == 62 )
goto tr420;
goto tr422;
}
_test_eof198: cs = 198; goto _test_eof;
_test_eof199: cs = 199; goto _test_eof;
_test_eof0: cs = 0; goto _test_eof;
_test_eof1: cs = 1; goto _test_eof;
_test_eof2: cs = 2; goto _test_eof;
_test_eof3: cs = 3; goto _test_eof;
_test_eof4: cs = 4; goto _test_eof;
_test_eof5: cs = 5; goto _test_eof;
_test_eof6: cs = 6; goto _test_eof;
_test_eof7: cs = 7; goto _test_eof;
_test_eof8: cs = 8; goto _test_eof;
_test_eof9: cs = 9; goto _test_eof;
_test_eof10: cs = 10; goto _test_eof;
_test_eof11: cs = 11; goto _test_eof;
_test_eof12: cs = 12; goto _test_eof;
_test_eof13: cs = 13; goto _test_eof;
_test_eof14: cs = 14; goto _test_eof;
_test_eof15: cs = 15; goto _test_eof;
_test_eof16: cs = 16; goto _test_eof;
_test_eof17: cs = 17; goto _test_eof;
_test_eof18: cs = 18; goto _test_eof;
_test_eof19: cs = 19; goto _test_eof;
_test_eof20: cs = 20; goto _test_eof;
_test_eof21: cs = 21; goto _test_eof;
_test_eof22: cs = 22; goto _test_eof;
_test_eof23: cs = 23; goto _test_eof;
_test_eof24: cs = 24; goto _test_eof;
_test_eof25: cs = 25; goto _test_eof;
_test_eof26: cs = 26; goto _test_eof;
_test_eof27: cs = 27; goto _test_eof;
_test_eof28: cs = 28; goto _test_eof;
_test_eof29: cs = 29; goto _test_eof;
_test_eof30: cs = 30; goto _test_eof;
_test_eof31: cs = 31; goto _test_eof;
_test_eof32: cs = 32; goto _test_eof;
_test_eof33: cs = 33; goto _test_eof;
_test_eof34: cs = 34; goto _test_eof;
_test_eof35: cs = 35; goto _test_eof;
_test_eof36: cs = 36; goto _test_eof;
_test_eof37: cs = 37; goto _test_eof;
_test_eof38: cs = 38; goto _test_eof;
_test_eof39: cs = 39; goto _test_eof;
_test_eof200: cs = 200; goto _test_eof;
_test_eof40: cs = 40; goto _test_eof;
_test_eof41: cs = 41; goto _test_eof;
_test_eof201: cs = 201; goto _test_eof;
_test_eof42: cs = 42; goto _test_eof;
_test_eof43: cs = 43; goto _test_eof;
_test_eof202: cs = 202; goto _test_eof;
_test_eof44: cs = 44; goto _test_eof;
_test_eof45: cs = 45; goto _test_eof;
_test_eof46: cs = 46; goto _test_eof;
_test_eof47: cs = 47; goto _test_eof;
_test_eof48: cs = 48; goto _test_eof;
_test_eof49: cs = 49; goto _test_eof;
_test_eof50: cs = 50; goto _test_eof;
_test_eof51: cs = 51; goto _test_eof;
_test_eof52: cs = 52; goto _test_eof;
_test_eof53: cs = 53; goto _test_eof;
_test_eof54: cs = 54; goto _test_eof;
_test_eof55: cs = 55; goto _test_eof;
_test_eof56: cs = 56; goto _test_eof;
_test_eof57: cs = 57; goto _test_eof;
_test_eof58: cs = 58; goto _test_eof;
_test_eof59: cs = 59; goto _test_eof;
_test_eof60: cs = 60; goto _test_eof;
_test_eof61: cs = 61; goto _test_eof;
_test_eof62: cs = 62; goto _test_eof;
_test_eof63: cs = 63; goto _test_eof;
_test_eof64: cs = 64; goto _test_eof;
_test_eof65: cs = 65; goto _test_eof;
_test_eof66: cs = 66; goto _test_eof;
_test_eof67: cs = 67; goto _test_eof;
_test_eof68: cs = 68; goto _test_eof;
_test_eof69: cs = 69; goto _test_eof;
_test_eof70: cs = 70; goto _test_eof;
_test_eof71: cs = 71; goto _test_eof;
_test_eof72: cs = 72; goto _test_eof;
_test_eof73: cs = 73; goto _test_eof;
_test_eof74: cs = 74; goto _test_eof;
_test_eof75: cs = 75; goto _test_eof;
_test_eof76: cs = 76; goto _test_eof;
_test_eof77: cs = 77; goto _test_eof;
_test_eof78: cs = 78; goto _test_eof;
_test_eof79: cs = 79; goto _test_eof;
_test_eof80: cs = 80; goto _test_eof;
_test_eof81: cs = 81; goto _test_eof;
_test_eof82: cs = 82; goto _test_eof;
_test_eof83: cs = 83; goto _test_eof;
_test_eof203: cs = 203; goto _test_eof;
_test_eof84: cs = 84; goto _test_eof;
_test_eof85: cs = 85; goto _test_eof;
_test_eof86: cs = 86; goto _test_eof;
_test_eof87: cs = 87; goto _test_eof;
_test_eof88: cs = 88; goto _test_eof;
_test_eof89: cs = 89; goto _test_eof;
_test_eof90: cs = 90; goto _test_eof;
_test_eof91: cs = 91; goto _test_eof;
_test_eof92: cs = 92; goto _test_eof;
_test_eof93: cs = 93; goto _test_eof;
_test_eof94: cs = 94; goto _test_eof;
_test_eof95: cs = 95; goto _test_eof;
_test_eof96: cs = 96; goto _test_eof;
_test_eof97: cs = 97; goto _test_eof;
_test_eof98: cs = 98; goto _test_eof;
_test_eof99: cs = 99; goto _test_eof;
_test_eof100: cs = 100; goto _test_eof;
_test_eof101: cs = 101; goto _test_eof;
_test_eof102: cs = 102; goto _test_eof;
_test_eof204: cs = 204; goto _test_eof;
_test_eof103: cs = 103; goto _test_eof;
_test_eof104: cs = 104; goto _test_eof;
_test_eof105: cs = 105; goto _test_eof;
_test_eof106: cs = 106; goto _test_eof;
_test_eof107: cs = 107; goto _test_eof;
_test_eof108: cs = 108; goto _test_eof;
_test_eof109: cs = 109; goto _test_eof;
_test_eof110: cs = 110; goto _test_eof;
_test_eof111: cs = 111; goto _test_eof;
_test_eof112: cs = 112; goto _test_eof;
_test_eof113: cs = 113; goto _test_eof;
_test_eof114: cs = 114; goto _test_eof;
_test_eof115: cs = 115; goto _test_eof;
_test_eof116: cs = 116; goto _test_eof;
_test_eof117: cs = 117; goto _test_eof;
_test_eof205: cs = 205; goto _test_eof;
_test_eof118: cs = 118; goto _test_eof;
_test_eof119: cs = 119; goto _test_eof;
_test_eof120: cs = 120; goto _test_eof;
_test_eof121: cs = 121; goto _test_eof;
_test_eof122: cs = 122; goto _test_eof;
_test_eof123: cs = 123; goto _test_eof;
_test_eof124: cs = 124; goto _test_eof;
_test_eof125: cs = 125; goto _test_eof;
_test_eof126: cs = 126; goto _test_eof;
_test_eof127: cs = 127; goto _test_eof;
_test_eof128: cs = 128; goto _test_eof;
_test_eof129: cs = 129; goto _test_eof;
_test_eof130: cs = 130; goto _test_eof;
_test_eof131: cs = 131; goto _test_eof;
_test_eof132: cs = 132; goto _test_eof;
_test_eof133: cs = 133; goto _test_eof;
_test_eof134: cs = 134; goto _test_eof;
_test_eof135: cs = 135; goto _test_eof;
_test_eof136: cs = 136; goto _test_eof;
_test_eof137: cs = 137; goto _test_eof;
_test_eof138: cs = 138; goto _test_eof;
_test_eof139: cs = 139; goto _test_eof;
_test_eof140: cs = 140; goto _test_eof;
_test_eof206: cs = 206; goto _test_eof;
_test_eof141: cs = 141; goto _test_eof;
_test_eof142: cs = 142; goto _test_eof;
_test_eof143: cs = 143; goto _test_eof;
_test_eof207: cs = 207; goto _test_eof;
_test_eof144: cs = 144; goto _test_eof;
_test_eof145: cs = 145; goto _test_eof;
_test_eof146: cs = 146; goto _test_eof;
_test_eof147: cs = 147; goto _test_eof;
_test_eof148: cs = 148; goto _test_eof;
_test_eof149: cs = 149; goto _test_eof;
_test_eof150: cs = 150; goto _test_eof;
_test_eof151: cs = 151; goto _test_eof;
_test_eof152: cs = 152; goto _test_eof;
_test_eof153: cs = 153; goto _test_eof;
_test_eof154: cs = 154; goto _test_eof;
_test_eof155: cs = 155; goto _test_eof;
_test_eof156: cs = 156; goto _test_eof;
_test_eof157: cs = 157; goto _test_eof;
_test_eof158: cs = 158; goto _test_eof;
_test_eof159: cs = 159; goto _test_eof;
_test_eof160: cs = 160; goto _test_eof;
_test_eof161: cs = 161; goto _test_eof;
_test_eof162: cs = 162; goto _test_eof;
_test_eof163: cs = 163; goto _test_eof;
_test_eof164: cs = 164; goto _test_eof;
_test_eof165: cs = 165; goto _test_eof;
_test_eof166: cs = 166; goto _test_eof;
_test_eof167: cs = 167; goto _test_eof;
_test_eof168: cs = 168; goto _test_eof;
_test_eof169: cs = 169; goto _test_eof;
_test_eof170: cs = 170; goto _test_eof;
_test_eof171: cs = 171; goto _test_eof;
_test_eof172: cs = 172; goto _test_eof;
_test_eof173: cs = 173; goto _test_eof;
_test_eof174: cs = 174; goto _test_eof;
_test_eof175: cs = 175; goto _test_eof;
_test_eof176: cs = 176; goto _test_eof;
_test_eof177: cs = 177; goto _test_eof;
_test_eof178: cs = 178; goto _test_eof;
_test_eof179: cs = 179; goto _test_eof;
_test_eof180: cs = 180; goto _test_eof;
_test_eof181: cs = 181; goto _test_eof;
_test_eof182: cs = 182; goto _test_eof;
_test_eof183: cs = 183; goto _test_eof;
_test_eof184: cs = 184; goto _test_eof;
_test_eof185: cs = 185; goto _test_eof;
_test_eof186: cs = 186; goto _test_eof;
_test_eof187: cs = 187; goto _test_eof;
_test_eof188: cs = 188; goto _test_eof;
_test_eof189: cs = 189; goto _test_eof;
_test_eof190: cs = 190; goto _test_eof;
_test_eof191: cs = 191; goto _test_eof;
_test_eof192: cs = 192; goto _test_eof;
_test_eof193: cs = 193; goto _test_eof;
_test_eof194: cs = 194; goto _test_eof;
_test_eof195: cs = 195; goto _test_eof;
_test_eof208: cs = 208; goto _test_eof;
_test_eof209: cs = 209; goto _test_eof;
_test_eof196: cs = 196; goto _test_eof;
_test_eof210: cs = 210; goto _test_eof;
_test_eof211: cs = 211; goto _test_eof;
_test_eof197: cs = 197; goto _test_eof;
_test_eof212: cs = 212; goto _test_eof;
_test_eof213: cs = 213; goto _test_eof;
_test_eof: {}
if ( p == eof )
{
switch ( cs ) {
case 199: goto tr400;
case 0: goto tr0;
case 1: goto tr0;
case 2: goto tr0;
case 3: goto tr0;
case 4: goto tr0;
case 5: goto tr0;
case 6: goto tr0;
case 7: goto tr0;
case 8: goto tr0;
case 9: goto tr0;
case 10: goto tr0;
case 11: goto tr0;
case 12: goto tr0;
case 13: goto tr0;
case 14: goto tr0;
case 15: goto tr0;
case 16: goto tr0;
case 17: goto tr0;
case 18: goto tr0;
case 19: goto tr0;
case 20: goto tr0;
case 21: goto tr0;
case 22: goto tr0;
case 23: goto tr0;
case 24: goto tr39;
case 25: goto tr39;
case 26: goto tr39;
case 27: goto tr39;
case 28: goto tr0;
case 29: goto tr39;
case 30: goto tr0;
case 31: goto tr0;
case 32: goto tr0;
case 33: goto tr0;
case 34: goto tr0;
case 35: goto tr0;
case 36: goto tr0;
case 37: goto tr0;
case 38: goto tr0;
case 39: goto tr0;
case 200: goto tr405;
case 40: goto tr0;
case 41: goto tr0;
case 201: goto tr405;
case 42: goto tr0;
case 43: goto tr0;
case 202: goto tr405;
case 44: goto tr0;
case 45: goto tr0;
case 46: goto tr0;
case 47: goto tr0;
case 48: goto tr0;
case 49: goto tr0;
case 50: goto tr0;
case 51: goto tr0;
case 52: goto tr0;
case 53: goto tr0;
case 54: goto tr0;
case 55: goto tr0;
case 56: goto tr0;
case 57: goto tr0;
case 58: goto tr0;
case 59: goto tr0;
case 60: goto tr0;
case 61: goto tr0;
case 62: goto tr0;
case 63: goto tr0;
case 64: goto tr39;
case 65: goto tr39;
case 66: goto tr39;
case 67: goto tr39;
case 68: goto tr39;
case 69: goto tr39;
case 70: goto tr39;
case 71: goto tr39;
case 72: goto tr39;
case 73: goto tr39;
case 74: goto tr39;
case 75: goto tr39;
case 76: goto tr39;
case 77: goto tr39;
case 78: goto tr39;
case 79: goto tr39;
case 80: goto tr39;
case 81: goto tr39;
case 82: goto tr39;
case 83: goto tr39;
case 203: goto tr39;
case 84: goto tr39;
case 85: goto tr39;
case 86: goto tr39;
case 87: goto tr39;
case 88: goto tr39;
case 89: goto tr39;
case 90: goto tr39;
case 91: goto tr39;
case 92: goto tr39;
case 93: goto tr39;
case 94: goto tr39;
case 95: goto tr39;
case 96: goto tr39;
case 97: goto tr39;
case 98: goto tr39;
case 99: goto tr39;
case 100: goto tr39;
case 101: goto tr39;
case 102: goto tr39;
case 204: goto tr39;
case 103: goto tr39;
case 104: goto tr39;
case 105: goto tr39;
case 106: goto tr39;
case 107: goto tr39;
case 108: goto tr39;
case 109: goto tr39;
case 110: goto tr39;
case 111: goto tr39;
case 112: goto tr39;
case 113: goto tr39;
case 114: goto tr39;
case 115: goto tr39;
case 116: goto tr39;
case 117: goto tr39;
case 205: goto tr39;
case 118: goto tr39;
case 119: goto tr39;
case 120: goto tr39;
case 121: goto tr39;
case 122: goto tr39;
case 123: goto tr39;
case 124: goto tr39;
case 125: goto tr39;
case 126: goto tr39;
case 127: goto tr39;
case 128: goto tr39;
case 129: goto tr39;
case 130: goto tr39;
case 131: goto tr39;
case 132: goto tr39;
case 133: goto tr39;
case 134: goto tr39;
case 135: goto tr39;
case 136: goto tr39;
case 137: goto tr39;
case 138: goto tr39;
case 139: goto tr0;
case 140: goto tr0;
case 206: goto tr406;
case 141: goto tr0;
case 142: goto tr0;
case 143: goto tr0;
case 207: goto tr406;
case 144: goto tr335;
case 145: goto tr335;
case 146: goto tr335;
case 147: goto tr335;
case 148: goto tr335;
case 149: goto tr335;
case 150: goto tr335;
case 151: goto tr335;
case 152: goto tr335;
case 153: goto tr335;
case 154: goto tr335;
case 155: goto tr335;
case 156: goto tr335;
case 157: goto tr335;
case 158: goto tr335;
case 159: goto tr335;
case 160: goto tr335;
case 161: goto tr335;
case 162: goto tr335;
case 163: goto tr335;
case 164: goto tr335;
case 165: goto tr335;
case 166: goto tr335;
case 167: goto tr335;
case 168: goto tr335;
case 169: goto tr335;
case 170: goto tr335;
case 171: goto tr335;
case 172: goto tr335;
case 173: goto tr335;
case 174: goto tr335;
case 175: goto tr335;
case 176: goto tr335;
case 177: goto tr335;
case 178: goto tr335;
case 179: goto tr335;
case 180: goto tr335;
case 181: goto tr335;
case 182: goto tr335;
case 183: goto tr335;
case 184: goto tr335;
case 185: goto tr335;
case 186: goto tr335;
case 187: goto tr335;
case 188: goto tr335;
case 189: goto tr335;
case 190: goto tr335;
case 191: goto tr335;
case 192: goto tr335;
case 193: goto tr335;
case 194: goto tr335;
case 195: goto tr335;
case 209: goto tr411;
case 196: goto tr393;
case 211: goto tr416;
case 197: goto tr395;
case 213: goto tr422;
}
}
}
#line 602 "hpricot_scan.rl"
if (cs == hpricot_scan_error) {
if (buf != NULL)
free(buf);
if (!NIL_P(tag))
{
rb_raise(rb_eHpricotParseError, "parse error on element <%s>, starting on line %d.\n" NO_WAY_SERIOUSLY, RSTRING_PTR(tag), curline);
}
else
{
rb_raise(rb_eHpricotParseError, "parse error on line %d.\n" NO_WAY_SERIOUSLY, curline);
}
}
if (done && ele_open)
{
ele_open = 0;
if (ts > 0) {
mark_tag = ts;
ts = 0;
text = 1;
}
}
if (ts == 0)
{
have = 0;
/* text nodes have no ts because each byte is parsed alone */
if (mark_tag != NULL && text == 1)
{
if (done)
{
if (mark_tag < p-1)
{
CAT(tag, p-1);
ELE(text);
}
}
else
{
CAT(tag, p);
}
}
if (io)
mark_tag = buf;
else
mark_tag = RSTRING_PTR(port);
}
else if (io)
{
have = pe - ts;
memmove(buf, ts, have);
SLIDE(tag);
SLIDE(akey);
SLIDE(aval);
te = buf + (te - ts);
ts = buf;
}
}
if (buf != NULL)
free(buf);
if (S != NULL)
{
VALUE doc = S->doc;
rb_gc_unregister_address(&S->doc);
free(S);
return doc;
}
return Qnil;
}
|
.uxs(str) ⇒ Object
XML unescape
87 88 89 90 91 92 |
# File 'lib/hpricot/xchar.rb', line 87 def uxs(str) str.to_s. gsub(/\&\w+;/) { |x| (XChar::PREDEFINED_U[x] || 63).chr }. # 63 = ?? (query char) gsub(/\&\#(\d+);/) { [$1.to_i].pack("U*") }. gsub(/\&\#x([0-9a-fA-F]+);/) { [$1.to_i(16)].pack("U*") } end |
.xchr(str) ⇒ Object
XML escaped version of chr
70 71 72 73 74 75 76 77 |
# File 'lib/hpricot/xchar.rb', line 70 def xchr(str) n = XChar::CP1252[str] || str case n when *XChar::VALID XChar::PREDEFINED[n] or (n<128 ? n.chr : "&##{n};") else '*' end end |
.XML(input = nil, opts = {}, &blk) ⇒ Object
Hpricot::XML parses input, disregarding all the HTML rules and returning a document tree.
20 21 22 23 |
# File 'lib/hpricot/parse.rb', line 20 def Hpricot.XML(input = nil, opts = {}, &blk) opts.merge! :xml => true make(input, opts, &blk) end |
.xs(str) ⇒ Object
XML escaped version of to_s
80 81 82 83 84 |
# File 'lib/hpricot/xchar.rb', line 80 def xs(str) str.to_s.unpack('U*').map {|n| xchr(n)}.join # ASCII, UTF-8 rescue str.to_s.unpack('C*').map {|n| xchr(n)}.join # ISO-8859-1, WIN-1252 end |