| 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
| 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 | ||||||||||
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.
|
|||||||||||
| ATerm | fix-heredoc | ||||||||||
Fixes the ambigious HereDoc when multiple HereDocs occur in a program. |
|||||||||||
| ATerm | post-process-structures | ||||||||||
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 | ||||||||||
Transforms the content of a DoubleQuoted string into alist.TODO: Integrate both HereDoc- and DQ-content
|
|||||||||||
| ATerm | make-list | ||||||||||
Utility function to transform a (possible transformed) |
|||||||||||