Sadly, it is impossible to correctly parse C++ (and C also I believe) without being aware of types.<div><br></div><div>--Sean Silva<br><br><div class="gmail_quote">On Tue, Jun 12, 2012 at 9:57 PM, andrewh <span dir="ltr"><<a href="mailto:andrewaah@gmail.com" target="_blank">andrewaah@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In my program I'm placing a macro function body into a normal function body<br>
so that the macro will be expanded and if there are no syntax errors,<br>
generate an ast of it.<br>
e.g:<br>
#define macronum 5<br>
#define macrofunc(x,y) x+y*macronum<br>
void func(char *x, char *y) {macrofunc(x,y);}<br>
<br>
expanding into:<br>
void func(char *x, char *y) {x+y*5;}<br>
to get an ast like: (+ x (* y 5))<br>
<br>
I won't know the param types, so I was hoping to skip the type checking.<br>
<br>
Is this possible? e.g. by doing something with the 'Sema' or 'Parser'<br>
classes?<br>
<br>
Thanks.<br>
<br>
<br>
--<br>
View this message in context: <a href="http://clang-developers.42468.n3.nabble.com/Disable-type-checking-on-identifiers-for-parse-tp4024483.html" target="_blank">http://clang-developers.42468.n3.nabble.com/Disable-type-checking-on-identifiers-for-parse-tp4024483.html</a><br>

Sent from the Clang Developers mailing list archive at Nabble.com.<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div>