|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Objectdk.brics.grammar.ambiguity.ApproximationStrategy
public abstract class ApproximationStrategy
Abstract base class for approximation strategies.
| Field Summary | |
|---|---|
protected boolean |
debug
Verbose flag. |
protected Grammar |
g
Current grammar. |
static HorizontalOverlapString |
HORIZONTAL_NOT_APPLICABLE
Value used by checkHorizontalOverlap(Production, int) for "not applicable" responses. |
protected PrintWriter |
out
Print stream for messages. |
static VerticalOverlapString |
VERTICAL_NOT_APPLICABLE
Value used by checkVerticalOverlap(Production, Production) for "not applicable" responses. |
| Constructor Summary | |
|---|---|
protected |
ApproximationStrategy()
Abstract constructor. |
| Method Summary | |
|---|---|
protected HorizontalOverlapString |
checkHorizontalOverlap(Production p,
int index)
Conservatively checks horizontal overlap in a production. |
protected VerticalOverlapString |
checkVerticalOverlap(Production p1,
Production p2)
Conservatively checks vertical overlap of two productions of the same nonterminal. |
HorizontalOverlapString |
horizontalCheck(Production p,
int index)
Conservatively checks horizontal overlap in a production. |
protected void |
horizontalDone()
Invoked once per production when all its horizontal checks are done. |
protected void |
init()
Initializes for the current grammar. |
void |
init(Grammar g,
PrintWriter out,
boolean debug)
Initializes for the given grammar. |
void |
printStatistics(PrintWriter out)
Prints statistics from the last analysis. |
VerticalOverlapString |
verticalCheck(Production p1,
Production p2)
Conservatively checks vertical overlap of two productions of the same nonterminal. |
protected void |
verticalDone()
Invoked once per nonterminal when all its vertical checks are done (in the outer loop). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean debug
protected Grammar g
public static final HorizontalOverlapString HORIZONTAL_NOT_APPLICABLE
checkHorizontalOverlap(Production, int) for "not applicable" responses.
protected PrintWriter out
public static final VerticalOverlapString VERTICAL_NOT_APPLICABLE
checkVerticalOverlap(Production, Production) for "not applicable" responses.
| Constructor Detail |
|---|
protected ApproximationStrategy()
| Method Detail |
|---|
protected HorizontalOverlapString checkHorizontalOverlap(Production p,
int index)
HORIZONTAL_NOT_APPLICABLE.
p - a productionindex - division point
HORIZONTAL_NOT_APPLICABLE can be used as a "don't know" value
protected VerticalOverlapString checkVerticalOverlap(Production p1,
Production p2)
VERTICAL_NOT_APPLICABLE.
p1 - one productionp2 - another production
VERTICAL_NOT_APPLICABLE can be used as a "don't know" value
public final HorizontalOverlapString horizontalCheck(Production p,
int index)
p - a productionindex - division point
HORIZONTAL_NOT_APPLICABLE can be used as a "don't know" valueprotected void horizontalDone()
protected void init()
g.
public final void init(Grammar g,
PrintWriter out,
boolean debug)
g - current grammarout - print writer for messagesdebug - debug flagpublic void printStatistics(PrintWriter out)
out - print writer for output
public final VerticalOverlapString verticalCheck(Production p1,
Production p2)
p1 - one productionp2 - another production
VERTICAL_NOT_APPLICABLE can be used as a "don't know" valueprotected void verticalDone()
|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||