How to use Grammatica(.NET) to parse SQL scripts?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to use Grammatica(.NET) to parse SQL scripts?

cheng yang
Hi, I use grammatica(.NET) for the first time. I want to parse SQL scripts in C#. And I run the CSharp test in the download package, but it can't be compiled successfully. The error message is:

Namespace "PerCederberg.Grammatica" does not exist in the type or namespace name "Test" .

I have added grammatica-1.5.dll to project.So how can I do now? Can you show me a demo that parsing SQL with C#? Thank you very much.

andycheng
30/4/2011



_______________________________________________
Grammatica-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/grammatica-users
Reply | Threaded
Open this post in threaded view
|

Re: How to use Grammatica(.NET) to parse SQL scripts?

Oliver Bock
Hi Andy,

I think you have done something wrong.  Using Visual Studio 2010 Pro SP1, I:

  1. Added a reference to grammatica-1.5.dll.
  2. Added all the source files under grammatica-1.5\test\src\csharp\PerCederberg.Grammatica.Test\
  3. Added in TestAll.cs (directory above).
  4. Commented out lines 44-47 of TestAll.cs because they refer to other tests I did not bother to include.
  5. It builds and runs OK.
I also use Grammatica 1.5 in Visual C# 2008 and in Visual Studio 2008.

Regards,
  Oliver Bock


On 30/04/2011 7:15 PM, cheng yang wrote:
Hi, I use grammatica(.NET) for the first time. I want to parse SQL scripts in C#. And I run the CSharp test in the download package, but it can't be compiled successfully. The error message is:

Namespace "PerCederberg.Grammatica" does not exist in the type or namespace name "Test" .

I have added grammatica-1.5.dll to project.So how can I do now? Can you show me a demo that parsing SQL with C#? Thank you very much.

andycheng
30/4/2011


_______________________________________________ Grammatica-users mailing list [hidden email] https://lists.nongnu.org/mailman/listinfo/grammatica-users


_______________________________________________
Grammatica-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/grammatica-users