According to the ANSI standard integers do not support an exponent:

    integer ::= decimalInteger  | radixInteger
    decimalInteger ::= digits
    digits ::= digit+
    radixInteger ::= radixSpecifier  'r' radixDigits
    radixSpecifier := digits
    radixDigits ::= (digit | uppercaseAlphabetic)+

They even state explicitly that '10e10' is not a valid number token.

Furthermore floating point numbers do not accept a different radix (or
base) and thus are always written in decimal notation:

    float ::= mantissa [exponentLetter exponent]
    mantissa ::= digits '.' digits
    exponent ::= ['-']decimalInteger
    exponentLetter ::= 'e' | 'd' | 'q'

Cheers,
Lukas

On Wed, Feb 11, 2009 at 11:34 AM, Gwenael Casaccio <[email protected]> wrote:
> Hi,
>
> RBParser parseExpression: '2r100e2'
>        results : 400 should be : 16
>
> Cheers,
> Gwenael Casaccio
>
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



-- 
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to