gherkin.parser
Class Parser

java.lang.Object
  extended by gherkin.parser.Parser
All Implemented Interfaces:
Listener

public class Parser
extends Object
implements Listener


Constructor Summary
Parser(Formatter formatter)
           
Parser(Formatter formatter, boolean throwOnError)
           
Parser(Formatter formatter, boolean throwOnError, String machineName)
           
Parser(Formatter formatter, boolean throwOnError, String machineName, boolean forceRubyDummy)
           
 
Method Summary
 void background(String keyword, String name, String description, int line)
           
 void comment(String comment, int line)
           
 void docString(String contentType, String content, int line)
           
 void eof()
           
 void examples(String keyword, String name, String description, int line)
           
 void feature(String keyword, String name, String description, int line)
           
 I18n getI18nLanguage()
           
 void parse(String gherkin, String featureURI, int lineOffset)
           
 void row(List<String> cells, int line)
           
 void scenario(String keyword, String name, String description, int line)
           
 void scenarioOutline(String keyword, String name, String description, int line)
           
 void step(String keyword, String name, int line)
           
 void syntaxError(String state, String event, List<String> legalEvents, int line)
           
 void syntaxError(String state, String event, List<String> legalEvents, String uri, int line)
           
 void tag(String tag, int line)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Parser

public Parser(Formatter formatter)

Parser

public Parser(Formatter formatter,
              boolean throwOnError)

Parser

public Parser(Formatter formatter,
              boolean throwOnError,
              String machineName)

Parser

public Parser(Formatter formatter,
              boolean throwOnError,
              String machineName,
              boolean forceRubyDummy)
Method Detail

parse

public void parse(String gherkin,
                  String featureURI,
                  int lineOffset)
Parameters:
featureURI - the URI where the gherkin originated from. Typically a file path.
lineOffset - the line offset within the uri document the gherkin was taken from. Typically 0.

getI18nLanguage

public I18n getI18nLanguage()

tag

public void tag(String tag,
                int line)
Specified by:
tag in interface Listener

docString

public void docString(String contentType,
                      String content,
                      int line)
Specified by:
docString in interface Listener

feature

public void feature(String keyword,
                    String name,
                    String description,
                    int line)
Specified by:
feature in interface Listener

background

public void background(String keyword,
                       String name,
                       String description,
                       int line)
Specified by:
background in interface Listener

scenario

public void scenario(String keyword,
                     String name,
                     String description,
                     int line)
Specified by:
scenario in interface Listener

scenarioOutline

public void scenarioOutline(String keyword,
                            String name,
                            String description,
                            int line)
Specified by:
scenarioOutline in interface Listener

examples

public void examples(String keyword,
                     String name,
                     String description,
                     int line)
Specified by:
examples in interface Listener

step

public void step(String keyword,
                 String name,
                 int line)
Specified by:
step in interface Listener

comment

public void comment(String comment,
                    int line)
Specified by:
comment in interface Listener

row

public void row(List<String> cells,
                int line)
Specified by:
row in interface Listener

eof

public void eof()
Specified by:
eof in interface Listener

syntaxError

public void syntaxError(String state,
                        String event,
                        List<String> legalEvents,
                        int line)

syntaxError

public void syntaxError(String state,
                        String event,
                        List<String> legalEvents,
                        String uri,
                        int line)


Copyright © 2012. All Rights Reserved.