Commit Graph

1933 Commits

Author SHA1 Message Date
Terence Parr be3a95e8a7 fix unit test. 2012-11-22 10:56:53 -08:00
Sam Harwell f3ca54d350 Separate the EqualityComparator interface from the Set and Map implementations that need it 2012-11-21 19:30:41 -06:00
Sam Harwell 038d3ad44f Make sure to check rules in modes while checking for undefined rules 2012-11-21 18:37:02 -06:00
Sam Harwell 094f40c961 Remove unused field 2012-11-21 17:13:20 -06:00
Terence Parr fc7977e0d9 rename method 2012-11-20 15:09:27 -08:00
Sam Harwell 0742b49c1b Fix USE_OF_BAD_WORD getting reported for elements that never appear in the generated code 2012-11-18 22:30:25 -06:00
Terence Parr 80f7c35a7c Merge branch 'fix-several-bugs' of git://github.com/sharwell/antlr4 2012-11-18 16:19:30 -08:00
Sam Harwell 7fe48dfebf Remove erroneous lexer command placement error message for rules with more than 1 command 2012-11-18 18:17:21 -06:00
Sam Harwell e610f26998 Fix support for the special token reference `EOF` 2012-11-18 18:13:49 -06:00
Sam Harwell d6e1ca2b61 Fix NPE when the grammar has no rules 2012-11-18 18:13:27 -06:00
Sam Harwell 16ace4b429 Fix token definitions: tokens in a tokens{...} block now have type TOKEN_REF (was ID before commit 38214f6312) 2012-11-18 18:03:06 -06:00
Sam Harwell 178df68183 Whitespace can appear between {...}? and => in v3 gated semantic predicates 2012-11-18 18:01:07 -06:00
Sam Harwell aace1ce399 V3 semantic predicate gate (=>) can only appear after a predicate {...}?, not an action {...} 2012-11-18 18:00:19 -06:00
Terence Parr ffbdf8a36c tweak to compile. strange 2012-11-18 15:04:42 -08:00
Terence Parr 133b00aef9 Revert "tweak to compile. strange"
This reverts commit 44cfedc5e6.
2012-11-18 15:01:59 -08:00
Terence Parr 44cfedc5e6 tweak to compile. strange 2012-11-18 14:59:56 -08:00
Terence Parr 3e91065824 Detect EOF in lexer rule 2012-11-18 14:24:18 -08:00
Terence Parr 060343f027 * added check for v3 backward incompatibilities:
** (...)=> syntactic predicates
2012-11-18 14:10:28 -08:00
Terence Parr c5bf2ba0bd * added check for v3 backward incompatibilities:
** {...}?=> gate semantic predicates
2012-11-18 13:59:43 -08:00
Terence Parr 405a447ada warn->err 2012-11-18 13:46:10 -08:00
Terence Parr 38214f6312 * added check for v3 backward incompatibilities:
** tokens {A;B;} syntax
** tokens {A='C';} syntax
2012-11-18 13:39:09 -08:00
Terence Parr 52d3e7ac71 err->warning 2012-11-18 13:04:43 -08:00
Terence Parr ae111eddbd * added check for v3 backward incompatibilities:
** labels in lexer rules
2012-11-18 13:03:37 -08:00
Terence Parr fafc804fdf Merge branch 'master' of github.com:parrt/antlr4 2012-11-18 12:54:24 -08:00
Terence Parr 397f28d12c added check for v3 backward incompatibility: tree grammars 2012-11-18 12:53:48 -08:00
Terence Parr d2054012f0 cleanup, rm dead etypes, add check for ids that cause code gen issues; added notion of one-off error 2012-11-18 12:53:21 -08:00
Sam Harwell aba4034051 Evaluate preds in SLL before falling back to full context, avoid full context prediction if unique alternative results 2012-11-18 14:16:28 -06:00
Sam Harwell 691532190c Extract method ParserATNSimulator.predicateDFAState 2012-11-18 14:15:16 -06:00
Terence Parr b214f36044 cleanup, rm dead etypes, add check for ids that cause code gen issues; added notion of one-off error 2012-11-18 11:00:06 -08:00
Terence Parr 3e5a976599 playground stuff 2012-11-18 09:57:05 -08:00
Terence Parr 468c791267 cleanup ErrorType a bit, split an error msg. 2012-11-18 09:56:41 -08:00
Terence Parr 0a8e7220f8 fixed: undefined rule refs caused exception 2012-11-18 09:33:11 -08:00
Terence Parr 1916ed0626 rm extra newline 2012-11-18 09:18:41 -08:00
Terence Parr fb63c9927e tweak comment 2012-11-18 09:12:30 -08:00
Terence Parr afe2224881 wasn't checking soon enough for rule redef; now it sets a dead flag in
AST so no more walking dup.
  error(51): T.g:7:0: rule s redefinition (ignoring); previous at line 3
2012-11-18 09:07:30 -08:00
Terence Parr 6a345316df if labels, don't allow set collapse for
a : A # X | B ;
2012-11-17 18:06:23 -08:00
Terence Parr 80b1fa7acb properly check for grammar/filename difference 2012-11-17 17:24:13 -08:00
Terence Parr 8631c143da add check for command placement in lexer rules 2012-11-17 17:03:29 -08:00
Terence Parr 9d34d4d3c9 forgot a case for actions in lexer rules. 2012-11-17 17:00:11 -08:00
Terence Parr e86f89724f added check: action in lexer rules must be last element of outermost alt 2012-11-17 16:50:38 -08:00
Terence Parr 5e519d0063 playground tweaks 2012-11-17 16:27:10 -08:00
Terence Parr b1a3370934 .tokens files goes in output dir like parser file. 2012-11-17 16:25:51 -08:00
Terence Parr e366f00820 small improvement in error msg 2012-11-17 16:09:12 -08:00
Terence Parr 78c75ee5e4 add comment showing snippet to fix unit test, allowing SLL to avoid LL with preds. 2012-11-17 13:44:33 -08:00
Terence Parr 40e95ea5e9 Merge branch 'lexer-block-ref' of git://github.com/sharwell/antlr4 2012-11-15 13:01:41 -08:00
Terence Parr a438c11734 Merge branch 'visitors' of git://github.com/sharwell/antlr4 2012-11-15 13:00:48 -08:00
Terence Parr ab5c9ede09 Merge branch 'set-interpreter' of git://github.com/sharwell/antlr4 2012-11-15 12:58:50 -08:00
Terence Parr a69ccb3c70 Merge branch 'token-stream-bugs' of git://github.com/sharwell/antlr4 2012-11-15 12:55:32 -08:00
Terence Parr b83a6bbeb0 Merge branch 'recognizer-local-state' of github.com:sharwell/antlr4 2012-11-14 17:07:42 -08:00
Terence Parr e1c8957192 rm two a.equals(a) bugs 2012-11-14 16:59:15 -08:00