4 ms·
I understand, but there's a difference between doing work for you and helping you get there. Imagine a sexpression representing C data types the following two w
by webkike 9y ago
I understand, but there's a difference between doing work for you and helping you get there. Imagine a sexpression representing C data types the following two ways:
(pointer-to (integer))
(integer (pointed-to))
We could very easily print a decl for the second example by printing the two atoms seen in order:
int *
But if we want to print the first correctly, we will have to prepend to a string in order to correctly display the decl. That is, we will have to change our traversal order: https://en.wikipedia.org/wiki/Tree_traversal https://en.wikipedia.org/wiki/Tree_traversal
- ufo 9y agoCome on, that is a trivial difference that doesn't change anything in the grand scheme of things. At this point needlessly restricting the input format would just serve to make it harder for other people to help me find the solution I need. And it is fine if you don't want to help me with this but sheesh, I am not trying to get someone else to do my homework here. I am trying to share a fun (and hopefully short) problem I couldnt solve myself yet.