Commit Graph

248 Commits

Author SHA1 Message Date
Sam Harwell 3f1f76df7d Move reportAmbiguity, reportContextSensitivity, reportAttemptingFullContext, reportInsufficientPredicates from ANTLRErrorStrategy to ANTLRErrorListener.
Add BaseErrorListener to allow implementing ANTLRErrorListener without implementing every method (e.g. ConsoleErrorListener).
DiagnosticErrorStrategy is now DiagnosticErrorListener, updated tests.
2012-03-12 15:07:48 -05:00
Terence Parr ae08867ff3 alter visitTerminal interface, add visitErrorNode. 2012-02-26 22:07:45 -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 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 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 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 725b105135 Added visitor gen mechanism, runtime support 2012-02-16 17:49:57 -08:00
Terence Parr 3d56d40975 update playground 2012-02-14 16:33:34 -08: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 b8f50d46e7 update playground 2012-02-14 13:59:53 -08:00
Terence Parr 6c2beb530d see A.g4 for getter syntax; use e() not gete(). adding ContextGetterDecl.java 2012-02-13 20:47:19 -08:00
Terence Parr 2091f2d001 change enterRule to enter in listener interface 2012-02-13 17:35:29 -08:00
Terence Parr 8af1e23461 adding tests 2012-02-13 09:16:29 -08:00
Terence Parr 59e4a54faa alter tests for new parser atn name 2012-02-07 13:18:51 -08:00
Terence Parr 5eb9ec9582 fixed bug in [a-z] 2012-01-30 18:08:22 -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 043afd3767 shelve for pull at home; don't sync ;)
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9914]
2012-01-27 15:38:11 -08:00
parrt 15d537ce6e Added ranges, escapes to [a-z] notation in lexer
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9897]
2012-01-22 11:37:15 -08:00
parrt 884472358d -> popMode was broken
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9893]
2012-01-21 21:21:19 -08:00
parrt 9fd280b30e Lexer fields mv from x to _x
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9883]
2012-01-21 15:36:20 -08:00
parrt 9ae5049d44 play with tests
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9879]
2012-01-21 15:15:01 -08:00
parrt 1ddf609e25 labels on tokens in left-recursive rules caused codegen exception.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9866]
2012-01-14 10:18:19 -08:00
parrt 73793898a9 update grammars
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9856]
2012-01-11 11:21:05 -08:00
parrt e7f6ba5ac1 lr rules now gen only 1 rule e->e not e->e_ etc... altered tests to build parse trees.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9823]
2012-01-04 17:36:24 -08:00
parrt 1d6bbb08c3 kill
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9793]
2012-01-03 12:30:21 -08:00
parrt 1b04195a2f removed all template / AST rewrite stuff; massive change; added -encoding tool option
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9780]
2012-01-02 18:13:16 -08:00
parrt ddb68aa948 new example
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9778]
2012-01-02 14:07:11 -08:00
parrt a923ad8765 Major update to v4. I backed out a change I made on Christmas then mistakenly prevented any lexer DFA creation. Per http://www.antlr.org/wiki/display/~admin/2011/12/29/Flaw+in+ANTLR+v3+LL%28*%29+analysis+algorithm I fixed a major flaw in ANTLR's notion of context. To do that, I needed to create a new LoopEndState, with all of its fanout to the serialization and parser ATN construction. got a very good start on ParserATNPathFinder, which uses basic recursion to find all possible paths and return a tree with the possibilities. I left it in the condition where he would sometimes loop forever; it needs to track sets of configurations in the busy set; it using states at the moment. added a new signal from the interpreter: reportAttemptingFullContext. I fixed a bug where configuration sets derived from a configuration that had reachesIntoOuterContext>0 were not being considered as dipping into the outer context. The ambiguity checker needed to switch so that a check for exact matches not suffixes when doing full context. It's faster at the very least for full context. added some more support routines to DFA. Added TraceTree in support of the new ParserATNPathFinder.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9764]
2011-12-29 17:04:40 -08:00
parrt 3a3ed27e60 add some tests
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9763]
2011-12-28 19:49:37 -08:00
parrt 52396d8f5f removed method call
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9762]
2011-12-27 16:31:09 -08:00
parrt 24c572d055 oops. antlr was ok, it was javalr grammar.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9754]
2011-12-26 17:14:29 -08:00
parrt 299c29d927 more lexer rule specialization in parser. got antlr almost back to working with new [Aa] notation in lexer.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9753]
2011-12-26 17:09:01 -08:00
parrt d9efffd104 Add [abc] syntax to allow set of char in lexer; args aren't allowed so unambig.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9750]
2011-12-26 15:58:40 -08:00
parrt 6fa5e52d5e added => skip, channel(99), more, mode(xx), push(xx), pop lexer syntax. separated lexer rules from others in parser / AST now.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9749]
2011-12-26 15:14:49 -08:00
parrt 6daa66f83f no more resolved bit in config. use ATNConfigSet all over. final clean up of ATN sim.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9741]
2011-12-25 12:01:24 -08:00
parrt bb48deb354 tweak to dotgenerator, make parserinterp using new atn sim
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9645]
2011-12-16 18:15:56 -08:00
parrt 6b673a3b2e track stats properly
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9643]
2011-12-16 16:00:11 -08:00
parrt ebd1fbb63d within 2 or 3 unit test of where I was before I got it the ATN simulator
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9642]
2011-12-16 15:07:28 -08:00
parrt 3d133e9417 broke out fullctx tests, some fixes.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9636]
2011-12-16 09:43:29 -08:00
parrt 5ad1505fdb almost got new ATN engine working; separated .* nongreedy tests, reorg args on reporting methods
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9627]
2011-12-15 11:03:41 -08:00
parrt 92279bd6db almost got prediction working
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9600]
2011-12-13 18:10:04 -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 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 cab803d5f3 tweak comment
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9528]
2011-12-05 09:44: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 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 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
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 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
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 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 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 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 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
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
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 1cd3bacaf2 tweak
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9289]
2011-11-10 12:30:12 -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 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 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 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 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 542a57b49a reworked udo's tree viewer
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9149]
2011-10-21 10:58:00 -08:00
parrt 6c104b7724 pull apart treeviewer; rename ANTLRParserListener
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9148]
2011-10-20 19:12:32 -08:00
parrt 3bbcfa5d25 change name of method
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9144]
2011-10-11 16:16:29 -08:00
parrt 547d58514d bug fixes in error handling part deux
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9112]
2011-10-06 13:28:36 -08:00
parrt 251a42ddbb bug fixes in error handling
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9111]
2011-10-06 10:40:07 -08:00
parrt 6179d7586b tweak tests
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9108]
2011-10-04 13:26:18 -08:00
parrt 6b4e9905fb rename member, tweak output. new chk for inf loop from error sync works
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9088]
2011-09-30 20:40:14 -08:00
parrt 60c9fe76c0 almost got new error mech in
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9087]
2011-09-30 20:22:09 -08:00
parrt e8a2a738cf rename TreeNodeStream
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9075]
2011-09-24 09:33:04 -08:00
parrt 9c5f636bea labels work with tree parsers now.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9072]
2011-09-22 17:32:25 -08:00
parrt b63b271815 got basic tree parser working.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9071]
2011-09-22 17:16:22 -08:00
parrt a8195e5d7c playing
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9067]
2011-09-11 16:20:42 -08:00
parrt a1c682434d removes the individual stacks to track rule invocations. $a::x now looks up the context stack for rule index RULE_a. they're not done very often and so it's better to say all of the overhead pushing and popping the contexts.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9066]
2011-09-11 16:12:01 -08:00
parrt bf19465437 Got a rule labels added to the tree and also altered code generation so that it pays attention to the labels. fairly major surgery but it's a nice refactoring.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9062]
2011-09-09 17:08:13 -08:00
parrt 62937ca639 rename visit->walk
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9060]
2011-09-08 16:52:30 -08:00
parrt 2d234ee28c Got the visitor thing cleaned up enough for a small example
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9059]
2011-09-08 13:45:05 -08:00
parrt da7e7c8813 clean up tree output, rename _ctx to context
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9058]
2011-09-08 12:12:51 -08:00
parrt 730794128e parse tree visiting; now, we ALWAYS generate a return struct definition: rule_ctx.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9049]
2011-09-05 17:08:26 -08:00
parrt 5c6f35abef did some reorganization
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9038]
2011-09-03 11:52:23 -08:00
parrt 085dd05bf1 got parser nongreedy loops going
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9032]
2011-08-12 19:51:12 -08:00
parrt f44c49a8b8 got lexer nongreedy loops going
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9018]
2011-08-07 11:19:34 -08:00
parrt a9782118ac add
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8985]
2011-08-04 08:56:08 -08:00
parrt d926ec9661 WOOT! all left-recursive tests pass
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8972]
2011-07-31 18:14:47 -08:00
parrt 328444244f backing out changes; tried 2 stacks; too complicated
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8969]
2011-07-31 10:38:48 -08:00
parrt e32bae3276 rebuilt ATN structure for ()* and ()+; two decisions each now unless single alt.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8966]
2011-07-30 17:20:57 -08:00
parrt 2ebedba421 debugging
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8933]
2011-07-29 15:45:31 -08:00
parrt b90b073450 getting more unit tests in
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8924]
2011-07-29 14:05:19 -08:00
parrt 4b5cd3a9ba We're forced to exec args, even if dependent on _localctx. If no actual context to use, create dummy context to use for arg eval only.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8922]
2011-07-29 11:45:27 -08:00
parrt dcfb804ed3 added method to get context for non-arg rules
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8921]
2011-07-28 19:36:56 -08:00
parrt cce6c70b2e fixed context in sempred. don't exec forced actions either if in outer context and dependent.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8920]
2011-07-28 15:15:41 -08:00
parrt 3d15daccad got predicate issue resolved. executes preds if not dependent on context and no dipping into outer context
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8919]
2011-07-28 12:43:28 -08:00
parrt 9328c164af set type
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8913]
2011-07-27 16:45:02 -08:00
parrt 2136287966 tweak
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8911]
2011-07-27 15:55:30 -08:00
parrt 078e2ab47c java.g working again.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8910]
2011-07-26 10:56:24 -08:00
parrt c6fa2fce6e decided to clean up a bit, backtracking from updating current to have inner/outer context. will try with full ctx again.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8908]
2011-07-25 16:49:33 -08:00
parrt a29feac1bf a bit of clean up
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8906]
2011-07-24 16:18:21 -08:00
parrt 66da1f723a got unit tests working again for interp; got args funcs in output
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8902]
2011-07-24 11:48:43 -08:00
parrt 3b52eb4e6a snapshot
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8899]
2011-07-22 17:19:26 -08:00
parrt 7a109d29d5 added a LexerInterpreter and copied in unit tests
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8867]
2011-07-16 12:57:25 -08:00
parrt 65396e6d7c don't reduce SETs if elements ref'd in -> rewrite
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8864]
2011-07-16 11:49:14 -08:00
parrt 43f4ef59f7 track tokens in SETs
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8863]
2011-07-15 16:10:47 -08:00
parrt f81d629780 new visitor does away with CollectSymbols.g
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8862]
2011-07-15 15:51:25 -08:00
parrt b9ef4f9bee woot! new visitor does away with BasicSemanticTriggers.g and Refs.g
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8861]
2011-07-14 19:25:08 -08:00
parrt f36b1ad875 started refactoring to collapse tree walker grammars into visitors
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8856]
2011-07-14 11:33:25 -08:00
parrt 42f6b7cf86 after much bullshit, got sets working for ast stuff.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8855]
2011-07-13 17:29:20 -08:00
parrt 39fe27dd1f fixed outer most vs inner alt issue
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8853]
2011-07-12 10:21:34 -08:00
parrt 59178d9959 got most of AST op unit tests working
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8852]
2011-07-11 18:35:52 -08:00
parrt dbceac768d all rewrites working minus error checking ones
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8851]
2011-07-10 17:56:11 -08:00
parrt 1dc598c26e got lots more rewrite ast done including predicates
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8850]
2011-07-10 17:07:07 -08:00
parrt a20912ba73 got rid of ...IsRoot templates and model elements!
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8848]
2011-07-09 16:27:01 -08:00
parrt 557e3a8389 got 61/81 rewrite ast tests working
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8846]
2011-07-08 17:50:25 -08:00
parrt 671a7f9038 got lots of ast rewrites working; off to do labels
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8845]
2011-07-07 12:52:05 -08:00
parrt aad0a37525 got some rewrite AST tests to work; got ID[...]
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8841]
2011-07-06 16:35:20 -08:00
parrt f8abf5d40b A B+ -> ^(A B)* works! fixed ant build
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8838]
2011-07-06 13:42:35 -08:00
parrt df80cb7622 good start on * and ? in rewrites
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8826]
2011-07-04 17:47:44 -08:00
parrt fbc92258f6 got nested trees working:
a : A b C -> ^(A ^(b C))
| B
;

[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8825]
2011-07-03 14:40:04 -08:00
parrt d33b3a4a62 got A b C -> ^(A b C) working :)
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8824]
2011-07-03 12:18:47 -08:00
parrt 07161bffe7 major reorg to get rewrites in there
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8821]
2011-07-02 16:04:56 -08:00
parrt ab8d07d82f got started on rewrite stuff
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8817]
2011-07-01 14:01:53 -08:00
parrt b9daa3763c using old ast op code from v3. works fine.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8812]
2011-06-30 12:11:32 -08:00
parrt 9da8639ba8 got AST construction ops working it seems.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8797]
2011-06-29 10:42:23 -08:00
parrt 68cef48483 cleaned up; mv'd stuff to parser. reorg to have lexer in controller
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8794]
2011-06-28 17:51:39 -08:00
parrt 2d5c4fd686 got core ^ and ! ops in
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8791]
2011-06-28 16:15:31 -08:00
parrt 15fbaccb6d reorg to get walking of rules out of default factory into controller
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8790]
2011-06-28 15:18:39 -08:00
parrt 9bc02bfd33 no tool depends now in ATN, moved some maps to arrays :)
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8779]
2011-06-27 18:46:21 -08:00
parrt 4d04b21999 removed Rule depend from ATN
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8778]
2011-06-27 17:53:11 -08:00
parrt ad98d17191 snapshot; removed some dependencies to tool in runtime; made sure java grammar / parser still works
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8777]
2011-06-27 17:38:15 -08:00
parrt 55ce044acf reorg to get extensions
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8767]
2011-06-27 11:33:40 -08:00
parrt 46f68c8d63 moved decls into package. messed around with AddLeaf. must distinguish between implicit and regular labels. implicit are locals, manual labels go into ctx.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8765]
2011-06-26 13:20:02 -08:00
parrt 046b469f8e got all locals into return struct. all vars are visible to invoked rules via $rule::attr now.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8757]
2011-06-23 17:29:51 -08:00
parrt d8edb713ed initial wack at args/return value object
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8743]
2011-06-22 18:04:29 -08:00
parrt 5f95cde48d cleaned up action splitting
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8737]
2011-06-22 16:40:42 -08:00
parrt a3b985fadf added @ModelElement annotation. model walker now descends into these in order to fill template args.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8665]
2011-06-18 12:55:39 -08:00
parrt 1a17eb3be1 get to compile
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8662]
2011-06-18 10:35:31 -08:00
parrt bb02ed151e adding new files
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8661]
2011-06-17 16:44:51 -08:00
parrt f6e54b3327 add more
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 8637]
2011-06-14 16:29:02 -08:00