public class ASDGrammarReader
extends java.lang.Object
Constructor and Description |
---|
ASDGrammarReader(java.lang.String fileName)
Initializes a new ASDGrammarReader on a given file or URL.
|
ASDGrammarReader(java.lang.String fileName,
boolean includeCoords)
Initializes a new ASDGrammarReader on a given file or URL.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the InputStream used by the ASDGrammarReader,
if the InputStream was opened from a URL.
|
java.util.HashMap<java.lang.String,asd.ASDWordEntry> |
getGrammar()
Gets an ASD grammar from the file.
|
public ASDGrammarReader(java.lang.String fileName) throws java.io.IOException, java.net.MalformedURLException
fileName
- the name of the file or URLjava.io.IOException
java.net.MalformedURLException
public ASDGrammarReader(java.lang.String fileName, boolean includeCoords) throws java.io.IOException, java.net.MalformedURLException
fileName
- the name of the file or URLincludeCoords
- indicates whether or not to include
pixel coordinates in the grammar loaded, if they are
present. They are needed by the graphical grammar editor
but not by the parser.java.io.IOException
java.net.MalformedURLException
public void close() throws java.io.IOException
java.io.IOException
public java.util.HashMap<java.lang.String,asd.ASDWordEntry> getGrammar() throws java.io.IOException, ASDInputException
java.io.IOException
ASDInputException