Commit Graph

1014 Commits

Author SHA1 Message Date
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
sharwell 66d82fab9b Merge remote-tracking branch 'parrt/master' 2012-02-08 12:34:17 -06:00
Terence Parr 5c79fc600a ["\\] didn't work in lexer 2012-02-07 13:19:12 -08:00
Terence Parr 59e4a54faa alter tests for new parser atn name 2012-02-07 13:18:51 -08:00
Terence Parr a5a403514d oops; forgot to update the templates when I renamed the ATN simulator 2012-02-06 09:46:59 -08:00
Terence Parr 93408d8901 Merge pull request #5 from parrt/master
rename atn sim, add error message to TestRig
2012-02-05 10:15:12 -08:00
Terence Parr 894a77168d rename atn sim, add error message to TestRig 2012-02-05 10:14:04 -08:00
Terence Parr c09c8b88d7 Merge pull request #4 from parrt/master
ugh. fix "[a-z]" for real now
2012-02-02 10:42:10 -08:00
Terence Parr c47c07299a ugh. fix "[a-z]" for real now 2012-02-02 10:41:27 -08:00
Terence Parr 6fe8ac1ac6 Merge pull request #3 from parrt/master
pulling in fixes
2012-02-01 16:32:15 -08:00
Terence Parr 5cec4721ab Merge branch 'dev' 2012-02-01 16:02:21 -08:00
Terence Parr c94037def5 fixed regression "a returns [int i] : A ;" didn't work. 2012-02-01 15:55:49 -08:00
Terence Parr dfc3acb39a add README 2012-01-31 19:28:15 -08:00
Terence Parr 5eb9ec9582 fixed bug in [a-z] 2012-01-30 18:08:22 -08:00
Terence Parr c723bd9305 Merge commit '0a5803fab4296d489beec559e2c33118320bccca' into dev 2012-01-30 17:36:23 -08:00
Terence Parr 0a5803fab4 useless tweaks 2012-01-30 17:09:29 -08:00
Terence Parr 3cefd3832f tweak readme 2012-01-30 17:03:48 -08:00
Terence Parr 433a30c584 Merge pull request #2 from parrt/dev
added -trace to TestRig. fixed code gen issue for trace listener
2012-01-30 17:00:20 -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 368b70d53c get 'x' not x in tokenNames
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9925]
2012-01-28 11:28:42 -08:00
parrt f4ecc75df5 allows " in [] char set now.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9923]
2012-01-28 10:46:08 -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 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
parrt adcf72b9a2 whitespace was being escaped to special characters even when printing to string should only do so when doing GUI tree
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9904]
2012-01-26 14:11:30 -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 89ad588023 fix regression
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9896]
2012-01-22 09:55:13 -08:00
parrt 9ffe9d2ee3 must have forgotten to commit
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9894]
2012-01-21 21:21:35 -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 449c845dc0 more cleanup
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9882]
2012-01-21 15:29:33 -08:00
parrt fd0d280e6a cleanup
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9881]
2012-01-21 15:23:39 -08:00
parrt 4632d7f493 rule name change
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9880]
2012-01-21 15:16:00 -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 6013c4c97d Added modeNames to gen'd lexers
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9878]
2012-01-21 15:10:46 -08:00
parrt dc82edad02 Summary: we can have lexer commands like -> skip now.
moved model.actions package to chunk
type(foo) didn't match.
ATNBuilder.g now tracks the outer alternative number and calls new factory commands on the lexer commands.
Removed unnecessary resolveWithPredicate field from ATNConfig
Added lexerActionIndex field to ATNConfig since we need to track whether we passed an action in an alternative will rule in the lexer.
Renamed ruleIndex in DFAState and added the lexer action index so that we can execute lexer actions from the DFA.
added functions to the grammar tree visitor for the lexer commands.
Added templates for the lexer commands.
Augmented the lexer ATN factory so that it constructs plain old actions from the lexer commands it finds. That way, the code generator doesn't know any different and generates an action.
Augmented the lexer ATN simulator so that it fires a proper action index now. previously it only used the rule index, which of course doesn't work when you have more than one action in a rule.
rm'd dup code from OutputModelController
altered the epsilon edge removal optimization so that it could not remove actions in lexer rules.
Added list of valid lexer commands in Rule.

[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9877]
2012-01-21 15:01:05 -08:00
parrt d321bb7854 fixed comment
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9876]
2012-01-21 14:49:20 -08:00
parrt 06e771f33a rm dead str
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9875]
2012-01-21 14:35:41 -08:00
parrt b90d41b508 wasn't walking lexer rule trees right.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9874]
2012-01-20 15:12:51 -08:00
parrt ec5e3e51b1 rm ForcedAction
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9873]
2012-01-20 15:12:32 -08:00