Package org.antlr.v4.gui
Class Interpreter
- java.lang.Object
-
- org.antlr.v4.gui.Interpreter
-
public class Interpreter extends java.lang.ObjectInterpret 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]
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classInterpreter.IgnoreTokenVocabGrammar
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Stringencodingprotected java.lang.StringgrammarFileNameprotected booleanguiprotected java.lang.StringinputFileNameprotected java.lang.StringlexerGrammarFileNameprotected java.lang.StringparserGrammarFileNameprotected booleanprintTreeprotected java.lang.StringprofileFileNamestatic java.lang.String[]profilerColumnNamesprotected booleanshowTokensprotected java.lang.StringstartRuleNameprotected booleantrace
-
Constructor Summary
Constructors Constructor Description Interpreter(java.lang.String[] args)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private voiddumpProfilerCSV(GrammarParserInterpreter parser, ParseInfo parseInfo)static java.lang.ObjectgetValue(DecisionInfo decisionInfo, java.lang.String[] ruleNamesByDecision, int decision, int col)protected ParseInfointerp()static voidmain(java.lang.String[] args)
-
-
-
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
-
-
Method Detail
-
interp
protected ParseInfo interp() throws org.antlr.runtime.RecognitionException, java.io.IOException
- Throws:
org.antlr.runtime.RecognitionExceptionjava.io.IOException
-
dumpProfilerCSV
private void dumpProfilerCSV(GrammarParserInterpreter parser, ParseInfo parseInfo)
-
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
-
-