Class Interpreter


  • public class Interpreter
    extends java.lang.Object
    Interpret a lexer/parser, optionally printing tree string and dumping profile info $ java org.antlr.v4.gui.Interpreter [X.g4|XParser.g4 XLexer.g4] startRuleName inputFileName [-tree] [-gui] [-trace] [-encoding encoding] [-tokens] [-profile filename.csv]
    • Field Detail

      • profilerColumnNames

        public static final java.lang.String[] profilerColumnNames
      • grammarFileName

        protected java.lang.String grammarFileName
      • parserGrammarFileName

        protected java.lang.String parserGrammarFileName
      • lexerGrammarFileName

        protected java.lang.String lexerGrammarFileName
      • startRuleName

        protected java.lang.String startRuleName
      • printTree

        protected boolean printTree
      • gui

        protected boolean gui
      • trace

        protected boolean trace
      • encoding

        protected java.lang.String encoding
      • showTokens

        protected boolean showTokens
      • profileFileName

        protected java.lang.String profileFileName
      • inputFileName

        protected java.lang.String inputFileName
    • Constructor Detail

      • Interpreter

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

      • interp

        protected ParseInfo interp()
                            throws org.antlr.runtime.RecognitionException,
                                   java.io.IOException
        Throws:
        org.antlr.runtime.RecognitionException
        java.io.IOException
      • getValue

        public static java.lang.Object getValue​(DecisionInfo decisionInfo,
                                                java.lang.String[] ruleNamesByDecision,
                                                int decision,
                                                int col)
      • main

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