org.prorefactor.macrolevel
Class ListingParser

java.lang.Object
  extended by org.prorefactor.macrolevel.ListingParser

public class ListingParser
extends java.lang.Object

For parsing Proparse's "preprocessor listing" file. Generates a "macro tree". The macro tree's root is an IncludeRef object. The root IncludeRef represents the main.p source file.


Field Summary
 java.util.HashMap<java.lang.Integer,java.lang.String> fileIndexes
          Map of fileIndex (Integer) to fileName (String)
 
Constructor Summary
ListingParser(java.lang.String listingFile)
           
 
Method Summary
 IncludeRef getRoot()
          Get the macro tree's root - an IncludeRef object which represents the main.p source file.
static void main(java.lang.String[] args)
          Just for build/test/debug
 void parse()
           
 MacroRef[] sourceArray()
          Get an array of the MacroRef objects, which would map to the SOURCENUM attribute from JPNode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fileIndexes

public java.util.HashMap<java.lang.Integer,java.lang.String> fileIndexes
Map of fileIndex (Integer) to fileName (String)

Constructor Detail

ListingParser

public ListingParser(java.lang.String listingFile)
Method Detail

getRoot

public IncludeRef getRoot()
Get the macro tree's root - an IncludeRef object which represents the main.p source file.


main

public static void main(java.lang.String[] args)
Just for build/test/debug


parse

public void parse()
           throws java.io.IOException,
                  RefactorException
Throws:
java.io.IOException
RefactorException

sourceArray

public MacroRef[] sourceArray()
Get an array of the MacroRef objects, which would map to the SOURCENUM attribute from JPNode.

See Also:
MacroLevel.sourceArray(MacroRef)


Copyright © 2008 Joanju Software. All Rights Reserved.