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
ddd4563f97
Renamed from 'help' to 'description' for ParserKeyword and ParserItem
2014-01-10 10:57:35 +01:00
Atle Haugan
308cfda3c5
Improved some type usage based on code review feedback
2014-01-10 08:53:19 +01:00
Atle Haugan
3271156f9d
First pull request candidate with help support
2014-01-09 13:33:32 +01:00
Atle Haugan
d3d6dc2c90
Added unit tests for ParserKeyword.help()
2014-01-09 08:42:27 +01:00
Atle Haugan
c9cda9916f
Code improvements based on code review feedback
2014-01-08 15:03:16 +01:00
Atle Haugan
6709523843
Removed even more green code
2014-01-08 11:20:31 +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
Kristian Flikka
9f4d5c11ab
Merge pull request #80 from joakim-hove/tablecollection-with-items
...
Tablecollection with items
2013-12-20 04:31:48 -08:00
Andreas Lauser
a1ae9ff6b5
add a few 'explicit' statements
...
this allows to constructs like
ParserIntItem("NRPVT");
which IMHO is more readable than the previous way, i.e.,
ParserIntItem(std::string("NRPVT"));
2013-12-19 15:39:47 +01:00
Joakim Hove
c78c6d3e96
Merge remote-tracking branch 'upstream/master' into tablecollection-with-items
2013-12-19 13:56:54 +01:00
Joakim Hove
ae2260aa43
Table collection keywords PVTO and PVTG now have individual items: settings.
2013-12-19 13:54:51 +01:00
Andreas Lauser
7096979a4b
add a few missing dimensions
...
This makes getSIDouble*() work on PORO and PVTW.
2013-12-18 16:27:47 +01:00
Joakim Hove
1d80ffaed8
Added test example for parsing DENSITY keyword.
2013-12-18 12:32:02 +01:00
Joakim Hove
65c9882b53
Added dimensions to WCONHIST & WCONPROD.
2013-12-16 00:02:47 +01:00
Joakim Hove
f357a6d23f
Added dimension create test in InlineKeywordTest.
2013-12-15 09:31:16 +01:00
Joakim Hove
de16ff8da1
Added methods applyUnitsToDeck() which push units onto the deck.
2013-12-14 10:28:49 +01:00
Joakim Hove
084fc24174
Changed parserItem::scan to return modifyable DeckItem - this is required to push dimension later.
2013-12-14 10:11:59 +01:00
Joakim Hove
8ff866266b
Added missing std::endl in keyword serialisation.
2013-12-11 13:29:42 +01:00
Joakim Hove
870cbc6eb9
INcluding dimension in ParserKeyword::inlineNew().
2013-12-11 13:28:10 +01:00
Joakim Hove
39ef9e3798
Calling initDimension for table collections and data keywords like PERMX.
2013-12-11 13:27:21 +01:00
Joakim Hove
7f213e4e9f
Added check that dimensions are equal in ParserDoubleItem::equal()
2013-12-11 13:25:42 +01:00
Joakim Hove
ac740276f0
Added virtual function push_backDimension() and getDimension() to parserItem.
2013-12-11 13:24:27 +01:00
Joakim Hove
e1b0669f6c
Pure white space.
2013-12-11 13:00:20 +01:00
Joakim Hove
5a69f64aef
Added functionality to apply dimensions to ParserItem from JsonConfig.
2013-12-10 17:35:20 +01:00
Joakim Hove
dd53619e0f
Added functions to query the dimensions on a ParserItem.
2013-12-10 17:34:52 +01:00
Joakim Hove
bb8b3ab240
Added ability to push_back() dimension strings to ParserItems; and then to query the
...
ParserItem -> ParserRecord -> ParserKeyword() structure whether it has dimension.
2013-12-09 21:12:27 +01:00
Joakim Hove
2a6fc5973c
Removed commented out code + moved micro function from header to cpp file.
2013-12-09 20:33:38 +01:00
Joakim Hove
02a9885727
Pure indentation change.
2013-12-09 20:19:29 +01:00
Kristian Flikka
c74a86b3f5
Merge pull request #68 from joakim-hove/units
...
Units
2013-12-09 01:12:33 -08:00
Andreas Lauser
7be1af4bf3
Parser.hpp: make the guardian macro less prone to conflicts
...
as soon as this class is used with another project, the old macro name
basically screamed for a naming conflict and a _very_ confused user...
2013-12-09 07:55:58 +01:00
Joakim Hove
5bc27e91f2
Added basic system for units - not yet hooked into the Parser items.
2013-12-08 19:26:30 +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
Joakim Hove
9ccc70b58d
Added enum for size of rawkeywords.
2013-12-04 17:21:54 +01:00
Joakim Hove
ed06ebf4d3
Added UNKNOWN enum value in ParserKeywordSize enum throughout.
2013-12-04 15:31:28 +01:00
Kristian Flikka
d007e8400f
Added new UNKNOWN for keywordSizeEnum
2013-12-04 14:26:08 +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
c5b53141ba
Merge remote-tracking branch 'upstream/master' into norne-keywords
2013-12-02 15:35:34 +01:00
Kristian Flikka
fa8b9e9aa3
Merge pull request #59 from joakim-hove/wildcard-keywords
...
Wildcard keywords
2013-12-02 04:24:45 -08:00
Joakim Hove
f1e9230911
Merge remote-tracking branch 'upstream/master' into norne-keywords
2013-12-02 13:21:00 +01:00
Kristian Flikka
1d0135da5e
Removed use of boost::shared_ptr, replaced with std::shared_ptr
2013-12-02 13:07:01 +01:00
Joakim Hove
6b5367854a
Factored out some common code from validName() and wildCardName().
2013-12-02 11:19:22 +01:00
Joakim Hove
4bf1adc593
Changed unsigned int -> size_t.
2013-12-02 11:10:53 +01:00