|
librdesc
|
librdesc is a portable parsing library written in standard C99. It provides the flexibility of a recursive descent parser with high degree of control in manual stack management.
Check out online documentation for building and public API details!
You can easily embed librdesc as a subproject and build dependency inside your own Makefiles by including the rdesc.mk.
This avoids the need for system-wide installation and builds the library alongside your project.
librdesc provides an include-based build which uses the following RDESC_* configuration variables to control the build process. When building directly from this repository's root makefile, you can drop the RDESC_ prefix (e.g., make MODE=debug).
| Variable | Description | Default | Valid Values |
|---|---|---|---|
RDESC_MODE | Determines the optimization level and instrumentation. | release | release, debug, test |
RDESC_FEATURES | Toggles modules linked into the library. | stack | stack, dump_bnf, dump_cst, full |
RDESC_FLAGS | Internal flags to configure library behavior. | ASSERTIONS | ASSERTIONS, full |
RDESC_DIR | Path to the root of the librdesc source repository. | . (do not use default) | rdesc path |
rdesc.mk defines two target variables: RDESC, the static library target and RDESC_SO, the shared object version. You can set these before including the rdesc.mk file to output into desired location, but you can also use the default values that output to rdesc's internal build directory.
A variable named RDESC_INCLUDE_DIR is also defined to point to the folder containing the public headers.
This command copies headers into $PREFIX/include and librdesc.so/a into $PREFIX/lib. Leave PREFIX empty to install librdesc system-wide:
Also you can specify build configuration variables during installation, with or without RDESC_ prefix:
Note: Test mode is not recommended for installation.
Contributions are welcome! Please check our Code of Conduct before submitting pull requests.