-
Notifications
You must be signed in to change notification settings - Fork 5
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
How to know if a CommandParam
is a pointer?
#25
Comments
Ah, my "favorite" part of
That Started work on the parser is in
Unfortunately, I'm a bit busy with other stuff these days and it's hard to say when I will be able to finish this part. But in my head, this is one of the major missing pieces on the road to 1.0. |
I guess most are trying to move off of To me it'd be great if we could at least have a I'm also at a massive lack for time now and pretty much always, so will have to decide how to proceed here with |
My main worry is that tags in xml might not enclose all of the declaration correctly. As I remember, I think you're right and we can try adding Hopefully I manage to find time to do it in upcoming days. |
If it isn't, that may be considered a spec bug? It seems there's only one way to find out: support this and run it through some (the same?) code that (currently) parses the types and names?
Also only one way to find out :)
That's how we (Ash) have been going at this so far. Some generator/compilation failures were our own, others were invalid spec. I managed to integrate Ash code generation and compile-testing into Khronos' Vulkan CI (but infallible) if only to give an indication of the current state of the spec. |
Commit 615ffb6 adds |
Thanks. I don't have any code ready to parse |
For the upcoming `api` attribute in `vk.xml` commands also need to be processed through `vk-parse` which has support for all the new attributes, while `vkxml` is deprecated and completely untouched for years. This conversion unfortunately requires whipping up yet another quick-and-dirty `nom` parser of a specific subset of C used in `vk.xml` to describe parameter signatures. This PR shows that conversion is complete and provides no accidental semantic differences. Also update `vk-parse` to `0.9` which contains a new `code` field on `CommandParam` (`<param>` element) to be able to inspect the code signature of individual parameters rather than parsing them out of (and matching them back to `vk-parse`'s `params` array!) the `<command>` / `CommandDefinition` as a whole: krolli/vk-parse#25 (comment) krolli/vk-parse@615ffb6
For the upcoming `api` attribute in `vk.xml` commands also need to be processed through `vk-parse` which has support for all the new attributes, while `vkxml` is deprecated and completely untouched for years. This conversion unfortunately requires whipping up yet another quick-and-dirty `nom` parser of a specific subset of C used in `vk.xml` to describe parameter signatures. This PR shows that conversion is complete and provides no accidental semantic differences. Also update `vk-parse` to `0.9` which contains a new `code` field on `CommandParam` (`<param>` element) to be able to inspect the code signature of individual parameters rather than parsing them out of (and matching them back to `vk-parse`'s `params` array!) the `<command>` / `CommandDefinition` as a whole: krolli/vk-parse#25 (comment) krolli/vk-parse@615ffb6
@krolli thanks for the |
For the upcoming `api` attribute in `vk.xml` commands also need to be processed through `vk-parse` which has support for all the new attributes, while `vkxml` is deprecated and completely untouched for years. This conversion unfortunately requires whipping up yet another quick-and-dirty `nom` parser of a specific subset of C used in `vk.xml` to describe parameter signatures. This PR shows that conversion is complete and provides no accidental semantic differences. Also update `vk-parse` to `0.9` which contains a new `code` field on `CommandParam` (`<param>` element) to be able to inspect the code signature of individual parameters rather than parsing them out of (and matching them back to `vk-parse`'s `params` array!) the `<command>` / `CommandDefinition` as a whole: krolli/vk-parse#25 (comment) krolli/vk-parse@615ffb6
Glad to hear that. 👍 |
For the upcoming `api` attribute in `vk.xml` commands also need to be processed through `vk-parse` which has support for all the new attributes, while `vkxml` is deprecated and completely untouched for years. This conversion unfortunately requires whipping up yet another quick-and-dirty `nom` parser of a specific subset of C used in `vk.xml` to describe parameter signatures. This PR shows that conversion is complete and provides no accidental semantic differences. Also update `vk-parse` to `0.9` which contains a new `code` field on `CommandParam` (`<param>` element) to be able to inspect the code signature of individual parameters rather than parsing them out of (and matching them back to `vk-parse`'s `params` array!) the `<command>` / `CommandDefinition` as a whole: krolli/vk-parse#25 (comment) krolli/vk-parse@615ffb6
For the upcoming `api` attribute in `vk.xml` commands also need to be processed through `vk-parse` which has support for all the new attributes, while `vkxml` is deprecated and completely untouched for years. This conversion unfortunately requires whipping up yet another quick-and-dirty `nom` parser of a specific subset of C used in `vk.xml` to describe parameter signatures. This PR shows that conversion is complete and provides no accidental semantic differences. Also update `vk-parse` to `0.9` which contains a new `code` field on `CommandParam` (`<param>` element) to be able to inspect the code signature of individual parameters rather than parsing them out of (and matching them back to `vk-parse`'s `params` array!) the `<command>` / `CommandDefinition` as a whole: krolli/vk-parse#25 (comment) krolli/vk-parse@615ffb6
Currently migrating some more of
ash
tovk-parse
to use a new property. During implementation it seems there's no easy way to know if aCommandParam
is a pointer type, becausevk.xml
has the*
outside its<type>
element. It's sometimes - but not always - possible to assume pointers whenlen.is_some()
.Consider the following XML:
This results in:
Notice how there's nothing on
pData
telling that it is a pointer, not even a member containing the raw text inside<param>
. There's acode
member on the entire command - containing the entire command as a C function declaration, which would be very tedious to parse by hand.The text was updated successfully, but these errors were encountered: