Contents

Start Rule

By default the first rule defined in a grammar is the start rule.

Scenario Outline: Default Start Rule

  • Given a grammar with:
    integer <-  @DIGIT+
    word    <-  @ALNUM+
  • When I parse <input>
  • Then the parse result should be <result>

Examples:

inputresult
"42a""42"
"foo"FAIL

Source: features/peg_syntax/start_rule.feature at commit 8b4efde2, Rattler (MIT license).