Commit Graph

16 Commits

Author SHA1 Message Date
Nathan Braswell
57976beb40 Just got paranoid about saving all this work. Almost finished operator overloading, but everything is slightly broken right now. 2014-03-06 13:13:40 -05:00
Nathan Braswell
b9ffe33d0b Made Symbol always stack, not heap, allocated. Finally fixed bugs with ASTTransformation. 2013-10-02 03:15:20 -04:00
Nathan Braswell
3a5d94caaa Started adding the nullable parts machinery. Also started to fix addStates for RNGLR and null reductions so it only truncated the rule to what had already been parsed, but now it looks like it maybe shouldn't truncate at all and use pointer position for length. However, I have to go to bed and will pick up later. 2013-08-12 00:02:50 -04:00
Nathan Braswell
680d978dcb Problem was actually in grammer, fixed it. Also made identical rules with different lookahead merge. Now just started on creating parse trees. Stopping for night. 2013-08-06 01:49:45 -04:00
Nathan Braswell
d5b33efb22 Null rules work in RNGLR now, but there seems to be a bug where somehow some states/rules get no lookahead. 2013-08-02 15:21:42 -04:00
Nathan Braswell
49d149bc1f RNGLR Recognizer now works for grammers without null rules. 2013-08-02 02:47:01 -04:00
Nathan Braswell
1c85e3693e Added support for null rules, works well. 2013-07-09 02:45:59 -04:00
Nathan Braswell
6a2977d12a Redid lookahead in a much much saner way. Now should be a legitimate parser somewhere between LALR(1) and LR(1). 2013-06-26 14:27:28 -04:00
Nathan Braswell
0c651a5d9e Added EOF symbol, making the getTable() saner for ACCEPT and lookahead support in ParseRule 2013-06-13 14:25:10 -04:00
Nathan Braswell
69713ffe1a Actually parses LR(0) grammers and sentences\! Only two problems is very inefficint gotoTable() and actionTable(), and it REJECTS the sentence after completing the Goal->Sentence(*) production. However, need to go to bed now. Does practially work though\! Yay\! 2013-05-29 20:43:35 -04:00
Nathan Braswell
315dc55409 Modifed set creation to use a State object. Set creation works 2013-05-26 22:12:47 -04:00
Nathan Braswell
1aec4ee6a7 Added first go at creating stateSets. This is a commit to save work, as it still segfaults.: 2013-05-24 00:00:41 -04:00
Nathan Braswell
e4f83cbb67 Added main loop of parser. 2013-05-23 01:35:54 -04:00
Nathan Braswell
14fc410e00 Added clone method and pointer location to toString in ParseRule 2013-05-20 23:26:15 -04:00
Nathan Braswell
200cff6ab4 Separate the toString and toDOT methods. 2013-05-20 22:59:57 -04:00
Nathan Braswell
d2698cf203 Implemented grammer loading 2013-05-20 19:34:15 -04:00