You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Text format: memarg doesn't follow lexical format #1552
The offset and align fields in memargs are specified as 'offset='o:u32 and 'align='a:u32 with no space between the keywords and the u32s. However, according to the longest match rule in the lexical format, valid offsets and alignments such as offset=0 and align=3 are reserved and should not appear in the source.
Obviously we can't fix this by changing the format of the offset and align fields due to backward compatibility. Is there a way we can safely fix this in the lexical format?
Lexically, an offset or align phrase is considered a single keyword token
in the section on memory instructions. Of course, that contradicts the earlier claim that all keyword tokens are defined by literals in the grammar. I suppose the simplest fix is to widen that statement appropriately.
Activity
rossberg commentedon Oct 20, 2022
Yeah, the spec hand-waves about this by saying
in the section on memory instructions. Of course, that contradicts the earlier claim that all keyword tokens are defined by literals in the grammar. I suppose the simplest fix is to widen that statement appropriately.
tlively commentedon Oct 21, 2022
Oh good, I hadn't seen that text. I'll make a PR adding more nuance to the definition of keyword tokens.
[spec] Allow explicit keyword definitions
[spec] Allow explicit keyword definitions (#1553)
Merge pull request #25 from dhil/wasmfx-funcref-merge
[spec] Allow explicit keyword definitions (WebAssembly#1553)