Top Description Constructors Methods
org.antlr.v4.semantics

public Class UseDefAnalyzer

extends Object
Class Inheritance
Imports
org.antlr.runtime.ANTLRStringStream, .Token, org.antlr.v4.parse.ANTLRParser, .ActionSplitter, .ActionSplitterListener, org.antlr.v4.tool.Alternative, .Grammar, .LexerGrammar, .Rule, org.antlr.v4.tool.ast.ActionAST, .GrammarAST, java.util.Collection, .HashMap, .HashSet, .List, .Map, .Set

Look for errors and deadcode stuff

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static boolean
public static Map<Rule, Set<Rule>>
getRuleDependencies(Grammar g)

Find all rules reachable from r directly or indirectly for all r in g

public static Map<Rule, Set<Rule>>
public static Map<Rule, Set<Rule>>
public static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

UseDefAnalyzerback to summary
public UseDefAnalyzer()

Method Detail

actionIsContextDependentback to summary
public static boolean actionIsContextDependent(ActionAST actionAST)
getRuleDependenciesback to summary
public static Map<Rule, Set<Rule>> getRuleDependencies(Grammar g)

Find all rules reachable from r directly or indirectly for all r in g

getRuleDependenciesback to summary
public static Map<Rule, Set<Rule>> getRuleDependencies(LexerGrammar g, String modeName)
getRuleDependenciesback to summary
public static Map<Rule, Set<Rule>> getRuleDependencies(Grammar g, Collection<Rule> rules)
trackTokenRuleRefsInActionsback to summary
public static void trackTokenRuleRefsInActions(Grammar g)