<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>20453</bug_id>
          
          <creation_ts>2012-12-20 04:55:45 +0000</creation_ts>
          <short_desc>3.1: two questions re underscore removal</short_desc>
          <delta_ts>2013-08-06 04:10:46 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>WebIDL</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>[v1]</status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Dyck">jmdyck</reporter>
          <assigned_to name="Cameron McCormack">cam</assigned_to>
          <cc>mike</cc>
    
    <cc>public-script-coord</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>80428</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2012-12-20 04:55:45 +0000</bug_when>
    <thetext>In 3.1, a couple of places say:
    the identifier [of some construct] is the value of the identifier token with
    any single leading U+005F LOW LINE (&quot;_&quot;) character (underscore) removed.

(1)
The significance of the word &apos;single&apos; is unclear. It could mean:
    (a) if the value of the identifier token begins with exactly one underscore,
        it is removed.
or
    (b) if the value of the identifier token begins with one or more underscores,
        exactly one is removed.

E.g., if the value of the identifier token is &quot;__foo&quot;, is the identifier
(a) &apos;__foo&apos; or (b) &apos;_foo&apos; ?


(2)
The production:
    identifier = [A-Z_a-z][0-9A-Z_a-z]*
allows an identifier token whose value is a single underscore.
This seems to imply that the resulting identifier has no characters.
Is that intended?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91593</commentid>
    <comment_count>1</comment_count>
    <who name="Cameron McCormack">cam</who>
    <bug_when>2013-08-04 05:46:59 +0000</bug_when>
    <thetext>I removed the &quot;single&quot;s and updated the regex for the identifier token.

http://dev.w3.org/cvsweb/2006/webapi/WebIDL/Overview.xml.diff?r1=1.673;r2=1.674;f=h
http://dev.w3.org/cvsweb/2006/webapi/WebIDL/v1.xml.diff?r1=1.115;r2=1.116;f=h</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91624</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2013-08-04 20:24:29 +0000</bug_when>
    <thetext>I&apos;ve since noticed two things:

(1) Both the old and new regex allow an identifier token such as _42,
    which would lead to an identifier of just 42, which seems undesireable.

(2) &quot;The identifier of any of the abovementioned IDL constructs MUST NOT ...
    begin with a U+005F LOW LINE (&quot;_&quot;) character.&quot;
    Which would seem to disallow an identifier token (or at least one that
    provides the identifier for some IDL construct) from having two or more
    leading underscores (which would obviate the original question about
    underscore removal).

So I wonder if the regex for identifier token should be:

    _?[A-Za-z][0-9A-Z_a-z]*</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91674</commentid>
    <comment_count>3</comment_count>
    <who name="Cameron McCormack">cam</who>
    <bug_when>2013-08-06 01:32:19 +0000</bug_when>
    <thetext>Sounds good, thanks.

http://dev.w3.org/cvsweb/2006/webapi/WebIDL/Overview.xml.diff?r1=1.687;r2=1.688;f=h
http://dev.w3.org/cvsweb/2006/webapi/WebIDL/v1.xml.diff?r1=1.129;r2=1.130;f=h</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>