Emitter

Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weka.core.parser.JFlex
Class Emitter

    java.lang.Object
      weka.core.parser.JFlex.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.

Version:
  JFlex 1.4.1, $Revision: 1.1 $, $Date: 2008-05-09 09:14:11 $
Author:
  Gerwin Klein

Constructor Summary
`Emitter(java.io.File inputFile, LexParse parser, DFA dfa)`

Method Summary
`void` | `emit()` Main Emitter method.
`void` | `emitActionTable()`
`static boolean` | `endsWithJavadoc(java.lang.StringBuffer usercode)` Try to find out if user code ends with a javadoc comment
`static java.io.File` | `normalize(java.lang.String name, java.io.File input)` Constructs a file in Options.getDir() or in the same directory as another file.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Emitter

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

Throws:
  `java.io.IOException`

Method Detail

### normalize

    public static java.io.File normalize(java.lang.String name,
                                         java.io.File input)

  Constructs a file in Options.getDir() 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)

### endsWithJavadoc

    public static boolean endsWithJavadoc(java.lang.StringBuffer usercode)

  Try to find out if user code ends with a javadoc comment

  Parameters:
    `buffer` - the user code
  Returns:
    true if it ends with a javadoc comment

### emitActionTable

    public void emitActionTable()

### emit

    public void emit()

  Main Emitter method.

Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD