Commit graph

426 commits

Author SHA1 Message Date
Paul Beckingham
88e932ea2e LR0: Diagnostics only in debug mode 2016-01-05 11:58:42 -05:00
Paul Beckingham
eac94e99bf LR0: Now copies lists of grammar rules and terminals 2016-01-05 02:21:08 -05:00
Paul Beckingham
04ce6a8b91 LR0: Stubbed ::createParseTable 2016-01-05 02:14:10 -05:00
Paul Beckingham
6b79a9a975 LR0: Removed obsolete ::getClosure 2016-01-05 02:06:54 -05:00
Paul Beckingham
5b6a232112 LR0: Removed duplicate States::dump call 2016-01-05 01:56:26 -05:00
Paul Beckingham
8a13686643 LR0: Removed debugging diagnostics 2016-01-05 01:55:38 -05:00
Paul Beckingham
6c9b186dc2 LR0: Fixed ::closeState
- Added check to prevent duplicate states.
- Added extra recursion for cases of the new item containing '. X' where X is a
  non-terminal.
2016-01-05 01:55:24 -05:00
Paul Beckingham
a9b7ca04c9 LR0: Documented ::initializeFirstState 2016-01-05 01:51:08 -05:00
Paul Beckingham
c33e12f099 LR0: Added ::Item::operator== 2016-01-05 01:48:38 -05:00
Paul Beckingham
0d7c356bed LR0: Replaced old first-state init code 2016-01-05 01:16:07 -05:00
Paul Beckingham
7126046049 LR0: Added ::initializeFirstState 2016-01-05 01:15:30 -05:00
Paul Beckingham
1f9826a07e LR0: ::closeState no longer has any return value 2016-01-05 01:13:47 -05:00
Paul Beckingham
1491df085d LR0: Implemnted ::closeState 2016-01-05 01:02:14 -05:00
Paul Beckingham
79f5e03a26 LR0: Changed the structure of the _actions and _goto tables 2016-01-05 01:01:00 -05:00
Paul Beckingham
c7aa6a3beb LR0: Modified ::getExpectedSymbols to use index-based looping
- Index-based looping makes it easier to link the items in the states to be
  linked back to the augmented grammar.
2016-01-03 17:24:32 -05:00
Paul Beckingham
c02b6f62c0 LR0: Diagnostics need to be shown after processing 2016-01-03 17:23:38 -05:00
Paul Beckingham
379c2f806e LR0: Documented the ::initialize algorithm 2016-01-03 16:42:13 -05:00
Paul Beckingham
2a9000cfd0 LR0: Added ::closeState
- This will be a recursive method to complete the state information, prior to
  the creation of the final parser table.
2016-01-03 16:41:12 -05:00
Paul Beckingham
40b7357b71 LR0: Renamed ::expand to ::getClosure 2016-01-03 16:40:21 -05:00
Paul Beckingham
a0d9df5edd LR0: Renamed ::getExpected to ::getExpectedSymbols 2016-01-03 16:38:46 -05:00
Paul Beckingham
71d216ea49 LR0: Removed ::getClosure, it's form is wrong 2016-01-03 16:36:30 -05:00
Paul Beckingham
819beb5909 LR0: Implemented full ::expand method 2016-01-03 00:44:00 -05:00
Paul Beckingham
f4bff57b09 LR0: Implemented ::expand 2016-01-02 15:35:53 -05:00
Paul Beckingham
ecb161131c LR0: Eliminated extra copies 2016-01-02 15:33:58 -05:00
Paul Beckingham
35b526957e LR0: Fixed bug where local variable eclipsed member 2016-01-02 15:33:04 -05:00
Paul Beckingham
586cce2114 LR0: Changed ::expand to take a single symbol, not a closure
- Updated ::initialize to handle the expanѕion of the first rule.
2016-01-02 15:21:50 -05:00
Paul Beckingham
27f71d810f LR0: Made more methods const 2016-01-02 14:42:39 -05:00
Paul Beckingham
c0a7a203cf LR0: Added ::expand 2016-01-02 14:42:06 -05:00
Paul Beckingham
31b53e8c23 LR0: Converted ::getExpected from std::vector to std::set 2016-01-02 14:33:05 -05:00
Paul Beckingham
1305c0cb55 LR0: Renamed ::getExpectations to ::getExpected 2016-01-02 14:28:20 -05:00
Paul Beckingham
f658c5d35c LR0: Added ::getExpected to ::closure 2016-01-02 14:27:22 -05:00
Paul Beckingham
679f094f16 LR0: Added ::getExpectations 2016-01-02 14:16:11 -05:00
Paul Beckingham
9327ff7c8b Tests: Added LR0::Item::next 2016-01-02 14:09:33 -05:00
Paul Beckingham
d8096d2fa8 LR0: Added Item::next 2016-01-02 14:09:13 -05:00
Paul Beckingham
b207039464 Tests: Added LR0::Item::done 2016-01-02 13:54:30 -05:00
Paul Beckingham
29130e9d4c LR0: Added ::Item::done 2016-01-02 13:54:11 -05:00
Paul Beckingham
fbcb79006e LR0: ::getClosure now takes a Closure and returns a Closure 2016-01-02 11:16:34 -05:00
Paul Beckingham
f353e86a27 LR0: Stubbed ::getExpectations 2016-01-02 11:15:32 -05:00
Paul Beckingham
b2e9ea87b4 LR0: Іtem now maintains an index into the augmented grammar 2016-01-02 10:43:55 -05:00
Paul Beckingham
61ef17813a LR0: Now retains a copy of the augmented grammar 2016-01-02 10:43:14 -05:00
Paul Beckingham
81fe18ec20 Tests: Added ::getDigit2, ::getDigit3, ::getDigit4 2016-01-01 14:53:10 -05:00
Paul Beckingham
fa5c8776fb Pig: Added ::getDigit2, ::getDigit3, ::getDigit4 2016-01-01 14:52:43 -05:00
Paul Beckingham
9855b75a78 Tests: Added ::getQuoted 2016-01-01 14:34:10 -05:00
Paul Beckingham
2590a48bfc Pig: Added ::getQuoted 2016-01-01 14:33:20 -05:00
Paul Beckingham
ab9d0606fd Copyright: Updated to 2016 2015-12-31 15:26:25 -05:00
Paul Beckingham
f6898ffa74 Tests: Added ::getHexDigit 2015-12-30 11:11:13 -05:00
Paul Beckingham
a66e03e858 Pig: Added ::getHexDigit 2015-12-30 11:06:43 -05:00
Paul Beckingham
91b1d512a7 Tests: Added ::getOneOf 2015-12-30 10:59:31 -05:00
Paul Beckingham
edda82fafe Pig: Added ::getOneOf 2015-12-30 10:59:14 -05:00
Paul Beckingham
544a1d67d0 Tests: Added ::skip 2015-12-30 10:51:38 -05:00