Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cjheath/600474 to your computer and use it in GitHub Desktop.
Save cjheath/600474 to your computer and use it in GitHub Desktop.
grammar PivotalStories
rule stories
story*
end
rule story
story_label:one_line "\n" feature*
end
rule feature
indent '- ' title
( "\n" long_description
/ description "\n"
)
end
rule title
plain_text
end
rule long_description
(indent indent one_line)*
end
# An in-line description
rule description
'(' description ')'
/
plain_text
end
def plain_text
(!non_plain .)*
end
# Any text to end of line:
rule one_line
(!"\n" .)*
end
rule indent
' '
end
# Characters not allowed in a one-line text fragment
rule non_plain
[()] / "\n"
end
end
LabelForNestedStories AnotherLabel
- Feature title (single line description in parens)
- Some other feature (you don't need blank lines seperating your stories but you can use them for extra readability in the file)
- Another feature
Multi-line description of this feature.
Use two tabs to indent for easy visual parsing.
[] Chores look like checkboxes (short description in parens)
[] Another chore
Multi-line descriptions for chores work the same way.
Possible steps:
1. Collect underpants
2. ?
3. Profit!
- Another feature here with no description
AnotherLabelForSomeFeatures
- Feature One
- Feature two
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment