-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add Pest Syntax to Ion Conversion #35
Labels
enhancement
New feature or request
Comments
almann
added a commit
to almann/partiql-lang-rust
that referenced
this issue
Jun 6, 2021
Adds the `pestion` crate to provide a simple trait `PestToElement` and implementations over the Pest AST and `&str` syntax definitions to create Ion `Element` serialized forms. Fixes partiql#35.
almann
added a commit
to almann/partiql-lang-rust
that referenced
this issue
Jun 7, 2021
Adds the `pestion` crate to provide a simple trait `PestToElement` and implementations over the Pest AST and `&str` syntax definitions to create Ion `Element` serialized forms. Resolves partiql#35.
almann
added a commit
to almann/partiql-lang-rust
that referenced
this issue
Jun 7, 2021
Adds the `pestion` crate to provide a simple trait `PestToElement` and implementations over the Pest AST and `&str` syntax definitions to create Ion `Element` serialized forms. Resolves partiql#35.
almann
added a commit
to almann/partiql-lang-rust
that referenced
this issue
Jun 7, 2021
The purpose of this commit is the start of a tool to generate Ion formatted ASTs from Pest grammars, particularly that of PartiQL. We could then easily process the grammar outside of Rust in scripts that could be used to generate things like TextMate grammars for IDE support or LaTeX fragments for the specification document. Adds the `pestion` crate to provide a simple trait `PestToElement` and implementations over the Pest AST and `&str` syntax definitions to create Ion `Element` serialized forms. Resolves partiql#35.
almann
added a commit
that referenced
this issue
Jun 8, 2021
The purpose of this commit is the start of a tool to generate Ion formatted ASTs from Pest grammars, particularly that of PartiQL. We could then easily process the grammar outside of Rust in scripts that could be used to generate things like TextMate grammars for IDE support or LaTeX fragments for the specification document. Adds the `pest-ion` crate to provide a simple trait `TryPestToElement` and implementations over `&str` syntax definitions to parse Pest grammars and create their Ion `Element` serialized forms. Also adds `PestToElement` which is the infallible version of the trait (used mostly for Pest AST elements). Resolves #35.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It would be good to be able to use the Pest grammar definition to create other artifacts. For example, we could use the Pest grammar to generate LaTeX figures for the specification, and also derive things like a TextMate.
To make this easier to do, we should have a way to convert the Pest AST into Ion representation. This generalized representation can be used outside of Rust (e.g. a Python script) to make some of these non-critical path cases easier to write.
I propose we add a simple library to convert Pest to Ion and then a CLI that to do the conversion.
The text was updated successfully, but these errors were encountered: