CQL.NET

Published 28 November 03 09:48 AM | MikeD

So today I am continuing work on porting a Java CQL library to C#. Yesterday I got a version to compile with no errors, and even made it more .NET-ish by implementing IFormattable in the parser class so I can just use .ToString(”CQL” | “BER” | “XCQL”) to render the query to a string. There's still a ton of code in there that is obviously not .NET-like.

The nice thing about this Java library is that the author included a set of scripts for creating random queries and testing the results of the two queries between two different parsers, and also a script for regression testing too. The scripts are written in Perl so yesterday I downloaded Perl and Java and installed them on my WinXP notebook. Oye - command line interfaces don't mix well with long paths such as C:\Documents and Settings\Mike Diehl\My Documents\Visual Studio Projects\Stacks\CQL.

But late last night I was stepping through my code anyway and finding that my implementation of StreamTokenizer in C# (that is included in Java) is not doing well. I can hear Joel admonishing me about unit testing already. So that's today's job, trying to get the tokenizer to work correctly.

Filed under:

Comments

# Lubos Andrle said on April 13, 2004 05:23 AM:

Hi, I would like more information and your experience about porting CQL parser to .NET platform because I want to use this solution for my project (digital library gate SRU/SRW).

Thanks Lubos.