Kristian Flikka
e8310ffbca
Changed from if to ifdef, to clarify the actual functionality
2014-07-08 12:49:12 +02:00
Andreas Lauser
1a72cade01
use std::regex if it is available
...
it turns out that boost::regex does not work for the libstdc++ debug
mode. This patch should fix this for sufficiently new compilers.
Note that this requires the FindCXX11Features.cmake tests pulled in
from opm-core and an additional compiler flag...
2014-07-07 17:50:46 +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
e2eca64f59
fix boost::regex usage
...
turns out that boost::regex("foo") should be used instead of
boost::regex::basic_regex
2014-07-01 10:21:08 +02:00
Andreas Lauser
f6689d838e
make ParserKeyword::matches only return true if the deck keyword name is valid
2014-06-29 14:32:06 +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
fee11596f8
allow underscores in deck names and disallow sharps
...
underscores are used by a few of the summary specifier keywords
(e.g. BPR_X), but after closer inspection '#' symbols are not.
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
Joakim Hove
2786b5e87b
Added isDataKeyword() property to deckKeyword.
2014-05-16 15:29:54 +02:00
Arne Morten Kvarving
3827ddca64
fixed: mark static symbols as such to quell warnings
2014-05-15 14:46:16 +02:00
Arne Morten Kvarving
670e8b692b
changed: don't use parameter names that conflicts with member function names
...
quells warnings (with gcc 4.8)
2014-05-15 14:46:16 +02:00
Andreas Lauser
fc43fdd427
add a cmake test to check if the used file system is case sensitive
...
And fix the unit test for INCLUDE. This should make the test pass on
case insensitive file systems like the one of MacOS X. (Who uses that
anyway? ;))
2014-04-23 14:56:27 +02:00
Joakim Hove
5c8493b23f
Changed working directory for test reading testdata.
2014-04-23 08:18:07 +02:00
Joakim Hove
3d4ea717db
Merge pull request #186 from andlaus/check_file_existence
...
make sure that the file we are attempting to parse actually exists
2014-04-22 18:32:24 +02:00
Andreas Lauser
a1de9a0e9e
add a test case for the INCLUDE statement
2014-04-22 17:09:02 +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
Atgeirr Flø Rasmussen
79e4d51597
Renamed local variable to avoid shadowing.
2014-04-15 09:49:04 +02:00
Atgeirr Flø Rasmussen
e3d167048f
Commented out unused function arguments.
2014-04-15 09:48:19 +02:00
Joakim Hove
d5bf1726f2
Verified behaviour of defaults (i.e. *) for multivalued items.
2014-04-11 13:42:22 +02:00
Joakim Hove
f59fd25668
Added boolan flag scalar = true to DeckItem.
...
The purpose of this flag is to keep track of whether a keyword is
supposed to have only one element, i.e. scalar, or several. The
defaultApplied method only makes sense in the case of scalar items, this
method will now throw if it is called on a non-scalar item.
2014-04-11 13:42:22 +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
Kristian Flikka
c0e17b79bb
Added two dependencies to generated files, to avoid potential build failures due to premature use of them
2014-04-08 11:49:34 +02:00
Joakim Hove
e93a377eb6
Large changes to createDefaultkeywordlist: Will create both tests and testSource in one pass. The special sorce code to create test source is removed. The test source is marked with Generated_source attribute.
2014-04-08 01:44:27 +02:00
Joakim Hove
0a24d926c1
The createDefaultkeywordlist program will create the generated-source/ directory if it does not exist.
2014-04-07 17:07:24 +02:00
Joakim Hove
9ebd9a227b
Moved test of valid keywordname to ensure that e.g editor backupfiles are not parsed.
2014-04-07 16:54:09 +02:00
atleh
07809cae2e
Ready for merge?
2014-04-04 12:04:21 +02:00
atleh
02a915ba2d
Adjustments in createDefaultKeywordList
2014-04-04 12:02:40 +02:00
atleh
25a5578677
Fixed bug regarding dump file usage in createDefaultKeywordList
2014-04-04 12:02:40 +02:00
atleh
c21a667f0e
Some adjustments to createDefaultKeywordList. Not complete.
2014-04-04 12:02:40 +02:00
atleh
bd150b5684
Marked parameter as const
2014-04-04 12:02:40 +02:00
atleh
a6cd64afb7
added support for dump files in createDefaultKeywordList.cpp
2014-04-04 12:02:40 +02:00
atleh
47713c7a00
createDefaultKeywordList - minor refactoring
2014-04-04 12:02:40 +02:00
atleh
0505c0a9ca
createDefaultKeywordList now able to generate dump file.
2014-04-04 12:02:40 +02:00
Joakim Hove
edde68fa6a
Added float data accessors.
2014-04-01 09:05:33 +02:00
Atgeirr Flø Rasmussen
3ab6a5388c
Suppress unused argument warnings.
2014-03-03 11:06:44 +01: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
0d134e8dcd
Removed special float/double handling in ParserFloatItem
2014-02-20 07:23:56 +01:00
Atle Haugan
442d0fb7bf
Added ParserFloatItem + some tests. More tests may be needed.
2014-02-18 11:02:38 +01: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
d672f4f5eb
Added DOUBLE enum to ParserValueTypeEnum
2014-02-17 14:32:32 +01:00
Andreas Lauser
50f2288148
units: rename "m" to "Mass"
2014-02-11 12:45:44 +01:00
Andreas Lauser
ae73345763
units: rename "K" to "Permeability"
2014-02-11 12:45:43 +01:00