[antlr-interest] problem with literal match
Ruslan Zasukhin
sunshine at public.kherson.ua
Wed Oct 3 12:35:42 PDT 2001
Hi All,
I have in grammar rule as:
-------------------------------------------------
drop_table_statement
: "drop"! "table"! table_name drop_behavior
;
in generated parser I see that in table ANTLR put literals with ""
-------------------------------------------------
const char* OBL_SQL_Parser::tokenNames[] = {
"<0>",
"EOF",
........
"\"drop\"",
"\"table\"",
"\"cascade\"",
"\"restrict\"",
0
};
Now I try to pass to Parser test string "DROP TABLE errors"
I see in debugger that function
int CharScanner::testLiteralsTable(int ttype) const
{
STD::map<STD::string,int,CharScannerLiteralsLess>::const_iterator i =
literals.find(text);
if (i != literals.end())
ttype = (*i).second;
return ttype;
}
DO NOT FIND first word 'DROP' in my test string.
NOTES:
** CASE is not sensitive.
** I did try testLiterals as true so false.
WHERE IS PROBLEM ???
--
Best regards,
Ruslan Zasukhin
-------------------------
Paradigma.
e-mail: ruslan at paradigmasoft.com
web : http://www.paradigmasoft.com
To subscribe to the Valentina mail list
send a letter to valentina-on at lists.macserve.net
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list