Class | Nokogiri::CSS::Parser
In: | lib/nokogiri/css/parser.rb lib/nokogiri/css/parser_extras.rb
Parent: | Racc::Parser

### Methods

[] []= _reduce_1 _reduce_10 _reduce_11 _reduce_13 _reduce_14 _reduce_15 _reduce_16 _reduce_17 _reduce_19 _reduce_2 _reduce_20 _reduce_21 _reduce_22 _reduce_23 _reduce_25 _reduce_26 _reduce_27 _reduce_28 _reduce_29 _reduce_3 _reduce_30 _reduce_31 _reduce_32 _reduce_33 _reduce_34 _reduce_35 _reduce_38 _reduce_39 _reduce_4 _reduce_40 _reduce_41 _reduce_42 _reduce_43 _reduce_46 _reduce_47 _reduce_48 _reduce_49 _reduce_5 _reduce_54 _reduce_55 _reduce_56 _reduce_58 _reduce_59 _reduce_6 _reduce_60 _reduce_61 _reduce_62 _reduce_63 _reduce_64 _reduce_65 _reduce_7 _reduce_8 _reduce_9 _reduce_none clear_cache new next_token on_error parse parse without_cache xpath_for

### Constants

Racc_arg | = | [ racc_action_table, racc_action_check, racc_action_default, racc_action_pointer, racc_goto_table, racc_goto_check, racc_goto_default, racc_goto_pointer, racc_nt_base, racc_reduce_table, racc_token_table, racc_shift_n, racc_reduce_n, racc_use_result_var ]

Racc_token_to_s_table

=

[ "$end", "error", "FUNCTION", "INCLUDES", "DASHMATCH", "LBRACE", "HASH", "PLUS", "GREATER", "S", "STRING", "IDENT", "COMMA", "NUMBER", "PREFIXMATCH", "SUFFIXMATCH", "SUBSTRINGMATCH", "TILDE", "NOT_EQUAL", "SLASH", "DOUBLESLASH", "NOT", "EQUAL", "RPAREN", "LSQUARE", "RSQUARE", "HAS", "\".\"", "\"|\"", "\"*\"", "\":\"", "$start", "selector", "simple_selector_1toN", "combinator", "simple_selector", "element_name", "hcap_0toN", "hcap_1toN", "negation", "function", "pseudo", "attrib", "class", "namespace", "attrib_val_0or1", "expr", "an_plus_b", "attribute_id", "eql_incl_dash", "negation_arg" ]

Racc_debug_parser | = | false

### External Aliases

cache_on | -> | cache_on?
cache_on= | -> | set_cache

### Attributes

cache_on | [RW] | Turn on CSS parse caching

### Public Class methods

[](string)

Get the css selector in `string` from the cache

[]=(string, value)

Set the css selector in `string` in the cache to `value`

clear_cache()

Clear the cache

new(namespaces = {})

Create a new CSS parser with respect to `namespaces`

parse(selector)

Parse this CSS selector in `selector`. Returns an AST.

without_cache(&block)

Execute `block` without cache

### Public Instance methods

_reduce_1(val, _values, result)

reduce 0 omitted

_reduce_10(val, _values, result)
_reduce_11(val, _values, result)
_reduce_13(val, _values, result)

reduce 12 omitted

_reduce_14(val, _values, result)
_reduce_15(val, _values, result)
_reduce_16(val, _values, result)
_reduce_17(val, _values, result)
_reduce_19(val, _values, result)

reduce 18 omitted

_reduce_2(val, _values, result)
_reduce_20(val, _values, result)
_reduce_21(val, _values, result)
_reduce_22(val, _values, result)
_reduce_23(val, _values, result)
_reduce_25(val, _values, result)

reduce 24 omitted

_reduce_26(val, _values, result)
_reduce_27(val, _values, result)
_reduce_28(val, _values, result)
_reduce_29(val, _values, result)
_reduce_3(val, _values, result)
_reduce_30(val, _values, result)
_reduce_31(val, _values, result)
_reduce_32(val, _values, result)
_reduce_33(val, _values, result)
_reduce_34(val, _values, result)
_reduce_35(val, _values, result)
_reduce_38(val, _values, result)

reduce 37 omitted

_reduce_39(val, _values, result)
_reduce_4(val, _values, result)
_reduce_40(val, _values, result)
_reduce_41(val, _values, result)
_reduce_42(val, _values, result)
_reduce_43(val, _values, result)
_reduce_46(val, _values, result)

reduce 45 omitted

_reduce_47(val, _values, result)
_reduce_48(val, _values, result)
_reduce_49(val, _values, result)
_reduce_5(val, _values, result)
_reduce_54(val, _values, result)

reduce 53 omitted

_reduce_55(val, _values, result)
_reduce_56(val, _values, result)
_reduce_58(val, _values, result)

reduce 57 omitted

_reduce_59(val, _values, result)
_reduce_6(val, _values, result)
_reduce_60(val, _values, result)
_reduce_61(val, _values, result)
_reduce_62(val, _values, result)
_reduce_63(val, _values, result)
_reduce_64(val, _values, result)
_reduce_65(val, _values, result)
_reduce_7(val, _values, result)
_reduce_8(val, _values, result)
_reduce_9(val, _values, result)
_reduce_none(val, _values, result)

reduce 68 omitted

next_token()
on_error(error_token_id, error_value, value_stack)

On CSS parser error, raise an exception

parse(string)
xpath_for(string, options={})

Get the xpath for `string` using `options`

[Validate]