ENH: adjust token in preparation for separate expression tokenization
- minor simplification of #if/#endif handling ENH: improve input robustness with negative-prefixed expansions (#2095) - especially in blockMeshDict it is useful to negate an value directly. Eg, ``` xmax 100; xmin -$xmax; ``` However, this fails since the dictionary expansion is a two-step process of tokenization followed by expansion. After the expansion the given input would now be the following: ``` xmax 100; xmin - 100; ``` and retrieving a scalar value for 'xmin' fails. Counteract this by being more generous on tokenized input when attempting to retrieve a label or scalar value. If a '-' is found where a number is expected, use it to negate the subsequent value. The previous solution was to invoke an 'eval': ``` xmax 100; xmin #eval{-$xmax}; ``` which adds additional clutter.
Showing
- applications/test/dictionary/testDict 1 addition, 1 deletionapplications/test/dictionary/testDict
- applications/test/dictionary/testDict2 1 addition, 1 deletionapplications/test/dictionary/testDict2
- applications/test/dictionary/testDictAPI 1 addition, 1 deletionapplications/test/dictionary/testDictAPI
- applications/test/dictionary/testDictCalc1 1 addition, 1 deletionapplications/test/dictionary/testDictCalc1
- applications/test/dictionary/testDictEval1 1 addition, 1 deletionapplications/test/dictionary/testDictEval1
- applications/test/dictionary/testDictEval2 1 addition, 1 deletionapplications/test/dictionary/testDictEval2
- applications/test/dictionary/testDictEval3 1 addition, 1 deletionapplications/test/dictionary/testDictEval3
- applications/test/dictionary/testDictEval4 121 additions, 0 deletionsapplications/test/dictionary/testDictEval4
- applications/test/dictionary/testDictList 1 addition, 1 deletionapplications/test/dictionary/testDictList
- applications/test/dictionary/testDictRegex 1 addition, 1 deletionapplications/test/dictionary/testDictRegex
- applications/test/dictionary/testPrimitiveEntry 1 addition, 1 deletionapplications/test/dictionary/testPrimitiveEntry
- applications/test/dictionary/testSubkeyword 1 addition, 1 deletionapplications/test/dictionary/testSubkeyword
- applications/test/dictionary3/Make/files 3 additions, 0 deletionsapplications/test/dictionary3/Make/files
- applications/test/dictionary3/Make/options 2 additions, 0 deletionsapplications/test/dictionary3/Make/options
- applications/test/dictionary3/Test-dictionary3.C 78 additions, 0 deletionsapplications/test/dictionary3/Test-dictionary3.C
- src/OpenFOAM/db/IOstreams/Pstreams/UIPstream.C 7 additions, 6 deletionssrc/OpenFOAM/db/IOstreams/Pstreams/UIPstream.C
- src/OpenFOAM/db/IOstreams/Pstreams/UOPstream.C 6 additions, 1 deletionsrc/OpenFOAM/db/IOstreams/Pstreams/UOPstream.C
- src/OpenFOAM/db/IOstreams/Sstreams/ISstream.C 3 additions, 3 deletionssrc/OpenFOAM/db/IOstreams/Sstreams/ISstream.C
- src/OpenFOAM/db/IOstreams/Sstreams/OSstream.C 16 additions, 10 deletionssrc/OpenFOAM/db/IOstreams/Sstreams/OSstream.C
- src/OpenFOAM/db/IOstreams/token/token.H 36 additions, 23 deletionssrc/OpenFOAM/db/IOstreams/token/token.H
Please register or sign in to comment