archives

« Bugzilla Issues Index

#2876 — 7.1.3.1 duplicates numeric lexical grammar


7.1.3.1 seems to have an unnecessary duplicate of the numeric lexical grammar, we should probably have a single unified grammar, parameterized if necessary to deal with the whole octal issue.


Ok, i think a better algorithm would be:

1. let stripped be the result of StripwhiteSpace(string)
2. if stripped is empty return +0
3. if stripped is "+Infinity" or "Infinity" return +Infinity
4. If stripped is "-Infinity" return -Infinity
5. Return the result of applying the numeric lexical grammar

AllenWB: I can't write very well so i'm kind of hoping you'd be able to make a better version of the above :D


[Changing this bug's 'Version' from Rev17 to Rev24.
Section 7.1.3.1 didn't exist in Rev17.]


(In reply to comment #0)
> 7.1.3.1 seems to have an unnecessary duplicate of the numeric lexical grammar,
> we should probably have a single unified grammar, parameterized if necessary to
> deal with the whole octal issue.

See also Bug 632.


sounds good in principle, but I'm going to prioritize it lower than working on actual errors or filling in still missing material.