-
Notifications
You must be signed in to change notification settings - Fork 28
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
Generating the grammar #89
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When parsing a complex language it becomes increasingly hard to keep track how everything fits together in the implementation code. It becomes increasingly helpful to look at the grammar of the language without the code. Also for a large enough project it becomes more tedious to write the grammar manually and keep it in sync for every change in the code. It pays of to have the code as single source of truth that the grammar is generated from. For similar reasons, it’s coming to generate a GraphQL schema from the code of a GraphQL server. For example, GraphQL.js has a
printSchema
function to generate the schema from the code.Can arcsecond generate the grammar for a language?
I’m assuming arcsecond should have all the information needed to generate the grammar encoded somewhere in its runtime. Though I can imagine for a context-dependent language generating the grammar could pose a challenge simply because I‘m not sure any grammar exists that can express all possibilities. But at least for a context-free language it should be possible using any common grammar like McKeeman Form or (E)BNF.
The text was updated successfully, but these errors were encountered: