Re: [Firebird-net-provider] Parser class/library

2015-10-05 Thread Amro El-Fakharany
I would be very careful taking a dependency on an external library like yacc or 
antlr and would recommend to avoid such a path.
If at all a standalone "light weight" tokenizer should be preferable although, 
unfortunately,  I don’t know any.
Libraries like antlr and yacc are simply awesome but changes in such libraries 
tends to be breaking changes!


> -Ursprüngliche Nachricht-
> Von: Геннадий Забула [mailto:zabulu...@gmail.com]
> Gesendet: Montag, 5. Oktober 2015 16:22
> An: For users and developers of the Firebird .NET providers  provi...@lists.sourceforge.net>
> Betreff: Re: [Firebird-net-provider] Parser class/library
> 
> EF uses yacc and lex for EntityTree parsing.
> They both produce C# class that can be compiled into the assembly.
> 
> On 5 October 2015 at 16:30, Jiří Činčura  wrote:
> > Hi,
> >
> > I'm working on a bug fix for DNET-266. And the more and more I tweak
> > the parser I wrote this morning to properly handle all the edge cases
> > I'm wondering whether it would make sense to take a dependency on
> some
> > library or class that can do some basic parsing. We don't need full
> > grammar features like ANTLR, just something that can tokenize SQL and
> > handle comments (or in general tokenizer with "escaping" support).
> >
> > What do you think? Any recommendations?
> >
> > BTW the bugfix is sponsored by SMS-Timing. Kudos to them.
> >
> > --
> > Mgr. Jiří Činčura
> > Independent IT Specialist
> >
> > --
> >  ___
> > Firebird-net-provider mailing list
> > Firebird-net-provider@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
> 
> --
> ___
> Firebird-net-provider mailing list
> Firebird-net-provider@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


--
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


Re: [Firebird-net-provider] Parser class/library

2015-10-05 Thread Amro El-Fakharany
True, but in order for yacc (or antlr) to generate C# code you have to use 
their syntax.
This syntax is used to provide the so called grammar mentioned by Jiri.
In General those kind of tools are basically small "compilers" which parses a 
given piece of "grammar" and then construct lexical analyzers.
Changes in the syntax of the "grammar" tends to be breaking changes by nature!


> -Ursprüngliche Nachricht-
> Von: Геннадий Забула [mailto:zabulu...@gmail.com]
> Gesendet: Montag, 5. Oktober 2015 16:43
> An: For users and developers of the Firebird .NET providers  provi...@lists.sourceforge.net>
> Betreff: Re: [Firebird-net-provider] Parser class/library
> 
> IIRC, yacc\lex are an external tools that produce .cs files that provide 
> parsing.
> 
> 
> On 5 October 2015 at 17:31, Amro El-Fakharany <amro00...@gmail.com>
> wrote:
> > I would be very careful taking a dependency on an external library like yacc
> or antlr and would recommend to avoid such a path.
> > If at all a standalone "light weight" tokenizer should be preferable
> although, unfortunately,  I don’t know any.
> > Libraries like antlr and yacc are simply awesome but changes in such
> libraries tends to be breaking changes!
> >
> >
> >> -Ursprüngliche Nachricht-
> >> Von: Геннадий Забула [mailto:zabulu...@gmail.com]
> >> Gesendet: Montag, 5. Oktober 2015 16:22
> >> An: For users and developers of the Firebird .NET providers
> >> 
> >> Betreff: Re: [Firebird-net-provider] Parser class/library
> >>
> >> EF uses yacc and lex for EntityTree parsing.
> >> They both produce C# class that can be compiled into the assembly.
> >>
> >> On 5 October 2015 at 16:30, Jiří Činčura <j...@cincura.net> wrote:
> >> > Hi,
> >> >
> >> > I'm working on a bug fix for DNET-266. And the more and more I
> >> > tweak the parser I wrote this morning to properly handle all the
> >> > edge cases I'm wondering whether it would make sense to take a
> >> > dependency on
> >> some
> >> > library or class that can do some basic parsing. We don't need full
> >> > grammar features like ANTLR, just something that can tokenize SQL
> >> > and handle comments (or in general tokenizer with "escaping" support).
> >> >
> >> > What do you think? Any recommendations?
> >> >
> >> > BTW the bugfix is sponsored by SMS-Timing. Kudos to them.
> >> >
> >> > --
> >> > Mgr. Jiří Činčura
> >> > Independent IT Specialist
> >> >
> >> > ---
> >> > ---
> >> >  ___
> >> > Firebird-net-provider mailing list
> >> > Firebird-net-provider@lists.sourceforge.net
> >> > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
> >>
> >> -
> >> - ___
> >> Firebird-net-provider mailing list
> >> Firebird-net-provider@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
> >
> >
> > --
> >  ___
> > Firebird-net-provider mailing list
> > Firebird-net-provider@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
> 
> --
> ___
> Firebird-net-provider mailing list
> Firebird-net-provider@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


--
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


Re: [Firebird-net-provider] Parameter check

2015-09-30 Thread Amro El-Fakharany
Hi Jiri,
you're not spinning circles. 
Either the check should be value.ParameterName or FbParameter should override 
the Equals() method accordingly.


> -Ursprüngliche Nachricht-
> Von: Jiří Činčura [mailto:j...@cincura.net]
> Gesendet: Mittwoch, 30. September 2015 08:12
> An: firebird-net-provider@lists.sourceforge.net
> Betreff: [Firebird-net-provider] Parameter check
> 
> Hi *,
> 
> I'm looking at
> https://github.com/cincuranet/FirebirdSql.Data.FirebirdClient/blob/master/
> NETProvider/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbParameterC
> ollection.cs#L379
> and I have a strong feeling the check is not correct. The check should contain
> `value.ParameterName`, isn't it? Or am I spinning in my own circles...
> 
> --
> Mgr. Jiří Činčura
> Independent IT Specialist
> 
> --
> ___
> Firebird-net-provider mailing list
> Firebird-net-provider@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


--
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


[Firebird-net-provider] DNet 176 and 564

2015-06-02 Thread Amro El-Fakharany
Hi all,

I'm trying to provide a patch fort the mentioned Jira issues.

The patch can be found here:

https://github.com/amroel/NETProvider/commit/576b16bc1afcb5f8373c149f928ef62
c597e5373

 

Would someone please review it before I submit a pull request? Jiri?

 

Thank you

Amro

--
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


[Firebird-net-provider] [FB-Tracker] Created: (DNET-564) Parameters are ignored if a comment in a query contains a single or double quote

2014-08-16 Thread Amro El-Fakharany (JIRA)
Parameters are ignored if a comment in a query contains a single or double quote


 Key: DNET-564
 URL: http://tracker.firebirdsql.org/browse/DNET-564
 Project: .NET Data provider
  Issue Type: Bug
  Components: ADO.NET Provider
Reporter: Amro El-Fakharany
Assignee: Jiri Cincura
Priority: Minor


The following query fails with an unknown token exception:
select int_field
from test
-- a comment with ' 
where varchar_field = @field

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider