<html><head><base href="x-msg://65/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>Le 6 mai 2010 à 12:33, mywayin2sky a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div lang="KO" link="blue" vlink="purple"><div class="Section1"><p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 12pt; margin-left: 0cm; text-align: justify; font-size: 10pt; font-family: 맑은고딕; "><span class="apple-style-span"><span lang="EN-US" style="font-family: Georgia, serif; color: rgb(34, 34, 34); ">Hello,</span></span><span lang="EN-US" style="font-family: Georgia, serif; color: rgb(34, 34, 34); "><o:p></o:p></span></p><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; text-align: justify; font-size: 10pt; font-family: 맑은고딕; "><span class="apple-style-span"><span lang="EN-US" style="font-family: Georgia, serif; color: rgb(34, 34, 34); ">I'm working in a project involving source to source transformation of some arbitrary c code , I'm looking forward to using Clang</span></span><span lang="EN-US" style="font-family: Georgia, serif; color: rgb(34, 34, 34); "><br><span class="apple-style-span">my main problem is where to start , I can find approx. no documentation on topic</span><br><br><span class="apple-style-span">Any existing source to source sample codes based on clang that can be of help as a starting point ?</span></span><span class="apple-style-span"><span lang="EN-US"><o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; text-align: justify; font-size: 10pt; font-family: 맑은고딕; "><span lang="EN-US">I want to know the Clang APIs for building a AST and rewriting codes from the AST.<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; text-align: justify; font-size: 10pt; font-family: 맑은고딕; "><span lang="EN-US"><o:p> </o:p></span></div></div></div></span></blockquote><div><br></div>Actually, the best source to source transformer example is the ObjC Rewriter (see lib/FrontEnd/RewriteObjC.cpp).</div><div><br></div><div><br></div><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div>-- Jean-Daniel</div><div><br></div><div><br></div></span><br class="Apple-interchange-newline">
</div>
<br></body></html>