[Prev][Next][Index]
adding labels to statements
- To: sage-users@cica.INDIANA.EDU
- Subject: adding labels to statements
- Date: Thu, 26 Jan 1995 11:27:03 -0500
- From: Erik Seligman <Erik_Seligman@BEEHIVE.MC.CS.CMU.EDU>
Have any of you used sage to add a label to a statement in C++?
I create a label using the constructor SgLabel(int). I don't know what
the int represents, but the other choice is to use a PTR_LABEL. Anyone
know what that is? Looking at the code, it looks like an internal sage
thing.
Anyway, I then add the label using stmt.setLabel(*new_label). I seem
to succeed, because next I assert(stmt.hasLabel()); but no label appears
when I unparse.
Also, I don't see where the SgLabelSymb object is connected with the
statement label. Do any of you understand this?
Thanks!
---Erik
eriks@cs.cmu.edu