Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.compilers    |    Compiler construction, theory, etc. (Mod    |    2,753 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 1,099 of 2,753    |
|    Tom Copeland to richard.melikson@gmail.com    |
|    Re: parser for C -> AST    |
|    03 Oct 07 09:40:11    |
      From: tom@infoether.com              On Mon, 2007-10-01 at 11:04 +0000, richard.melikson@gmail.com wrote:       > I have to do some analysis of C code. Is it possible to find online a       > free parser for C that will generate some kind of syntax tree / AST ?       > All I could find is bits and pieces of lex/yacc files that don't       > compile, and I tried to look at TCC but its parser is intergrated with       > the generator in a stack-based manner, so no AST.              And one more, for JavaCC:              https://javacc.dev.java.net/servlets/ProjectDocumentList?folderI       =110&expandFolder=110&folderID=0              These are JavaCC grammars, but you can convert them to JJTree grammars       (which produce an AST) by just renaming them to C.jjt and twiddling the       start symbol to return the root AST node.              Yours,              Tom              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca