Added strict flag to parser:

Have added a new bool strict flag to the parsing functions, if the
strict flag is set to false the parser will just skip lines with unknwon
keywords, including pure garbage in the input. I.e. for a deck like:

TABDIMS
  1 1 1 /

Crap - not a keyword at all

-- Correctly formatted - unknown keyword
IGNORED
  0 1 /

The parser will load the TABDIMS keyword correctly, and skip the rest.
This commit is contained in:
Joakim Hove
2015-06-12 10:54:25 +02:00
parent c38b892876
commit 875fd86c3c
5 changed files with 126 additions and 42 deletions

View File

@@ -0,0 +1,22 @@
SPECGRID
20 20 10 /
IGNORED
Have no clue /
how to /
parse This keyword/
/
FAULTS
'F1' 1 1 1 4 1 4 'X' /
'F2' 5 5 1 4 1 4 'X-' /
/
And then comes more crap??!
-- And a valid keyword:
TABDIMS
1 2 3 /
And it ends with crap?!