https://github.com/joeyshi12/pql-parser
Plot query language parser library
https://github.com/joeyshi12/pql-parser
ast node npm-package parser pql
Last synced: 5 months ago
JSON representation
Plot query language parser library
- Host: GitHub
- URL: https://github.com/joeyshi12/pql-parser
- Owner: joeyshi12
- License: mit
- Created: 2024-03-16T20:36:54.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-03T00:38:42.000Z (over 1 year ago)
- Last Synced: 2025-12-02T02:49:23.273Z (7 months ago)
- Topics: ast, node, npm-package, parser, pql
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/pql-parser?activeTab=readme
- Size: 413 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pql-parser



Plot query language parser.
A 2D plot generation tool made with this parser is hosted at https://devtools.joeyshi.xyz/pql_compiler.
## Syntax
```
PLOT (BAR(category_column, value_column) | LINE(x_column, y_column) | SCATTER(x_column, y_column))
[WHERE ]
[GROUP BY ]
[HAVING ]
[LIMIT [OFFSET ]]
```
## EBNF
```
::= "PLOT" [] [] [] []
::= | |
::= "BAR" "(" "," ")"
::= "LINE" "(" "," ")"
::= "SCATTER" "(" "," ")"
::= "WHERE"
::= "GROUP BY"
::= "HAVING"
::= "LIMIT" ["OFFSET" ]
::= "OR" | "AND"
::= ["AS" ]
::= "(" ")" |
::= "MIN" | "MAX" | "AVG" | "COUNT" | "SUM"
::= { | | "_" }
::= { "OR" } | { "AND" }
::= | "(" ")"
::= { "OR" } | { "AND" }
::= | "(" ")"
::= ">" | "<" | ">=" | "<=" | "="
::= | | "NULL"
::= {}
::= "'" {} "'"
::= "0" | ... | "9"
::= "A" | ... | "Z" | "a" | ... | "z"
```