Fix internal error with selection "resname help".
authorTeemu Murtola <teemu.murtola@gmail.com>
Thu, 23 Aug 2012 04:00:56 +0000 (07:00 +0300)
committerTeemu Murtola <teemu.murtola@gmail.com>
Tue, 28 Aug 2012 03:43:02 +0000 (06:43 +0300)
commitff6274d59ab0dd94188df1905db9ea31edc4b66b
treef5a3324399cbeeb69de4feae782cc767349a5fa2
parent64a06b73929e1be6a713815ce9e3fe9a600d17db
Fix internal error with selection "resname help".

- Always recognize "help" as a help request token, which then causes a
  syntax error in invalid context instead of an internal error in the
  tokenizer symbol table lookup.
- Change the internal error in question to use an exception for error
  reporting to make it possible to easily check it in a unit test.

Change-Id: I4a4057840b47a818cc840654945e84ec536e35b0
src/gromacs/selection/scanner.cpp
src/gromacs/selection/scanner.l
src/gromacs/selection/scanner_internal.cpp
src/gromacs/selection/tests/selectioncollection.cpp