SQL autocomplete project

console kid <sandundhammikaperera@gmail.com>
Tue, 6 Oct 2009 17:32:02 -0700 (PDT)

          From comp.compilers

Related articles
SQL autocomplete project sandundhammikaperera@gmail.com (console kid) (2009-10-06)
Re: SQL autocomplete project DrDiettrich1@aol.com (Hans-Peter Diettrich) (2009-10-08)
Re: SQL autocomplete project gneuner2@comcast.net (George Neuner) (2009-10-08)
Re: SQL autocomplete project johnmillaway@yahoo.com (John Millaway) (2009-10-08)
Re: SQL autocomplete project cfc@shell01.TheWorld.com (Chris F Clark) (2009-10-10)
| List of all articles for this month |
From: console kid <sandundhammikaperera@gmail.com>
Newsgroups: comp.compilers
Date: Tue, 6 Oct 2009 17:32:02 -0700 (PDT)
Organization: Compilers Central
Keywords: SQL, question
Posted-Date: 07 Oct 2009 10:51:26 EDT

Hi I am doing my final year project , that is a SQL autocomplete
library ( a dll that can used by any other
win32 application ).




I have a list of SQL grammar, so according to the rules in that
grammar file the program will read that file
and build internal NFA graph , which every NFA state contains a string
of suggestion syntax. for example
if a user enters like this ,


>>SELECT *
it will show : {SELECT selectPart FROM fromPart | FROM fromPart SELECT
selectPart}
[WHERE expression] [GROUP BY expression [,...]] [HAVING expression]
[{UNION [ALL] | MINUS | EXCEPT | INTERSECT} select]
[ORDER BY order [,...]] [LIMIT expression [OFFSET expression]
[SAMPLE_SIZE rowCountInt]] [FOR UPDATE]


like this.


Suggest me how to write this algorithm. I mean graph traveling
algorithm using a stack. For example after
if the users enters like this
>> SELECT ide
it will show : Table Name


I am confused on this entirely , please give me a suggestion.
This project is different from writing a parser tree. because parser
is parsing the fully completed SQL syntax and
this will not do that.The algorithm should guess the possibilities
using a graph traveling like a thing.


If you can suggest me to read and learn something please suggest.




-- thanks in advance --


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.