org.inxar.syntacs.translator
Interface Translator

All Superinterfaces:
Serializable
All Known Subinterfaces:
LRTranslator

public interface Translator
extends Serializable

A Translator is an object capable if transforming a stream of characters into an Object. A Translator encapsulates both lexing and parsing tasks.


Method Summary
 TranslatorGrammar getGrammar()
          Returns the TranslatorGrammar for this Translator.
 Properties getProperties()
          Returns the Properties defined for this Translator.
 Object translate(Object src)
          Translates the given Object to some other Object representation.
 

Method Detail

getGrammar

public TranslatorGrammar getGrammar()
Returns the TranslatorGrammar for this Translator.

translate

public Object translate(Object src)
                 throws TranslationException
Translates the given Object to some other Object representation. If errors are encountered during the translation, a TranslationException will be thrown. For LRTranslator instances, the Object argument must be related to character streams, such as a Reader, URL, char[], File, or something like that. If the Translator cannot handle the src argument type, it will let you know.

getProperties

public Properties getProperties()
Returns the Properties defined for this Translator. Property names, types, and semantics need be documented by actual translator instances.