Brian Stempin 2012-10-09, 20:54
-Re: Adding keywords to Pig Latin (Was: Question about UDFs and tuple ordering)
Gianmarco De Francisci Mo... 2012-10-09, 21:40
one grammar is responsible for lexing (tokenization), the second one for
parsing and the last one for generating the plan from a tree grammar (the
AST output of the parsing).
These are the main ones, but there are also some "minor" ones like AST
validator or AST printer.
If you had to add a keyword you would at least need to modify the
QueryLexer, most likely also the QueryParser, possibly also the
LogicalPlanGenerator (and LogicalPlanBuilder.java as well).
Hope this helps.
On Tue, Oct 9, 2012 at 1:54 PM, Brian Stempin <[EMAIL PROTECTED]>wrote:
> I've taken some time to understand how a Logical Plan progresses to a
> Physical and MR Plan (thanks for the boost, Alan!)
> My next question is centered around Logical Plan generation. If one were
> to add a new keyword (sticking with the theme in my last message, say,
> SUPERSPECIALJOIN), that keyword would have to be added into the grammar
> files. Perhaps this isn't obvious to me because I'm not an ANTLR user
> (learning), but what is each grammar file responsible for?
> This e-mail is intended solely for the above-mentioned recipient and it
> may contain confidential or privileged information. If you have received it
> in error, please notify us immediately and delete the e-mail. You must not
> copy, distribute, disclose or take any action in reliance on it. In
> addition, the contents of an attachment to this e-mail may contain software
> viruses which could damage your own computer system. While ColdLight
> Solutions, LLC has taken every reasonable precaution to minimize this risk,
> we cannot accept liability for any damage which you sustain as a result of
> software viruses. You should perform your own virus checks before opening
> the attachment.