Commit Graph

507 Commits

Author SHA1 Message Date
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 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
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
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 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 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
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 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 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
sharwell 417af93ca1 v4: code cleanup in BaseTest
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9500]
2011-11-30 09:56:32 -08:00
sharwell 918544f2b2 v4: Code cleanup in BaseTest
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9499]
2011-11-30 09:51:48 -08:00
sharwell 1ba52d6f54 v4: Add configurable performance unit test
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9498]
2011-11-30 09:37:12 -08:00
sharwell 49ea01136c v4: Compile the generated listeners in BaseTest. Allow tests to specify extra options to the tool.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9497]
2011-11-30 09:34:32 -08:00
parrt 0bf1aca47f cleaned up a bit so that TestToolSyntaxErrors works. added some cast checks and some bailout upon error before semantic processing
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9483]
2011-11-29 15:59:23 -08:00
parrt e00fa44996 Got validating and disambiguating predicates the way I want; widespread changes. DFAStates now have a list of predicate/alt pairs that they can test at except states. renamed Java.g4 to JavaLR.g4. LL(1) analysis did not fail when it's all predicates, which it must.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9482]
2011-11-29 15:46:51 -08:00
parrt 9a1a8428b5 got ambig pred thing working i think; unit tests. missing validating pred thing.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9480]
2011-11-28 19:16:45 -08:00
parrt e288ff3039 interim pred overhaul
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9479]
2011-11-28 09:37:29 -08:00
parrt 3b7e984d5f mv join to runtime Utils
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9477]
2011-11-27 14:28:59 -08:00
parrt d9a499f8f7 got left-recur java grammar working w/o generics
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9474]
2011-11-26 14:23:57 -08:00
parrt 00365ac511 add test
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9472]
2011-11-26 13:24:10 -08:00
parrt 21e9f67927 rm print
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9471]
2011-11-26 13:07:08 -08:00
parrt c2145a4120 didn't store parser::members in combined grammar
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9470]
2011-11-26 13:04:15 -08:00
parrt bb73ad341b tweak
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9469]
2011-11-26 12:48:57 -08:00
parrt 36a7597bcf adding left-recursive parser
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9467]
2011-11-26 11:05:02 -08:00
parrt b83da61f52 Left EPSILON in expected set; rm'd
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9466]
2011-11-26 11:02:45 -08:00
parrt a81ab4cc64 rm more invalid options
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9464]
2011-11-26 10:46:54 -08:00
parrt 2c52166dd0 removing sync() in front of (...) and (...)?
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9460]
2011-11-25 16:24:40 -08:00
parrt d2b24da47f remove incidentTransition from ATNState, add computation for next tokens within rule, add nextTokenWithinRule to ATNState, add EPSILON as -2 token type
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9459]
2011-11-25 16:09:00 -08:00
parrt c69814515b add unit tests for remove()
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9457]
2011-11-25 14:26:54 -08:00
parrt 06b27b8244 added stub for ID*[','] if we want that syntax
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9455]
2011-11-25 12:13:29 -08:00
parrt 3b543098aa refactor grammar transform pipeline
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9454]
2011-11-25 11:55:13 -08:00
parrt 5dfc4aed1d add on-the-fly listeners; augment enter/exit rule, consume(). playground/U.g and MyUListener.java are test. added human-readable toInfoString to ParserRuleContext such as
RuleParserRuleContext[s, a]{altNum=0, start=[@0,0:0='a',<6>,1:0], stop=null, st=null}

[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9453]
2011-11-25 10:38:36 -08:00