diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2017-04-10 16:49:54 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2017-04-10 16:49:54 -0400 |
| commit | 56f07e9a3aaa873fe385d224f088f048dbafa8f7 (patch) | |
| tree | 64fae78f95fd1c233689ecf3dda2e2b645bb8d33 /JPratt/src/main/java/bjc/pratt/blocks/ParseBlocks.java | |
| parent | 251419e1f0ab8eb04d21287b708b06a552f4c58a (diff) | |
Cleanup
Diffstat (limited to 'JPratt/src/main/java/bjc/pratt/blocks/ParseBlocks.java')
| -rw-r--r-- | JPratt/src/main/java/bjc/pratt/blocks/ParseBlocks.java | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/JPratt/src/main/java/bjc/pratt/blocks/ParseBlocks.java b/JPratt/src/main/java/bjc/pratt/blocks/ParseBlocks.java index e0dea48..d236a71 100644 --- a/JPratt/src/main/java/bjc/pratt/blocks/ParseBlocks.java +++ b/JPratt/src/main/java/bjc/pratt/blocks/ParseBlocks.java @@ -9,76 +9,76 @@ import bjc.utils.data.ITree; /** * Utility class for creating common implementations of {@link ParseBlock} - * + * * @author bjculkin * */ public class ParseBlocks { /** * Create a new repeating parse block. - * + * * @param inner * The parse block to repeat. - * + * * @param delim * The token type that seperates repetitions. - * + * * @param term * The token type that terminates repititions. - * + * * @param mark * The token to use as the node in the AST. - * + * * @param action * The action to perform on the state after every * repitition. - * + * * @return A configured repeating parse block. */ - public static <K, V, C> ParseBlock<K, V, C> repeating(ParseBlock<K, V, C> inner, K delim, K term, - Token<K, V> mark, UnaryOperator<C> action) { + public static <K, V, C> ParseBlock<K, V, C> repeating(final ParseBlock<K, V, C> inner, final K delim, + final K term, final Token<K, V> mark, final UnaryOperator<C> action) { return new RepeatingParseBlock<>(inner, delim, term, mark, action); } /** * Create a new triggered parse block. - * + * * @param source * The block to trigger around. - * + * * @param onEnter * The action to perform upon the state before entering * the block. - * + * * @param onExit * The action to perform upon the state after exiting the * block. - * + * * @return A configured trigger parse block. */ - public static <K, V, C> ParseBlock<K, V, C> trigger(ParseBlock<K, V, C> source, UnaryOperator<C> onEnter, - UnaryOperator<C> onExit) { + public static <K, V, C> ParseBlock<K, V, C> trigger(final ParseBlock<K, V, C> source, + final UnaryOperator<C> onEnter, final UnaryOperator<C> onExit) { return new TriggeredParseBlock<>(onEnter, onExit, source); } /** * Create a new simple parse block. - * + * * @param precedence * The precedence of the expression inside the block. - * + * * @param terminator * The key type of the token expected after this block, * or null if none is expected. - * + * * @param validator * The predicate to use to validate parsed expressions, * or null if none is used. - * + * * @return A configured simple parse block. */ - public static <K, V, C> ParseBlock<K, V, C> simple(int precedence, K terminator, - Predicate<ITree<Token<K, V>>> validator) { + public static <K, V, C> ParseBlock<K, V, C> simple(final int precedence, final K terminator, + final Predicate<ITree<Token<K, V>>> validator) { return new SimpleParseBlock<>(precedence, terminator, validator); } }
\ No newline at end of file |
