Andreas Lauser
f754bd9c45
fix some screw-up with internal vs deck names
...
Parser::hasKeyword() was called with deckNames but looked up the map
for internal names. This patch renames the method to hasDeckName(),
renames Parser::getKeyword() to Parser::getKeywordFromDeckName() and
adapts/extends the tests.
2014-07-01 17:07:43 +02:00
Andreas Lauser
fe638c2fc8
separate the internal keyword names and the deck names more clearly
...
so far, these two concepts were partially mingled in Opm::Parser...
2014-06-29 14:32:06 +02:00
Andreas Lauser
96904b00f4
allow keywords to match regular expressions as their deck name
...
the RE used is specified via the "deck_name_regex" in the JSON file of
the respective keyword. A deck name is assumed to match a given parser
internal keyword if the deck name is valid and if it is either in the
list specified by the "deck_names" entry or if it matches the regular
expression.
This functionality is useful to implement the well probes for the
tracers as well as replacing the current "wild card keyword"
implementation which only allows a star as a suffix.
2014-06-29 14:32:06 +02:00
Andreas Lauser
5f949c11c3
add support for parser keywords specifying to multiple deck keywords
...
Say hello to the complete set of well, region, field and group output
specifiers soon...
2014-06-13 13:17:03 +02:00
Andreas Lauser
d820a4d435
change construction of ParserKeyword objects to the factory paradigm
...
this makes it more explicit what the object is supposed to represent.
2014-06-11 15:08:58 +02:00
Andreas Lauser
0d92cd43b0
export possibility to parse an arbitrary std::istream
...
this has the potential to reduce the memory requirements of the parser
for opm-benchmarks considerably and is quite easy to add since
internally all parsing happend on istreams anyway...
The parser integration test has been extended to test the new method
as well as `parseString()` which was omitted previously. (I wonder who
introduced this without changing the test. ;)
2014-05-20 12:12:12 +02:00
Andreas Lauser
0ca3a30697
make sure that the file we are attempting to parse actually exists
...
before that case was identical to an empty data file...
2014-04-15 13:52:08 +02:00
Joakim Hove
5becf79dd1
The ParserKeyword->parse() method will throw if the raw input argument is not finished.
...
Requires several changes to assure that the rawkeyword instances are
marked as finished before reacing the ParserKeyword->parse method.
2014-04-11 13:42:22 +02:00
Atle Haugan
c81fe99fec
Fixed definition for PATHS keyword + improved unit test for same
2014-02-26 15:03:04 +01:00
Atle Haugan
e4a404023c
Removed some logging output from Parser
2014-02-21 13:14:11 +01:00
Atle Haugan
9ac0401af5
Support for PATHS keyword - first take
2014-02-21 12:56:20 +01:00
Atle Haugan
cd3d4f9337
First cut: TITLE keyword now being parsed correctly.
2014-01-28 10:01:11 +01:00
Atle Haugan
51ac683ef2
OPM-17: Fixed bug in END[INC] logic.
2014-01-24 13:16:37 +01:00
Atle Haugan
ef11a2331f
OPM-17: First attempt to handle END and ENDINC keywords
2014-01-24 10:01:17 +01:00
Andreas Lauser
9a09fa29af
rename Parser::parse to Parser::parseFile and add Parser::parseData
...
Parser::parseData is quite useful for unit tests to prevent them
spilling files to everything. Also, what was formerly
Parser::parseFile has been renamed to Parser::parseStream and slightly
modified to not be specific for std::ifstream.
2014-01-10 14:51:56 +01:00
Atle Haugan
308cfda3c5
Improved some type usage based on code review feedback
2014-01-10 08:53:19 +01:00
Atle Haugan
f9d06da6db
Removed even more green code
2014-01-08 11:16:30 +01:00
Atle Haugan
e3f752f38b
Removed some green code
2014-01-08 11:12:52 +01:00
Atle Haugan
25eb08aa52
After code review with Kristian and Joakim
2014-01-08 10:49:21 +01:00
Atle Haugan
73dfc77aab
Some more adjustments
2014-01-08 10:49:20 +01:00
Atle Haugan
67ab48eee0
First running version of the KeyWordDescriber class. Some cleanup and refactoring required.
2014-01-08 10:49:20 +01:00
Atle Haugan
72545992e1
First running version of the KeyWordDescriber class. Some cleanup and refactoring required.
2014-01-08 10:49:20 +01:00
Joakim Hove
65c9882b53
Added dimensions to WCONHIST & WCONPROD.
2013-12-16 00:02:47 +01:00
Joakim Hove
de16ff8da1
Added methods applyUnitsToDeck() which push units onto the deck.
2013-12-14 10:28:49 +01:00
Kristian Flikka
a750fd422d
Added constructor, moved ParserState struct to cpp file
2013-12-06 15:27:05 +01:00
Kristian Flikka
78337c7bda
Added a ParserState struct, to encapsulate the temporary state of the parsing process
2013-12-06 14:18:05 +01:00
Joakim Hove
24e233a53c
Support for parsing keywords with unknown size.
2013-12-05 08:26:29 +01:00
Kristian Flikka
ce692159c9
Trimming right side of each read line, to avoid line ending problems.
...
Removed C style parsing of numbers, using boost::lexical_cast instead.
2013-12-03 10:15:22 +01:00
Joakim Hove
6021d03548
Removed debug message on stdout
2013-12-02 09:31:19 +01:00
Joakim Hove
abd0905171
Changed parser to support parsing of keywords with wildcard like
...
"TVDP*". An importtant change is that we now query the parser
canParseKeyword() instead of hasKeyword().
2013-12-01 09:28:14 +01:00
Joakim Hove
f303c09690
Parser->addKeyword() will erase first; NOW the ReplaceKeyword works
2013-10-24 09:37:14 +02:00
Joakim Hove
803304d5f8
Deck->keywordContainer will set deckIndex of DeckKeyword when inserting: Have relaxed const properties of DeckKeyword
2013-10-22 11:42:15 +02:00
Joakim Hove
2ac8bc55a5
Merge pull request #30 from joakim-hove/data-with-space
...
Data with space
2013-10-15 05:23:11 -07:00
Joakim Hove
b63244228d
Added Parser::dropKeyword()
2013-10-09 08:22:43 +02:00
Joakim Hove
253d8bec0f
Minor minor
2013-10-08 17:03:46 +02:00
Joakim Hove
6dce82c5a5
Added action: THROW_EXCEPTION
2013-10-08 16:54:41 +02:00
Joakim Hove
8e550b7f32
Added warnings in Deck for keywords of type IGNORE_WARNING and unrecognized keywords
2013-10-08 16:19:18 +02:00
Joakim Hove
f3a38425cb
Added warning capabilities to the Deck
2013-10-08 16:02:16 +02:00
Joakim Hove
997d53ea99
Merge branch 'store-file-and-line' into keyword-status
2013-10-08 15:28:21 +02:00
Joakim Hove
f0770f47fb
Added filename and line nr to RawRecord
2013-10-08 15:23:45 +02:00
Joakim Hove
f019d40dd4
Parser will inspect keyword->action; only INTERNALIZE are stored
2013-10-08 14:45:41 +02:00
Joakim Hove
2913b526d7
Added isTableCollection attribute on Parser and Raw keyword - mainly to parse PVTG keyword
2013-10-01 16:35:55 +02:00
Joakim Hove
94250f6e03
Added (default == false) verbose keyword for the parseFile() method
2013-10-01 16:05:01 +02:00
Joakim Hove
b938057dbd
Renamed sizeType UNDEFINED -> SLASH_TERMINATED
2013-10-01 15:50:43 +02:00
Kristian Flikka
297c719a1c
Cleanup of some remaining Logger stuff
2013-09-19 10:57:46 +02:00
Kristian Flikka
687b5aed2f
Formatting...
2013-09-16 15:53:56 +02:00
Joakim Hove
1ff18bb38a
Removed constructor with one global JSON config file + addedd optional flag to include all built in keywords
2013-09-14 22:39:43 +02:00
Joakim Hove
f461ba6f07
Created code to create cpp representation of complete ParserKeyword
2013-09-13 22:23:12 +02:00
Joakim Hove
41376779f0
Fixed handling of INCLUDE keyword
2013-09-02 10:08:37 +02:00
Kristian Flikka
57ca1d0eb6
Added an else clause that throws, should check before getting
2013-08-27 10:06:55 +02:00