class Journey::Parser - journey-1.0.4 Documentation

# class Journey::Parser

### Constants

Racc_arg
Racc_debug_parser
Racc_token_to_s_table

### Public Class Methods

new() click to toggle source

    # File lib/journey/parser_extras.rb, line 8
    def initialize
      @scanner = Scanner.new
    end

### Public Instance Methods

_reduce_1(val, _values, result) click to toggle source

reduce 0 omitted

    # File lib/journey/parser.rb, line 138
    def _reduce_1(val, _values, result)
     result = Cat.new(val.first, val.last)
        result
    end

_reduce_14(val, _values, result) click to toggle source

reduce 13 omitted

    # File lib/journey/parser.rb, line 179
    def _reduce_14(val, _values, result)
     result = Slash.new('/')
        result
    end

_reduce_15(val, _values, result) click to toggle source

    # File lib/journey/parser.rb, line 184
    def _reduce_15(val, _values, result)
     result = Symbol.new(val.first)
        result
    end

_reduce_16(val, _values, result) click to toggle source

    # File lib/journey/parser.rb, line 189
    def _reduce_16(val, _values, result)
     result = Literal.new(val.first)
        result
    end

_reduce_17(val, _values, result) click to toggle source

    # File lib/journey/parser.rb, line 194
    def _reduce_17(val, _values, result)
     result = Dot.new(val.first)
        result
    end

_reduce_2(val, _values, result) click to toggle source

    # File lib/journey/parser.rb, line 143
    def _reduce_2(val, _values, result)
     result = val.first
        result
    end

_reduce_7(val, _values, result) click to toggle source

reduce 6 omitted

    # File lib/journey/parser.rb, line 156
    def _reduce_7(val, _values, result)
     result = Group.new(val[1])
        result
    end

_reduce_8(val, _values, result) click to toggle source

    # File lib/journey/parser.rb, line 161
    def _reduce_8(val, _values, result)
     result = Or.new([val.first, val.last])
        result
    end

_reduce_9(val, _values, result) click to toggle source

    # File lib/journey/parser.rb, line 166
    def _reduce_9(val, _values, result)
     result = Star.new(Symbol.new(val.last.left))
        result
    end

_reduce_none(val, _values, result) click to toggle source

    # File lib/journey/parser.rb, line 199
    def _reduce_none(val, _values, result)
      val[0]
    end

next_token() click to toggle source

    # File lib/journey/parser_extras.rb, line 17
    def next_token
      @scanner.next_token
    end

parse(string) click to toggle source

    # File lib/journey/parser_extras.rb, line 12
    def parse string
      @scanner.scan_setup string
      do_parse
    end