help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: yyparse(): input from string


From: Sylvain Schmitz
Subject: Re: yyparse(): input from string
Date: Fri, 20 Jan 2006 17:04:36 +0100
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040616

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]