Add syntax to force selection string matching mode.
authorTeemu Murtola <teemu.murtola@gmail.com>
Fri, 24 Aug 2012 09:42:19 +0000 (12:42 +0300)
committerTeemu Murtola <teemu.murtola@gmail.com>
Tue, 28 Aug 2012 03:45:10 +0000 (06:45 +0300)
commita9beaee98013c7800ae62637fc081cbce86a71d3
tree6757aada4490c3629f50b2698a804abe30585de7
parent7ce47fc7198ed306f801e8c0a2e0f1774100e1ac
Add syntax to force selection string matching mode.

The selection syntax for string keyword matching no longer depends on
whether regular expression support is available.  Instead, an error is
now given if the string looks like a regexp (the logic for the deduction
is not changed), but regexp support is not available.  Added syntax to
force the string matching to use either literal, wildcard, or regexp
matching.

This change allows removing a few more direct prints to stderr (related
to #655).

Closes #938.

Change-Id: I7b998050c8b00b5f1229ed23a0a15685c514010f
12 files changed:
src/gromacs/selection/keywords.h
src/gromacs/selection/parser.cpp
src/gromacs/selection/parser.h
src/gromacs/selection/parser.y
src/gromacs/selection/parsetree.cpp
src/gromacs/selection/parsetree.h
src/gromacs/selection/selhelp.cpp
src/gromacs/selection/sm_keywords.cpp
src/gromacs/selection/tests/refdata/SelectionCollectionDataTest_HandlesForcedStringMatchingMode.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/SelectionCollectionDataTest_HandlesRegexMatching.xml
src/gromacs/selection/tests/refdata/SelectionCollectionDataTest_HandlesWildcardMatching.xml [new file with mode: 0644]
src/gromacs/selection/tests/selectioncollection.cpp