-
- Downloads
openfoam: tune parser handling of string lists in dictionaries
- While any particular OpenFOAM class using dictionary input knows what to expect, our parser does not or cannot. For an entry with a list of words, it could have two equivalent forms: 1. keyword (abc def); 2. keyword 2(abc def); The parser tokenizes these as 1. STRINGLIST 2. LABEL STRINGLIST Instead of making the parser itself more aggressive, settle for fixing up the parse result. When a dictionary entry matches that pattern (ie, has label + stringlist and the sizes match), drop the redundant size token. To be a bit more conservative, limit the fixup to entries that contains no other tokens. BUG: the token IsLabel() condition was incorrect/overly aggressive - align some token methods with OpenFOAM equivalents. Eg, IsPunctuation(char), IsLabel(int) tests. STYLE: token qualifiers, consistent infinite loop - move dictionary read implementation out of line, in preparation for using dictionary to support meta information for an IOobject.
Loading
Please register or sign in to comment