Sam Harwell
7c0d5cd726
Fix use of v3 runtime generics
2012-02-22 15:44:17 -06:00
Terence Parr
995f8e0108
Merge pull request #24 from parrt/master
...
lots of stuff; check out commits
2012-02-22 12:47:15 -08:00
Terence Parr
8a34176d82
added listener unit tests. fixed bug that didn't create ctx getters properly for recursive rules. added Symbol extends Token to parse tree stuff. added visitTerminal to Visitor. recursive alts now track their original, unedited AltAST subtree so we can properly count rule refs etc... later. dup of RuleRefAST was making wrong node. don't gen dispatch methods if no listener.
2012-02-22 12:44:33 -08:00
Terence Parr
58ef729be5
renamed next to target. factored out to methods, commented code.
2012-02-21 12:47:34 -08:00
Terence Parr
0e23c7e2a3
Merge commit '611728a3806d6a8c9fe44a538d34b448784986c1'
2012-02-21 12:14:11 -08:00
Sam Harwell
05930b04ce
Use Class.asSubclass instead of unchecked cast
2012-02-21 07:50:02 -06:00
Sam Harwell
1970ac240e
Generalize several functions in TestPerformance
2012-02-20 20:59:06 -06:00
Sam Harwell
5fb389b6e4
Improve lexer performance during warm-up by tracking DFA states within exec (ATN) and using existing edges when available
2012-02-20 19:20:50 -06:00
Sam Harwell
611728a380
Update testPerformance to show information about DFA states in the lexer
2012-02-20 18:51:26 -06:00
Sam Harwell
f5edb7653a
Add missing @Override attributes in generated code, use hard tabs instead of spaces
2012-02-20 17:23:38 -06:00
Sam Harwell
ca0b1d399c
Move "metadata" methods to top of generated parser
2012-02-20 17:21:44 -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
d166e6d5d1
Emit grammar file name instead of generated class file name in generated implementation of getGrammarFileName(). Implement getGrammarFileName() in generated parser.
2012-02-20 17:14:19 -06:00
Sam Harwell
8773c34375
Fix unit tests
2012-02-20 15:58:21 -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
97660e21ae
add alt labels to all alts
2012-02-20 12:26:32 -08: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
7287f5a2d3
prefix left-recursive alts weren't recognized with actions on end.
2012-02-20 10:51:34 -08:00
Terence Parr
f53b9820ba
Merge pull request #23 from parrt/master
...
forgot to add dispatch methods in context objects. in-parse listeners should work now.
2012-02-19 11:26:02 -08:00
Terence Parr
642177f716
forgot to add dispatch methods in context objects. in-parse listeners should work now.
2012-02-19 11:25:15 -08:00
Terence Parr
9792b360b1
Merge pull request #22 from parrt/master
...
added -parse-listener option, interfaces; fixes antlr/antlr4#18
2012-02-18 16:54:56 -08:00
Terence Parr
65bd541242
add to changes file
2012-02-18 16:50:12 -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
71b75c88dd
Fix regression; did not gen enter/exit in alt label structs.
2012-02-18 15:16:42 -08:00
Terence Parr
9b49005f9b
Merge pull request #21 from parrt/master
...
Big update to include visitors, update listener names etc...
2012-02-18 14:57:51 -08:00
Terence Parr
c6fd897287
altered naming scheme for listeners/visitors
...
* names changed. visit() -> visitX(). enter/exit() -> enter/exitX()
* capitalizing automatically now. rule s -> SContext not sContext
* no enter/exit method in generic rule context object if rule has alt labels, nor in interfaces.
* dup labels allowed in same rule
* label X or x illegal if rule x exists
2012-02-18 12:40:47 -08:00
Terence Parr
b33f157743
Merge branch 'visitors'
2012-02-16 18:14:16 -08:00
Terence Parr
f0a852c3d7
Merge pull request #16 from parrt/master
...
Added automatically generated parse tree visitors
2012-02-16 18:05:39 -08:00
Terence Parr
725b105135
Added visitor gen mechanism, runtime support
2012-02-16 17:49:57 -08:00
Terence Parr
44c0c8ca5e
dont gen visitor unless -visitor option
2012-02-16 17:45:57 -08:00
Terence Parr
2b9511f333
Merge branch 'master' of github.com:parrt/antlr4 into visitors
2012-02-16 17:41:55 -08:00
Terence Parr
c098e5c729
rm file
2012-02-16 17:31:59 -08:00
Terence Parr
d00ec9d227
got -no prefix options working. rm'd dup error from toolError(); rm dbg print
2012-02-16 17:31:30 -08:00
Terence Parr
100b530201
report errors with too few alt labels or redef of alt label
2012-02-16 17:14:41 -08:00
Terence Parr
66e7e0fad2
Merge pull request #16 from sharwell/parrt_master
...
Fix listener name BlankJavaListener->JavaBaseListener
2012-02-16 16:12:52 -08:00
Sam Harwell
82aac56c98
Fix rule list labels
2012-02-16 17:35:01 -06:00
Sam Harwell
0520400493
TestPerformance: print additional information about states/configs
2012-02-16 15:41:43 -06:00
Terence Parr
646b22b9ec
snapshot
2012-02-16 13:36:07 -08:00
Terence Parr
4a374dab60
got visitors generated
2012-02-16 11:04:04 -08:00
Terence Parr
baf62685ab
snapshot
2012-02-16 10:27:56 -08:00
Terence Parr
8013bb868c
stash; got lost of visitor stuff working
2012-02-15 18:28:34 -08:00
Sam Harwell
feeaffc710
Fix listener name BlankJavaListener->JavaBaseListener
2012-02-15 19:06:27 -06:00
Sam Harwell
27806dc490
Merge remote-tracking branch 'parrt/master'
2012-02-15 14:58:16 -06:00
Terence Parr
f426e8781b
Merge pull request #14 from sharwell/parrt-master
...
Fixed excessive consume in execDFA and corrected the unit test that should have detected it
2012-02-15 12:40:11 -08: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
79f0de4cde
Fix unit test checking for incorrect input index in warning message
2012-02-15 13:51:28 -06:00
Terence Parr
b44b0a3c09
Merge pull request #13 from sharwell/parrt-master
...
Several fixes on the latest updates
2012-02-15 10:57:34 -08: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