You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Ersin Er (JIRA)" <di...@incubator.apache.org> on 2005/09/02 15:02:13 UTC

[jira] Created: (DIRLDAP-52) The Antlr grammar for Subtree Specification (RFC 3672) does not handle Separators correctly

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


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


[jira] Assigned: (DIRLDAP-52) The Antlr grammar for Subtree Specification (RFC 3672) does not handle Separators correctly

Posted by "Alex Karasulu (JIRA)" <di...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/DIRLDAP-52?page=all ]

Alex Karasulu reassigned DIRLDAP-52:
------------------------------------

    Assign To: Alex Karasulu

> 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
>     Assignee: Alex Karasulu
>  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


[jira] Resolved: (DIRLDAP-52) The Antlr grammar for Subtree Specification (RFC 3672) does not handle Separators correctly

Posted by "Alex Karasulu (JIRA)" <di...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/DIRLDAP-52?page=all ]
     
Alex Karasulu resolved DIRLDAP-52:
----------------------------------

    Fix Version: 0.9.3
     Resolution: Fixed

Commited in revision 267349 here:

http://svn.apache.org/viewcvs.cgi?view=rev&rev=267349

> 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
>     Assignee: Alex Karasulu
>      Fix For: 0.9.3
>  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


[jira] Updated: (DIRLDAP-52) The Antlr grammar for Subtree Specification (RFC 3672) does not handle Separators correctly

Posted by "Ersin Er (JIRA)" <di...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/DIRLDAP-52?page=all ]

Ersin Er updated DIRLDAP-52:
----------------------------

    Attachment: SubtreeSpecificationInvalidSeperatorHandlingBugFix.patch

> 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


[jira] Commented: (DIRLDAP-52) The Antlr grammar for Subtree Specification (RFC 3672) does not handle Separators correctly

Posted by "Ersin Er (JIRA)" <di...@incubator.apache.org>.
    [ 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


[jira] Closed: (DIRSERVER-221) The Antlr grammar for Subtree Specification (RFC 3672) does not handle Separators correctly

Posted by "Ersin Er (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DIRSERVER-221?page=all ]
     
Ersin Er closed DIRSERVER-221:
------------------------------


Done.

> The Antlr grammar for Subtree Specification (RFC 3672) does not handle Separators correctly
> -------------------------------------------------------------------------------------------
>
>          Key: DIRSERVER-221
>          URL: http://issues.apache.org/jira/browse/DIRSERVER-221
>      Project: Directory ApacheDS
>         Type: Bug

>   Components: ldap
>     Versions: pre-1.0
>     Reporter: Ersin Er
>     Assignee: Alex Karasulu
>      Fix For: pre-1.0
>  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