openmopac/mopac

Keywords in strings

Closed this issue · 1 comments

The keyword line can include strings such as filenames. The parser presently can be confused by keywords that incidentally appear in strings - some of the parsing successfully ignores them, but other parsing steps will erroneously confuse them with actual, intended keywords if they appear before the actual keyword.

This bug has a high priority, but it isn't easy to fix as keyword-line parsing occurs in a very large number of places throughout the source code. One possible solution is to replace most uses of the Fortran index function with a custom version that ignores substrings inside quotes or some functional equivalent of this.

Various small adjustments to the input parser recently have resolved the most common instances of this problem. This should be practically resolved, unless new edge cases are reported in the future.