Minres / CoreDSL

Xtext project to parse CoreDSL files
Apache License 2.0
16 stars 3 forks source link

Grammar type specifiers #18

Closed AtomCrafty closed 2 years ago

AtomCrafty commented 2 years ago

Depends on #17

This PR rewrites the grammar for type specifiers and introduces a proper hierarchy. Nonsense types like unsigned float<17> or double char char are no longer syntactically valid.

previous hierarchy:

TypeSpecifier
    PrimitiveType
    CompositeType
    EnumType

new hierarchy:

TypeSpecifier
    ValueTypeSpecifier
        PrimitiveTypeSpecifier
            IntegerTypeSpecifier
            FloatTypeSpecifier
            BoolTypeSpecifier
        CompositeTypeSpecifier
        EnumTypeSpecifier
    VoidTypeSpecifier