Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » SQL Parser/Lexer Extension
SQL Parser/Lexer Extension [message #28496] Tue, 03 April 2007 12:59
Christian Beckel is currently offline Christian BeckelFriend
Messages: 14
Registered: July 2009
Junior Member
Hello,

I'm extending the extendable SQL Query Parser, being a part of the
SQLTools.

My goal is to add a new keyword to the lexer and add a simple rule to the
parser, containing this keyword.
Extending the parser works fine, but I realized that the base SQL Parser
expects a lexer of type org.eclipse.datatools.sqltools.parsers.sql.lexer,
which is generated with lpg. Thus, copying & extending the lpg files in
order to create my own lexer doesn't work. However, referring to a
presentation given on EclipseConn, that should be the way to do it:

1. Copy LPG lexer template
2. Modify grammar rules in lexer
3. Generate lexer code

Unfortunately, there is no more information available. How can I extend
the parser in a way to use my own Lexer rather then the default one? I
also had the idea to use the default lexer and just add my own lpg-created
SQLKeywordLexer instead,However, this didn't work out either, since the
method to check a token for being a keyword is marked as "final" in the
lexer implementation, and thus cannot be overridden.

Thank you for your help,

Christian Beckel
Previous Topic:Eclipse SQL Explorer vs. Data Tools Platform
Next Topic:SQL Parser/Lexer Extension
Goto Forum:
  


Current Time: Fri Mar 29 09:37:30 GMT 2024

Powered by FUDForum. Page generated in 0.04065 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top