Class FZagalaSpecZagalaSpecParser#

Inheritance Relationships#

Base Type#

Class Documentation#

class FZagalaSpecZagalaSpecParser : public IZagalaSpecBDDParser#

Parses ZagalaSpec-native (.zagalaspec) files.

Grammar (line-based, Gherkin-derived):

  • Lines starting with # are comments and are skipped.

  • @tag lines apply to the next Feature: or Scenario: block.

  • Feature: <name> opens a feature block. Indented non-keyword lines become the description.

  • ”Shared Context Extensions:” collects Given/When/Then lines into SharedContextExtensionSteps until the next Scenario: or end-of-file.

  • Scenario: <name> opens a scenario block.

  • ”Context Extensions:” (inside a Scenario) collects Given/When/Then lines into ContextExtensionSteps until “Expectations:”.

  • ”Expectations:” (inside a Scenario) collects Given/When/Then lines into FZagalaSpecScenarioIR::ExpectationSteps.

  • Strict mode: if “Context Extensions:” appears in a scenario, “Expectations:” is mandatory before the scenario ends.

  • ”Given, When, Then, And, But, *” lines are collected into FZagalaSpecScenarioIR::Steps.

  • Lines starting with # are comments and are skipped.

Public Functions

FZagalaSpecZagalaSpecParser()#
virtual FZagalaSpecParseResult ParseFile(const FString &FilePath) const override#

Parse a BDD file from disk and return an import result.

Parameters:

FilePath – Path of the file to parse.

Returns:

The parsed features, errors, and warnings.

virtual FZagalaSpecParseResult ParseContent(const FString &Content, const FString &SourceName = TEXT("<inline>")) const override#

Parse BDD content from an in-memory string.

Parameters:
  • Content – BDD text to parse.

  • SourceName – Identifies the source in warnings/errors (e.g. file path or <inline>).

Returns:

The parsed features, errors, and warnings.