On Mon, Feb 6, 2012 at 3:11 PM, Mark Miesfeld <[email protected]> wrote:
> On Mon, Feb 6, 2012 at 11:59 AM, Rick McGuire <[email protected]> wrote:
>>
>>
>> Whether it is a number or not is not the issue.  The issue is whether
>> it is considered a symbol or not during scanning.  For example, 3a is
>> a symbol token, and it is only when you try to do arithmetic with its
>> value do any numeric rules get applied.  At issue here is whether the
>> scanner rules for exponential notation require this to be interpreted
>> as a single token, or two tokens with an operator between.  By the
>> rules we have in our documentation, then 3ae+6, 3..0+6, and .ae+6
>> should all be single tokens.  Prior to that "bug fix", only the first
>> of these was interpreted as a single symbol token.  After the update,
>> none of these were.  Our working definition, I believe, goes all the
>> way back to Mike's original definition.  However, I think I just found
>> the relevant section in the ANSI standard, which states:
>>
>> – EXPONENT_SIGN occurs when the character about to be scanned is '+'
>> or '-', and the
>> characters to the left of the sign, currently parsed as part of
>> Const_symbol, represent a
>> plain_number followed by 'E' or 'e', and the characters to the right
>> of the sign represent a
>> repetition of digit not followed by a general_letter or '.'.
>>
>> So, by this definition, the exponent is only recognized as part of the
>> symbol if the token scanned so far is a "plain number" (consisting of
>> at least one digit and at most one ".").  So by the ANSI definition,
>> 3ae+6 should NOT be treated as a single token, but rather as two
>> tokens with a operator between then.  The error is the correct
>> behavior here, and this truly was a bug fix :-)
>>
>
> Okay, thanks for straightening that out.  I didn't have the ANSI standard,
> but I just downloaded the pre-publication from RexxLA.  Not sure if would
> have found that part eventually or not.  <grin>
>
> Does our working definition in the docs need to be updated?

It probably should be.  I'll take a crack at updating the wording.

Rick

>
> --
> Mark Miesfeld
>
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> _______________________________________________
> Oorexx-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to