|
librdesc
|
librdesc uses a modular build system with separate Makefiles for the library, tests, and examples.
Refer to librdesc for integration.
Build the main library:
Providing FEATURES variable, you can toggle modules linked to the library. By default, stack and flip_left features are enabled. You may use feature flag full to include all features.
| Feature | Description |
|---|---|
stack (default) | Use built-in stack implementation in backtracing, which uses malloc/free family functions. |
flip_left (default) | Convert right-recursive match to left-recursive. |
dump_bnf | Dump rdesc_grammar in Backus-Naur form. |
dump_cst | Dump rdesc_node (Concrete Syntax Tree) as dotlang graph. |
Providing FLAGS variable, you can toggle injection macros. Similar to Features, you may use feature flag full to include all flags.
| Flag | Description |
|---|---|
ASSERTIONS | Enable runtime boundary and logic validation checks. |
Tests are organized into three categories and built independently:
Or from project root:
Examples build using their Makefile, and example output will be present in dist/examples/ folder.
Examples statically links librdesc in tests mode.