MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::StringNumericLiteral::NativeNumberSemantics - ECMAScript 262, Edition 5, lexical string numeric grammar default semantics package, using native perl representations
version 0.014
This modules provide a default semantics package for the actions associated to ECMAScript_262_5 lexical string numeric grammar, using native number representation, with the possible exceptions of positive zero and positive infinity: If one of them is not available natively, then the Math::BigFloat representation is used.
For this reason, this module exports two class methods to test if a number is zero or not, that use the native library or Math::BigFloat.
For convenience, even if this is not formally in the string numeric grammar, the neg_zero(), neg_infinity(), nan(), is_zero(), is_infinite() and is_nan() methods are also exported.
Instantiate a new object that has two members: number initialized to host's positive zero, and length initalized to host's positive zero.
Host implementation of $self multiplied by $objmul. Returns $self.
Host implementation of rounded $self. Returns $self.
Host implementation of $self setted to positive zero, defaulting to Data::Float::pos_zero if your host have signed zeroes, 0 otherwise. Returns $self.
Host implementation of $self setted to positive infinity, defaulting to Data::Float::pos_infinity if your host have infinity, otherwise a trial between (~0)**(~0) and {my $n = 2; $n *= $n while $n < $n*$n; $n}. Return $self.
Host implementation of $self setted to 10 ** $powobj. Returns $self.
Host implementation of $self setted to positive integer represented in $string, length initialized to the number of characters in $string. Returns $self.
Host implementation of $self setted to positive hexadecimal integer represented in $string. Returns $self.
Host implementation of $self sign change. Returns $self.
Host implementation of $addobj added to $self. Returns $self.
Host implementation of $subobj substracted from $self. Returns $self.
Increase by one the host representation of the number of characters used to evaluate the host value. Returns $self.
Returns the a new object derived from the number of characters used to evaluate the host value of $self. Returns the new object instance.
Returns the host class that, when called as class->new, is creating a new object.
Returns the host implementation of value hosted in $self.
Class method that returns the host implementation of (positive if any) zero, or its Math::BigFloat implementation otherwise.
Class method that returns the host implementation of (negative if any) zero, or its Math::BigFloat implementation otherwise.
Class method that returns the host implementation of (positive if any) infinity, or its Math::BigFloat implementation otherwise.
Class method that returns the host implementation of (negative if any) infinity, or its Math::BigFloat implementation otherwise.
Class method that returns the host implementation of NaN, or its Math::BigFloat implementation otherwise.
Class method that returns true or false if $value is zero. In case $value would be a blessed object, $value->is_zero() is returned if $value can do this method, otherwise undef is returned.
Class method that returns true or false if $value is infinite. In case $value would be a blessed object, $value->is_inf() is returned if $value can do this method, otherwise undef is returned.
Class method that returns true or false if $value is NaN. In case $value would be a blessed object, $value->is_nan() is returned if $value can do this method, otherwise undef is returned.
Jean-Damien Durand <jeandamiendurand@free.fr>
This software is copyright (c) 2013 by Jean-Damien Durand.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install MarpaX::Languages::ECMAScript::AST, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MarpaX::Languages::ECMAScript::AST
CPAN shell
perl -MCPAN -e shell install MarpaX::Languages::ECMAScript::AST
For more information on module installation, please visit the detailed CPAN module installation guide.