|  |     I doubt such a general translator exists.  The universe of possible
    MACRO programs is larger than the universe of possible Pascal programs
    as there are constructs possible in MACRO that are impossible with
    Pascal (such as two loops which partially overlap, but neither of
    which is nested in the other).  The same is true of ADA and PL/1.
    
    While it might be possible to back-translate (at great effort) the
    output of a simple-minded compiler to the source,  the general case
    is much more difficult.  Back-transating from the output of the
    VAX Pascal compiler, for example, is not easy due to the many peep-hole
    optimizations, as I know from having done so as part of trying to
    answer SPRs on it.  And the VAX Pascal compiler is far less tricky
    a MACRO coder than most humans.
    
    I'm sorry to be the bearer of bad news.
    
    			-John Bishop
 | 
|  |     
    	Five years later, I am looking into "reverse engineering" a body of
    	working VAX Macro (-32) programs.  Eventually they will be written
    	in ANSI C, so that they may run on VAX/VMS, RISC/OSF, and perhaps
    	other things.
    
    	So far, I've glanced at the McCabe "BattleMap" tool, and I've
    	gotten in touch with the last member of the VMS A/D project
    	of the same name as the topic of this note.
    
    	The McCabe Tools parse various languages, then perform various
    	types of analysis.  The will display flow graphs, and call
    	structure, in the form of a structure chart.  Also, it will
    	generate a list of conditions that will cover all of the code at
    	least once.
    
    	Can anyone point me at any other tools that will perform semantic
    	analysis on Macro code, other than code generation?
    
    		Thanks in advance,
    
    		-pk.
    
 | 
|  |     Part of the Alpha effort includes VEST, a tool which analyzes MACRO-32
    (in the form of VAX/VMS images) and generates flowgraphs.  Perhaps you
    could use it as a starting point.  However, keep in mind the advice in
    86.1---it may be impossible to translate a MACRO-32 program into C,
    short of writing a C program which simulates a VAX!
        John Sauter
 |