[Pharo-project] Bug with RBParser
Hi, RBParser parseExpression: '2r100e2' results : 400 should be : 16 Cheers, Gwenael Casaccio
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 <mrgwen@gmail.com> wrote:
Hi,
RBParser parseExpression: '2r100e2' results : 400 should be : 16
Cheers, Gwenael Casaccio
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Lukas Renggli http://www.lukas-renggli.ch
On Wednesday 11 February 2009 12:08:44 Lukas Renggli wrote:
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)+
Ok thanks for this explanation :) I didn't know but the problem is that some classes use this notation ... Cheers, Gwenael Casaccio
participants (2)
-
Gwenael Casaccio -
Lukas Renggli