Standard Library
DaeDaLus provides a standard library module called Daedalus that can
be imported with:
import Daedalus
Multi-Byte Integer Parsers
These parsers read multi-byte integers from the input. They use the
implicit parameter ?bigEndian to determine byte order:
Parser |
Description |
|---|---|
|
Parse a 16-bit unsigned integer |
|
Parse a 32-bit unsigned integer |
|
Parse a 64-bit unsigned integer |
|
Parse a 16-bit signed integer |
|
Parse a 32-bit signed integer |
|
Parse a 64-bit signed integer |
There are also variants with a fixed byte order:
Parser |
Description |
|---|---|
|
Big-endian (most significant byte first) |
|
Little-endian (least significant byte first) |
Floating-Point Parsers
Parser |
Description |
|---|---|
|
Parse a 16-bit half-precision float |
|
Parse a 32-bit single-precision float |
|
Parse a 64-bit double-precision float |
These also have BE and LE variants (e.g., BEFloat, LEDouble).
Utility Combinators
Combinator |
Description |
|---|---|
|
Succeed if |
|
Like |
|
Parse |
|
Parse |
|
Succeed only if |
|
Count how many times |
|
Match one |
Numeric Utilities
Function |
Description |
|---|---|
|
Evaluate a digit array in the given base |
|
The smaller of two values |
|
The larger of two values |
Stream Manipulation
Combinator |
Description |
|---|---|
|
Set the stream to the |
|
Advance the current stream by |
|
Parse the next |
|
Get the next |
|
Parse with |
|
Parse |
Testing Combinators
These are useful for writing test cases within DaeDaLus:
Combinator |
Description |
|---|---|
|
Succeeds if |
|
Succeeds if |
|
Succeeds if |
|
Succeeds if |