module php/pp/common/main

rules
// Document
  php-to-box:
    Document(topinline,open,stats,close,botinline)
    -> 
V([SOpt(VS(), "0")], [ V([SOpt(VS(), "0")|[SOpt(IS(), "2")]], [ H([SOpt(HS(), "0")], [ topinline' | [ open ] ]) | [ stats ] ]) | [ H([SOpt(HS(), "0")], [ close | [ botinline' ] ]) ] ])
V vs=0 [ V vs=0 is=2 [ H hs=0 [~topinline' ~open] ~*stats ] H hs=0 [ ~close ~botinline'] ]
where <lit-or-echo> topinline => topinline' ; <lit-or-echo> botinline => botinline' php-to-box: Document(topinline,open,stats) ->
V([SOpt(VS(), "0")], [ V([SOpt(VS(), "0")|[SOpt(IS(), "2")]], [ H([SOpt(HS(), "0")], [ topinline' | [ open ] ]) | [ stats ] ]) ])
V vs=0 [ V vs=0 is=2 [ H hs=0 [~topinline' ~open] ~*stats ] ]
where <lit-or-echo> topinline => topinline' php-to-box: TemplateDocument(inline) -> H([SOpt(HS(), "0")], [ inline' ])
H hs=0 [ ~inline' ]
where <lit-or-echo> inline => inline'