public class PredictionContextCache extends 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 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 Map<PredictionContext,PredictionContext> cache
public PredictionContext add(PredictionContext ctx)
public PredictionContext get(PredictionContext ctx)
public int size()
Copyright © 1992–2018 ANTLR. All rights reserved.