Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent operands names in extended grammar files #186

Open
sfricke-samsung opened this issue Dec 25, 2020 · 1 comment
Open

Inconsistent operands names in extended grammar files #186

sfricke-samsung opened this issue Dec 25, 2020 · 1 comment

Comments

@sfricke-samsung
Copy link

This is a really minor issue, but did catch me off guard.

The extinst.nonsemantic.clspvreflection.grammar.json grammar file for has the operands for the extended instructions as

{ "kind" : "IdRef", "name" : "Kernel" },

while every other grammar file has

{ "kind" : "IdRef", "name" : "'Format'" },

Where the name is wrapped in the single quote. This is easy to check, but annoying to not know it isn't consistent everywhere

@johnkslang
Copy link
Member

I did some grepping, and found this is pretty consistent, in that all grammars except for clspvreflection always have the formatting '...' while the clspvreflection grammar never does, with one exception where the core grammar has { "kind" : "LiteralString", "name" : "The name of the opaque type." }.

The convention is to use emphasized operand names, so maybe clspvrelfection should also do that. @dneto0?

The exception in the core grammar shows flexibility in use of name, but as this has evolved to be considered a name (the writing predates the grammar representation), it could be made to match the other opcodes, using something like "'Type Name'" which is then described in the instruction description instead of this attempt to describe it in the operand name itself. @raunraun?

(If we completed this as an enforced formalization, the '...' could move inside of tooling instead of being in the grammar files.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants