com php-langspec: Move literal production to syntactic grammar: spec/09-lexical-structure.md spec/10-expressions.md spec/19-grammar.md

[email protected] (Nikita Popov) Wed, 31 Aug 2016 17:13:05 +0000
Newsgroups php.standards.cvs
Message-ID <[email protected]>
Commit:    b2b8ac599733be8ca8d1a99d4e01876049b5f861=0AAuthor:    Nikita Pop=
ov <[email protected]>         Wed, 31 Aug 2016 19:13:05 +0200=0AParents:   a1c=
c12b6a7fa3e6e779d09de8101ece489b7d911=0ABranches:  master=0A=0ALink:       =
http://git.php.net/?p=3Dphp-langspec.git;a=3Dcommitdiff;h=3Db2b8ac599733be8=
ca8d1a99d4e01876049b5f861=0A=0ALog:=0AMove literal production to syntactic =
grammar=0A=0ANot all literals are supported everywhere. Move to syntactic=
=0Agrammar to allow the distinction.=0A=0AChanged paths:=0A  M  spec/09-lex=
ical-structure.md=0A  M  spec/10-expressions.md=0A  M  spec/19-grammar.md=
=0A=0A=0ADiff:=0Adiff --git a/spec/09-lexical-structure.md b/spec/09-lexica=
l-structure.md=0Aindex 678e502..d4cea2b 100644=0A--- a/spec/09-lexical-stru=
cture.md=0A+++ b/spec/09-lexical-structure.md=0A@@ -325,25 +325,8 @@ Also, =
all [*magic constants*](06-constants.md#context-dependent-constants) are a=
=0A =0A ####Literals=0A =0A-#####General=0A-=0A The source code representat=
ion of a value is called a *literal*.=0A =0A-**Syntax**=0A-=0A-<pre>=0A-  <=
i>literal::</i>=0A-    <i>integer-literal</i>=0A-    <i>floating-literal</i=
>=0A-    <i>string-literal</i>=0A-</pre>=0A-=0A-**Defined elsewhere**=0A-=
=0A-* [*integer-literal*](#integer-literals)=0A-* [*floating-literal*](#flo=
ating-point-literals)=0A-* [*string-literal*](#string-literals)=0A-=0A ####=
#Integer Literals=0A =0A **Syntax**=0Adiff --git a/spec/10-expressions.md b=
/spec/10-expressions.md=0Aindex 134caec..f6b58e0 100644=0A--- a/spec/10-exp=
ressions.md=0A+++ b/spec/10-expressions.md=0A@@ -105,7 +105,7 @@ function, =
`$a` need not actually be incremented.=0A =0A * [*variable-name*](09-lexica=
l-structure.md#names)=0A * [*qualified-name*](09-lexical-structure.md#names=
)=0A-* [*literal*](09-lexical-structure.md#general-2)=0A+* [*literal*](#lit=
erals)=0A * [*constant-expression*](#constant-expressions)=0A * [*intrinsic=
*](#general-2)=0A * [*anonymous-function-creation-expression*](#anonymous-f=
unction-creation)=0A@@ -120,6 +120,28 @@ The variable `$this` is predefined=
 inside any non-static instance method (includ=0A constructor) when that me=
thod is called from within an object=0A context. The value of `$this` is th=
e calling object or the object being constructed.=0A =0A+###Literals=0A+=0A=
+**Syntax**=0A+=0A+<pre>=0A+  <i>literal:</i>=0A+    <i>integer-literal</i>=
=0A+    <i>floating-literal</i>=0A+    <i>string-literal</i>=0A+</pre>=0A+=
=0A+**Defined elsewhere**=0A+=0A+* [*integer-literal*](09-lexical-structure=
.md#integer-literals)=0A+* [*floating-literal*](09-lexical-structure.md#flo=
ating-point-literals)=0A+* [*string-literal*](09-lexical-structure.md#strin=
g-literals)=0A+=0A+**Semantics**=0A+=0A+A literal evaluates to its value, a=
s specified in the lexical specification for=0A+[literals](09-lexical-struc=
ture.md#literals).=0A+=0A ###Intrinsics=0A =0A ####General=0Adiff --git a/s=
pec/19-grammar.md b/spec/19-grammar.md=0Aindex 17898db..2c29b27 100644=0A--=
- a/spec/19-grammar.md=0A+++ b/spec/19-grammar.md=0A@@ -123,15 +123,6 @@ Th=
e grammar notation is described in [Grammars section](09-lexical-structure.=
md#=0A =0A ###Literals=0A =0A-####General=0A-=0A-<pre>=0A-  <i>literal::</i=
>=0A-    <i>integer-literal</i>=0A-    <i>floating-literal</i>=0A-    <i>st=
ring-literal</i>=0A-</pre>=0A-=0A ####Integer Literals=0A =0A <pre>=0A@@ -3=
90,6 +381,11 @@ The grammar notation is described in [Grammars section](09-=
lexical-structure.md#=0A     (  <i>expression</i>  )=0A     $this=0A =0A+  =
<i>literal:</i>=0A+    <i>integer-literal</i>=0A+    <i>floating-literal</i=
>=0A+    <i>string-literal</i>=0A+=0A   <i>intrinsic:</i>=0A     <i>intrisi=
c-construct</i>=0A     <i>intrisic-operator</i>=0A