Commit graph

  • aed1de5ce5 Applied a bugfix from my local branch Dan Hirsch 2013-06-24 21:46:23 +02:00
  • e9a7c0b83d Added new SConscript-based build system; not yet done porting Dan Hirsch 2013-06-24 21:26:07 +02:00
  • ce74cf7939 Refactored regex backend to use a sparse thread list Dan Hirsch 2013-06-24 21:23:28 +02:00
  • 0d7e69767d update README: all the backends are done Meredith L. Patterson 2013-06-22 11:00:49 -07:00
  • 623ca6e4e8 Merge pull request #14 from pesco/GLR Meredith L. Patterson 2013-06-22 10:35:44 -07:00
  • 66809ceeda go back to storing engines in lists Sven M. Hallberg 2013-06-22 18:16:41 +02:00
  • 67681a119a finish engine merging Sven M. Hallberg 2013-06-22 17:40:47 +02:00
  • 23afea4b4e add demerge code path (untested) Sven M. Hallberg 2013-06-22 14:21:19 +02:00
  • bf9c9b5f7a refactoring in preparation for engine merging Sven M. Hallberg 2013-06-22 12:51:25 +02:00
  • 8bc3b93e95 correctly use augmented grammar for test_glr() output Sven M. Hallberg 2013-06-21 23:53:47 +02:00
  • 34c6d868b9 commentation Sven M. Hallberg 2013-06-21 23:47:22 +02:00
  • 9585a5946e use lookahead stream directly for LR (terminal) lookup Sven M. Hallberg 2013-06-21 23:22:07 +02:00
  • 853e1fba46 split LR table representation by key type (terminals/nonterminals) Sven M. Hallberg 2013-06-21 22:55:04 +02:00
  • d67e12a825 better factor out lr table writes Sven M. Hallberg 2013-06-21 20:52:27 +02:00
  • 534a29b7ba split h_lr_lookup into two (yet identical) functions Sven M. Hallberg 2013-06-21 20:21:40 +02:00
  • c32cf709b2 eliminate the right stack; work with the HInputStream directly Sven M. Hallberg 2013-06-21 20:11:19 +02:00
  • 1e59e461fa make ambiguous test ignore order of precedence Sven M. Hallberg 2013-06-21 19:58:58 +02:00
  • ec88580b22 make h_lrengine_step a void function again Sven M. Hallberg 2013-06-21 18:46:16 +02:00
  • bf3e3c162e don't even touch the right stack on piggy-back shifts Sven M. Hallberg 2013-06-21 15:31:37 +02:00
  • 7cd143c0c4 piggy-back the next shift directly onto the reduce Sven M. Hallberg 2013-06-21 15:06:31 +02:00
  • bbbaf1634c add an assertion checking that HLR_REDUCE is always followed by HLR_SHIFT Sven M. Hallberg 2013-06-21 15:00:04 +02:00
  • f5d4ea90da add ambiguous test case for GLR Sven M. Hallberg 2013-06-20 11:30:30 +02:00
  • b1e8e29774 add engine forking Sven M. Hallberg 2013-06-20 11:05:57 +02:00
  • 4f36fcd2c1 avoid duplicate conflict branches Sven M. Hallberg 2013-06-19 18:51:16 +02:00
  • 572f1c8f9e expand stub GLR backend Sven M. Hallberg 2013-06-19 18:22:19 +02:00
  • ecfc0a8e62 fix conflict pretty-printing Sven M. Hallberg 2013-06-19 18:21:53 +02:00
  • 55c9a3d9c5 add stub GLR backend with h_glr_parse() a copy of h_lr_parse() Sven M. Hallberg 2013-06-19 17:20:53 +02:00
  • 54ba62bfb7 record conflicts in a special HLRAction type Sven M. Hallberg 2013-06-19 17:01:13 +02:00
  • 168760b10a return running state from h_lrengine_step Sven M. Hallberg 2013-06-19 14:16:34 +02:00
  • 409d33c916 split out h_lrengine_action() Sven M. Hallberg 2013-06-19 14:09:39 +02:00
  • 129d50c0ef split LR code into lr.c, lr0.c, and lalr.c Sven M. Hallberg 2013-06-17 20:08:25 +02:00
  • 7eff4b8d94 factor out a struct HLREngine Sven M. Hallberg 2013-06-17 19:11:18 +02:00
  • 3e85648844 Merge pull request #13 from pesco/LALR Meredith L. Patterson 2013-06-16 13:34:17 -07:00
  • fdafb64762 Merge pull request #12 from pesco/recursive_indirect Meredith L. Patterson 2013-06-16 13:33:52 -07:00
  • 67b6e9666c fix a potentially uninitialized variable Sven M. Hallberg 2013-06-16 22:29:53 +02:00
  • 24c15f34cc augment grammar to ensure start symbol never occurs on rhs Sven M. Hallberg 2013-06-16 22:23:35 +02:00
  • 8d21c782e7 fix eq/hash_lalr_item to compare symbols by value Sven M. Hallberg 2013-06-15 21:24:27 +02:00
  • f0cd2de55c fix match_production for the empty-sequence case Sven M. Hallberg 2013-06-15 20:54:53 +02:00
  • 5a57adabab some refactoring trying to get h_many to work Sven M. Hallberg 2013-06-15 20:30:57 +02:00
  • 9a96314931 refactor hashtable iterations to use H_FOREACH Sven M. Hallberg 2013-06-15 19:06:10 +02:00
  • e56f052255 remove the extra +1 from h_arena_malloc Sven M. Hallberg 2013-06-15 16:04:29 +02:00
  • a7fe3824cd minor bugfixies Sven M. Hallberg 2013-06-14 19:07:26 +02:00
  • d51e13173a add LALR test suite Sven M. Hallberg 2013-06-14 17:36:46 +02:00
  • 1918c97e1c fix a premature arena delete Sven M. Hallberg 2013-06-14 17:36:30 +02:00
  • 06acbe2fb5 LALR example parses! Sven M. Hallberg 2013-06-14 17:17:23 +02:00
  • bfc2433320 don't call compare function on NULL hashtable keys Sven M. Hallberg 2013-06-14 17:07:56 +02:00
  • 6f44ab1196 Merge branch 'recursive_indirect' into LALR Sven M. Hallberg 2013-06-14 12:51:48 +02:00
  • f65b0ae82a commentation Sven M. Hallberg 2013-06-14 12:50:39 +02:00
  • dfe4c3ad47 add right-recursion test for packrat and llk Sven M. Hallberg 2013-06-14 12:42:55 +02:00
  • 7b04ab8d9d pre-allocate h_desugar's result to squelch recursive calls Sven M. Hallberg 2013-06-14 12:27:35 +02:00
  • 92f16a4d14 proper LALR example with conflict in LR(0) Sven M. Hallberg 2013-06-14 12:24:18 +02:00
  • fd297b636c add LALR conflict resolution (untested) Sven M. Hallberg 2013-06-13 14:45:26 +02:00
  • ddfd3796a7 why not include the lhs in pretty-printed reduce entries? Sven M. Hallberg 2013-06-12 16:48:59 +02:00
  • 4b5a936667 handle charsets Sven M. Hallberg 2013-06-12 16:38:50 +02:00
  • 41d4be4b84 avoid a segfault on getting the token position Sven M. Hallberg 2013-06-12 15:54:46 +02:00
  • ce387d81b6 save production rhs in reduce actions for pretty-printing if not compiled NDEBUG Sven M. Hallberg 2013-06-12 15:48:52 +02:00
  • 805dfeb363 duh, forgot to record the start symbol in table Sven M. Hallberg 2013-06-12 15:33:53 +02:00
  • 0a7548bb2f lr driver, first stab (still bugged) Sven M. Hallberg 2013-06-12 15:07:19 +02:00
  • bbdced376e derps etc Sven M. Hallberg 2013-06-11 00:27:34 +02:00
  • 04487ff80f add table pretty-printer Sven M. Hallberg 2013-06-10 23:45:25 +02:00
  • 4cd51b8953 make it compile and fix some basic segfaults Sven M. Hallberg 2013-06-10 22:05:12 +02:00
  • dabe4b07a9 wip end-of-day commit - almost there (untested) Sven M. Hallberg 2013-06-10 00:46:03 +02:00
  • 3bb26162c3 end-of-day scratch commit (LALR table generation) Sven M. Hallberg 2013-06-07 22:39:09 +02:00
  • f041775bb9 declare h_cfgrammar_new in cfgrammar.h Sven M. Hallberg 2013-06-07 22:38:26 +02:00
  • 732545274a look up neighbor set index properly (was left uninitialized) Sven M. Hallberg 2013-06-07 16:55:36 +02:00
  • 67e5b2fee0 add DFA pretty-printer Sven M. Hallberg 2013-06-07 16:30:16 +02:00
  • 373a7aef94 make h_pprint_char from cfgrammar public so LR pretty printers can use it Sven M. Hallberg 2013-06-07 16:29:14 +02:00
  • 43fc07e67b add construction of LR(0) automaton (untested) Sven M. Hallberg 2013-06-07 13:47:00 +02:00
  • 3ad4c51070 fix hte_same_length() Sven M. Hallberg 2013-06-07 13:46:16 +02:00
  • 167e187151 scratch commit of LALR preparations (breaks compile) Sven M. Hallberg 2013-06-06 13:05:48 +02:00
  • e7a388d1c7 move djbhash into general availability as h_djbhash Sven M. Hallberg 2013-06-06 13:01:54 +02:00
  • b959bcb5c7 fix an array index Sven M. Hallberg 2013-06-06 13:01:39 +02:00
  • 636f741d88 add h_hashset_equal (set comparison) Sven M. Hallberg 2013-06-05 15:12:48 +02:00
  • 976205f9da hook up LALR backend stub Sven M. Hallberg 2013-06-04 22:14:06 +02:00
  • ef52f66a8c Merge branch 'LL' of github.com:pesco/hammer into LL Sven M. Hallberg 2013-06-04 22:02:04 +02:00
  • 3be83c7fa2 set index and offset of result tokens in llk driver Sven M. Hallberg 2013-06-04 21:59:39 +02:00
  • dba9d41eda rename HCFStringMap to HStringMap Sven M. Hallberg 2013-06-04 21:47:09 +02:00
  • 92f2eecf6c Remove unneeded desugaring code. Dan Hirsch 2013-05-27 08:31:15 +02:00
  • e0207b8d5f properly initialize NULL fields in h_cfgrammar_new and h_stringmap_new Sven M. Hallberg 2013-05-25 14:49:59 +02:00
  • 02f1c80eea Merge remote-tracking branch 'mlp/master' into LL Sven M. Hallberg 2013-05-25 14:34:10 +02:00
  • 8618f9cb62 remove useless desugar_unimplemented; revert incorrect changes to test_llk() Meredith L. Patterson 2013-05-24 20:10:21 -07:00
  • 02d68f6d18 Merge branch 'master' of https://github.com/thequux/hammer Meredith L. Patterson 2013-05-24 20:00:41 -07:00
  • ec404ca8fe Refactored all of the desugaring code to no longer depend on memory being initialized to 0. Everything is about 12% faster now. Dan Hirsch 2013-05-25 03:35:42 +02:00
  • b6d9c0c0c4 No more cycles in table generation! (Merge branch 'LL' of https://github.com/pesco/hammer) Meredith L. Patterson 2013-05-24 14:13:54 -07:00
  • 8197a06c80 Merge remote-tracking branch 'mlp/master' into LL Sven M. Hallberg 2013-05-24 23:11:06 +02:00
  • 0dde8ea4ee remove debug output from fill_table_row Sven M. Hallberg 2013-05-24 23:04:20 +02:00
  • 7ce2194ff1 upgrade dummy example to require LL(3) Sven M. Hallberg 2013-05-24 23:00:00 +02:00
  • 48afbcb078 justify a const cast Sven M. Hallberg 2013-05-24 22:48:15 +02:00
  • f55ec2f1ed comment wording Sven M. Hallberg 2013-05-24 22:40:00 +02:00
  • cbd50ec4c3 temp commit some debugging stuff for posterity Sven M. Hallberg 2013-05-24 22:39:32 +02:00
  • de4b21757e make sure h_string_update copies its subtrees Sven M. Hallberg 2013-05-24 22:38:14 +02:00
  • 3047fd223b let h_hashtable_merge's combine function decide what to do on NULL dst values Sven M. Hallberg 2013-05-24 22:29:33 +02:00
  • c8dba54bb4 More LL(k) fixes (Merge branch 'LL' of https://github.com/pesco/hammer) Meredith L. Patterson 2013-05-24 06:11:44 -07:00
  • cb6e7f4229 Regex all works now! (Merge branch 'master' of https://github.com/thequux/hammer) Meredith L. Patterson 2013-05-24 06:09:21 -07:00
  • d71215d494 All tests pass; lots of stuff is no longer const Dan Hirsch 2013-05-24 15:07:47 +02:00
  • e4984fe60c add an assertion that catches the infinite loop Sven M. Hallberg 2013-05-24 14:08:13 +02:00
  • b9a33f2c98 More testcases work Dan Hirsch 2013-05-24 12:22:15 +02:00
  • bd9f9293c1 why does this (test_llk) segfault!? driver goes into a loop. Sven M. Hallberg 2013-05-24 04:33:27 +02:00
  • c6d3bc7fd5 let h_stringmap_get_char return the proper type Sven M. Hallberg 2013-05-24 04:32:14 +02:00
  • 81e0ffed1d remove an erroneous assert that snuck into reshape_optional Sven M. Hallberg 2013-05-24 04:31:33 +02:00