Commit Graph

460 Commits

Author SHA1 Message Date
Sam Harwell 611728a380 Update testPerformance to show information about DFA states in the lexer 2012-02-20 18:51:26 -06:00
Sam Harwell a81b1a17eb Extract abstract method in Recognizer for Parser.getGrammarFileName() and generated lexer's getGrammarFileName(). Make Recognizer.getTokenNames(), getRuleNames(), and getATN() abstract - implementations are always generated. 2012-02-20 17:18:57 -06:00
Sam Harwell 2982f4b5a6 Add comments describing the semantics of an ATNConfig set with partially predicated alts in ParserATNSimulator 2012-02-20 15:43:02 -06:00
Sam Harwell 16fa8ba4f4 Add comments describing the context depth latch in ParserATNSimulator.closure 2012-02-20 15:25:58 -06:00
Terence Parr e9122cafa3 Merge commit '46d5458' 2012-02-20 12:22:37 -08:00
Terence Parr 1a2094b2dd merging Sam\'s fix to full ctx pred etc...; effectively did pull parrt/antlr4#15, includes fixes antlr/antlr4#14, includes fixes antlr/antlr4#15 2012-02-20 11:48:03 -08:00
Terence Parr 4e8931519c added -parse-listener option and generated code if option on. parse listener differs from tree listener 2012-02-18 16:49:05 -08:00
Terence Parr 725b105135 Added visitor gen mechanism, runtime support 2012-02-16 17:49:57 -08:00
Sam Harwell 27806dc490 Merge remote-tracking branch 'parrt/master' 2012-02-15 14:58:16 -06:00
Sam Harwell 28919bbdc5 Fix ParserATNSimulator.execDFA consuming an unnecessary symbol after an accept or context-sensitive state is reached 2012-02-15 14:02:50 -06:00
Sam Harwell 685cf7b7d5 Further improvements to auto-label generic usage, return Collections.emptyList() instead of null when no children are found 2012-02-15 12:31:43 -06:00
Sam Harwell 0bbb7101ba Include input character in LexerNoViableAltException.toString() 2012-02-15 12:02:44 -06:00
Sam Harwell bc87562aff Remove unused exception LexerRecognitionExeption [sic] 2012-02-15 11:01:01 -06:00
Sam Harwell 5ab082967f Fix generic usage 2012-02-15 10:50:37 -06:00
Terence Parr fa3a664696 got some good examples working that play around with the getter methods. 2012-02-14 16:33:12 -08:00
Terence Parr cdb420fdde got implementation of getters in! Fixes #8 2012-02-14 15:01:03 -08:00
Sam Harwell 9600a70724 Fix NPE in CommonToken when TokenSource is not available 2012-02-13 08:41:57 -06:00
Terence Parr 6e4cba131a Allow var args in ctor of IntervalSet 2012-02-11 15:30:54 -08:00
Terence Parr f278d3b453 add unit test for left-recur grammars 2012-02-11 11:35:27 -08:00
Sam Harwell cd3adb140d Fix ParserATNSimulator.execDFA adding incorrect error edges in the DFA 2012-02-10 00:52:24 -06:00
Sam Harwell 30c58bf8eb Specify <?> type parameter on raw types 2012-02-10 00:51:23 -06:00
Sam Harwell 99ce3cba5c Fix ParserATNSimulator.closure not tracking proper context for context-sensitive predicates during full-context parsing 2012-02-09 19:47:56 -06:00
Sam Harwell 467797785f Fix generics in ParserATNSimulator 2012-02-09 15:37:56 -06:00
Sam Harwell ddf946b067 Token.EOF instead of -1, add <?> to generic type usage, make getUniqueAlt an instance method (need to override it for some apps), @NotNull annotations 2012-02-09 15:33:03 -06:00
Sam Harwell 7fb73a3849 Construct DFA instances with the decision number 2012-02-09 13:29:14 -06:00
Sam Harwell bf5df30708 Remove unnecessary initializations, use isEmpty() instead of size()==0 2012-02-09 12:45:46 -06:00
sharwell 46d5458617 Fix handling of alts with some configs predicated and some configs unpredicated (should be treated as always true) 2012-02-09 01:11:09 -06:00
sharwell 9c554a002b Add LexerATNSimulator.copyState (allows copying state information from another simulator instance) 2012-02-09 00:15:30 -06:00
sharwell 40a8759276 Add LexerATNSimulator.getTraceStream 2012-02-09 00:14:37 -06:00
sharwell 3b4ae2a742 Use trivial implementation of mark/release for BufferedTokenStream 2012-02-08 18:58:57 -06:00
sharwell f43f9f2218 Override CommonTokenStream.reset() to make sure the stream is left on an on-channel token 2012-02-08 18:58:19 -06:00
sharwell a34fd6330b Use isEmpty() instead of size()==0 2012-02-08 18:57:32 -06:00
sharwell a9e44f3aab Use isEmpty() instead of size()==0, use StringBuilder instead of StringBuffer, use chained append() calls instead of string concatenation, add @Override annotations 2012-02-08 18:57:05 -06:00
sharwell d181b230dc Specify generic type parameter 2012-02-08 18:55:57 -06:00
sharwell 64203312ac Improved SemanticContext.hashCode(), add @Override annotations 2012-02-08 18:54:40 -06:00
sharwell 773e9e1c7e Add generic type argument 2012-02-08 18:12:01 -06:00
sharwell dcdfac4bcd Improved implementation of equals() and hashCode() for ATNConfig 2012-02-08 18:09:32 -06:00
sharwell 64210f4b72 Add @NotNull annotations, make ATNConfig.semanticContext field final 2012-02-08 17:21:09 -06:00
sharwell 71e0c66477 Rename NUM_EDGES to MAX_DFA_EDGE, reduce max value to 127 2012-02-08 17:15:34 -06:00
sharwell 2249135c21 Specify generic type parameters 2012-02-08 17:12:22 -06:00
sharwell 1df70924f5 Use ATNConfigSet instead of OrderedHashSet<ATNConfig> 2012-02-08 17:06:41 -06:00
sharwell 52256044a9 Use for each instead of indexed for; use isEmpty() instead of size()==0 2012-02-08 17:06:03 -06:00
sharwell 326cb259a0 Construct Parser with TokenStream (restriction from IntStream) 2012-02-08 16:34:04 -06:00
sharwell 18a6414fb3 Use ATNConfigSet for parameter instead of OrderedHashSet<ATNConfig> 2012-02-08 16:26:14 -06:00
sharwell a6524d8b38 Add pom.xml to support maven builds 2012-02-08 15:07:06 -06:00
Terence Parr 894a77168d rename atn sim, add error message to TestRig 2012-02-05 10:14:04 -08:00
Terence Parr 1cc7ac3410 added -trace to TestRig. fixed code gen issue for trace listener 2012-01-30 16:51:55 -08:00
parrt e90b322dd4 ~[] stuff is allowed and works inside sets etc...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9926]
2012-01-28 14:36:46 -08:00
parrt 09da63cfd4 rollback and do a real fix for whitespace escaping
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9911]
2012-01-27 12:00:30 -08:00
parrt 7498908d62 rollback and do a real fix for whitespace escaping
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9906]
2012-01-26 14:18:57 -08:00