Thanks again Ulrik...the problem was with the tokenizer and not the parser...
Medi -----Original Message----- From: Medi Montaseri [mailto:[EMAIL PROTECTED] Sent: Friday, May 04, 2007 5:14 PM To: sqlite-users@sqlite.org Subject: RE: [sqlite] Lemon parser generator question Thanks Ulrik...I am now looking for the lexer... Medi -----Original Message----- From: Ulrik Petersen [mailto:[EMAIL PROTECTED] Sent: Friday, May 04, 2007 4:30 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Lemon parser generator question Medi, Lemon is a parser, not a lexer. The terminals are defined outside of Lemon. Perhaps you inherited the .y file but did not receive the lexer/tokenizer? SQLite, for example, has a hand-coded tokenizer. Other projects (such as my own) may use a lexer-generator such as flex. In Lemon, the tokenizer drives the parser, not the other way around. For more information, you can see the sources of SQLite, which includes a document on Lemon, or you can read this: http://www.hwaci.com/sw/lemon/lemon.html HTH Ulrik Petersen Medi Montaseri wrote: > Hi, > > Firstly, if this is not the proper forum for Lemon questions, please let > me know where I need to go... > > Second, I am looking at a SQL grammer written for Lemon parser generator > and am failing to see where some terminals are defined. For example > COMMA, FROM, SELECT are terminals and releatively easy to deduce. > However in the grammer I am studying, I see references to NAME and > STRING (all in uppercase, indicating a terminal production). > > Here is my higher level problem... > > I have inherited a SqlGrammer.y that does not parse quoted-table-name > and is failing in cases where the FROM clause have things like "my, > table". For example select * from "my, table". Currently it works with > select * from "table one" > Chasing the grammer rules, it see a rule that reads > from_source(P) ::= NAME(C). > { > someClass:someAction() > } > Based on Lemons' doc, NAME must be a terminal rule (all upper case) and > since I don't define it, then lemon must. > > Can someone shed some light on this.... > > Thanks > Medi > > ------------------------------------------------------------------------ ----- To unsubscribe, send email to [EMAIL PROTECTED] ------------------------------------------------------------------------ ----- ------------------------------------------------------------------------ ----- To unsubscribe, send email to [EMAIL PROTECTED] ------------------------------------------------------------------------ ----- ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------