[antlr-interest] Code completion, possible with JavaScript output?

David Wynter david_wynter at yahoo.com
Fri Jun 17 05:07:21 PDT 2011


I have had a look thru the ANTLR documentation and could not find what I was looking for. New to ANTLR.

I have a SQL database with 400 tables and want to produce a parser for a language I convert to SQL for querying 3 different domains within that model. 
The application uses a Web interface so the search command line parser has to be in Javascript. 
I intend to use a grammar base don a subset of the SQL grammar <search condition> 
The users of the query languages (3, one for each domain) will need help on determining the terms we use for the column names.
For example they might type "WHERE interestrate > 1% AND interestrate < 3%" where interestrate is a column name.
We will map these to tablename.columnname. so only single words in a reserved set are required. 
The 3 grammars are the same except they have different reserved words. 
OK to include the reserved words in the grammar itself, these are DSLs.

My question is, is there the ability to search the list of these reserved words as they type (characters as token I expect) and auto suggest in a list the possible entries?
So if "interestrate" and "interbreeding" were 2 of the reserved words then these would be suggested in a list right up until they typed the 6th character.



More information about the antlr-interest mailing list