Commit Graph

12 Commits

Author SHA1 Message Date
Jørgen Kvalsvik
f9cb516b99 Remove DeckPtr+ParserPtr aliases
Remove the deprecated DeckPtr and ParserPtr aliases and removes
shared_ptr<Deck> and friends from all interfaces.
2016-10-19 20:38:28 +02:00
Pål Grønås Drange
49f3356934 Removed getDims() and disable this EclipseGrid
* Removed method getDims since getNXYZ already exists
* Now we throw if EclipseGrid get lean deck
* Removed tests for assertCellInfo and hasCellInfo
* Fixed ResinsightTests to use GridDims
2016-06-21 14:56:34 +02:00
Pål Grønås Drange
ff9ee958d7 Minor refactor. Changed shared_ptr to references in EclipseState, MULTREGTScanner and FaultCollection 2016-06-20 12:27:56 +02:00
Liu Ming
88d489e876 rename ParseMode as ParseContext in IntegrationTests folder. 2016-03-17 08:28:17 +08:00
Jørgen Kvalsvik
f0ae5db131 opm-parser adoption of Deck automatic ownership
Since the Deck* family of classes have changed their interfaces to no
longer use shared_ptr, a lot of code broke. This patch fixes all
problems in tests, other signatures and accesses to now use the new Deck
interfaces.
2016-02-18 13:27:24 +01:00
Jørgen Kvalsvik
04900a4bb6 ParserKeywords.hpp -> ParserKeywordsX.hpp
To reduce compiler stress and be more explicit w.r.t. dependencies, all
files now includes only the keywords they need, instead of the
collection of all files.
2016-01-21 09:25:58 +01:00
Jørgen Kvalsvik
f404828d63 Cleans up headers to improve build preformance
This is an effort to improve build performance.  Several includes
scattered across the project are either unused or partially used (i.e.
just used to import a type name, not depending on the actual contents of
the header file).

Replaces a lot of these includes with forward declarations.
2016-01-21 09:22:06 +01:00
Joakim Hove
d26428dd52 Reimplmented ParseMode based on string keys.
Completely reimplemented the ParseMode class. Now the main datastructure
is a map<string,action> where the possible error situations are the
keys. This approach allows for a much more flexible
setting/filtering/querying of the ParseMode settings.
2015-08-10 14:27:53 +02:00
Joakim Hove
e368a05e00 Merge fixup 2015-08-06 15:12:53 +02:00
Joakim Hove
5e64d0f147 Added parser error for 'random text'.
Previously random text in the input deck which was not formatted as a
valid keyword header was simply ignored; i.e. this

   DIMENS
     10 10 10 /

   Mohaha random gibbersih - not according to any Spec.

   GRID

Would suprisingly parse just fine. This will now be handled according
to the ParseMode::randomText setting. Observe that as a side effect of
this it turned out that many of the test datasets had additional
terminating slashes which were now detected as 'ranomdText'.
2015-08-05 22:02:10 +02:00
Joakim Hove
733af54777 Added struct ParseMode to control parse behaviour.
- Introduce a very simple class ParseMode which will become a simple
   value object which can be used to control the behavior when errors
   and inconsistencies are encountered in the parse and EclipseState
   construction phases.

 - Added ParseMode instance as second argument to all parseXXX()
   methods.
2015-08-05 22:02:09 +02:00
Joakim Hove
875fd86c3c 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.
2015-06-18 08:06:40 +02:00