at.dms.msggen
Class DefinitionFile

java.lang.Object
  |
  +--at.dms.msggen.DefinitionFile

class DefinitionFile
extends java.lang.Object

A parsed representation of a file containing compiler messages.


Constructor Summary
DefinitionFile(java.lang.String sourceFile, java.lang.String packageName, java.lang.String prefix, java.util.List definitions)
          Constructs a token definition file
 
Method Summary
 void checkIdentifiers(java.util.Map identifiers)
          Check for duplicate identifiers
 java.lang.String getClassName()
          Returns the package name
 java.lang.String getPackageName()
          Returns the package name
 java.lang.String getPrefix()
          Returns the literal prefix
 void printFile(java.io.PrintWriter out)
          Prints the token definition to interface file (java)
static DefinitionFile read(java.lang.String sourceFile)
          Reads and parses an token definition file
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefinitionFile

public DefinitionFile(java.lang.String sourceFile,
                      java.lang.String packageName,
                      java.lang.String prefix,
                      java.util.List definitions)
Constructs a token definition file
Method Detail

read

public static DefinitionFile read(java.lang.String sourceFile)
                           throws MsggenError
Reads and parses an token definition file
Parameters:
sourceFile - the name of the source file
Returns:
a class info structure holding the information from the source

checkIdentifiers

public void checkIdentifiers(java.util.Map identifiers)
                      throws MsggenError
Check for duplicate identifiers
Parameters:
identifiers - a table of all token identifiers
Returns:
the id of the last token + 1

printFile

public void printFile(java.io.PrintWriter out)
Prints the token definition to interface file (java)
Parameters:
out - the output stream
parent - the super interface

getClassName

public java.lang.String getClassName()
Returns the package name

getPackageName

public java.lang.String getPackageName()
Returns the package name

getPrefix

public java.lang.String getPrefix()
Returns the literal prefix