Sha256: 3bf484e4cfb17fcdb0b3c6a2abb6c4e3ed8abfd28a7588c468eb00bff58a2ebd

Contents?: true

Size: 983 Bytes

Versions: 156

Compression:

Stored size: 983 Bytes

Contents

class ActionDispatch::Journey::Parser
  options no_result_var
token SLASH LITERAL SYMBOL LPAREN RPAREN DOT STAR OR

rule
  expressions
    : expression expressions  { Cat.new(val.first, val.last) }
    | expression              { val.first }
    | or
    ;
  expression
    : terminal
    | group
    | star
    ;
  group
    : LPAREN expressions RPAREN { Group.new(val[1]) }
    ;
  or
    : expression OR expression { Or.new([val.first, val.last]) }
    | expression OR or { Or.new([val.first, val.last]) }
    ;
  star
    : STAR       { Star.new(Symbol.new(val.last)) }
    ;
  terminal
    : symbol
    | literal
    | slash
    | dot
    ;
  slash
    : SLASH              { Slash.new(val.first) }
    ;
  symbol
    : SYMBOL             { Symbol.new(val.first) }
    ;
  literal
    : LITERAL            { Literal.new(val.first) }
    ;
  dot
    : DOT                { Dot.new(val.first) }
    ;

end

---- header
# :stopdoc:

require "action_dispatch/journey/parser_extras"

Version data entries

156 entries across 148 versions & 7 rubygems

Version Path
actionpack-6.0.6.1 lib/action_dispatch/journey/parser.y
actionpack-6.0.6 lib/action_dispatch/journey/parser.y
actionpack-6.0.5.1 lib/action_dispatch/journey/parser.y
actionpack-5.2.8.1 lib/action_dispatch/journey/parser.y
actionpack-5.2.8 lib/action_dispatch/journey/parser.y
actionpack-6.0.5 lib/action_dispatch/journey/parser.y
actionpack-6.0.4.8 lib/action_dispatch/journey/parser.y
actionpack-5.2.7.1 lib/action_dispatch/journey/parser.y
actionpack-5.2.7 lib/action_dispatch/journey/parser.y
actionpack-6.0.4.7 lib/action_dispatch/journey/parser.y
actionpack-5.2.6.3 lib/action_dispatch/journey/parser.y
actionpack-6.0.4.6 lib/action_dispatch/journey/parser.y
actionpack-5.2.6.2 lib/action_dispatch/journey/parser.y
actionpack-5.2.6.1 lib/action_dispatch/journey/parser.y
actionpack-6.0.4.5 lib/action_dispatch/journey/parser.y
actionpack-6.0.4.4 lib/action_dispatch/journey/parser.y
actionpack-6.0.4.3 lib/action_dispatch/journey/parser.y
actionpack-6.0.4.2 lib/action_dispatch/journey/parser.y
actionpack-6.0.4.1 lib/action_dispatch/journey/parser.y
actionpack-6.0.4 lib/action_dispatch/journey/parser.y