[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: yyparse(): input from string
From: |
Krisakorn Rerkrai |
Subject: |
Re: yyparse(): input from string |
Date: |
Fri, 20 Jan 2006 17:12:22 +0100 |
Hi,
That means I can skip "yyin" and "yyparse" and simply call
"yy_scan_string()". Is that right?
Thank you,
Krisakorn
On 1/20/06, Sylvain Schmitz <address@hidden> wrote:
> Krisakorn Rerkrai wrote:
> > Is it really required to parse from yyin??
> > In case I don't want to read my query from a file.
> > How can I do
> > parse_this(para1, "SELECT hot_food FROM menu");
>
> When using bison, it's the lexer's job to feed tokens to the parser; so
> yyin is really controlled by your lexer. If your lexer is generated by
> GNU/flex, the solution is to use yy_scan_string (see
> <http://www.gnu.org/software/flex/manual/html_chapter/flex_12.html#SEC12>).
>
> --
> Regards,
>
> Sylvain
>