postprocess

File postprocess.str
Author Eric Bouwers
Since unknown

Module containing the strategies used to post-process a parsed PHP-source. Post-processing includes:- Rewriting HereDoc an DoubleQuoted-parts to lists




Statistics


General
Lines of code 125
Stratego
Module number 1 (100% documented)
Constructor number 0
Overlay number 0
Strategy number 7 (42% documented)
Rule number 10 (20% documented)
DynamicRule number 0



Strategy summary


check-heredoc Checks whether the HereDoc start-tag is equal to the end-tag postprocess.str
fix-and-length n/a postprocess.str
fix-conc n/a postprocess.str
fix-heredoc Fixes the ambigious HereDoc when multiple HereDocs occur in a program postprocess.str
maybe-wrap-in-list n/a postprocess.str
post-process-structures Rewrites all the structures of DQ- and HereDoc strings to lists postprocess.str
tup-min n/a postprocess.str

Rule summary


content-to-list Transforms the content of a DoubleQuoted string into a list postprocess.str
content-to-list n/a postprocess.str
content-to-list n/a postprocess.str
content-to-list n/a postprocess.str
content-to-list n/a postprocess.str
content-to-list n/a postprocess.str
make-list Utility function to transform a (possible transformed) postprocess.str
make-list n/a postprocess.str
make-list n/a postprocess.str
make-list n/a postprocess.str



Strategy details


ATerm check-heredoc
File postprocess.str
Author unknown
Since unknown
 

Checks whether the HereDoc start-tag is equal to the end-tag.We can just check if it ends-with the start-tag because otherwisethe HereDoc would not parse.


type HereDoc(_,_,_) -> exit

 
ATerm fix-heredoc
File postprocess.str
Author unknown
Since unknown
 

Fixes the ambigious HereDoc when multiple HereDocs occur in a program.



 
ATerm post-process-structures
File postprocess.str
Author unknown
Since unknown
 

Rewrites all the structures of DQ- and HereDoc strings to lists.This is needed because a follow-restriction cannot prevent ambiguity



 

Rule details


ATerm content-to-list
File postprocess.str
Author unknown
Since unknown
 

Transforms the content of a DoubleQuoted string into alist.TODO: Integrate both HereDoc- and DQ-content


type DQContent() -> List()

 
ATerm make-list
File postprocess.str
Author unknown
Since unknown
 

Utility function to transform a (possible transformed)