Package org.antlr.v4.gui
Class Interpreter
- java.lang.Object
-
- org.antlr.v4.gui.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]
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
Interpreter.IgnoreTokenVocabGrammar
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
encoding
protected java.lang.String
grammarFileName
protected boolean
gui
protected java.lang.String
inputFileName
protected java.lang.String
lexerGrammarFileName
protected java.lang.String
parserGrammarFileName
protected boolean
printTree
protected java.lang.String
profileFileName
static java.lang.String[]
profilerColumnNames
protected boolean
showTokens
protected java.lang.String
startRuleName
protected boolean
trace
-
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 void
dumpProfilerCSV(GrammarParserInterpreter parser, ParseInfo parseInfo)
static java.lang.Object
getValue(DecisionInfo decisionInfo, java.lang.String[] ruleNamesByDecision, int decision, int col)
protected ParseInfo
interp()
static void
main(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.RecognitionException
java.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
-
-