Module: Gherkin

Defined in:
lib/gherkin/token.rb,
lib/gherkin/errors.rb,
lib/gherkin/parser.rb,
lib/gherkin/dialect.rb,
lib/gherkin/ast_node.rb,
lib/gherkin/ast_builder.rb,
lib/gherkin/gherkin_line.rb,
lib/gherkin/token_matcher.rb,
lib/gherkin/token_scanner.rb,
lib/gherkin/pickles/compiler.rb,
lib/gherkin/stream/source_events.rb,
lib/gherkin/stream/gherkin_events.rb,
lib/gherkin/token_formatter_builder.rb

Defined Under Namespace

Modules: Pickles, Stream Classes: AstBuilder, AstBuilderException, AstNode, CompositeParserException, Dialect, GherkinLine, NoSuchLanguageException, Parser, ParserContext, ParserError, ParserException, Token, TokenFormatterBuilder, TokenMatcher, TokenScanner, UnexpectedEOFException, UnexpectedTokenException

Constant Summary collapse

RULE_TYPE =
[
  :None,
  :_EOF, # #EOF
  :_Empty, # #Empty
  :_Comment, # #Comment
  :_TagLine, # #TagLine
  :_FeatureLine, # #FeatureLine
  :_BackgroundLine, # #BackgroundLine
  :_ScenarioLine, # #ScenarioLine
  :_ScenarioOutlineLine, # #ScenarioOutlineLine
  :_ExamplesLine, # #ExamplesLine
  :_StepLine, # #StepLine
  :_DocStringSeparator, # #DocStringSeparator
  :_TableRow, # #TableRow
  :_Language, # #Language
  :_Other, # #Other
  :GherkinDocument, # GherkinDocument! := Feature?
  :Feature, # Feature! := Feature_Header Background? Scenario_Definition*
  :Feature_Header, # Feature_Header! := #Language? Tags? #FeatureLine Description_Helper
  :Background, # Background! := #BackgroundLine Description_Helper Step*
  :Scenario_Definition, # Scenario_Definition! := Tags? (Scenario | ScenarioOutline)
  :Scenario, # Scenario! := #ScenarioLine Description_Helper Step*
  :ScenarioOutline, # ScenarioOutline! := #ScenarioOutlineLine Description_Helper Step* Examples_Definition*
  :Examples_Definition, # Examples_Definition! [#Empty|#Comment|#TagLine->#ExamplesLine] := Tags? Examples
  :Examples, # Examples! := #ExamplesLine Description_Helper Examples_Table?
  :Examples_Table, # Examples_Table! := #TableRow #TableRow*
  :Step, # Step! := #StepLine Step_Arg?
  :Step_Arg, # Step_Arg := (DataTable | DocString)
  :DataTable, # DataTable! := #TableRow+
  :DocString, # DocString! := #DocStringSeparator #Other* #DocStringSeparator
  :Tags, # Tags! := #TagLine+
  :Description_Helper, # Description_Helper := #Empty* Description? #Comment*
  :Description, # Description! := #Other+
]
DIALECT_FILE_PATH =
File.expand_path("gherkin-languages.json", File.dirname(__FILE__))
DIALECTS =
JSON.parse File.open(DIALECT_FILE_PATH, 'r:UTF-8').read