-
Notifications
You must be signed in to change notification settings - Fork 2
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
[cpp] export isl_printer functionality #6
Comments
Very interesting. I would like to see a modern printer interface for isl. Sven wanted to not directly expose the isl printer as he did not like the current design. It would be great to learn what kind of interface Sven has in mind. |
Or what kind of interface we would like to have. |
In fact Polly we just define operator<< using isl_*_to_str:
https://github.com/llvm-mirror/polly/blob/master/include/polly/Support/ISLOStream.h |
This sort of definitions can be auto-generated, I think, but it won't solve the callbacks problem. |
Sure, the Polly stuff is certainly not a complete interface. Can you expand a little on the callback stuff. What exactly would you like / do you need? |
What we need is the AST printing functions exposed with the support for callbacks handling users node printing. |
It can fit a custom stream object, similarly to
std::stringstream
, which has state and can accept any relevant objects usingoperator <<
. This way, it will be possible to configure the output formats of the isl_printer. The different betweenprinter_to_file
andprinter_to_str
can be resolved, e.g., with inheritance. It would be nice ifprinter_to_str
behaved similarly tostd::stringstream
. Finally, callbacks accepting/returning a printer object can accept/return a stream object instead, which is compatible with C++ notion of a stream.The text was updated successfully, but these errors were encountered: