Package io.crums.model.hashing
Class Parser
java.lang.Object
io.crums.model.hashing.Parser
public class Parser
extends java.lang.Object
Base parser for the grammar. This is a super-simple grammar, so we do away with a
formal specification.
Grammer
Each object represents a final sequence of bytes. There are 4 types object:
- Literal. An even sequence of hexadecimal digits, each pair specifying a byte value.
- Grouped Symbols
[
]
. An object whose bytes are the concatentation of the bytes of a non-empty sequence of objects. The object sequence is bounded by brackets . - Flipped Symbol
:
. A pair of adjacent objects separated by a colon and by the rules of our grammar, transposed in position. - Hashed. Symbols
(
)
. An object whose bytes are the hash of a concatenated sequence of objects bound by parentheses.
- See Also:
- Shunting-yard algorithm
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait