JFlex
Class Emitter

java.lang.Object
  extended byJFlex.Emitter

public final class Emitter
extends java.lang.Object

This class manages the actual code generation, putting the scanner together, filling in skeleton sections etc. Table compression, String packing etc. is also done here.


Field Summary
static java.io.File directory
           
 
Constructor Summary
Emitter(java.io.File inputFile, LexParse parser, DFA dfa)
           
 
Method Summary
 void emit()
           
static java.io.File normalize(java.lang.String name, java.io.File path, java.io.File input)
          Constructs a file in a path or in the same directory as another file.
static java.net.URL toURL(java.io.File file)
          Converts an abstract pathname into a file: URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

directory

public static java.io.File directory
Constructor Detail

Emitter

public Emitter(java.io.File inputFile,
               LexParse parser,
               DFA dfa)
        throws java.io.IOException
Method Detail

normalize

public static java.io.File normalize(java.lang.String name,
                                     java.io.File path,
                                     java.io.File input)
Constructs a file in a path or in the same directory as another file. Makes a backup if the file already exists.

Parameters:
name - the name (without path) of the file
path - the path where to construct the file
input - fallback location if path = null (expected to be a file in the directory to write to)

emit

public void emit()

toURL

public static java.net.URL toURL(java.io.File file)
                          throws java.net.MalformedURLException
Converts an abstract pathname into a file: URL. The exact form of the URL is system-dependent. If it can be determined that the file denoted by this abstract pathname is a directory, then the resulting URL will end with a slash.

Throws:
java.net.MalformedURLException