With DelphiAST you can take real Delphi code and get an abstract syntax tree. One unit at time and without a symbol table though. FreePascal and Lazarus compatible.