commit 4c60fbb22126f599030860ccbebf885f75870039 Author: Mauro Talevi <mauro.tal...@aquilonia.org> AuthorDate: Fri Jul 6 11:31:17 2012 +0200 Commit: Mauro Talevi <mauro.tal...@aquilonia.org> CommitDate: Fri Jul 6 11:33:18 2012 +0200
JBEHAVE-794: Updated EBNF grammar. Updated download page to specify profile to access artifacts on Codehaus repo. diff --git a/jbehave-core/src/main/java/org/jbehave/core/parsers/grammar.ebnf b/jbehave-core/src/main/java/org/jbehave/core/parsers/grammar.ebnf index cee1cf2..f25666f 100755 --- a/jbehave-core/src/main/java/org/jbehave/core/parsers/grammar.ebnf +++ b/jbehave-core/src/main/java/org/jbehave/core/parsers/grammar.ebnf @@ -1,15 +1,11 @@ ; JBehave Grammar expressed in EBNF (http://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_Form) ; The story describes a feature via description, narrative and a set of scenarios -Story := Description? Meta? Narrative? Scenario+ ; +Story := Description? Meta? Narrative? GivenStories? Scenario+ ; ; The Description is expressed by any sequence of words that must not contain any keywords at start of lines. Description := (Word Space?)* ; -; The narrative is identified by keyword "Narrative:" (or equivalent in I18n-ed locale), -; It is followed by the narrative elements -Narrative:= "Narrative:" InOrderTo AsA IWantTo ; - ; The meta is identified by keyword "Meta:" (or equivalent in I18n-ed locale), ; It is followed by any number of meta elements Meta:= "Meta:" (MetaElement)* ; @@ -18,6 +14,10 @@ Meta:= "Meta:" (MetaElement)* ; ; It is followed by a name-value pair, where the value can be empty or have multiple words MetaElement:= "@" Space? Word Space (Word Space?)* ; +; The narrative is identified by keyword "Narrative:" (or equivalent in I18n-ed locale), +; It is followed by the narrative elements +Narrative:= "Narrative:" InOrderTo AsA IWantTo ; + ; The narrative elements InOrderTo:= "In order to" NarrativeElementContent ; AsA:= "As a" NarrativeElementContent ; @@ -32,6 +32,9 @@ NarrativeCharacter := ? Any Unicode character ? ; ; The narrative starting words (or equivalent in I18n-ed locale) NarrativeStartingWord :== ("In order to" | "As a" | "I want to" ) ; +; The comma-separated list of story resources that specify the stories to be run before a story or a scenario +GivenStories:= "GivenStories:" (StoryPath ','?)+ ; + ; The scenario is identified by keyword "Scenario:" (or equivalent in I18n-ed locale), ; which is optional in the case of a single scenario. ; It can optionally be followed by a title, which is expressed by any sequence of words @@ -55,9 +58,6 @@ NonSpaceCharacter := ? Any Unicode character except Space ? ; ; The keywords which are reserved (or equivalent in I18n-ed locale) KeyWord := "Scenario:" | "GivenStories:" | "Given" | "When" | "Then" | "And" | "!--"; -; The comma-separated list of story resources that specify the stories to be run before the scenario steps -GivenStories:= "GivenStories:" (StoryPath ','?)+ ; - ; The story resource path StoryPath := PathCharacter+ ;