You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Ashutosh Chauhan (JIRA)" <ji...@apache.org> on 2014/03/23 18:33:44 UTC

[jira] [Updated] (HIVE-6264) Unbalanced number of HiveParser msgs.push/msgs.pop calls when doing lookahead

     [ https://issues.apache.org/jira/browse/HIVE-6264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashutosh Chauhan updated HIVE-6264:
-----------------------------------

    Fix Version/s: 0.13.0

> Unbalanced number of HiveParser msgs.push/msgs.pop calls when doing lookahead
> -----------------------------------------------------------------------------
>
>                 Key: HIVE-6264
>                 URL: https://issues.apache.org/jira/browse/HIVE-6264
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Jason Dere
>            Assignee: Jason Dere
>             Fix For: 0.13.0
>
>         Attachments: HIVE-6264.1.patch, HIVE-6264.2.patch, HIVE-6264.3.patch, HIVE-6264.4.patch
>
>
> HiveParser pushes/pops messages describing the current parse rule like so:
> {noformat}
> joinSource
> @init { gParent.msgs.push("join source"); }
> @after { gParent.msgs.pop(); }
> ...
> {noformat}
> The ANTLR generated code for the init/after actions looks like this:
> {noformat}
>          gParent.msgs.push("join source"); 
> ...
>             if ( state.backtracking==0 ) { gParent.msgs.pop(); }
> {noformat}
> If we have a parse rule that does some lookahead, the message is always pushed onto the message stack since the init action has no check of state.backtracking.  But that message is never popped because the after action does check state.backtracking. As a result there can be a bunch of parser context messages added to the stack which are never taken off.



--
This message was sent by Atlassian JIRA
(v6.2#6252)