Skip to Content.
Sympa Menu

freetds - Re: [freetds] a better libtds

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] a better libtds
  • Date: Mon, 22 Aug 2011 09:04:29 -0400

On Thu, 18 Aug 2011 22:20:44 +0000
Dann Corbit <DCorbit AT connx.com> wrote:

> This is Microsoft's TDS grammar:
> http://msdn.microsoft.com/en-us/library/dd304582%28v=PROT.13%29.aspx

Yes, it's a start, but it's far from complete description.

The first step is to reduce TDS to BNF. The step before that (!) might
be to reduce it to a tabular description from which the BNF and
documentation can be generated.

> A grammar can be turned into a parser and tree walker with a tool
> like the Gold Parser: http://www.devincook.com/goldparser/

Yes, I was thinking along just those lines. Gold doesn't run on Linux,
though, and LALR is more complex than we need to parse TDS.

An LL parser looks ahead only one token, enough for TDS. I had been
thinking about ANTLR, but RDP

http://www.cs.rhul.ac.uk/research/languages/projects/rdp.html

looks promising.

Because we're adding a build-time dependency, any parser we use
must be freely available and as portable as FreeTDS itself. And
it's tiny: the RDP source zip archive is 189,628 bytes, less
than 10% of FreeTDS's 2,136,329.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page