Open pfalcon opened 6 years ago
First issue is elaborating label handling. There're 2 close, but distinct issues:
goto
is required to be a label. I now consider allowing it to be an address too. To achieve that, p.1 needs to be addressed first. But there can still can be ambiguities, e.g. if address starts with hexadecimal a-f
. As addresses are defined to be symbolic in ScratchABlock, it's unclear how to fix this ambiguity actually (and that's of course the reason why goto
was required to take a label in the first place). The motivation for allowing addresses is simplifying e.g. "disassembling to PseudoC". Of course, to simplify that completely, the parser would need to be rewritter, as currently a label is required to signify a basic block start. Ironically, if all these changes are made, it effectively enables PseudoC with implicit basic block labels, and that was one of the reasons of my grudge with LLVM IR ;-).
This issue is to discuss ideas on changes to PseudoC syntax - mostly to implementation aspects in ScratchABlock, but maybe general PseudoC matters too.