Commit Graph

1359 Commits

Author SHA1 Message Date
Terence Parr 54fd28c29d add() was wrong 2012-07-27 21:03:41 -07:00
Terence Parr 8279c3da11 turn on local context cache. 2012-07-27 20:53:10 -07:00
Terence Parr 14372f2515 only 14 unit tests fail. 2012-07-27 17:38:02 -07:00
Terence Parr b8f072e231 rebuilt new hashtable as T[][] 2012-07-27 17:18:33 -07:00
Terence Parr b843d6cf59 initial new hash table impl. 2012-07-27 14:51:07 -07:00
Terence Parr b83c90af2f play with atnconfigset fields 2012-07-27 14:50:36 -07:00
Terence Parr 9445d1fdd6 update comment 2012-07-27 10:38:43 -07:00
Terence Parr 26165c5d54 atnconfigsets can be readonly now. no copying to put into new DFA state, set readonly instead. made atnconfigset.equals() more accurate. add -notree option to test java lr 2012-07-27 10:34:59 -07:00
Terence Parr 093af0edce update comment 2012-07-26 18:26:17 -07:00
Terence Parr 6322ff3abd add comment 2012-07-26 18:17:05 -07:00
Terence Parr 0e24a66f07 reduce memory usage by creating LexerATNConfig a subclass with the lexer action index. saves about 2M on java.* with javalr. 2012-07-26 17:51:02 -07:00
Terence Parr 3c7b4c2a33 big cleanup. 2012-07-26 17:28:10 -07:00
Terence Parr 48ddc0bcee add gc() 2012-07-26 12:42:10 -07:00
Terence Parr 6b8e6cf0a7 reduces a few equals calls. 2012-07-26 10:58:11 -07:00
Terence Parr faafe8dfa2 no local/shared predctx caches. remove spurious array creation. 2012-07-26 10:35:52 -07:00
Terence Parr 86a4f26596 still has dfa and local predict ctx cache, but doesn't help much, and takes time. Eval preds as we pass them in full ctx mode; no sempred ctx in configs then. removed LANDMINE!!!!!!!!! some lame code that uses fields like _startIndex; fix that. added bail option to testjavalr. 18s to parse java.* with javalr full ctx now. 2012-07-25 18:47:34 -07:00
Terence Parr 05de714987 add chk for null contextCache. 2012-07-25 10:58:04 -07:00
Terence Parr 3774c5752b add more tracking var 2012-07-25 10:30:19 -07:00
Terence Parr 3cec976f7e Don't pursue the closure if there is just one state or it's predicting unique alt. Fixed up computeReachSet() to do this. Dropped from 6s to 4.5s for TestJavaLR -SLL on java.* with 45M max footprint. 2012-07-24 18:45:23 -07:00
Terence Parr 2495ce6b20 add SLL option to the ATN simulator and use in TestJavaLR. 2012-07-24 17:42:47 -07:00
Terence Parr 2ae4d4eebd add ctx cache to merge op. now i get optimal graph it seems. doesn't seem longer for java.* with JavaLR. still landmine in Pattern.java, Foo.java. Made toDOTString sort predctx nodes by id for repeatable tests. updated unit tests. 2012-07-24 16:26:01 -07:00
Terence Parr ac4f00524e add ctx cache. 2012-07-24 14:19:43 -07:00
Terence Parr 9627652b67 tweak to compile 2012-07-24 12:20:56 -07:00
Terence Parr 320868d661 added code chking size of ctxs. changed configsets -> configs. added recur getallnodes. 2012-07-24 10:04:51 -07:00
Terence Parr 344a56fd1e finished inter-dfa-state-context-cache but doesn't fix landmine. add debug_list_atn_decisions field. 2012-07-23 18:21:53 -07:00
Terence Parr 1966379265 shelve to look back at sam's. added optimizeConfigs() stuff. 2012-07-23 17:50:22 -07:00
Terence Parr 00c4f98134 add test file that kills antlr 2012-07-23 10:35:02 -07:00
Terence Parr 935fd2831e add writeFile util. improve dbg msg 2012-07-23 10:29:12 -07:00
Terence Parr d8a9207041 improve combine common parents, return a or b in merge array of merged is a or b; new unit test. 2012-07-22 20:07:46 -07:00
Terence Parr e18b9132d9 cleanup and merge common parents for array merge; fixes unit test 2012-07-22 16:39:53 -07:00
Terence Parr f1e4d85d0a fix cut/paste error. 2012-07-22 16:17:07 -07:00
Terence Parr f7eeca274f reorg closure and fix bug where $ in arrayctx wouldn't perform global follow. fix case in array merge that didn't check both a[i], b[i] as $ (only matters in full ctx). unit tests for graph show fewer ctx's created. 2012-07-22 16:09:45 -07:00
Terence Parr eb78593469 rm comment 2012-07-22 15:43:01 -07:00
Terence Parr 44ae1dad0b if merged array is 1 node, return singleton. more unit tests 2012-07-22 15:05:12 -07:00
Terence Parr 3edb35d95e cleanup; avoid array creation 2012-07-22 12:59:26 -07:00
Terence Parr 829ad9191c didn't join a$ + bx as [a,b]$ for local ctx. new unit test to chk 2012-07-22 12:57:30 -07:00
Terence Parr 8695210903 cleanup, simplify array ctx equals 2012-07-22 12:17:34 -07:00
Terence Parr 43424cd5df do check for a==b in merge(); improve DOT output 2012-07-22 12:10:40 -07:00
Terence Parr 43e986db8b small hash code cleanup. 2012-07-22 11:27:44 -07:00
Terence Parr 54d23066b2 merge of array and $ for rootIsWildcard was broken. Fixed JavaLR parsing. Still sticks on Pattern.java but not 5 hours anymore--faster up til that landmine. 2012-07-21 19:24:03 -07:00
Terence Parr 36a725765e cleanup; hashcode for single node pred ctx was wrong. failed to see [46] and [46] as same. 2012-07-21 17:13:16 -07:00
Terence Parr 93945d47f5 Merge branch 'master' into stack-graphs-integration 2012-07-21 16:27:36 -07:00
Terence Parr 9539572ee7 simplify test. 2012-07-21 16:27:00 -07:00
Terence Parr 7a4a269615 fix test so no error due to EOF. 2012-07-21 15:36:56 -07:00
Terence Parr 8c03dbacf8 Resolves #41. EOF cannot follow s. would need s' : s EOF ; for that. updating unit test TestParserExec.testOptional 2012-07-21 15:29:07 -07:00
Terence Parr 991014d3f2 clean up, add comments, fix graph unit tests, updated toDotString(). 2012-07-21 15:10:15 -07:00
Terence Parr f78bf4d097 rm comment; looks inappropriate for branch 2012-07-21 10:45:59 -07:00
Terence Parr 0141bc058a merge from master,In preparation for continuing on this experiment branch. 2012-07-21 10:38:55 -07:00
Sam Harwell 885f6530ad Use chained calls to append instead of string concatenation 2012-07-20 14:52:49 -05:00
Sam Harwell 6259ab5c9e Use StringBuilder instead of StringBuffer 2012-07-20 14:52:48 -05:00