[cfe-dev] [LLVMdev] Looking for C Parser

Sean Silva silvas at purdue.edu
Tue Feb 28 09:33:35 PST 2012


No, that won't find includes. It will be more useful to run
`clang main.c -Xclang -ast-dump`

The `-Xclang` passes the next argument to the "-cc1" invocation of clang.
(warning, the dump will probably be huge, but you can grep and such to get
just the parts you want). Btw I didn't know that you could trigger the ast
dump from the command line; awesome!

--Sean Silva

On Tue, Feb 28, 2012 at 3:40 AM, Nikola Smiljanic <popizdeh at gmail.com>wrote:

> On Wed, Feb 22, 2012 at 12:09 AM, Perry Smith <pedzsan at gmail.com> wrote:
> >
> > I got clang working.  I put it on my Mac.  I see the -S option and I see
> that -emit-ast spews out some binary stuff.  I've also found a page
> describing how to read it back in but I'm assuming that somewhere is a
> utility to pretty print the AST (or perhaps it is built right into clang).
> >
> try clang -cc1 main.c -ast-dump
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120228/208c8843/attachment.html>


More information about the cfe-dev mailing list