-
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
Strongly-typed parsed data structures, no longer stringly-typed #26
base: master
Are you sure you want to change the base?
Conversation
parse_name_with_type still has some leftovers from early iterations only preprocessor commands are un-parsed If possible using nom would make this much better
TODO convert stringly-typed attributes FIXME still not a bijective parsing removed `TypeCode`, but `TypeCodeMarkup` still needs to go
FIXME finish error messages/handling TODO strongly type more stringly typed attributes TODO Add full c-expr/c-type/c-preproc parsing with nom?
Remove parse_name_with_type's handle_extra param Which was a leftover of my old method, but unused now
I only added paste b/c only after copying & updating the patch version, did I realize I forgot the test name. But at least it makes maintenance easier
Preparing to break it into a smaller enum without any unused fields Also stop blindly generating the code string with invalid C, it didn't handle the const ptr switch that offical python generator does
The `queues` attribute should always be used instead per offical specs See the vulkan 1.2.180 changelog
New 'stride' attribute for <param> remove unused info in TypeBitmask::Definition
@jdtatz That's great to see, as this (parsing types) is one of the major blockers to get For the rest, let's start with:
Then, as more of a loose question: is anything holding us back from finally removing |
Used in the altlen attribute parsing & the #define type tag, mostly The prototype parses is complete enough that it can parse the C subset found in in the spec
can't share rules across peg grammars, so all in one Fixed Expression::Comma No Vec in Expression allowed Add `opticalflow` support for CommandQueue
NameWithType types can be const (arrays) & not ptrs, so seperate constness out from PointerKind to its own field Fix some minor type errors w/ NonZero & Vec
Ooof, to be honest, I saw your fork a few weeks ago (probably just before you opened up the PR) and I didn't really like the direction it was taking. I didn't comment on it because, well, there was no PR or ticket related to it. I'm also not particularly fond of a PR that basically decided to refactor everything without asking before doing so. Even if those changes are good, I am looking at a few thousands lines of diff and I don't have time to review it to see if I agree with this direction or not. And if I don't like these changes and refuse to accept them, then all that work has been wasted. Things I didn't like when I skimmed through it:
I did like the use of One more thing might be formatting. I thought I saw some weird formatting in some commits, but I wasn't sure if it was because of some differences in rust-fmt settings (I'm trying to stick to defaults) or whether you didn't format the code before commit. Would be good to get that lined up so it doesn't cause unnecessary noise in diffs. Ultimately, I think there are two options here:
|
Major work-in-progress, but the goal is to parse everything (attributes and text) into strongly-typed data structures where the only strings left are names & comments. A goal is to make it so no downstream crate will need to parse any C expressions/types/defines. Also I wanted to ensure no information was lost.
I started working on this as I needed more information for extending the ash code-gen for formats, and neither vk-parse or vkxml include what I needed. I'm creating this early pull request to get some feedback on naming, backwards compatibility policy, and the usage of nom.