To run the parser, run `make` then run `./SQLPParser`. An example of a test input is `select s.name from student s where s.name = "John";`. Currently a syntax error will be reported when the semi-colon is read, but the parse tree that is outputted is correct.
To run the SQLP parser, run `make` then run `./SQLPParser`. An example of a test input is `select s.name from student s where s.name = "John" and s.num = 10;`. Currently a syntax error will be reported when the semi-colon is read, but the parse tree that is outputted is correct.
The grammar is located in `SQLPGrammar.y`, and non-keyword types (such as `INTEGER`, `IDENTIFIER`, `STRING`) are defined in `SQLPScanner.l`. `util.c` contains the functions needed to build the con cell structure.
For parsing any general string into a tree of `cons_cells`, run `make` then run `./Parser`. An example of a test input is `PROJ (AS (SPCOL (VAR (s) PF (ATTR (name)))) ATOM (TABLE (student) VAR (s)))`. Every clause encosed in brackets is nested within a child `cons_cell`, and any two adjacent terms are connected via the `next` pointer.
A common way of defining the behavior of a process or thread in cases where
performance is critical is in terms of a collection of n+1 files containing
code in the C programming language: n "module" files with a ".c" suffix that