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

Use EBNF instead of images to render sqlgrams #4389

Closed
kennytm opened this issue Dec 10, 2020 · 6 comments
Closed

Use EBNF instead of images to render sqlgrams #4389

kennytm opened this issue Dec 10, 2020 · 6 comments

Comments

@kennytm
Copy link
Contributor

kennytm commented Dec 10, 2020

Change Request

Please answer the following questions before submitting your issue. Thanks!

  1. Describe what you find is inappropriate or missing in the existing docs.

Recently we support rendering EBNF code directly as SVG (sample: https://docs.pingcap.com/tidb/stable/sql-statement-backup), and thus no longer needs to use PNG images for the sqlgrams (see #4342 for details). We should upgrade the remaining docs to use the new feature.

  1. Describe your suggestion or addition.

Change the following pages to use ```ebnf+diagram:

  1. Provide some reference materials (documents, websites, etc) if you could.

You can use https://kennytm.github.io/website-docs/dist/ to preview the rendered result.

Supported grammar:

Grammar     ::= Production+
Production  ::= NonTerminal "::=" Choice
Choice      ::= Seq ('|' Seq)*
Seq         ::= Item+
Item        ::= Primary ('*' | '+' | '?')?
Primary     ::= Terminal | NonTerminal | '(' Choice ')'
Terminal    ::= '"' '[^"]'* '"' | "'" "[^']"* "'"
NonTerminal ::= '[0-9a-zA-Z_]'+
@kennytm

This comment has been minimized.

@dveeden
Copy link
Contributor

dveeden commented Apr 9, 2021

Besides updating the things that predate this it might also be nice to add information into the README.md and/or CONTRIBUTING.md about how to work with the EBNF rendering and how to test it before submitting a PR.

@dveeden
Copy link
Contributor

dveeden commented Mar 23, 2023

Current state:

$ git grep -c 'sqlgram/.*png'
functions-and-operators/set-operators.md:1
sql-statements/sql-statement-select.md:14
sql-statements/sql-statement-set-default-role.md:4
sql-statements/sql-statement-set-names.md:7
sql-statements/sql-statement-set-password.md:1
sql-statements/sql-statement-set-role.md:3
sql-statements/sql-statement-set-variable.md:2
sql-statements/sql-statement-show-bindings.md:4
sql-statements/sql-statement-show-builtins.md:1
sql-statements/sql-statement-show-character-set.md:2
sql-statements/sql-statement-show-collation.md:1
sql-statements/sql-statement-show-columns-from.md:10
sql-statements/sql-statement-show-config.md:2
sql-statements/sql-statement-show-create-sequence.md:2
sql-statements/sql-statement-show-create-table.md:2
sql-statements/sql-statement-show-create-user.md:2
sql-statements/sql-statement-show-databases.md:2
sql-statements/sql-statement-show-engines.md:1
sql-statements/sql-statement-show-errors.md:1
sql-statements/sql-statement-show-grants.md:5
sql-statements/sql-statement-show-histograms.md:3
sql-statements/sql-statement-show-indexes.md:5
sql-statements/sql-statement-show-plugins.md:2
sql-statements/sql-statement-show-privileges.md:1
sql-statements/sql-statement-show-processlist.md:2
sql-statements/sql-statement-show-profiles.md:1
sql-statements/sql-statement-show-stats-healthy.md:3
sql-statements/sql-statement-show-stats-meta.md:3
sql-statements/sql-statement-show-status.md:3
sql-statements/sql-statement-show-table-next-rowid.md:2
sql-statements/sql-statement-show-table-regions.md:5
sql-statements/sql-statement-show-table-status.md:3
sql-statements/sql-statement-show-tables.md:4
sql-statements/sql-statement-show-variables.md:3
sql-statements/sql-statement-show-warnings.md:1
sql-statements/sql-statement-shutdown.md:1
sql-statements/sql-statement-split-region.md:7
sql-statements/sql-statement-trace.md:2
sql-statements/sql-statement-truncate.md:3
sql-statements/sql-statement-update.md:6
sql-statements/sql-statement-use.md:2
statistics.md:3

@dveeden
Copy link
Contributor

dveeden commented Apr 5, 2024

Maybe @terry1purcell can help with the statistics.md related sqlgrams/EBNF

@dveeden dveeden removed the lifecycle/frozen Issues with this label will not be labeled as "stale". label Apr 5, 2024
@dveeden
Copy link
Contributor

dveeden commented Apr 26, 2024

Current state:

$ git grep -c 'sqlgram/.*png'
functions-and-operators/set-operators.md:1
sql-statements/sql-statement-select.md:13
statistics.md:3

@dveeden
Copy link
Contributor

dveeden commented May 27, 2024

Everything done. Thanks to everyone involved in this!

@dveeden dveeden closed this as completed May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants