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

Bork tutorial example always fails with obscure error #47

Closed
MaxDesiatov opened this issue Feb 16, 2018 · 2 comments · Fixed by #53
Closed

Bork tutorial example always fails with obscure error #47

MaxDesiatov opened this issue Feb 16, 2018 · 2 comments · Fixed by #53
Assignees
Labels

Comments

@MaxDesiatov
Copy link
Contributor

MaxDesiatov commented Feb 16, 2018

Hi, thanks for the great library!

When I go through the tutorial, I copy the example grammar exactly as given:

//
// A grammar for the Bork text-adventure
//


// Vocabulary
//
@pin verb        = "INVENTORY" | "GO" | "PICKUP" | "DROP" | "ATTACK"
@pin noun        = "NORTH" | "SOUTH" | "KITTEN" | "SNAKE" | "CLUB" | "SWORD"
@pin adjective   = "FLUFFY" | "ANGRY" | "DEAD"
@pin preposition = "WITH" | "USING"

// Commands
//
subject     = (adjective .whitespaces)? noun
command     = verb (.whitespaces subject (.whitespaces preposition .whitespaces subject)? )?

to a file Bork.stlr

After I test this grammar with swift run stlrc -g Bork.stlr I always get this error with any of the tutorial test strings:

Parsing failed: 
constructionFailed([])

The error doesn't give any info on what exactly failed. OysterKit code is from master branch.

@MaxDesiatov
Copy link
Contributor Author

In fact, any grammar loaded through command-line gives the same error, e.g.:

% swift run stlrc -g Resources/STLR.stlr 
stlr interactive mode. Send a blank line to terminate. Parsing STLR
// test
Parsing failed: 
constructionFailed([])

@SwiftStudies
Copy link
Owner

Thanks for this. I will take a look, one other thing I need to do following the recent refactoring is get correct error reporting back in as well as some are getting hidden

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Documentation
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants