A simple query processor for EMF Queries, allowing aggregation over the same group.
- Install requirements:
pip install -r requirements.txt
- To run an ESQL query:
python run.py [-v] [-o outputfile.table] [example.esql]
-
If the
-voption is provided, verbose output will be printed, such as lexing and parsing. -
If the
-ooption is provided, you must give an output file name, and the generated table will be written to the file, rather than stdout. -
example.esqlis an optional argument, if it is provided, input will be read from the file. Otherwise, you are asked to provide valid esql input. To terminate input, simply type "done". -
If no file is provided as argument, you will get the following output when run:
1. ESQL
2. Phi Operator
If you choose 1, type the ESQL query and type "done" when you're done. This is equivalent to putting the query in a .esql file. If you press 2, you will be asked to provide the 6 differen arguments to Phi.
- Note: taking in ESQL input is preferred and heavily tested.
cd test
./test.sh
- Note: ESQl and SQL examples can be found under the
examples/folder.
The lexer and parser were inspired by the examples at https://www.dabeaz.com/ply/ply.html#ply_nn9