Closed pdhahn closed 1 year ago
@pdhahn, I am glad to hear you're enjoying using cpp-peglib! apd
is equivalent to 'AND', and npd
is 'NOT' described on page 2 in the document by Bryan Ford.
Here is a simple example using 'AND' in PEG grammar and parser combinators:
StartWithA <- &'A' ([A-Z-a-z])+
StartWithA <= seq(apd(chr('A')), oom(cls("A-Za-z")))
Hope it helps!
I have been using cpp-peflib for a while now. I use cpp-peglib operators to define my C++ grammar. This is all successful.
However, now I am curious about the "apd" operator, what it does, and how to use it. I cannot find anything about it in the README or it being used in the sample code.
RSVP
Thanks for cpp-peglib!