Class TestRig


  • public class TestRig
    extends java.lang.Object
    Run a lexer/parser combo, optionally printing tree string or generating postscript file. Optionally taking input file. $ java org.antlr.v4.runtime.misc.TestRig GrammarName startRuleName [-tree] [-tokens] [-gui] [-ps file.ps] [-trace] [-diagnostics] [-SLL] [input-filename(s)]
    • Field Detail

      • LEXER_START_RULE_NAME

        public static final java.lang.String LEXER_START_RULE_NAME
        See Also:
        Constant Field Values
      • grammarName

        protected java.lang.String grammarName
      • startRuleName

        protected java.lang.String startRuleName
      • inputFiles

        protected final java.util.List<java.lang.String> inputFiles
      • printTree

        protected boolean printTree
      • gui

        protected boolean gui
      • psFile

        protected java.lang.String psFile
      • showTokens

        protected boolean showTokens
      • trace

        protected boolean trace
      • diagnostics

        protected boolean diagnostics
      • encoding

        protected java.lang.String encoding
      • SLL

        protected boolean SLL
    • Constructor Detail

      • TestRig

        public TestRig​(java.lang.String[] args)
                throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • process

        public void process()
                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • process

        protected void process​(Lexer lexer,
                               java.lang.Class<? extends Parser> parserClass,
                               Parser parser,
                               CharStream input)
                        throws java.io.IOException,
                               java.lang.IllegalAccessException,
                               java.lang.reflect.InvocationTargetException,
                               javax.print.PrintException
        Throws:
        java.io.IOException
        java.lang.IllegalAccessException
        java.lang.reflect.InvocationTargetException
        javax.print.PrintException