The parser is based on JavaCC[1] so you can download it and explore its
"examples" folder for tutorials to understand how it works.

If that's not what you're looking for, then you might debug through the
generated core parser[2] (There is also what we call Babel parser,
developed to parse all sorts of syntaxes other than the standard supported
by the core parser).

You can also enable the parser's debugging mode [3] which can be specified
in the grammer file or through the command line [4].

If that's not what you're looking for either then you're probably looking
for "visiting" the parsed tree to traverse all its contents ? You can do
that by providing an "SqlVisitor" to the SQL tree root node (ie.
SqlNode.accept(SqlVisitor visitor)).

[1] https://javacc.org/getting-started
[2] org.apache.calcite.sql.parser.impl.SqlParserImpl
[3] https://javacc.org/javaccgrm#prod6
[4] https://javacc.org/commandline

Thanks,
Gelbana


On Sat, Sep 21, 2019 at 10:31 PM Peer Arimond, INF-I <
[email protected]> wrote:

> Hello Apache Calcite,
>
> I´m currently working on a project, wich connects diffrent database
> systems, relational such as nosql. Part of the project is to translate an
> SQL query into our own model of relational algebra. After making some
> research i saw Apache Calcite and especially the SQL Parser of Apache
> Calcite and i think it could help me a lot.
> Is there only the documentation or are there may be more guides or
> something to get deeper into the SQL Parser?
> I want to parse a query and walk recursively over each node from the query
> tree and for example print every Node and it´s function.
> If i could achieve that it would be a good beginning. May be you can help?
>
> Greetings,
>
> Peer Arimond
>
> --
> http://webmail.fh-trier.de
>
>

Reply via email to