bnfa Home
Status: Alpha
Brought to you by:
breese
Regular expressions uses round brackets to group sub-expressions. For instance, a(bc)+ matches one "a" followed by one-or-more "bc" sequences. In addition to grouping sub-expressions, the round brackets are also used to capture (e.g. record for later use) the input that matches the sub-expression. If you wish to avoid the capturing, the you need to use the non-capturing variant a(?:bc)+.
BNFA uses round brackets for non-capturing groups. This is how it works in C++. If you wish to capture a sub-expression, then you must specify it explicity with the capture() directive, e.g. text("a") >> capture(text("bc")+).
BNFA does not support back-references as they pose an NP-complete problem. There are no plans for adding back-references.