|with or without keywords email@example.com (Buday Gergely) (1998-03-12)|
|Re: with or without keywords firstname.lastname@example.org (Vladimir Alexiev) (1998-03-15)|
|Re: with or without keywords email@example.com (1998-03-18)|
|Re: with or without keywords Nick.Roberts@dial.pipex.com (Nick Roberts) (1998-03-18)|
|Re: with or without keywords firstname.lastname@example.org (Olaf Stoyke) (1998-03-18)|
|From:||Buday Gergely <email@example.com>|
|Date:||12 Mar 1998 23:22:02 -0500|
I'd like to parse a language that allows embedded sql querys. The
problem is that tokens that are keywords in an sql statement are
allowed as an identifier outside it. I've tried to circumvence this
by introducing an SQLKEYWORD nonterminal, with the rule:
SQLKEYWORD: ORDER | ...
IDENT : ID | SQLKEYWORD
but I had no success, some conflicts were arisen, and at all, it does
not seem to be elegant. Is there any possibility to use a rule what
invesigates the next ID's content, and, depending on it, chooses on
shift/reduce? Or is it a completely stupid idea? Just to remark, I'm
using ML-Yacc. What can I do?
[When I did that, I did the extra work in the lexer so the SQL parser only
started up with a lexical flag said that there was embedded SQL. I used
double square brackets or something like that. -John]
Return to the
Search the comp.compilers archives again.