File | typejuggling.str |
Author | Eric Bouwers |
Since | unknown |
Strategies that do type juggling.Apply the rules on a PHPPrimitiveType toget a PHPPrimitiveType of the desired type.
General | |
Lines of code | 355 |
Stratego | |
Module number | 1 (100% documented) |
Constructor number | 0 |
Overlay number | 0 |
Strategy number | 10 (100% documented) |
Rule number | 38 (15% documented) |
DynamicRule number | 0 |
Strategy summary |
||
extract-float-part | Extracts the start of a string that can be interperted as an float | typejuggling.str |
extract-integer-part | Extracts the start of a string that can be interperted as an integer | typejuggling.str |
generic-get-php-array-value | Generic type to Array | typejuggling.str |
get-php-number-value | Introduction of pseudo-type number | typejuggling.str |
take-decimal-part | Returns the elements of a list of Chars the correspond to a " | typejuggling.str |
take-exponent-part | Returns the elements of a list of Chars the correspond to a "e" and a sequence of numbers | typejuggling.str |
take-exponent-part | Returns the elements of a list of Chars the correspond to a "E" and a sequence of numbers | typejuggling.str |
take-negative-part(Strategy s) | Matches on the "-" and a givens strategy | typejuggling.str |
take-positive-part(Strategy s) | Matches on the "+" and a givens strategy | typejuggling.str |
try-take-pos-take-neg(Strategy s) | Tries to match element of a list given a strategy | typejuggling.str |
Rule summary |
||
get-php-array-value | Converting to PHPArray see: http://www | typejuggling.str |
get-php-array-value | n/a | typejuggling.str |
get-php-array-value | n/a | typejuggling.str |
get-php-array-value | n/a | typejuggling.str |
get-php-array-value | n/a | typejuggling.str |
get-php-array-value | n/a | typejuggling.str |
get-php-boolean-value | Converting to PHPBoolean | typejuggling.str |
get-php-boolean-value | n/a | typejuggling.str |
get-php-boolean-value | n/a | typejuggling.str |
get-php-boolean-value | n/a | typejuggling.str |
get-php-boolean-value | n/a | typejuggling.str |
get-php-boolean-value | n/a | typejuggling.str |
get-php-float-value | Converting to PHPFloat | typejuggling.str |
get-php-float-value | n/a | typejuggling.str |
get-php-float-value | n/a | typejuggling.str |
get-php-float-value | n/a | typejuggling.str |
get-php-float-value | n/a | typejuggling.str |
get-php-float-value | n/a | typejuggling.str |
get-php-float-value | n/a | typejuggling.str |
get-php-float-value | n/a | typejuggling.str |
get-php-integer-value | Converting to PHPInteger | typejuggling.str |
get-php-integer-value | n/a | typejuggling.str |
get-php-integer-value | n/a | typejuggling.str |
get-php-integer-value | n/a | typejuggling.str |
get-php-integer-value | n/a | typejuggling.str |
get-php-integer-value | n/a | typejuggling.str |
get-php-integer-value | n/a | typejuggling.str |
get-php-integer-value | n/a | typejuggling.str |
get-php-string-value | Converting to PHPString | typejuggling.str |
get-php-string-value | n/a | typejuggling.str |
get-php-string-value | n/a | typejuggling.str |
get-php-string-value | n/a | typejuggling.str |
get-php-string-value | n/a | typejuggling.str |
get-php-string-value | n/a | typejuggling.str |
get-php-string-value | n/a | typejuggling.str |
take-float-part | Takes a list of Chars and extracts the part that can be interpreted as a float | typejuggling.str |
take-float-part | n/a | typejuggling.str |
take-float-part | n/a | typejuggling.str |
Strategy details |
|||||||||||
ATerm | extract-float-part | ||||||||||
Extracts the start of a string that can be interperted as anfloat.
|
|||||||||||
ATerm | extract-integer-part | ||||||||||
Extracts the start of a string that can be interperted as aninteger.
|
|||||||||||
ATerm | generic-get-php-array-value | ||||||||||
Generic type to Array. It will make an array with one indexwith the value the strategy is applied on.
|
|||||||||||
ATerm | get-php-number-value | ||||||||||
Introduction of pseudo-type number. It tries to get a float- or an integervalue. This strategy should be used for everything that is documented withnumber values. |
|||||||||||
ATerm | take-decimal-part | ||||||||||
Returns the elements of a list of Chars the correspondto a "." and a sequence of numbers.
|
|||||||||||
ATerm | take-exponent-part | ||||||||||
Returns the elements of a list of Chars the correspondto a "e" and a sequence of numbers.
|
|||||||||||
ATerm | take-exponent-part | ||||||||||
Returns the elements of a list of Chars the correspondto a "E" and a sequence of numbers.
|
|||||||||||
ATerm | take-negative-part(Strategy s) | ||||||||||
Matches on the "-" and a givens strategy. Build the result asthe "-" and the result of the strategy.
|
|||||||||||
ATerm | take-positive-part(Strategy s) | ||||||||||
Matches on the "+" and a givens strategy. Build the result asthe "+" and the result of the strategy.
|
|||||||||||
ATerm | try-take-pos-take-neg(Strategy s) | ||||||||||
Tries to match element of a list given a strategy.It first matches on a "+" or a "-".
|
|||||||||||
Rule details |
|||||||||||
ATerm | get-php-array-value | ||||||||||
Converting to PHPArraysee: http://www.php.net/manual/en/language.types.array.php#language.types.array.casting
|
|||||||||||
ATerm | get-php-boolean-value | ||||||||||
Converting to PHPBoolean.see: http://www.php.net/manual/en/language.types.boolean.php#language.types.boolean.casting
|
|||||||||||
ATerm | get-php-float-value | ||||||||||
Converting to PHPFloat.see: http://www.php.net/manual/en/language.types.float.php#language.types.float.casting
|
|||||||||||
ATerm | get-php-integer-value | ||||||||||
Converting to PHPInteger.see: http://www.php.net/manual/en/language.types.integer.php#language.types.integer.casting
|
|||||||||||
ATerm | get-php-string-value | ||||||||||
Converting to PHPString.see: http://www.php.net/manual/en/language.types.string.php#language.types.string.casting
|
|||||||||||
ATerm | take-float-part | ||||||||||
Takes a list of Chars and extracts the part that can be interpreted as afloat. This is an optional list of numbers, an optional point, a list ofnumbers followed by an optional e/E with numbers behind it.(0-9]+ [\.]? [0-9]+? ([eE][0-9]+)? The rule truncates the rest of the list.
|
|||||||||||