From 98cdf435d4974f4cca8f7b4eb4026da2c88cbc4c Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Sun, 26 Mar 2017 11:30:43 -0400 Subject: Update --- .../pratt/commands/ConstantCommand.java | 23 ++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'BJC-Utils2/src/main/java/bjc/utils/parserutils/pratt/commands/ConstantCommand.java') diff --git a/BJC-Utils2/src/main/java/bjc/utils/parserutils/pratt/commands/ConstantCommand.java b/BJC-Utils2/src/main/java/bjc/utils/parserutils/pratt/commands/ConstantCommand.java index 2308cc7..10ff184 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/parserutils/pratt/commands/ConstantCommand.java +++ b/BJC-Utils2/src/main/java/bjc/utils/parserutils/pratt/commands/ConstantCommand.java @@ -6,16 +6,35 @@ import bjc.utils.parserutils.pratt.InitialCommand; import bjc.utils.parserutils.pratt.ParserContext; import bjc.utils.parserutils.pratt.Token; +/** + * A command that represents a specific tree. + * + * @author bjculkin + * + * @param + * The key type of the tokens. + * + * @param + * The value type of the tokens. + * + * @param + * The state type of the parser. + */ public class ConstantCommand implements InitialCommand { private ITree> val; + /** + * Create a new constant. + * + * @param con + * The tree this constant represents. + */ public ConstantCommand(ITree> con) { val = con; } @Override - public ITree> denote(Token operator, ParserContext ctx) - throws ParserException { + public ITree> denote(Token operator, ParserContext ctx) throws ParserException { return val; } } \ No newline at end of file -- cgit v1.2.3