This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 20475 - Grammar allows "- Infinity", but not "- 1"
Summary: Grammar allows "- Infinity", but not "- 1"
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: WebIDL (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Cameron McCormack
QA Contact: public-webapps-bugzilla
URL:
Whiteboard: [v1]
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-21 14:31 UTC by Dominique Hazael-Massieux
Modified: 2013-08-04 05:52 UTC (History)
2 users (show)

See Also:


Attachments

Description Dominique Hazael-Massieux 2012-12-21 14:31:46 UTC
The current WebIDL grammar makes "-    Infinity" a valid float litteral, while "- 1.0" is not:
FloatLiteral	→	float
 | "-" "Infinity"
 | "Infinity"
 | "NaN"

I see little value in allowing space between the "-" and "Infinity", so I would suggest instead making the second production "-Infinity".