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

Modular, parameterized grammars #22

Open
pczarn opened this issue May 21, 2016 · 0 comments
Open

Modular, parameterized grammars #22

pczarn opened this issue May 21, 2016 · 0 comments
Labels

Comments

@pczarn
Copy link
Owner

pczarn commented May 21, 2016

Let's allow composition of grammars. That means you will be able to invoke symbols of one grammar from another grammar. Rules can be reused across many grammars.

There is a problem with the alphabet of terminals. Grammars must agree on their terminal symbol sets in order to be composed. I believe terminal sets should be declared. For example, having common sets such as ascii and unicode could enable simpler composition. Right now, lexers have implicit terminal sets.

Composition of languages is becoming popular*. Nevertheless, parser generators have limited support of modularity.

Related: Allow grammar extension at runtime [#17]

* for example, React's JSX in Javascript.

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

No branches or pull requests

1 participant