In pega-texto, PEGs are just Expression arrays, and can be easily combined or rearranged dynamically. You can also provide a single expression (which, for C, is the same as a 1 element array) for simple pattern-matching.
To use the values matched, each Expression may have a user defined Action function that produces a value. Each Action receives as parameter the values produced by Actions executed by inner matched Expressions, reducing them into a single value down the stack.
$ mkdir build $ cd build $ cmake .. $ make
CPack is configured for packaging pega-texto. From build directory, after building:
By default, it uses the TGZ, STGZ and TZ generators. You may override this with other available generators if you want:
$ cpack -DCPACK_GENERATOR=<generator>
From build directory:
$ make install
From build directory, after building:
$ make test
- 2.1.0 - Populate
pt_match_result.data.iwith the first syntactic error code when syntactic errors occur.
- 2.0.1 - Put
extern "C"declarations in inner headers.
- 2.0.0 - ABI change on
pt_match_options, included Case Insensitive and Character Class Expressions (the old Custom Matcher), changed Custom Matcher Expressions to allow operating on strings, also receiving userdata.
- 1.2.7 - Removed all the Action sequence computation, as Actions are already stacked in the right sequence. Running actions is now iterative, O(n) and use far less memory.
- 1.2.6 - Fixed
ORexpression macros on C++, turns out they behave differently about temporary lifetime of arrays.
- 1.2.5 - Fixed
ORexpression macros to compile on both C and C++ using preprocessor macros and
- 1.2.4 - Added
extern "C"declaration on
pega-texto.hfor using in C++.
- 1.2.3 - Fixed validation error code emmited when
pt_is_nullablereturned true, as it may find an error other than
- 1.2.2 - Added
NULLstring check on match.
- 1.2.1 - Fixed validation error on empty
ORExpressions, which are valid with a
- 1.2.0 - Macros for Expressions to not own memory buffers, empty
ORExpressions don't allocate a 0-byte buffer anymore, fixed validation error on Non-terminal cycles.
- 1.1.1 - Fixed validation error on Non-terminal cycles.
- 1.1.0 - Added basic error handling support.
- 1.0.0 - Expressions, Grammars, parsing, validation, actions.