[ http://issues.apache.org/jira/browse/DIRLDAP-52?page=comments#action_12320934 ]
Ersin Er commented on DIRLDAP-52: --------------------------------- I've fixed the issues mentioned. The patch attached includes a grammar update and minor cleanup for related files. The grammar got somewhat complicated but this was required to solve SEP token issue with antlr. I should thank to Emmanuel Lécharny for his great advices. > The Antlr grammar for Subtree Specification (RFC 3672) does not handle > Separators correctly > ------------------------------------------------------------------------------------------- > > Key: DIRLDAP-52 > URL: http://issues.apache.org/jira/browse/DIRLDAP-52 > Project: Directory LDAP > Type: Bug > Components: Common > Versions: 0.9.3 > Reporter: Ersin Er > Attachments: SubtreeSpecificationInvalidSeperatorHandlingBugFix.patch > > The Antlr grammar for Subtree Specification (RFC 3672) handles SP token as ' > ' (single space) and MSP as (' ')+. The SEP token is handled as ',' > everywhere. However, "RFC 3642" defines them as follows: > " > 3. Separators > Certain separators are commonly used in constructing equivalent ABNF > for SET and SEQUENCE types. > sp = *%x20 ; zero, one or more space characters > msp = 1*%x20 ; one or more space characters > sep = [ "," ] > The <sep> rule is used in the ABNF description of the encoding for > ASN.1 SET or SEQUENCE types where all the components are either > OPTIONAL or DEFAULT. It encodes to an empty string if and only if > the immediately preceding character in the encoding is "{", i.e., it > is only empty for the first optional component actually present in > the SET or SEQUENCE value being encoded. > " > So, > SP token should be handled as Zero Or More Spaces Characters which is (' ')*, > MSP token should be handled as OneOr More Spaces Characters which is (' ')+, > and > SEP should be handled in a way that it should match empty string when it > comes just after a "{" token. (This one is an interesting problem.) > I'm working on this issue now and will submit a patch soon. Comments are > welcome. > The grammar file considered is: > http://svn.apache.org/viewcvs.cgi/directory/shared/ldap/trunk/common/src/antlr/subtree-specification.g?rev=265643&view=markup -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
