package bjc.pratt; /** * Represents the contextual state passed to a command. * * @author EVE * * @param * The key type of the tokens. * @param * The value type of the tokens. * * @param * The state type of the parser. */ public class ParserContext { /** * The source of tokens. */ public TokenStream tokens; /** * The parser for sub-expressions. */ public PrattParser parse; /** * The state of the parser. */ public C state; /** * Create a new parser context. * * @param tokns * The source of tokens. * * @param prse * The parser to call for sub expressions. * * @param stte * Any state needing to be kept during parsing. */ public ParserContext(TokenStream tokns, PrattParser prse, C stte) { this.tokens = tokns; this.parse = prse; this.state = stte; } }