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
sharwell
7a52d4e304
Back out changelist 9448
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9449]
2011-11-23 12:25:06 -08:00
sharwell
898138a5e2
v4: Reusable ATN simulator objects
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9448]
2011-11-23 06:42:31 -08:00
parrt
d0230aba5b
rm legacy options from grammar, rule, block
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9444]
2011-11-22 18:23:08 -08:00
sharwell
ec5593709e
v4: Specify generic types
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9443]
2011-11-22 16:48:32 -08:00
parrt
2b36a19739
rm Rule.scope field. not doing scope {...} anymore
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9442]
2011-11-22 16:48:20 -08:00
sharwell
83e5e3fe7f
v4: Mark @Override for generated action and sempred methods. Don't emit the DEFAULT_MODE constant in lexers because it's already defined in Lexer
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9440]
2011-11-22 16:46:27 -08:00
sharwell
1495ba5bd7
v4: use getInterpreter() instead of directly accessing the _interp field
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9437]
2011-11-22 16:33:19 -08:00
parrt
72684907bc
add -Xlog, add .ctx to rule refs. parse tree test pass.
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9436]
2011-11-22 16:30:50 -08:00
parrt
95f3afa562
rm ANTLRStringStream. combined with ANTLRInputStream. causes name change in lots of files. rm encoding ability.
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9435]
2011-11-22 15:50:19 -08:00
sharwell
ed12c072e9
v4: Update BaseTest with @Override annotations, remove obsolete rewind methods, and use List<T> instead of List
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9432]
2011-11-22 15:37:12 -08:00
sharwell
09ad4bcb0a
v4: Remove dependency on v3 tool (still depends on v3 runtime)
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9431]
2011-11-22 15:32:53 -08:00
parrt
cfecf4b109
add CANNOT_FIND_ATTRIBUTE_NAME_IN_DECL
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9429]
2011-11-22 15:26:41 -08:00
parrt
7d5c69842b
BufferedTokenStream gets generic type. CommonTokenStream extends BufferedTokenStream<CommonToken>, rename unbuff'd stream. add unbuff token stream
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9428]
2011-11-22 15:21:09 -08:00
parrt
0d691db980
added uniq error codes
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9426]
2011-11-22 14:29:06 -08:00
parrt
31c24292cd
unbuff char stream working
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9425]
2011-11-22 12:32:15 -08:00
parrt
f3b0ffb8b2
almost working
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9423]
2011-11-21 17:55:39 -08:00
parrt
dcedc63dec
added missing error msg
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9422]
2011-11-21 17:22:21 -08:00
parrt
0fe415e227
checking in but doesn't work yet; just so i can pull at work
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9421]
2011-11-20 16:07:45 -08:00
parrt
9f294794a8
tweak
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9414]
2011-11-20 14:33:48 -08:00
parrt
4b4a7d9c7a
add LogManager, add InputSymbolType()
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9413]
2011-11-20 14:27:58 -08:00
parrt
18e8a853e7
rm prints, add log mgr to runtime (in case we need it there for profiling/testing etc...)
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9412]
2011-11-19 18:53:37 -08:00
parrt
01a71c5b02
fixing a lot of little thingsTo make my examples work
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9410]
2011-11-19 17:27:19 -08:00
sharwell
beb4386fd0
v4: Fix BlankListenerFile (these files should be part of CL9408)
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9409]
2011-11-19 15:32:40 -08:00
sharwell
426d96c3b8
v4: Fix the BlankListenerFile template
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9408]
2011-11-19 15:04:26 -08:00
parrt
140f0fc098
visitTerminal had extra <> so it was <Token> arg type
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9407]
2011-11-19 13:50:22 -08:00
parrt
b61603e98a
A rename of TSymbol->Symbol and a few of T to Symbol. Also changed name of the default error handler
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9406]
2011-11-19 13:44:53 -08:00
parrt
20f86b8018
tweak
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9402]
2011-11-19 12:53:34 -08:00
sharwell
7774405ee3
v4: Can't use the @NotNull and @Nullable from com.sun.istack.internal. Adding our own until we settle on a final library.
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9394]
2011-11-18 22:48:08 -08:00
sharwell
9e89438556
v4: specify tokenVocab to fix unit test
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9391]
2011-11-18 11:34:49 -08:00
sharwell
5e1b372ca1
v4: fix generated attribute name for wildcards (_track__wild instead of _track_.)
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9390]
2011-11-18 11:33:45 -08:00
sharwell
ca141afc28
v4: @NotNull and @Nullable annotations for fields and methods
...
mark fields final
no behavior changes
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9389]
2011-11-18 11:29:58 -08:00
sharwell
909ea67d6b
v4: support disabling the inlined LL1 code generation
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9387]
2011-11-18 11:20:38 -08:00
sharwell
6060b6c288
v4: visitToken->visitTerminal
...
TokenNode->TerminalNode
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9384]
2011-11-17 20:09:24 -08:00
sharwell
c12167974b
v4: fix several unit tests
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9383]
2011-11-17 19:48:16 -08:00
sharwell
3e279fbd3e
v4: Update BaseTest harness for changes to the runtime
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9382]
2011-11-17 19:46:29 -08:00
sharwell
65f8b9f124
v4: Add TSymbol generic type parameter to Recognizer, BaseRecognizer, ParserATNSimulator, ParserRuleContext, ParseTreeListener, ANTLRErrorStrategy, ANTLRErrorListener, TreeParserRuleContext
...
Move ParserRuleContext.tree/getTree to the generated contexts, implement ASTContext<T> for strongly typed getTree() method
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9379]
2011-11-17 19:40:48 -08:00
sharwell
89b1d52c77
v4: add error for isolated rule refs
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9355]
2011-11-17 18:25:13 -08:00
sharwell
08d47088b4
v4: Fix NPE when creating Action elements within an extension
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9354]
2011-11-17 18:24:44 -08:00
sharwell
b27441346b
v4: Specify concrete value for TreeParser<T> base class
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9352]
2011-11-17 18:16:55 -08:00
sharwell
b1a060a61e
v4: refactor ASTLabelType() and TokenLabelType() to new templates that properly handle null values
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9351]
2011-11-17 18:15:27 -08:00
sharwell
0fb5baca1c
v4: specify default Parser and TreeParser superclass in the code generation template
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9350]
2011-11-17 18:12:28 -08:00
sharwell
7e6eb1fda4
v4: fix possible NPE
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9349]
2011-11-17 18:06:17 -08:00
sharwell
dd0d5e3ed5
v4: add support for custom interfaces and extension members StructDecl
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9348]
2011-11-17 18:05:41 -08:00
sharwell
32976eefdb
v4: check for invalid block and rule options
...
fix error for hetero AST usage outside of rewrite in alts with rewrites
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9347]
2011-11-17 17:00:23 -08:00
sharwell
062210b54a
v4: check for labels that alias a token name
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9346]
2011-11-17 17:00:08 -08:00
parrt
d597de1792
tweak
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9311]
2011-11-13 18:26:27 -08:00
parrt
27cbd249ac
Added lots of little stuff
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9310]
2011-11-13 18:04:35 -08:00
parrt
324884585b
add slider
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9306]
2011-11-13 11:35:11 -08:00
parrt
7050d07d5b
tweak
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9304]
2011-11-12 13:19:49 -08:00
parrt
e6d316f3e9
added {...} as option value. <fail={"value must be <= "+$max}>
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9303]
2011-11-12 12:47:11 -08:00
parrt
91ccd76e65
tweak
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9302]
2011-11-10 14:22:58 -08:00
parrt
3729529f25
msg->fail
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9301]
2011-11-10 14:09:28 -08:00
parrt
61e9eade6a
added {...}?<msg="foo"> option
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9300]
2011-11-10 14:08:16 -08:00
parrt
1cd3bacaf2
tweak
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9289]
2011-11-10 12:30:12 -08:00
parrt
b6d8ff9234
tweak
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9286]
2011-11-10 12:16:28 -08:00
sharwell
26d5d5c9c0
v4 tool:
...
* StringBuilder instead of StringBuffer
* Add Utils.setSize for List<?>
* Use Func1<T, TResult> "delegate" instead of reflection for Utils.apply (and rename apply to select to suggest a return value)
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9272]
2011-11-10 07:58:00 -08:00
sharwell
3a8ab7f859
v4 tool: Fix compile error (Ter's using a custom build of v3... this works with both) :)
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9271]
2011-11-10 07:53:22 -08:00
sharwell
f9c364db1f
v4 tool: A couple simple generics
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9270]
2011-11-10 07:52:30 -08:00
sharwell
783c3b2e50
v4:
...
* Use mark->seek->release instead of mark->release->seek
* mark() returns a marker. must pass the result of index() to seek(), and the result of mark() to release().
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9268]
2011-11-09 10:16:51 -08:00
parrt
64b4cbd2c8
added auto highlight to tree views
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9262]
2011-11-05 08:56:12 -08:00
parrt
3e03259ac0
tweak
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9260]
2011-11-03 12:50:13 -08:00
parrt
ffc4f9b126
added Cay Horstmann's printing code for postscript.
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9254]
2011-11-03 09:10:30 -08:00
parrt
5cf4cba9c7
fix bug in modes
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9231]
2011-10-31 16:27:34 -08:00
parrt
dd1ad971a9
more
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9229]
2011-10-30 13:49:35 -08:00
parrt
947a11a3e4
start lexical error unit tests
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9228]
2011-10-30 13:48:09 -08:00
parrt
2d43a22e27
reorg'd lexer
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9226]
2011-10-30 10:39:17 -08:00
parrt
95bc423669
more tests and made EOF always appear even if DONE : EOF ; in lexer
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9225]
2011-10-29 13:59:17 -08:00
parrt
bc5577307c
more tests
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9224]
2011-10-29 12:08:34 -08:00
parrt
6e2bbcdb42
got EOF in lexer
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9223]
2011-10-29 11:08:40 -08:00
parrt
6576abf65f
reorg'd lexer ATN sim to fix bug
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9221]
2011-10-27 19:33:45 -08:00
parrt
f44d03343a
push to grab at work...lexer might be hosed
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9220]
2011-10-27 11:29:20 -08:00
parrt
e2db920cce
msg.e -> msg.getCause()
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9218]
2011-10-27 10:12:41 -08:00
sharwell
980db2caac
v4: add ANTLRMessage.getCause(), overridden in GrammarSyntaxMessage instead of keeping 2 separate fields
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9210]
2011-10-27 08:55:01 -08:00
parrt
ad468ee29b
added tree node highlighting in treeviewer
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9206]
2011-10-25 15:53:46 -08:00
parrt
08bba26940
commented out DotGen
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9180]
2011-10-23 19:25:52 -08:00
parrt
565be04fd2
sam changes
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9179]
2011-10-23 19:23:51 -08:00
parrt
2cbd522320
clean up, added tree parser err handler
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9178]
2011-10-23 14:04:58 -08:00
parrt
11b61d979d
refactored sync/recoverInLine. figured out exactly what sync does at start of alt. setState goes to loopBack now in loops
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9177]
2011-10-23 11:07:07 -08:00
parrt
4920bb2c9e
_errHandler.sync(this);
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9176]
2011-10-22 13:25:28 -08:00
parrt
542a57b49a
reworked udo's tree viewer
...
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9149]
2011-10-21 10:58:00 -08:00