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

What to do with a grammar? #7

Closed
CrockAgile opened this issue Oct 30, 2017 · 4 comments
Closed

What to do with a grammar? #7

CrockAgile opened this issue Oct 30, 2017 · 4 comments

Comments

@CrockAgile
Copy link
Collaborator

The example use case is parsing a bnf string to a grammar. But, what are the use cases after that?

// let input = some grammar string
let grammar = bnf::parse(input);
// now what can I do with it?
  • Should an example be added that does something interesting by navigating the tree?
  • Should any functions be added that assist in walking the tree, like a visitor pattern?
  • Should the grammar be able to parse input strings and return the series of productions used?
@shnewto
Copy link
Owner

shnewto commented Oct 30, 2017

I agree that there is a lot of room for growth. I'd like to begin implementing some of the things you've mentioned in the near future (or review PRs that implement them! 😊). Thanks for raising the issue.

@CrockAgile
Copy link
Collaborator Author

CrockAgile commented Oct 30, 2017

I was hoping that you might be able to act as the current typical user. Which of those ideas would be useful to a user? I am having trouble envisioning the end use case. But for each idea we have that resonates as useful improvement, then we should open a corresponding issue. I would rather work on features that you have deemed useful and thought out with descriptions than improvise my ideas.

@shnewto
Copy link
Owner

shnewto commented Oct 30, 2017

One high priority goal I have is a generate function that does something along the lines of what the erratic JavaScript library enables.

@CrockAgile
Copy link
Collaborator Author

I think this question has been answered by the work in 0.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants