Hello (CIL) World.

I was looking through the CIL codebase in search of a function that would
convert a statement into an element of the CIL representation.

The larger context of this problem is as follows: I have a C file, and I
also have another file (a non-legal C file) with assignments such as:

a = 3;
b[0x5] = 4;
c.d.foo = 3;

I would like to "patch" these assignments into a function of the original C
file. These assignments are the initial assignments to these variables, so
they will occur just after the definitions of these variables at the top of
the function.

I was wondering if there was already something in CIL that could do this,
since I haven't yet seen one. As an alternative, I was considering passing
the source file through CIL; once this is done, I hope to read these
assignments and somehow "convert" them into the appropriate elements of the
CIL representations, so that I can stitch them into the CIL AST.

The best I could find was the function "cStmt" within "formatCil.ml".

Any suggestions or advice would be appreciated.

Thanks,
Jon.
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
CIL-users mailing list
CIL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cil-users

Reply via email to