Commit Graph

23 Commits

Author SHA1 Message Date
Joakim Hove
2d036144cc Raise OpmInputError for unbalanced quotes 2020-10-14 08:40:10 +02:00
Williham Williham Totland
6d2f8cca5c Adds type information to integer literals. 2020-09-29 13:54:21 +02:00
Joakim Hove
11d5128cbf Use KeywordLocation instead of passing keyword and filename separately 2020-09-22 09:55:45 +02:00
Joakim Hove
874c734628 Remove name property from UnitSystem dimension 2020-03-05 13:08:00 +01:00
Joakim Hove
6cc3b578f5 Use value::status to keep track of data status in DeckItem
With this commit the DeckItem::push_backDummyDefault() function will push back a
default value T( ). This will give a change in behaviour in downstream code
which has used getData<T> to get DeckItem data unchecked.
2019-11-17 17:23:42 +01:00
Joakim Hove
6dbbc8c037 Remove / rename DeckItem::size() 2019-11-16 18:31:12 +01:00
Joakim Hove
697545cf54 Use dimensions from ParserKeyword 2019-10-16 21:03:02 +02:00
Steinar Foss
11d1c7d634 python: DeckKeyword constructor, w/ ParserKeyword arg.
parserkeyword can create deckkeyword.

python parserkeyword: removed create_deckkeyword.

DeckKeyword: member parser_keyword is shared_ptr.

python DeckKeyword constructor.

python: no exposure of ParserKeyword.

DeckKeyword: shared_ptr<ParserKeyword> -> ParskerKeyword.

python/cxx/deck_keyword.cpp: cosntructor takes arg const ParskerKeyword&.

test_parser.py: simplified test_pyinut.

...
2019-09-23 23:27:03 +02:00
Joakim Hove
3070bf4a31 Change DeckKeyword constructor
The DeckKeyword::DeckKeyword(const std::string&) constructor has been removed
and the DeckKeyword now requires a ParserKeyword pointer in the constructor.
2019-09-16 00:47:34 +02:00
Joakim Hove
15c2e69e9f Add ParserKeyword member to DeckKeyword 2019-09-09 11:12:59 +02:00
Joakim Hove
e5013125f1 Refactor initial parsing stage
- Reduced the amount of state in the RawKeyword and ParserState classes.
 - RawKeyword class has normal constructor - remove init method.
 - The Rawxxx symbols are module private and the header files are not installed.
 - Removed several unused static methods from Rawxxx and ParserKeyword.
2019-08-22 09:32:11 +02:00
Joakim Hove
5103e7b604 Removed filename and keyword members from RawRecord 2019-08-14 07:34:56 +02:00
Joakim Hove
e6aecbd7ac ParserItem: differentiate between input type and internal data type
Differentiate between the input type, as specified in the json configuration
file, and the internal native type used to store data. This is a many-to-one
mapping, where e.g. both the input types STRING and RAW_STRING map to the
internal datatype std::string.

Additional changes:

 - Have removed several ParserItem() constructors.
 - The size_type::SINGLE is default for a ParserItem, and not set explicitly in
   the generated ParserKeywords.cpp file.
 - Have removed a call to boost::lexical_cast<> - just use std::to_string()
2019-04-01 18:32:06 +02:00
Joakim Hove
25522dc424 Add to_bool(string) function 2019-03-18 10:34:18 +01:00
Joakim Hove
2cd6fa2f49 Add overloads without ParseContext and ErrorGuard - update all tests 2019-01-04 13:59:28 +01:00
Joakim Hove
fd36bf88fb Add function Deck::makeDeckPath() 2018-10-18 10:47:37 +02:00
Joakim Hove
64e5d123a2 Deck will internalize path to datafile 2018-07-19 08:20:04 +02:00
Steinar Foss
d9ffb579e1 Removed MessageContainer. OpmLog used instead.
...

...

...

GenerateKeywords.cmake changed.

ParserContext.handleerror takes only two args.

Schedule: removed all MessageContainer.

...

...

...

GridProperties: removed MessageContiner.

...

Eclipse3DProperties: removed MessageContainer.

...

TabelManager:removed MessageContainer.

...

.nnn.

...

...

...

...

...

...

...

...

...

...

...

...

...
2018-03-26 10:15:18 +02:00
Joakim Hove
1050b8cba9 Added operator<< suppport for Deckxxx 2017-08-30 16:57:23 +02:00
Joakim Hove
1f646711d4 Added DeckXXX::equal( ) method. 2017-08-30 16:57:22 +02:00
Joakim Hove
da55685b62 Added simple DeckOutput class for output. 2017-08-30 16:57:21 +02:00
Jørgen Kvalsvik
477fa5a988 Combine test files, reduce number of targets
In an effort to reduce the numbers of targets built, and consequently
the repeated work and overhead of compiling boost test, a series of
test programs are combined to larger modules.

Every target typically has a constant cost of 3-6s, depending on the
computer, just for the make to set up dependencies and for the compiler
to parse and compile the testing framework and other dependencies. Each
set of tests typically add very little, so significant savings are
achieved by merging targets.

When tested on a 2015 i5m laptop, this reduced serial, single-core
compile time from ~14m45s to ~11m15s.
2017-06-01 15:29:23 +02:00
Jørgen Kvalsvik
e884b0664c Redesign cmake
Tune the makefile according to new principles, which adds a few bells
and whistles and for clarity.

Synopsis:

* The dependency on opm-common is completely gone. This is reflected in
  travis and appveyor as well. No non-kitware cmake modules are used.
* Directories are flattened, quite a bit - source code is located in the
  lib/ directory if it belongs to opm-parser, and external/ if third
  party.
* The sibling build feature is implemented through cmake's
  export(PACKAGE) rather than implicitly looking through source files.
* Targets explicitly set required public and private include
  directories, compile options and definitions, which cmake will handle
  and propagate
* opm-parser-config.cmake for downstream users is now provided.
* Dependencies are set up using targets. In the future, when cmake 3.x+
  can be used, these should be either targets from newer Find modules,
  or interface libraries.
* Fewer system specific assumptions are coded in, instead we assume
  cmake or users set up system specific details.
* All module wide configuration and looking up libraries is handled in
  the root makefile - all sub directories only set up libraries and
  compile options for the module in question.
* Targets are defined and links handled transitively because cmake now
  is told about them. ${module_LIBRARIES} variables are gone.

This is largely guided by the principles outlined in
https://rix0r.nl/blog/2015/08/13/cmake-guide/

Most source files are just moved - if they have some content change then
it's nothing more than include fixes or similar in order to make them
compile.
2017-06-01 15:29:23 +02:00