decomp-permuter icon indicating copy to clipboard operation
decomp-permuter copied to clipboard

C++ Support?

Open RevoSucks opened this issue 3 years ago • 1 comments

Is this out of scope? Surely we can at least have some way of dealing with c++ features like casts and classes and certain c99 inherited features.

RevoSucks avatar May 24 '21 15:05 RevoSucks

It's hard, given the reliance on pycparser. If we restrict ourselves to C++ without templates we could plausibly patch pycparser, but that's a) a fair chunk of work, b) pretty limiting. PERM_IGNORE + PERM_PRETEND can be used to some extent. An option would be to use the clang parser, translate the resutling AST to a pycparser one, and then later translate back. Or alternatively, emit pretty-printed text with lots of PERM_IGNORE.

It would be nice to have a "text mode" for the permuter, where it doesn't make use of the C parser (only supporting PERM macros).

simonlindholm avatar May 24 '21 18:05 simonlindholm