Commit Graph

788 Commits

Author SHA1 Message Date
parrt 8f7fb98e16 added big comments
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9565]
2011-12-12 16:33:10 -08:00
parrt b9afdf6e07 rename var; add missing return
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9564]
2011-12-11 14:45:25 -08:00
parrt 3fb7466a80 another big reorg and fixed unit test. lots more sharing and splitting into methods; same 21/807 tests fail; java works.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9563]
2011-12-11 14:34:32 -08:00
parrt 8615fc26da rm dead code
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9562]
2011-12-11 13:03:34 -08:00
parrt b379a56c7f was playing with test java
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9561]
2011-12-11 13:02:58 -08:00
parrt 18ff004d83 playing; nop
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9560]
2011-12-11 12:29:27 -08:00
parrt d372d761d5 interim refactoring. much smaller execATN; removed prevAccept fields. useless.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9559]
2011-12-11 12:09:29 -08:00
parrt c3630843d2 add convenience method
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9558]
2011-12-11 11:23:42 -08:00
parrt c32b703555 quote literal was not translated properly. updated Lexer to convert antlr literals to target literals properly. added unit test.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9557]
2011-12-11 10:37:27 -08:00
parrt 1923242b37 clean up comment
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9553]
2011-12-10 18:54:52 -08:00
parrt b89d7c0932 rm dead code
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9552]
2011-12-10 18:51:46 -08:00
parrt c59b63c79b turn on in-VM exec for testing.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9551]
2011-12-10 18:17:29 -08:00
parrt 12aa6c2404 fix unit tests, bug in collecting preds and testing in DFA state
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9550]
2011-12-10 17:28:17 -08:00
parrt b1c7edb8d8 moved empty context chk for retry
altered args on reporting methods
reporting methods moved from parser to error strategy
fixed full ctx retry in DFA (used to only work in ATN)
i record conflictSet not just boolean in DFA
added debugging support to BaseRecognizer
added DiagnosticErrorStrategy

[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9549]
2011-12-10 16:24:41 -08:00
parrt b682450e29 add clone()
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9548]
2011-12-10 15:43:06 -08:00
parrt d170d89ce6 wasn't using some args
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9547]
2011-12-09 18:15:05 -08:00
parrt 131e9f7686 added comments, working on parser interpreter (not prediction) reorg. adding ParserInterpreter. adding unit tests.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9546]
2011-12-09 16:35:21 -08:00
parrt 63168c5577 added more dbg prints, turned on context sensitivity in test java lr.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9545]
2011-12-07 17:47:08 -08:00
parrt 9173367a1e fix unit test
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9544]
2011-12-07 13:27:22 -08:00
parrt 6c5f3655b9 dropped another eps edge; like 5% savings for JavaLR.g4
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9543]
2011-12-07 13:07:04 -08:00
parrt 946c59da14 added Sam's fix for def of ambiguous DFA state; added unit test but not working yet. rule ctx conflictsWith() consistent with v3 now; replaced some Set<Integer> with IntervalSet (for alt sets) and sped things up.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9541]
2011-12-06 17:10:53 -08:00
parrt 28696fe2ff add toSet()
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9540]
2011-12-06 15:58:47 -08:00
sharwell cb5d55512a v4: remove stale code (and fix broken build)
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9539]
2011-12-06 13:31:34 -08:00
sharwell af8e1edb32 v4: Run unit tests in same process (30% performance improvement)
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9538]
2011-12-06 13:30:05 -08:00
parrt 6e79c36861 add verbose dfa state option
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9537]
2011-12-06 12:09:19 -08:00
parrt afb89c56b9 fix a few unit tests
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9536]
2011-12-06 11:47:40 -08:00
parrt cc00494e9d add null chk
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9535]
2011-12-06 11:41:08 -08:00
parrt 27aca5a66e rm prints
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9533]
2011-12-06 11:24:33 -08:00
sharwell edc4224b56 v4: updated atn graphs
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9531]
2011-12-06 10:46:33 -08:00
parrt cab803d5f3 tweak comment
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9528]
2011-12-05 09:44:40 -08:00
parrt 265a189a86 crap. fixing regression. was adding way too many followlinks.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9527]
2011-12-04 19:01:55 -08:00
parrt 2ddb8100e9 shrunk serialized ATN a bit
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9526]
2011-12-04 18:39:20 -08:00
parrt b09077209c fixed hideous bug found by sam in getAmbigAlts
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9525]
2011-12-04 18:21:24 -08:00
parrt 110fafde5a change name
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9524]
2011-12-04 16:02:40 -08:00
parrt 80fd90d363 rm'd epsilon transition in ATN after rule refs.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9518]
2011-12-03 14:52:24 -08:00
parrt 2b8a821c21 turn off dbg print
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9517]
2011-12-03 14:16:47 -08:00
parrt f08e8fc098 predTransition was not passing along predicate properly. rm'd unneeded parameter. pass null if ctx independent pred. added 2 unit tests for non outer ctx check.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9516]
2011-12-03 14:12:06 -08:00
parrt cabe808c7f trivial change, gets small speed bump
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9514]
2011-12-02 12:22:35 -08:00
sharwell beec4ab721 v4: Back out changelist 9511 (change DFAState.configs to ATNConfig[])
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9513]
2011-12-02 10:04:34 -08:00
parrt ae74881de6 strip epsilons between alternative elements and also stripped the final epsilons before block ends. added an ATN visitor for general use. updated all of the unit tests so they pass new smaller ATNs. had to do some work in the serialization and deserialization to handle state numbers without state information. did not want to reorder state numbers during optimization.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9512]
2011-12-01 17:46:12 -08:00
sharwell 682e60b065 v4: DFAState.configs now ATNConfig[] instead of OrderedHashSet<ATNConfig>
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9511]
2011-12-01 17:04:25 -08:00
parrt 4d942c37c8 use RuleContext not ParserRuleContext during prediction
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9510]
2011-12-01 14:24:57 -08:00
parrt 4400ba169f refactored RuleContext to move all noncritical fields down into ParserRuleContext. Widespread but minor changes. Using the more specific ParserRuleContext where appropriate.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9509]
2011-12-01 14:01:00 -08:00
sharwell 38c69af805 v4: Back out changelist 9507 (PredictionContext optimization)
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9508]
2011-12-01 13:14:37 -08:00
sharwell 11b6fa13f9 v4: PredictionContext optimization
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9507]
2011-12-01 13:13:24 -08:00
parrt a8219d943e got java LR parser working :) allows e A B C e type LR alts now
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9506]
2011-11-30 18:57:45 -08:00
parrt b6b4583b92 let it build DFA again.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9505]
2011-11-30 18:31:20 -08:00
parrt ad9259fc4f bad attribute in error msg
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9504]
2011-11-30 18:00:43 -08:00
parrt 8d7a97fb68 fixing some pred bugs. fixed unit testSimple in pred eval. optimized sem ctx.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9503]
2011-11-30 17:44:49 -08:00
Udo Borkowski 1bc3997930 add "useCurvedEdges" feature
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9502]
2011-11-30 17:10:46 -08:00