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

Knut Anders Hatlen updated DERBY-4879:
--------------------------------------

    Attachment: ij.diff

Attaching a patch that reduces the lookahead in ij.jj from 2 to 1, thereby 
enabling lookahead adequacy checking and silencing the warning. The following 
grammar changes were needed to make it work with lookahead 1:

1) Remove the duplicate reference to FirstStatement in the grammar

2) Refactor the ConnectStatement rule so that it doesn't branch until after the 
common prefix <CONNECT> has been seen

3) dynamicConnection/attributeList: Add a lookahead hint in attributeList to 
avoid ambiguity when the attribute list is empty and followed by AS (as in 
CONNECT '...' ATTRIBUTES AS C1, where a lookahead of 1 wouldn't be enough to 
determine whether AS was a property name or a keyword)

4) Merge the rules for qualified and unqualified table names in 
DescTableStatement

5) Factor out the common prefix <SHOW> in ShowStatement

6) Merge the rules IllegalStatementName and PrepareStatement into a single rule 
with the common prefix <PREPARE> factored out

7) Merge the three rules JBMSPreparedStatementExec, F2KExecuteProcedure and 
ExecuteStatement into a single rule, with the common prefix <EXECUTE> factored 
out

> Lookahead warning from ij.jj
> ----------------------------
>
>                 Key: DERBY-4879
>                 URL: https://issues.apache.org/jira/browse/DERBY-4879
>             Project: Derby
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 10.7.1.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: ij.diff
>
>
> When building with "ant -q", I see this warning when JavaCC processes ij.jj:
>      [java] Warning: Lookahead adequacy checking not being performed since 
> option LOOKAHEAD is more than 1.  Set option FORCE_LA_CHECK to true to force 
> checking.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to