Re: a better libtds

"Neuhauser, Roman (GE Capital, consultant)" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <D3A73269432A224FA3E7ECE3DDDFCE40078C33E8@LONMLVEM10.e2k.ad.ge.com>
> From: [email protected]
[mailto:[email protected]] On Behalf Of James K. Lowden
> As I looked more into RDP I realized not only it but most
> lex/yacc tools are aimed at text files and are capable of handling
much
> more complex languages than is TDS.  Too little and too much!
> 
> Can you show me, say, a Flex rule that parses a varchar (int16,
> value N, followed by N characters)?

excuse the digression.  i wouldn't be bringing up c++ if it weren't for
the fact that you guys mentioned it first.  this obviously isn't Flex, i
just thought i'd pimp Boost.Spirit a bit. ;)

using phoenix::ref;
using qi::word;
using qi::repeat;
using qi::char_;

boost::uint16_t len;
word[ref(len) = _1] >> repeat(len)[char_];

-- 
roman
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.