Class ParserUtil


  • public class ParserUtil
    extends Object

    Created by Jeff Gaynor
    on 9/20/18 at 1:10 PM

    • Field Detail

      • BATCH_FILE_COMMENT_CHAR

        public static String BATCH_FILE_COMMENT_CHAR
      • BATCH_FILE_LINE_TERMINATION

        public static String BATCH_FILE_LINE_TERMINATION
    • Constructor Detail

      • ParserUtil

        public ParserUtil()
    • Method Detail

      • main

        public static void main​(String[] args)
      • processInput

        public static List<String> processInput​(Reader reader,
                                                boolean isStrict)
                                         throws Throwable
        Takes a reader that contains a command file and returns a list of executable string. You can pass these to a parser. Note that you should parse each command then inspect the resulting AbstractHandler that results from parsing. If the isStrict flag is true, then this will check if there were no terminators and throw an exception if no commands were found.
        Parameters:
        reader -
        isStrict -
        Returns:
        Throws:
        Throwable