Class Parser


  • public class Parser
    extends java.lang.Object
    Parses a .language file, and allows various parts to be accessed
    Author:
    alex
    • 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
      • 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: