PredictionContextCache

Used to cache {@link 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.

Members

Functions

add
PredictionContext add(PredictionContext ctx)

Add a context to the cache and return it. If the context already exists, return that one instead and do not add a new context to the cache. Protect shared cache from unsafe thread access.

get
PredictionContext get(PredictionContext ctx)
Undocumented in source. Be warned that the author may not have intended to support it.
hasKey
bool hasKey(PredictionContext predictionContext)
Undocumented in source. Be warned that the author may not have intended to support it.
size
size_t size()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

cache
PredictionContext[PredictionContext] cache;
Undocumented in source.

Meta