Article View: es.comp.os.linux.programacion
Article #12936Re: Flex en C++
From: Ignacio Arenaza
Date: Sat, 28 Apr 2001 22:21
Date: Sat, 28 Apr 2001 22:21
40 lines
2272 bytes
2272 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
>>>>> "Kuantiko" == Jes�s Carrete Monta�a <kuantiko@escomposlinux.org> writes:
Kuantiko> switch_streams(StringFlow,cout); //Y procesamos con
Kuantiko> yylex() while(yylex()); }
Kuantiko> El problema es switch_streams(). Yo pens� que
Kuantiko> strstream heredaba de ostream y que se le pod�a pasar un
Kuantiko> objeto de este tipo, pero nada. En fin, pregunta
Bueno, al final he acabado mirando la doc de flex y su interfaz para
C++... (sin comentarios ;-)
No tengo la doc. de la stdlibc++ a mano, asi que no se de que deriva
strstream, pero si acabo de leer en el Stroustroup que istringstream
es una modalidad de istream, y que por tanto se puede usar en los
mismos contextos que un istream. En ese caso, podrias hacer algo del
estilo de
istringstream StringFlow;
....
switch_streams (StringFlow, cout);
...
Saludos. I�aki.
- --
Get PGP/GPG Keys at http://www.escomposlinux.org/iarenaza/pgpkey.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: Processed by Mailcrypt and GPG
iD8DBQE660JRZXLnGT1HLgcRAuMoAKCdxlT19NdqxyXGV6nXdawMXuzBXwCeP+J7
uSPhUkSWFmV3XuwHBBTvSy8=
=aVZp
-----END PGP SIGNATURE-----
Technical Details
Message-ID:
<87g0esr7hp.fsf@eb2ebu.ampr.org>Path:
arc1-ca.pugleaf.net!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!130.133.1.3!fu-berlin.de!newsfeed.bcn.ttd.net!news.bcn.ttd.net!frodo.audiolis.com!127.0.0.1!news.audiolis.com!127.0.0.1!newsfeeder.wanadoo.es!44.133.1.30!nobodyReferences:
<873dazs7sd.fsf@relativistic.homeip.net>Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII X-Google-Thread: f86c8,f7965ec5c27cdf3c X-Google-Attributes: gidf86c8,public X-Google-ArrivalTime: 2001-04-28 17:01:01 PST Path: arc1-ca.pugleaf.net!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!130.133.1.3!fu-berlin.de!newsfeed.bcn.ttd.net!news.bcn.ttd.net!frodo.audiolis.com!127.0.0.1!news.audiolis.com!127.0.0.1!newsfeeder.wanadoo.es!44.133.1.30!nobody From: Ignacio Arenaza <iarenaza@eb2ebu.ampr.org> Newsgroups: es.comp.os.linux.programacion Subject: Re: Flex en C++ Date: 29 Apr 2001 00:21:06 +0200 Organization: Servidor NNTP de eb2ebu.ampr.org Lines: 40 Message-ID: <87g0esr7hp.fsf@eb2ebu.ampr.org> References: <873dazs7sd.fsf@relativistic.homeip.net> NNTP-Posting-Host: 213.97.227.24 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@wanadoo.es NNTP-Posting-Date: Sat, 28 Apr 2001 23:06:25 +0000 (UTC) User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7