rfc:docblockparser

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
rfc:docblockparser [2010/09/16 20:55] – Fixed example 1 cfultonrfc:docblockparser [2014/04/08 22:48] – Inactive levim
Line 3: Line 3:
   * Date: 2008-03-06   * Date: 2008-03-06
   * Author: Chad Fulton <ChadFulton@gmail.com>   * Author: Chad Fulton <ChadFulton@gmail.com>
-  * Status: Ready for Discussion+  * Status: Inactive
   * First Published at: http://wiki.php.net/rfc/docblockparser   * First Published at: http://wiki.php.net/rfc/docblockparser
  
Line 57: Line 57:
  
 <code> <code>
-docblock := "\/**" , [whitespace] , [short_description] , [long_description] , [tag , { tag | ignored }*] , { emptyline }* , linebreak , "*/" ;+docblock          := "/**" , [whitespace] , [short_description] , [long_description] , [tag , { tag | ignored }*] , { emptyline }* , linebreak , "*/" ;
 short_description := line , { emptyline }+ ; short_description := line , { emptyline }+ ;
-long_description := line , { line | emptyline }* ; +long_description  := line , { line | emptyline }* ; 
-line := [space] , "* " , [space] , character-"@" , string , [space] , linebreak ; +line              := [space] , "* " , [space] , character-"@" , string , [space] , linebreak ; 
-emptyline := [space] , "*" , [space] , linebreak ; +emptyline         := [space] , "*" , [space] , linebreak ; 
-tag := [space] , "* " , "@" , tagname , space , { string | string , linebreak }* , linebreak ; +tag               := [space] , "* " , "@" , tagname , space , { string | string , linebreak }* , linebreak ; 
-ignored := emptyline , { line | emptyline }+ ; +ignored           := emptyline , { line | emptyline }+ ; 
-string := { character } ; +string            := { character }
-tagname := { character - " " } ; +tagname           := { character - " " }
-space := " " | "\t"+space             := " " | "\t"
-linebreak := "\n" | "\r" | "\r\n"+linebreak         := "\n" | "\r" | "\r\n"
-character := ? any ASCII character with code >= 32 and <= 126 ? ;+character         := ? any ASCII character with code >= 32 and <= 126 ? ;
 </code> </code>
  
Line 133: Line 133:
     string(0) ""     string(0) ""
     ["tag3"]=>     ["tag3"]=>
-    string(53) "this is some pretty-indented multiline text for  +    string(53) "this is some pretty-indented multiline text for tag3"
-tag3"+
     ["tag4"]=>     ["tag4"]=>
-    string(58) "this is some non-pretty-indented multiline  +    string(58) "this is some non-pretty-indented multiline text for tag 4"
-text for tag 4"+
   }   }
 } }
Line 176: Line 174:
      */      */
 } }
 +</code>
  
  
Line 193: Line 192:
  
 None. None.
- 
 ===== Changelog ===== ===== Changelog =====
  
 +2010-09-16 cfulton Initial RFC creation.
rfc/docblockparser.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1