|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:||"Olaf Stoyke" <email@example.com>|
|Date:||18 Mar 1998 23:04:45 -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. ...
> [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]
Try to build a new scanner start state (I don't know if your scanner
generator supports this...) or emulate this feature (If it has no
start states): The first token belonging to a SQL statement triggers
this new start state and everything scanned from that moment on can
be encoded separately for SQL in this state or in depending ones, i.e.
you can choose which token patterns are shared (identifiers? numbers?)
and which are not...
Return to the
Search the comp.compilers archives again.