Skip to content

Bug in language spec grammar for SpecialFloatLiteral? #113

@matty-hall

Description

@matty-hall

The production for SpecialFloatLiteral looks incorrect, as the minuses are not optional, as they are for IntLiteral and FloatLiteral. Instead of this:

SpecialFloatLiteral = minus inf | minus nan .

Should it not actually be this?

SpecialFloatLiteral = [ minus ] inf | [ minus ] nan .

EDIT:
A few more things I noticed that may or may not be intentional, but I wanted to ask:

  1. IntLiteral, FloatLiteral, and SpecialFloatLiteral allow a preceding minus in the grammar but not a plus. Is this intentional?

  2. ScalarValue allows a SpecialFloatLiteral (i.e. inf and NaN) while TextFormatScalarValue does not. Is this intentional?

  3. TextFormatScalarValue allows both an identifier and a SignedIdentifier while ScalarValue allows the identifier but not its signed version. Is this intentional?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions