I am trying to build a parser for CUDA code. Specifically, I am attempting to extend an ANSI C parser to include CUDA code. I’m wondering:
(1) Am I reinventing the wheel; i.e., does an open source parser already exist?
(2) Specifically, how do I go about parsing the dimBlock an dimGrid assignments? The following isn’t standard C, certainly:
[font=“Courier New”]dim3 dimBlock(block_size);[/font]
It’s not a function declaration (despite the [font=“Courier New”]dim3[/font] type), but it doesn’t work the same a function call (because of the [font=“Courier New”]dim3[/font] type). Thanks!