Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The grammar in readme.md throws errors. #1

Open
stellamazeika opened this issue Nov 15, 2014 · 1 comment
Open

The grammar in readme.md throws errors. #1

stellamazeika opened this issue Nov 15, 2014 · 1 comment

Comments

@stellamazeika
Copy link

There are two major problems with the code as written:

First, there is no "animal" symbol in the grammar.
Second, tracery errors out if one leaves a symbol unpopped at the end of its expansion.

(ie, instead of the current Origin symbol:

"origin" : ["[mainCharacter:#name# the #animal.capitalize#][destination:#place#]#story#[mainCharacter:pop]"

we need to have:

"origin" : ["[mainCharacter:#name# the #animal.capitalize#][destination:#place#]#story#[mainCharacter:pop][destination:pop]"

The other solution would be allow the current format to exist without erroring out - or a way of just saying "pop all of the things that have been pushed")

@hugovk
Copy link

hugovk commented Jun 14, 2016

The example at the top of the README now works:

{
    "name": ["Arjun","Yuuma","Darcy","Mia","Chiaki","Izzi","Azra","Lina"],
    "animal": ["unicorn","raven","sparrow","scorpion","coyote","eagle","owl","lizard","zebra","duck","kitten"],
    "mood": ["vexed","indignant","impassioned","wistful","astute","courteous"],
    "story": ["#hero# traveled with her pet #heroPet#.  #hero# was never #mood#, for the #heroPet# was always too #mood#."],
    "origin": ["#[hero:#name#][heroPet:#animal#]story#"]
}

test

I've created PR #27 to add quotes around the symbols in the examples at the end of the README.

hugovk pushed a commit to hugovk/tracery that referenced this issue Jun 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants