org.prorefactor.treeparserbase
Class TokenTypesReader

java.lang.Object
  extended by org.prorefactor.treeparserbase.TokenTypesReader
All Implemented Interfaces:
TokenTypesI

public class TokenTypesReader
extends java.lang.Object
implements TokenTypesI

Provides a lookup of token names from numbers, for ASTs which have more than the usual Proparse token types. This is for specialized ASTs, and wouldn't be used for the usual ASTs that flow from Proparse through ProRefactor. This class gives us a map of token type numbers to token type names and is useful in generating parsing debugging tools, such as token listers. Reads the "XYZTokenTypes.txt" file in this class's package directory. Subclass this in your own treeparsers directory in order to use it. IMPORTANT: When subclassing: 1. Copy the constructor to your subclass. 2. Set your own value for the file name.


Field Summary
protected  java.io.InputStream inputStream
           
 
Constructor Summary
TokenTypesReader()
           
 
Method Summary
 java.lang.String getName(int type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inputStream

protected java.io.InputStream inputStream
Constructor Detail

TokenTypesReader

public TokenTypesReader()
                 throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getName

public java.lang.String getName(int type)
Specified by:
getName in interface TokenTypesI


Copyright © 2008 Joanju Software. All Rights Reserved.