Class ConfigCompiler


  • public final class ConfigCompiler
    extends java.lang.Object
    Static utility functions to analyze and build a config node.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static GResultOf<ConfigNode> analyze​(boolean failOnErrors, SentenceLexer lexer, ConfigParser parser, java.util.List<Pair<java.lang.String,​java.lang.String>> configs)
      Uses the SentenceLexer to tokenize the configs.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • analyze

        public static GResultOf<ConfigNode> analyze​(boolean failOnErrors,
                                                    SentenceLexer lexer,
                                                    ConfigParser parser,
                                                    java.util.List<Pair<java.lang.String,​java.lang.String>> configs)
        Uses the SentenceLexer to tokenize the configs. Then validates the tokens for any errors. If everything is ok it will send the tokens to the parser.
        Parameters:
        failOnErrors - if we want to fail on errors or try and recover. Results can be unpredictable if it continues
        lexer - the SentenceLexer used to tokenize the configs.
        parser - ConfigParser to parse the tokens into a config node.
        configs - the configuration to parse.
        Returns:
        the GResultOf of the config node with the results or errors.