1. A method for constructing language specific reverse engineering systems for automatically extracting compressed ASTs with attributes, called Flexforms in the preferred embodiment, from arbitrary source code in a plurality of structured languages; wherein said method minimizes the need for human input and automates many difficult and key steps in the process, wherein each said language has a well defined grammar and lexical analyzer to which some general purpose parser generator can be applied to create a parser for source code written in said language; wherein the terminal nodes in said compressed ASTs contain statements, declarations and/or expressions in said source code and wherein the non-terminal nodes in said compressed ASTs correspond to higher level constructs in said code, said method comprising the steps of: a) receiving a grammar and lexical analyzer for said language and an associated language independent parser generator; b) one of receiving and constructing a set of programming commands sufficient for constructing said compressed AST representations of said source code in said language of step a; c) identifying constructs in said language of step a, including the allowable types of said compressed ASTs and the allowable sections and kinds of procedural refinements in each said type of compressed AST, that are to be represented as non-terminal nodes in said compressed AST; d) for each said construct of step c, identifying those right hand side tokens in specific productions in said grammar of step b that collectively comprise one of said construct and the name of said node representing said construct; e) for each said specific production in step d that corresponds to one said construct of step c, assigning commands from step b, which operate on nodes corresponding to said right side input tokens in said production and generate a node in said compressed AST that corresponds to that said construct; f) for each said specific production in said grammar of step a that does not correspond to any said construct of step c, assigning a default command which automatically decides whether to concatenate the contents of given nodes or to construct a subtree containing said nodes; and g) applying said general-purpose parser generator to the results of said steps e and step f.
1. A method for constructing language specific reverse engineering systems for automatically extracting compressed ASTs with attributes, called Flexforms in the preferred embodiment, from arbitrary source code in a plurality of structured languages; wherein said method minimizes the need for human input and automates many difficult and key steps in the process, wherein each said language has a well defined grammar and lexical analyzer to which some general purpose parser generator can be applied to create a parser for source code written in said language; wherein the terminal nodes in said compressed ASTs contain statements, declarations and/or expressions in said source code and wherein the non-terminal nodes in said compressed ASTs correspond to higher level constructs in said code, said method comprising the steps of: a) receiving a grammar and lexical analyzer for said language and an associated language independent parser generator; b) one of receiving and constructing a set of programming commands sufficient for constructing said compressed AST representations of said source code in said language of step a; c) identifying constructs in said language of step a, including the allowable types of said compressed ASTs and the allowable sections and kinds of procedural refinements in each said type of compressed AST, that are to be represented as non-terminal nodes in said compressed AST; d) for each said construct of step c, identifying those right hand side tokens in specific productions in said grammar of step b that collectively comprise one of said construct and the name of said node representing said construct; e) for each said specific production in step d that corresponds to one said construct of step c, assigning commands from step b, which operate on nodes corresponding to said right side input tokens in said production and generate a node in said compressed AST that corresponds to that said construct; f) for each said specific production in said grammar of step a that does not correspond to any said construct of step c, assigning a default command which automatically decides whether to concatenate the contents of given nodes or to construct a subtree containing said nodes; and g) applying said general-purpose parser generator to the results of said steps e and step f. 9. A method in accordance with claim 1 wherein the default command of said step f of claim 1, which automatically decides whether to concatenate the contents of given nodes or to construct a subtree containing said nodes based on whether nodes are complete, in which case the node represents a token in said grammar of claim 1 corresponding to a construct of step c of claim 1, or not complete, in which case the node does not represent a said token corresponding to said construct, further comprises: p) when said given nodes are complete, then the default command returns a parent node with said complete nodes as children; q) when one said given node is complete and one said node is the root of a subtree, then the default command returns the subtree with the complete node as a child; r) when one said given node is complete and one said node is not complete, then the default command returns said complete node to which the contents of the incomplete node have been appended; and s) when neither said given node is complete, then the default command returns a node containing a concatenation of the contents of the nodes.