com php-langspec: Fix markdown and grammar tool: spec/00-specification-for-php.md tools/grammar.php

[email protected] (Nikita Popov) Sun, 17 Sep 2017 13:41:02 +0000
Newsgroups php.standards.cvs
Message-ID <[email protected]>
Commit:    993ab3eb81f3529ae0ad5b534a2396405306fe00=0AAuthor:    ekinhbayar=
 <[email protected]>         Sat, 6 May 2017 18:32:56 +0300=0ACommitt=
er: Nikita Popov <[email protected]>      Sun, 17 Sep 2017 15:41:02 +0200=0APar=
ents:   befef5a037689d587b159933c21f334c39151170=0ABranches:  master=0A=0AL=
ink:       http://git.php.net/?p=3Dphp-langspec.git;a=3Dcommitdiff;h=3D993a=
b3eb81f3529ae0ad5b534a2396405306fe00=0A=0ALog:=0AFix markdown and grammar t=
ool=0A=0AChanged paths:=0A  M  spec/00-specification-for-php.md=0A  M  tool=
s/grammar.php=0A=0A=0ADiff:=0Adiff --git a/spec/00-specification-for-php.md=
 b/spec/00-specification-for-php.md=0Aindex a40f29d..d2d2f4c 100644=0A--- a=
/spec/00-specification-for-php.md=0A+++ b/spec/00-specification-for-php.md=
=0A@@ -1,7 +1,7 @@=0A <!-- This file is autogenerated, do not edit it manua=
lly -->=0A <!-- Run tools/toc.php instead -->=0A =0A-#Specification for PHP=
=0A+# Specification for PHP=0A Facebook has dedicated all copyright to this=
 specification to the public=0A domain worldwide under the CC0 Public Domai=
n Dedication located at=0A <http://creativecommons.org/publicdomain/zero/1.=
0/>. This specification=0Adiff --git a/tools/grammar.php b/tools/grammar.ph=
p=0Aindex 289aea4..a749450 100644=0A--- a/tools/grammar.php=0A+++ b/tools/g=
rammar.php=0A@@ -48,22 +48,22 @@ $dir =3D __DIR__ . '/../spec/';=0A $gramma=
rFile =3D $dir . '19-grammar.md';=0A =0A $output =3D <<<'END'=0A-#Grammar=
=0A+# Grammar=0A =0A-##General=0A+## General=0A =0A The grammar notation is=
 described in [Grammars section](09-lexical-structure.md#grammars).=0A =0A-=
##Lexical Grammar=0A+## Lexical Grammar=0A =0A =0A END;=0A =0A $lexical =3D=
 file_get_contents($dir . '09-lexical-structure.md');=0A-$lexical =3D strst=
r($lexical, '##Lexical analysis');=0A+$lexical =3D strstr($lexical, '## Lex=
ical analysis');=0A $output .=3D extract_grammar($lexical, $names);=0A =0A-=
$output .=3D "\n\n##Syntactic Grammar";=0A+$output .=3D "\n\n## Syntactic G=
rammar";=0A =0A $skipFiles =3D ['05-types.md', '09-lexical-structure.md', '=
19-grammar.md'];=0A foreach (spec_files($skipFiles) as $fileName =3D> $path=
) {=0A@@ -74,7 +74,7 @@ foreach (spec_files($skipFiles) as $fileName =3D> $=
path) {=0A     }=0A =0A     $heading =3D extract_heading($code);=0A-    $ou=
tput .=3D "\n\n###$heading\n\n" . $grammar;=0A+    $output .=3D "\n\n### $h=
eading\n\n" . $grammar;=0A }=0A =0A $output .=3D "\n";=0A