public abstract class AbstractGrammarEntityVisitor extends Object implements GrammarEntityVisitor
| Modifier and Type | Field and Description |
|---|---|
protected Set<AlphabetSymbol> |
marked |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractGrammarEntityVisitor() |
protected |
AbstractGrammarEntityVisitor(boolean shouldPrettyPrint) |
| Modifier and Type | Method and Description |
|---|---|
void |
apply(Grammar g) |
void |
apply(NonTerminal nonTerminal) |
void |
apply(Production production) |
void |
apply(Terminal terminal) |
protected CodeLocation |
getLocation(Production production) |
protected LinkedList<GrammarEntity> |
getPath() |
void |
in(NonTerminal nonTerminal) |
void |
in(Production production) |
void |
in(Terminal terminal) |
protected boolean |
isMarked(AlphabetSymbol symbol) |
protected void |
mark(AlphabetSymbol symbol) |
void |
out(NonTerminal nonTerminal) |
void |
out(Production production) |
void |
out(Terminal terminal) |
void |
print(Grammar g) |
boolean |
shouldPrettyPrint()
If this method returns true the grammar will be printed to debug after the visitor has run
|
protected Set<AlphabetSymbol> marked
protected AbstractGrammarEntityVisitor()
protected AbstractGrammarEntityVisitor(boolean shouldPrettyPrint)
public void apply(Grammar g)
apply in interface GrammarEntityVisitorpublic void apply(NonTerminal nonTerminal)
apply in interface GrammarEntityVisitorpublic void apply(Production production)
apply in interface GrammarEntityVisitorpublic void apply(Terminal terminal)
apply in interface GrammarEntityVisitorprotected CodeLocation getLocation(Production production)
protected LinkedList<GrammarEntity> getPath()
public void in(NonTerminal nonTerminal)
in in interface GrammarEntityVisitorpublic void in(Production production)
in in interface GrammarEntityVisitorpublic void in(Terminal terminal)
in in interface GrammarEntityVisitorprotected boolean isMarked(AlphabetSymbol symbol)
protected void mark(AlphabetSymbol symbol)
public void out(NonTerminal nonTerminal)
out in interface GrammarEntityVisitorpublic void out(Production production)
out in interface GrammarEntityVisitorpublic void out(Terminal terminal)
out in interface GrammarEntityVisitorpublic void print(Grammar g)
print in interface GrammarEntityVisitorpublic boolean shouldPrettyPrint()
shouldPrettyPrint in interface GrammarEntityVisitorCopyright © 2008-2013 Mathias Schwarz.