com php-langspec: b-prefix is case-insensitive and applies to doc strings: spec/09-lexical-structure.md spec/19-grammar.md
[email protected] (Nikita Popov) Tue, 09 Aug 2016 21:15:53 +0000
| Newsgroups | php.standards.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit: 39cb8bede53e51929700fd2fae66ae3790306d7b=0AAuthor: Nikita Pop= ov <[email protected]> Tue, 9 Aug 2016 23:15:53 +0200=0AParents: 5999= 63eccd8d5f940195800302844f2e9a8e6e76=0ABranches: master=0A=0ALink: h= ttp://git.php.net/?p=3Dphp-langspec.git;a=3Dcommitdiff;h=3D39cb8bede53e5192= 9700fd2fae66ae3790306d7b=0A=0ALog:=0Ab-prefix is case-insensitive and appli= es to doc strings=0A=0AChanged paths:=0A M spec/09-lexical-structure.md= =0A M spec/19-grammar.md=0A=0A=0ADiff:=0Adiff --git a/spec/09-lexical-str= ucture.md b/spec/09-lexical-structure.md=0Aindex bf8ddec..a3b3665 100644=0A= --- a/spec/09-lexical-structure.md=0A+++ b/spec/09-lexical-structure.md=0A@= @ -519,7 +519,7 @@ The type of a string literal is `string`.=0A =0A <pre>= =0A <i>single-quoted-string-literal::</i>=0A- b<i><sub>opt</sub></i> = ' <i>sq-char-sequence<sub>opt</sub></i> '=0A+ <i>b-prefix<sub>opt</sub>= </i> ' <i>sq-char-sequence<sub>opt</sub></i> '=0A =0A <i>sq-char-sequen= ce::</i>=0A <i>sq-char</i>=0A@@ -530,7 +530,10 @@ The type of a string = literal is `string`.=0A \<i><sub>opt</sub></i> any member of the sour= ce character set except single-quote (') or backslash (\)=0A =0A <i>sq-es= cape-sequence:: one of</i>=0A- \' \\=0A+ \' \\=0A+=0A+ <i>b-prefi= x:: one of</i>=0A+ b B=0A </pre>=0A =0A **Semantics**=0A@@ -540,9 +543= ,9 @@ single-quotes (`'`, U+0027). The literal can contain any source chara= cter except=0A single-quote (`'`) and backslash (`\\`), which can only be r= epresented by=0A their corresponding escape sequence.=0A =0A-The optional `= b` prefix is reserved for future use in dealing with=0A+The optional *b-pre= fix* is reserved for future use in dealing with=0A so-called *binary string= s*. For now, a *single-quoted-string-literal*=0A-with a `b` prefix is equiv= alent to one without.=0A+with a *b-prefix* is equivalent to one without.=0A= =0A A single-quoted string literal is always a constant expression.=0A =0A= @@ -560,7 +563,7 @@ A single-quoted string literal is always a constant exp= ression.=0A =0A <pre>=0A <i>double-quoted-string-literal::</i>=0A- b<i= ><sub>opt</sub></i> " <i>dq-char-sequence<sub>opt</sub></i> "=0A+ <i>b= -prefix<sub>opt</sub></i> " <i>dq-char-sequence<sub>opt</sub></i> "=0A = =0A <i>dq-char-sequence::</i>=0A <i>dq-char</i>=0A@@ -601,6 +604,7 @@= A single-quoted string literal is always a constant expression.=0A =0A * [= *octal-digit*](#integer-literals)=0A * [*hexadecimal-digit*](#integer-liter= als)=0A+* [*b-prefix*](#single-quoted-string-literals)=0A =0A **Semantics**= =0A =0A@@ -610,9 +614,9 @@ double-quote (`"`) and backslash (`\\`), which c= an only be represented by=0A their corresponding escape sequence. Certain o= ther (and sometimes=0A non-printable) characters can also be expressed as e= scape sequences.=0A =0A-The optional `b` prefix is reserved for future use = in dealing with=0A+The optional *b-prefix* is reserved for future use in de= aling with=0A so-called *binary strings*. For now, a *double-quoted-string-= literal*=0A-with a `b` prefix is equivalent to one without.=0A+with a *b-pr= efix* is equivalent to one without.=0A =0A An escape sequence represents a = single-character encoding, as described=0A in the table below:=0A@@ -741,7 = +745,7 @@ echo "\$myC->p1 =3D >$myC->p1<\n"; // =E2=86=92 $myC->p1 =3D >2<= =0A =0A <pre>=0A <i>heredoc-string-literal::</i>=0A- <<< <i>= hd-start-identifier new-line hd-char-sequence<sub>opt</sub> new-line h= d-end-identifier</i> ;<i><sub>opt</sub> new-line</i>=0A+ <i>b-prefix<= sub>opt</sub></i> <<< <i>hd-start-identifier new-line hd-char= -sequence<sub>opt</sub> new-line hd-end-identifier</i> ;<i><sub>opt</sub>= new-line</i>=0A =0A <i>hd-start-identifier::</i>=0A <i>name</i>=0A= @@ -775,6 +779,7 @@ echo "\$myC->p1 =3D >$myC->p1<\n"; // =E2=86=92 $myC->= p1 =3D >2<=0A * [*new-line*](#comments)=0A * [*dq-octal-escape-sequence*](#= double-quoted-string-literals)=0A * [*dq-hexadecimal-escape-sequence*](#dou= ble-quoted-string-literals)=0A+* [*b-prefix*](#single-quoted-string-literal= s)=0A =0A **Constraints**=0A =0A@@ -799,6 +804,8 @@ A heredoc literal suppo= rts variable substitution as defined for=0A A heredoc string literal is a c= onstant expression if it does not contain=0A any variable substitution.=0A = =0A+The optional *b-prefix* has no effect.=0A+=0A **Examples**=0A =0A ```PH= P=0A@@ -818,13 +825,14 @@ echo ">$s<";=0A =0A <pre>=0A <i>nowdoc-string-l= iteral::</i>=0A- <<< ' <i>name</i> ' <i>new-line hd-char-s= equence<sub>opt</sub> new-line name</i> ;<i><sub>opt</sub> new-line</i= >=0A+ <i>b-prefix<sub>opt</sub></i> <<< ' <i>name</i> ' <i>= new-line hd-char-sequence<sub>opt</sub> new-line name</i> ;<i><sub>opt<= /sub> new-line</i>=0A </pre>=0A =0A **Defined elsewhere**=0A =0A * [*hd-c= har-sequence*](#heredoc-string-literals)=0A * [*new-line*](#comments)=0A+* = [*b-prefix*](#single-quoted-string-literals)=0A =0A **Constraints**=0A =0A@= @ -842,6 +850,8 @@ not subject to variable substitution (like the single-qu= oted string).=0A =0A A nowdoc string literal is a constant expression.=0A = =0A+The optional *b-prefix* has no effect.=0A+=0A **Examples**=0A =0A ```PH= P=0Adiff --git a/spec/19-grammar.md b/spec/19-grammar.md=0Aindex f57ddf1..e= 426ea1 100644=0A--- a/spec/19-grammar.md=0A+++ b/spec/19-grammar.md=0A@@ -2= 14,7 +214,7 @@ The grammar notation is described in [Grammars section](09-l= exical-structure.md#=0A <i>nowdoc-string-literal</i>=0A =0A <i>single= -quoted-string-literal::</i>=0A- b<i><sub>opt</sub></i> ' <i>sq-char-se= quence<sub>opt</sub></i> '=0A+ <i>b-prefix<sub>opt</sub></i> ' <i>sq-c= har-sequence<sub>opt</sub></i> '=0A =0A <i>sq-char-sequence::</i>=0A = <i>sq-char</i>=0A@@ -225,10 +225,13 @@ The grammar notation is described i= n [Grammars section](09-lexical-structure.md#=0A \<i><sub>opt</sub></i>= any member of the source character set except single-quote (') or backsl= ash (\)=0A =0A <i>sq-escape-sequence:: one of</i>=0A- \' \\=0A+ \'= \\=0A+=0A+ <i>b-prefix:: one of</i>=0A+ b B=0A =0A <i>double-quo= ted-string-literal::</i>=0A- b<i><sub>opt</sub></i> " <i>dq-char-sequen= ce<sub>opt</sub></i> "=0A+ <i>b-prefix<sub>opt</sub></i> " <i>dq-char-= sequence<sub>opt</sub></i> "=0A =0A <i>dq-char-sequence::</i>=0A <i>= dq-char</i>=0A@@ -281,7 +284,7 @@ The grammar notation is described in [Gra= mmars section](09-lexical-structure.md#=0A -> <i>name</i>=0A =0A = <i>heredoc-string-literal::</i>=0A- <<< <i>hd-start-identifi= er new-line hd-char-sequence<sub>opt</sub> new-line hd-end-identifier<= /i> ;<i><sub>opt</sub> new-line</i>=0A+ <i>b-prefix<sub>opt</sub></i>= <<< <i>hd-start-identifier new-line hd-char-sequence<sub>opt= </sub> new-line hd-end-identifier</i> ;<i><sub>opt</sub> new-line</i>= =0A =0A <i>hd-start-identifier::</i>=0A <i>name</i>=0A@@ -309,7 +312,= 7 @@ The grammar notation is described in [Grammars section](09-lexical-str= ucture.md#=0A \\ \$ \e \f \n \r \t \v=0A =0A <i>nowdoc-= string-literal::</i>=0A- <<< ' <i>name</i> ' <i>new-line h= d-char-sequence<sub>opt</sub> new-line name</i> ;<i><sub>opt</sub> new= -line</i>=0A+ <i>b-prefix<sub>opt</sub></i> <<< ' <i>name</i>= ' <i>new-line hd-char-sequence<sub>opt</sub> new-line name</i> ;<i><= sub>opt</sub> new-line</i>=0A </pre>=0A =0A ###Operators and Punctuators= =0A