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

Adds Pest Grammar to Ion Conversion #38

Merged
merged 3 commits into from
Jun 8, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ members = [
"partiql-irgen",
"partiql-parser",
"partiql-rewriter",
"pestion",
]
29 changes: 29 additions & 0 deletions pestion/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[package]
name = "pestion"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless this is a pun/reference that I'm missing, I suggest naming this pest-ion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We chatted about this offline, but the idea here was just a portmanteau of Pest and Ion into something that is pronounced like "question". I was trying to avoid a hyphenated name, so let's get a second opinion from someone like @dlurton / @alancai98 / @abhikuhikar to see if they don't like the name and suggest any alternatives.

If we do like it, I will add something to the README. If we don't I can refactor the name.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slight preference to pest-ion so it doesn't get too closely associated with something David sent offline: https://www.pestions.com/

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another possibility is pest2ion. It avoids the hyphen and any association with that pest control website.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the consensus is pest-ion so I will refactor it. The problem with pest2ion is that it will look very jarring as a crate (e.g. use pest2ion).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to pest-ion.

authors = ["PartiQL Team <partiql-team@amazon.com>"]
description = "A simple Pest grammar to Ion converter"
homepage = "https://github.com/partiql/partiql-lang-rust/pestion"
repository = "https://github.com/partiql/partiql-lang-rust/pestion"
license = "Apache-2.0"
readme = "README.md"
keywords = ["parser", "peg", "pest", "ion", "cli"]
categories = ["parser-implementations", "command-line-utilities"]
exclude = [
"**/.git/**",
"**/.github/**",
"**/.travis.yml",
"**/.appveyor.yml",
]
edition = "2018"
version = "0.0.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
thiserror = "~1.0.25"
pest = "~2.1.3"
pest_meta = "~2.1.3"
ion-rs = "~0.6.0"

[dev-dependencies]
rstest = "~0.10.0"
9 changes: 9 additions & 0 deletions pestion/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Pestion

This is a simple tool and library for converting [Pest] grammars to [Ion] data format.

The motivation for this is to make a portable way to introspect [Pest] grammars in other tools
as a data format versus having to provide bespoke parsers for the Pest syntax in other platforms.

[Pest]: https://pest.rs/
[Ion]: https://amzn.github.io/ion-docs/
Loading