Commit Graph

51 Commits

Author SHA1 Message Date
Joakim Hove
875f591a1b Changed ParserKeyword to use vector of records 2015-02-20 00:21:32 +01:00
Andreas Lauser
ea38a25af4 remove all trailing white space
this is just the result of

```
find -iname "*.[ch]pp" | xargs sed -i "s/ *$//"
find opm/parser/share/keywords -type f |  xargs sed -i "s/ *$//"
```

so if it causes conflicts with other patches, the others should get
priority. The rationale behind this patch is that some people tell
their editor to remove white space which leads to larger than
necessary patches...
2014-12-08 16:34:28 +01:00
Andreas Lauser
fbf6008da4 Parser: rename and split canParseKeyword to isRecognizedKeyword
which is more what the method does because the keyword can still
contain an error in its data which would make it non-parseable.

While at it, split the method into a "get keyword name from input
line" and "is a valid keyword name" part. (this will be needed later.)
2014-11-05 13:08:04 +01:00
Andreas Lauser
a4f55f5f8d JSON keyword definitions: make the "sections" item mandatory
the empty list can be used which means that the keyword may occur in
any section. (which is useful for e.g. section delimiters.)
2014-10-13 16:06:09 +02:00
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
09c5a24473 add GROUP_PROBE 2014-06-29 14:32:06 +02:00
Andreas Lauser
d4409dbae0 add BLOCK_PROBE 2014-06-29 14:32:06 +02:00
Andreas Lauser
49b48662ef change the TVDP keywords to use regular expressions instead of wildcards 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
Arne Morten Kvarving
3827ddca64 fixed: mark static symbols as such to quell warnings 2014-05-15 14:46:16 +02:00
Atgeirr Flø Rasmussen
79e4d51597 Renamed local variable to avoid shadowing. 2014-04-15 09:49:04 +02:00
Atle Haugan
ed17058ad3 Renamed FLOAT to DOUBLE in JSON files, tests and some code using the enum 2014-02-17 15:02:40 +01:00
Atle Haugan
c9cda9916f Code improvements based on code review feedback 2014-01-08 15:03:16 +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
76a9cbb0b8 Updated test to check a return value 2013-10-25 17:31:48 +02:00
Roland Kaufmann
781ef04a0e Compare size with unsigned int literal
Surprisingly, some compilers (notably GCC 4.6.3) will issue a warning
when comparing a literal which is clearly positive to an unsigned type,
when looking for a suitable instantiation in Boost. This is fixed by
making the literal unsigned too, so there's no doubt.
2013-10-22 23:39:49 +02:00
Joakim Hove
1cc16de2bd Added test for replace keyword functionality 2013-10-18 10:17:48 +02:00
Joakim Hove
b63244228d Added Parser::dropKeyword() 2013-10-09 08:22:43 +02:00
Joakim Hove
9986916ca7 Fixing parser tests 2013-09-17 17:45:42 +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
Kristian Flikka
e55d52654d Added test to check that getKeyword throws when asked for non-existing keyword 2013-08-27 10:10:12 +02:00
Kristian Flikka
480d14934b Added test for a case with fully, partial and empty record body, defaults are added 2013-08-26 15:17:52 +02:00
Kristian Flikka
be882b6b27 Removed commented test 2013-08-23 12:18:38 +02:00
Joakim Hove
b630140316 Merged upstream/master 2013-08-23 09:30:23 +02:00
Joakim Hove
df031007db Added items: to all inline config strings 2013-08-23 00:20:07 +02:00
Joakim Hove
dfca913462 Added method to load keyword configurations from directory 2013-08-21 12:50:21 +02:00
Kristian Flikka
002ab45f77 Removed commented test 2013-08-21 08:51:00 +02:00
Kristian Flikka
89daeea561 Renamed newRawKeyword to createRawKeyword. Minor refactoring 2013-08-21 08:44:46 +02:00
Joakim Hove
47d29cc804 Added parser->size() and parser->loadKeywordFromFile() 2013-08-19 22:37:48 +02:00
Joakim Hove
a0a20425f6 Updated tests to reflect that RawDeck has been removed 2013-08-13 14:51:33 +02:00
Joakim Hove
946485e2b4 Added parsing support for sizeType OTHER 2013-08-06 16:28:12 +02:00
Joakim Hove
475b607faf Can now parse file with several WCONHIST keywords 2013-08-01 12:50:42 +02:00
Joakim Hove
75954575d5 Changed Deck::getKeyword() to take an additional inde argument 2013-08-01 10:57:25 +02:00
Joakim Hove
db60ee2b56 Removed setRecord() method ParserKeyword. Instead ParserRecord is created during ParserKeyword construction 2013-07-31 15:02:00 +02:00
Joakim Hove
b3d9fb51a0 Parser object can be constructed with config file as input argument 2013-07-31 11:30:21 +02:00
Joakim Hove
e0995814f6 More JSON integration in Parser and ParserKeyword 2013-07-30 14:10:07 +02:00
Kristian Flikka
31b3031c1a Removed class ParserKeywordSize, and accompanying tests. Put info into ParserKeyword. Changed tests to expose same constraints. 2013-06-24 14:08:53 +02:00
Kristian Flikka
951ce6ac4d Changed from using RawParserKeywords to equivalent functionality now in Parser and ParserKeywordSize 2013-06-21 15:34:45 +02:00
Kristian Flikka
01abb91959 Renamed ParserRecordSize to ParserKeywordSize, because it is more consistent with ParserItemSize 2013-06-21 10:23:24 +02:00
Kristian Flikka
d79745ce4f Changed some KEYWORD->Keyword instances, search and replace hickup 2013-06-20 15:40:45 +02:00
Kristian Flikka
f1660460dc Replaced all instances of KW with Keyword. We can afford it. 2013-06-20 15:30:37 +02:00
Kristian Flikka
5fa04e5377 Added/implemented XStringItem for Parser and Deck, with tests. Added integration test for WWCT keyword. Moved DeckItem tests into type-specific files. Removed unused file. 2013-06-20 13:56:11 +02:00
Kristian Flikka
17dde28c49 Expanded ParserTest to test int based record with 1 to many records and items 2013-06-18 14:12:00 +02:00
Kristian Flikka
de1983807d Added single parser test to test raw to deck parsing of int 2013-06-18 13:47:07 +02:00
Kristian Flikka
2cce97f115 Split parser function, to make more modular and testable. Moved integrationtests from ParserTests into Integration tests. 2013-06-18 10:28:30 +02:00
Kristian Flikka
fbb468342d Finished up the last pieces for a simple BPR keyword vertical. 2013-06-04 14:32:30 +02:00
Joakim Hove
c596b086c8 Started integration testing 2013-05-30 10:11:12 +02:00
Kristian Flikka
2088c3e96d Simple scan implementation in ParserIntItem added. DeckIntItem now support push_back 2013-05-08 14:31:20 +02:00