lann / wasm-wave

Web Assembly Value Encoding
Apache License 2.0
38 stars 6 forks source link

Keyword ambiguities #19

Closed lann closed 10 months ago

lann commented 10 months ago

WAVE's formal description is currently ambiguous wrt nan and inf which can be interpreted either as float literals (not-a-number and infinity) or as variant case labels.

Additionally, the language description side-steps other similar potential ambiguities with bool (true, false), option (some(...), none) and result (ok(...), err(...)) types by grouping them all under the variant-case rule.

As with #17 the WAVE parser in this repo avoids this ambiguity by being type-driven, but another implementation may want to parse to an unambiguous AST.

Two options:

lann commented 10 months ago

Dupe of #18