Sha256: 5737a808928d33457e0d7806a5cff245df4d69c8d103f83eb9757c9623e13b5c

Contents?: true

Size: 638 Bytes

Versions: 18

Compression:

Stored size: 638 Bytes

Contents

module Gherkin
  class ParseError < StandardError
    def initialize(state, new_state, expected_states, line)
      super("Parse error on line #{line}. Found #{new_state} when expecting one of: #{expected_states.join(', ')}. (Current state: #{state}).")
    end
  end

  class Parser
    def self.new(listener, raise_on_error=false, machine_names='root')
      if defined?(JRUBY_VERSION)
        require 'gherkin.jar'
        Java::Gherkin::Parser.new(listener, raise_on_error, machine_names)
      else
        require 'gherkin/rb_parser'
        Gherkin::RbParser.new(listener, raise_on_error, machine_names)
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
gherkin-1.0.2-i386-mswin32 lib/gherkin/parser.rb
gherkin-1.0.2-i386-mingw32 lib/gherkin/parser.rb
gherkin-1.0.2-java lib/gherkin/parser.rb
gherkin-1.0.2 lib/gherkin/parser.rb
gherkin-1.0.1-i386-mswin32 lib/gherkin/parser.rb
gherkin-1.0.1-i386-mingw32 lib/gherkin/parser.rb
gherkin-1.0.1-universal-java-1.5 lib/gherkin/parser.rb
gherkin-1.0.1 lib/gherkin/parser.rb
gherkin-1.0.0-i386-mingw32 lib/gherkin/parser.rb
gherkin-1.0.0-i386-mswin32 lib/gherkin/parser.rb
gherkin-1.0.0-universal-java-1.5 lib/gherkin/parser.rb
gherkin-1.0.0 lib/gherkin/parser.rb
gherkin-0.0.4-universal-java-1.5 lib/gherkin/parser.rb
gherkin-0.0.4-i386-mswin32 lib/gherkin/parser.rb
gherkin-0.0.4-i386-mingw32 lib/gherkin/parser.rb
gherkin-0.0.4 lib/gherkin/parser.rb
gherkin-0.0.3-universal-java-1.5 lib/gherkin/parser.rb
gherkin-0.0.3 lib/gherkin/parser.rb