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 | Description |
---|---|---|
protected Map<PredictionContext,PredictionContext> |
cache |
Constructor | Description |
---|---|
PredictionContextCache() |
Modifier and Type | Method | 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–2019 ANTLR. All rights reserved.