Can data flow analysis be performed during the parse of a source file ( forward flow analysis at least? ) . Is this a bad idea , if so ( seperation of concerns , ect... ). Thanks .... :U
Sounds like a bad idea.
Do you want to be managing sets of values at the same time you're creating a symbol table?
Quote from: cman on May 30, 2005, 12:28:35 AM
Can data flow analysis be performed during the parse of a source file ( forward flow analysis at least? ) . Is this a bad idea , if so ( seperation of concerns , ect... ). Thanks .... :U
You can begin building the AST (abstract syntax tree) upon which you'll do the DFA, but successful data flow analysis generally requires random access to the AST. So generally, DFA occurs after the entire file is scanned and parsed (generally, this is a precursor to optimization, which occurs after code generation).
Cheers,
Randy Hyde