|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Objectdk.brics.grammar.ambiguity.ApproximationStrategy
dk.brics.grammar.ambiguity.TerminalApproximation
public class TerminalApproximation
Terminal approximation, using terminals, nullables, and FIRST/LAST sets.
| Field Summary |
|---|
| Fields inherited from class dk.brics.grammar.ambiguity.ApproximationStrategy |
|---|
debug, g, HORIZONTAL_NOT_APPLICABLE, out, VERTICAL_NOT_APPLICABLE |
| Constructor Summary | |
|---|---|
TerminalApproximation()
Constructs a new approximator. |
|
| Method Summary | |
|---|---|
HorizontalOverlapString |
checkHorizontalOverlap(Production p,
int index)
Conservatively checks horizontal overlap in a production. |
VerticalOverlapString |
checkVerticalOverlap(Production p1,
Production p2)
Conservatively checks vertical overlap of two productions of the same nonterminal. |
String |
getName()
Returns the name "terminal". |
void |
horizontalDone()
Invoked once per production when all its horizontal checks are done. |
void |
init()
Initializes for the current grammar. |
void |
verticalDone()
Invoked once per nonterminal when all its vertical checks are done (in the outer loop). |
| Methods inherited from class dk.brics.grammar.ambiguity.ApproximationStrategy |
|---|
horizontalCheck, init, printStatistics, verticalCheck |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TerminalApproximation()
| Method Detail |
|---|
public HorizontalOverlapString checkHorizontalOverlap(Production p,
int index)
ApproximationStrategyApproximationStrategy.HORIZONTAL_NOT_APPLICABLE.
checkHorizontalOverlap in class ApproximationStrategyp - a productionindex - division point
ApproximationStrategy.HORIZONTAL_NOT_APPLICABLE can be used as a "don't know" value
public VerticalOverlapString checkVerticalOverlap(Production p1,
Production p2)
ApproximationStrategyApproximationStrategy.VERTICAL_NOT_APPLICABLE.
checkVerticalOverlap in class ApproximationStrategyp1 - one productionp2 - another production
ApproximationStrategy.VERTICAL_NOT_APPLICABLE can be used as a "don't know" valuepublic String getName()
public void horizontalDone()
ApproximationStrategy
horizontalDone in class ApproximationStrategypublic void init()
ApproximationStrategyApproximationStrategy.g.
init in class ApproximationStrategypublic void verticalDone()
ApproximationStrategy
verticalDone in class ApproximationStrategy
|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||