LibParserUtils -- a utility library for parser building ======================================================= Overview -------- LibParserUtils provides various pieces of functionality that are useful when writing parsers. Requirements ------------ LibParserUtils requires the following tools: + A C99 capable C compiler + GNU make or compatible + Perl (for the testcases) + Pkg-config (for the testcases) + doxygen (for the API documentation) For enhanced charset support, LibParserUtils may also be configured to use an iconv() implementation, see the "Enabling iconv() support" section, below. Compilation ----------- If necessary, modify the toolchain settings in the Makefile. Invoke make: $ make Verification ------------ To verify that the parser is working, it is necessary to specify a different makefile target than that used for normal compilation, thus: $ make test API documentation ----------------- Currently, there is none. However, the code is well commented and the public API may be found in the "include" directory. The testcase sources may also be of use in working out how to use it. Additionally, you can use doxygen to auto-generate API documentation, thus: $ make docs Then open the build/docs/html/index.html file in a web browser. Enabling iconv() support ------------------------ By default, libparserutils only supports the following character sets: + UTF-16 (platform-native endian) + UTF-8 + ISO-8859-n + Windows-125n + US-ASCII Support for more character sets may be enabled through the use of iconv(). To enable iconv() support in libparserutils, do the following: $ echo "CFLAGS += -DWITH_ICONV_FILTER" \ >build/Makefile.config.override Then build libparserutils as normal. A note on character set aliases ------------------------------- Libparserutils uses an external mapping file to encode relationships between character set names. This is the "Aliases" file. A copy may be found at test/data/Aliases. The path to this file is required when calling parserutils_initialise().