From: Rick M. <obj...@gm...> - 2012-02-06 19:38:36
|
Yes, I was just checking that out, and that was the update that broke this. By the language definition, this badly coded line was actually producing the defined behavior and correcting that line caused the breakage. However, I suspect this is not as simple as just backing this out, as there are a number of other examples where the exponent is rejected that should be according to this definition. For example, .ae+6 and 3..0+6. I think I need to see what the ANSI standard says for definition of a symbol. Rick On Mon, Feb 6, 2012 at 2:30 PM, Jean-Louis Faucher <jfa...@gm...> wrote: > rev 6673 in scanner.cpp seems the reason of this change. > > old : else if (inch < '0' && inch > '9') > new : else if (inch < '0' || inch > '9') > > If the test above is true then : > state = EXP_EXCLUDED; /* no longer scanning a number > > So there was a bug in 4.1.0 and before... > > Jean-Louis > > > 2012/2/6 Rick McGuire <obj...@gm...> >> >> On Mon, Feb 6, 2012 at 2:04 PM, Mark Miesfeld <mie...@gm...> wrote: >> > In trunk this line of code raises an error condition: >> > >> > x = 3aE+6 >> > >> > But, in 4.1.0 and all the way back to 3.0.0 it is accepted. >> > >> > I see that according to the definition of numbers: >> > >> > >> > The definition of numbers is, therefore, extended as follows: >> > >> >>>-+------------+--+----------------------+--+-digits--------+----------> >> > >> > +-whitespace-+ +-sign--+------------+-+ +-digits.digits-+ >> > >> > +-whitespace-+ +-.digits-------+ >> > >> > +-digits.-------+ >> > >> >>--+---------------------+--+------------+------------------------->< >> > >> > +-E--+------+--digits-+ +-whitespace-+ >> > >> > +-sign-+ >> > >> > >> > >> > the 'a' is not valid if we use the statement: "digits are one or more of >> > the >> > decimal digits 0-9" from the first, un-extended definition. >> >> The rule that applies here is not the definition of a number, but the >> definition of a SYMBOL. Section 1.10.4.4. This states: >> >> One other form of symbol is allowed to support the representation of >> numbers in exponential format. The >> symbol starts with a digit (0-9) or a period, and it can end with the >> sequence E or e, followed immediately >> by an optional sign (- or +), followed immediately by one or more >> digits (which cannot be followed by >> any other symbol characters). The sign in this context is part of the >> symbol and is not an operator. >> These are valid numbers in exponential notation: >> 17.3E-12 >> .03e+9 >> >> By this definition, 3ae+6 should be scanned as a single symbol token >> (the old behavior). I'm not aware of any updates that would have >> changed this behavior. >> >> Rick >> >> >> > >> > But, under the extended definition, there is no statement as to what >> > 'digits' is. >> > >> > This seems like such a fundamental change. >> > >> > Has ooRexx always been wrong and this is just fixed in 4.2.0? Since >> > 3.0.0 >> > is, I've always assumed, the same as IBM' Object Rexx, was this wrong >> > there >> > also? >> > >> > >> > >> > -- >> > >> > 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 >> > Oor...@li... >> > 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 >> Oor...@li... >> 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 > Oor...@li... > https://lists.sourceforge.net/lists/listinfo/oorexx-devel > |