Top Description Inners Fields Constructors Methods
org.antlr.v4.gui

public Class Interpreter

extends Object
Class Inheritance
Imports
org.antlr.runtime.RecognitionException, org.antlr.v4.Tool, org.antlr.v4.runtime.*, org.antlr.v4.runtime.atn.DecisionInfo, .ParseInfo, org.antlr.v4.runtime.tree.ParseTree, org.antlr.v4.tool.*, java.io.FileWriter, .IOException, .PrintWriter, java.nio.charset.Charset, java.nio.file.Files, .NoSuchFileException, .Path, .Paths

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 and Inner Type Summary

Modifier and TypeClass and Description
protected static class

Field Summary

Modifier and TypeField and Description
protected String
protected String
protected boolean
protected String
protected String
protected String
protected boolean
protected String
public static final String[]
protected boolean
protected String
protected boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
public static Object
getValue(DecisionInfo decisionInfo, String[] ruleNamesByDecision, int decision, int col)

protected ParseInfo
public static void
main(String[] args)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

encodingback to summary
protected String encoding
grammarFileNameback to summary
protected String grammarFileName
guiback to summary
protected boolean gui
inputFileNameback to summary
protected String inputFileName
lexerGrammarFileNameback to summary
protected String lexerGrammarFileName
parserGrammarFileNameback to summary
protected String parserGrammarFileName
printTreeback to summary
protected boolean printTree
profileFileNameback to summary
protected String profileFileName
profilerColumnNamesback to summary
public static final String[] profilerColumnNames
showTokensback to summary
protected boolean showTokens
startRuleNameback to summary
protected String startRuleName
traceback to summary
protected boolean trace

Constructor Detail

Interpreterback to summary
public Interpreter(String[] args) throws Exception

Method Detail

dumpProfilerCSVback to summary
private void dumpProfilerCSV(GrammarParserInterpreter parser, ParseInfo parseInfo)
getValueback to summary
public static Object getValue(DecisionInfo decisionInfo, String[] ruleNamesByDecision, int decision, int col)
interpback to summary
protected ParseInfo interp() throws RecognitionException, IOException
mainback to summary
public static void main(String[] args) throws Exception
org.antlr.v4.gui back to summary

protected Class Interpreter.IgnoreTokenVocabGrammar

extends Grammar
Class Inheritance

Field Summary

Inherited from org.antlr.v4.tool.Grammar:
actionOptionsastatnAUTO_GENERATED_TOKEN_NAME_PREFIXcaseInsensitiveOptionNamechannelNameToValueMapchannelValueToNameListdecisionDFAsdecisionLOOKdoNotCopyOptionsToLexerfileNameGRAMMAR_FROM_STRING_NAMEgrammarAndLabelRefTypeToScopeimplicitLexerimportedGrammarsindexToPredMapindexToRuleINVALID_RULE_NAMEINVALID_TOKEN_NAMElexerActionslexerBlockOptionslexerOptionslexerRuleOptionsnamenamedActionsoriginalGrammaroriginalTokenStreamparentparserBlockOptionsparserOptionsparseRuleOptionsruleRefOptionsrulessemPredOptionssempredsstateToGrammarRegionMapstringLiteralToTypeMaptexttokenNameToTypeMaptokenOptionstokenStreamtooltypeToStringLiteralListtypeToTokenList

Constructor Summary

AccessConstructor and Description
public
IgnoreTokenVocabGrammar(String fileName, String grammarText, Grammar tokenVocabSource, ANTLRToolListener listener)

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from org.antlr.v4.tool.Grammar:
createGrammarParserInterpretercreateLexerInterpretercreateParserInterpreterdefAliasdefineActiondefineChannelNamedefineChannelNamedefineRuledefineStringLiteraldefineStringLiteraldefineTokenAliasdefineTokenNamedefineTokenNamegetAllCharValuesgetAllImportedGrammarsgetATNgetChannelValuegetDefaultActionScopegetGrammarAncestorsgetGrammarTypeToFileNameSuffixgetImplicitLexergetImportedGrammargetImportedGrammarsgetIndexToPredicateMapgetLanguagegetMaxCharValuegetMaxTokenTypegetNewChannelNumbergetNewTokenTypegetOptionStringgetOutermostGrammargetPredicateDisplayStringgetRecognizerNamegetRulegetRulegetRulegetRuleNamesgetSemanticContextDisplayStringgetStateToGrammarRegiongetStateToGrammarRegionMapgetStringLiteralAliasesFromLexerRulesgetStringLiteralLexerRuleNamegetStringLiteralsgetTokenDisplayNamegetTokenDisplayNamesgetTokenLiteralNamesgetTokenNamegetTokenNamegetTokenNamesgetTokenStreamgetTokenSymbolicNamesgetTokenTypegetTokenTypesgetTypegetTypeStringgetVocabularyimportVocabinitTokenSymbolTablesisCombinedisLexerisParserisTokenNamejoinPredicateOperandsloadloadImportedGrammarsresolvesToAttributeDictresolvesToLabelresolvesToListLabelresolvesToTokenresolveToAttributeresolveToAttributesetChannelNameForValuesetLookaheadDFAsetNodeOptionssetTokenForTypeundefineRule

Constructor Detail

IgnoreTokenVocabGrammarback to summary
public IgnoreTokenVocabGrammar(String fileName, String grammarText, Grammar tokenVocabSource, ANTLRToolListener listener) throws RecognitionException

Method Detail

importTokensFromTokensFileback to summary
public void importTokensFromTokensFile()

Overrides org.antlr.v4.tool.Grammar.importTokensFromTokensFile.

Annotations
@Override