Package net.oijon.utils.parser
Class Parser
- java.lang.Object
-
- net.oijon.utils.parser.Parser
-
public class Parser extends java.lang.ObjectParses a .language file, and allows various parts to be accessed- Author:
- alex
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LoggetLog()Gets the log the parser outputs to.MultitaggetPHOSYSTag()Gets the containing tag, including all subtagsLanguageparseLanguage()Parses a language from a ParserLexiconparseLexicon()Parses a lexicon from a ParserOrthographyparseOrtho()PhonologyparsePhono()Parses a phonology from a ParserPhonoSystemparsePhonoSys()Parses a phonology system from a Parser
-
-
-
Constructor Detail
-
Parser
public Parser(java.lang.String input)
Creates an object to hold the contents of a .language structured string- Parameters:
input- The string to be parsed.
-
Parser
public Parser(java.io.File file)
Creates an object to hold the contents of a .language structured file- Parameters:
file- The file to be read
-
-
Method Detail
-
getPHOSYSTag
public Multitag getPHOSYSTag()
Gets the containing tag, including all subtags- Returns:
-
parsePhonoSys
public PhonoSystem parsePhonoSys() throws java.lang.Exception
Parses a phonology system from a Parser- Returns:
- A PhonoSystem object with data from the Parser.
- Throws:
java.lang.Exception- Thrown when a phonology system could not be found
-
parsePhono
public Phonology parsePhono() throws java.lang.Exception
Parses a phonology from a Parser- Returns:
- A Phonology object with data from the Parser.
- Throws:
java.lang.Exception- Thrown when a phonology could not be found
-
parseLanguage
public Language parseLanguage() throws java.lang.Exception
Parses a language from a Parser- Returns:
- A Language object with data from the Parser.
- Throws:
java.lang.Exception- Thrown when a language could not be found
-
parseOrtho
public Orthography parseOrtho()
-
parseLexicon
public Lexicon parseLexicon()
Parses a lexicon from a Parser- Returns:
- A Lexicon object with data from the Parser.
- Throws:
java.lang.Exception- Thrown when a lexicon could not be found
-
getLog
public static Log getLog()
Gets the log the parser outputs to. Useful for parse methods in data types.- Returns:
-
-