Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 32393 invoked from network); 2 Oct 2007 16:12:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Oct 2007 16:12:21 -0000 Received: (qmail 27585 invoked by uid 500); 2 Oct 2007 16:12:10 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 27368 invoked by uid 500); 2 Oct 2007 16:12:09 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 27357 invoked by uid 99); 2 Oct 2007 16:12:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Oct 2007 09:12:09 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of elecharny@gmail.com designates 66.249.82.228 as permitted sender) Received: from [66.249.82.228] (HELO wx-out-0506.google.com) (66.249.82.228) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Oct 2007 16:12:10 +0000 Received: by wx-out-0506.google.com with SMTP id s8so3292440wxc for ; Tue, 02 Oct 2007 09:11:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=JYg06eROvcbbNYKOkqCJK3xUrbwcMYYaB+vfGGwJ0S0=; b=QjatD9Uv7wkMbzGlA+1AVr6GTiqAI02P05AjbV7q6+K8oQGfLJFhejc27VpDSUtX/H6puCe3soBOwyC+V9PNso3c0c3jkEkCUnY0PFkjBpRZRWqPo7VZhMEqGkfns0XMBJoFW/VO9N3Ichp0cQDjZwzpHrtbDkFrgKzQ4Jx125c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=MYfc+avmfcPhWVSZXDjueaDBxfRvokPMv1tVhTuy5E2ZaxvrxEh+m4D5jmDq9jbXSahUkKpMh6D0WyS1lVUAvahrMO4dmBYgyrXrx0HmH4xlazSuJ2CdHcrS+BwviA6WmGIEK0O5iqe+9xIOtuKxkUJn62YYzhTu++fUNboHWBs= Received: by 10.90.78.9 with SMTP id a9mr234698agb.1191341509425; Tue, 02 Oct 2007 09:11:49 -0700 (PDT) Received: by 10.90.65.1 with HTTP; Tue, 2 Oct 2007 09:11:49 -0700 (PDT) Message-ID: Date: Tue, 2 Oct 2007 18:11:49 +0200 From: "Emmanuel Lecharny" Reply-To: elecharny@iktek.com To: "Apache Directory Developers List" Subject: Re: [Filters] New parser In-Reply-To: <46FC05DC.1050508@apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <46FC05DC.1050508@apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Hi Stefan I have looked at your code, and its purpose is different from what we need inside the server : * in the server - fast parsing - stateless parser - fail fast - generate a ExprNode tree - strict filter * in the client - fast parsing - contextfull parser - auto-corrective parser - generate LdapFilter tree - relaxed filter We need also to be more precise in the way we distinguish nodes : Substring node and present node are different, for instance. For those reasons, I don't think it's reasonable to merge the two parsers, and as they are already tailored for their specific usages, I think we will waste some time during the merge at the expense of slower performances on the server. Btw, your parser is very elegant. I like the decoupling between tokenization and syntaxic oarsing. Classical Aho, Sethi & Ullmann compiler technic ;) On 9/27/07, Stefan Seelmann wrote: > Hi Emmanuel, > > we also have a filter parser in Studio. It is a hand-written parser and > it is optimized to parse incomplete filters while typing the filter in > the GUI to give some attribute completions and error markers. See > http://issues.apache.org/jira/browse/DIRSTUDIO-47. > > Perhaps you want to take a look at it, but be aware: it isn't strict ;-) > http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-co= re/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/filter/ > > Regards, > Stefan > > > Emmanuel Lecharny schrieb: > > Hi, > > > > due to some serious reentrant problems we have with the current server > > implementation, I'm rewriting the filter parser. > > > > Things are going well, but I have a question about the syntax. RFC > > 4515 does not allow spaces inside a filter, but the current parser > > allows them. For instance : > > ( ou =3D test ) is valid for our antlr parser, when it's not > > specifically allowed by the grammar. > > > > I can relax the grammar easily, but then we may have issues like : > > ( ou=3D test) should match "test" or only " test" ? or should we use > > this filter : ( ou =3D \20test ) to match " test" ? > > > > I would favor a strict parser otherwise we will have serious problems > > with such values containing starting or trailing spaces. > > > > Keep in mind that the filter parser will only be used when embedding > > the server. For a remote server, filters are already parsed by the > > client. > > > > > > wdyt ? > > > > --=20 Regards, Cordialement, Emmanuel L=E9charny www.iktek.com