simple

File simple.str
Author Eric Bouwers
Since unknown

Simple common strategies for PHP




Statistics


General
Lines of code 187
Stratego
Module number 1 (100% documented)
Constructor number 0
Overlay number 0
Strategy number 19 (36% documented)
Rule number 0
DynamicRule number 0



Strategy summary


generic-procedural-topdown(Strategy s1, Strategy s2) Generic version of prodecural topdown simple.str
generic-procedural-topdown(Strategy s1, Strategy s2) n/a simple.str
isClassDecl Different match functions for different constructors simple.str
isFunctionDecl n/a simple.str
isInterfaceDecl n/a simple.str
isOldFunctionDecl n/a simple.str
isRequireOrInclude n/a simple.str
php-collect-inclusion(Strategy s) Collects all the terms that succeed a given strategy simple.str
php-collect-inclusion(Strategy s) n/a simple.str
procedural-occurrences(Strategy s) Counting occurences of everything Const that is in the given strategy, without going into function- or class- or interface-definitions simple.str
procedural-occurrences(Strategy s) n/a simple.str
procedural-occurrences-worker(Strategy s) n/a simple.str
procedural-occurrences-worker(Strategy s) n/a simple.str
procedural-topdown(Strategy s) Topdown without going into class- or function-declerations simple.str
procedural-topdown-with-inclusion(Strategy s) Topdown with going into inclusion simple.str
procedural-topdown-with-inclusion(Strategy s) n/a simple.str
procedural-topdown-with-inclusion-worker(Strategy s) n/a simple.str
topdown-with-inclusion(Strategy s) Topdown with going into inclusion simple.str
topdown-with-inclusion(Strategy s) n/a simple.str



Strategy details


ATerm generic-procedural-topdown(Strategy s1, Strategy s2)
File simple.str
Author unknown
Since unknown
 
Parameters
Strategy s1 s1 The strategy to be applied to each term
Strategy s2 s2 The strategy to be called when going into children

Generic version of prodecural topdown



 
ATerm isClassDecl
File simple.str
Author unknown
Since unknown
 

Different match functions for different constructors



 
ATerm php-collect-inclusion(Strategy s)
File simple.str
Author unknown
Since unknown
 
Parameters
Strategy s s The strategy to try on the terms

Collects all the terms that succeed a given strategy. Is compareablewith the normal collect, but this strategy goes into included files whenthey are found.


type a -> List(b)

 
ATerm procedural-occurrences(Strategy s)
File simple.str
Author unknown
Since unknown
 

Counting occurences of everything Const that is in the given strategy,without going into function- or class- or interface-definitions



 
ATerm procedural-topdown(Strategy s)
File simple.str
Author unknown
Since unknown
 
Parameters
Strategy s s The strategy to be applied to each term

Topdown without going into class- or function-declerations.



 
ATerm procedural-topdown-with-inclusion(Strategy s)
File simple.str
Author unknown
Since unknown
 

Topdown with going into inclusion. This will try to extractthe AST from the enivironment and apply the strategy to it.Stores the new AST in the environment. This strategy will not go into class- of function-declerations.

Note: This strategy does _NOT_ take the '_once' into account.



 
ATerm topdown-with-inclusion(Strategy s)
File simple.str
Author unknown
Since unknown
 

Topdown with going into inclusion. This will try to extractthe AST from the enivironment and apply the strategy to it.Stores the new AST in the environment.Note that is tries to extract the AST. If there are no inclusions made thisstrategy will behave like topdown.

Note: This strategy does _NOT_ take the '_once' into account.