org.ourgrid.common.spec.grammar.io
Interface GrammarReader

All Known Implementing Classes:
GalsGrammarReader

public interface GrammarReader

This entity is responsable to know how to read a gammar description file. Created on 22/05/2004


Method Summary
 Grammar read(java.io.File fileName, Grammar grammar)
          Read a gammar description file from a determined format and returns a Grammar object after the process
 Grammar read(java.io.InputStream stream, Grammar grammar)
          Read a gammar description file from a determined format and returns a Grammar object after the process
 

Method Detail

read

Grammar read(java.io.File fileName,
             Grammar grammar)
             throws MalformedGrammarException,
                    java.io.IOException
Read a gammar description file from a determined format and returns a Grammar object after the process

Parameters:
fileName - The file where the grammar is described.
grammar - The object grammar that will be filled with the informations from the file.
Returns:
A Grammar object
Throws:
MalformedGrammarException
java.io.IOException

read

Grammar read(java.io.InputStream stream,
             Grammar grammar)
             throws MalformedGrammarException,
                    java.io.IOException
Read a gammar description file from a determined format and returns a Grammar object after the process

Parameters:
stream - The stream that contains the description of the grammar
grammar - The object grammar that will be filled with the informations from the file.
Returns:
A Grammar object
Throws:
MalformedGrammarException
java.io.IOException