[antlr-interest] parsing incomplete syntax

Michiel Vermandel Michiel_Vermandel at axi.be
Fri Jun 30 00:30:35 PDT 2006


Hi,

We have our own Oracle Designer/developer environment and I have written a 
Sql/Plsql/Forms Plsql code parser which is linked to our repository.
The parser looks up all used objects in the repository. This part works 
just fine.
But ( as in many other dev tools) the user wants to lookup data while 
typing: eg: "select  * from  drtable t where t." and then pressing a key 
combination to lookup the available columns of table drtable.
The problem is that at this point the statement is incomplete and no 
grammer rule can be applied.
What should be the best approach to solve these kinds of issues (not only 
for looking up fields of tables but in general).
If the AST should say (simplified)

select_statement
   select_list
     *
   from
    table_list
       table
         drtable
         t
    where_condition
        t
       dot

then I would be saved.

I need the AST tree completely up to the last token.
(of course other statements can follow this one)

Any suggestions, best practices?
Anyone done this before (in other language)?

Thanks!

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20060630/1a0a8f04/attachment.html


More information about the antlr-interest mailing list