public class PredictionContextCache
extends java.lang.Object
PredictionContext objects. Its used for the shared
context cash associated with contexts in DFA states. This cache
can be used for both lexers and parsers.| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<PredictionContext,PredictionContext> |
cache |
| Constructor and Description |
|---|
PredictionContextCache() |
| Modifier and Type | Method and Description |
|---|---|
PredictionContext |
add(PredictionContext ctx)
Add a context to the cache and return it.
|
PredictionContext |
get(PredictionContext ctx) |
int |
size() |
protected final java.util.Map<PredictionContext,PredictionContext> cache
public PredictionContext add(PredictionContext ctx)
public PredictionContext get(PredictionContext ctx)
public int size()