Commit Graph

239 Commits

Author SHA1 Message Date
Terence Parr ffbdf8a36c tweak to compile. strange 2012-11-18 15:04:42 -08:00
Terence Parr 3e5a976599 playground stuff 2012-11-18 09:57:05 -08:00
Terence Parr 0a8e7220f8 fixed: undefined rule refs caused exception 2012-11-18 09:33:11 -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 64a5be0675 nongreedy decisions can't be LL(1) 2012-11-04 12:06:36 -08:00
Terence Parr 8c4edb8fba clean playground 2012-11-03 08:53:26 -07:00
Terence Parr 675776267f foo 2012-11-03 08:47:32 -07:00
Terence Parr fca4710004 alter tests 2012-10-31 12:46:11 -07:00
Terence Parr 75a01636d0 got ambiguity reporting set right I think. fixed unit tests to force exact ambig detection. 2012-10-14 18:42:43 -07:00
Terence Parr 01bbce6952 full LL is always correct now, if slower. Stops prediction when resolvesToJustOneViableAlt(). SLL always uses heuristic 2012-10-14 13:25:34 -07:00
Terence Parr a9ccda48ab Merge branch 'new-conflicting-alts' of github.com:parrt/antlr4 into new-conflicting-alts 2012-10-13 10:48:43 -07:00
Terence Parr e69734c501 rm loopsSimulateTailRecursion 2012-10-12 17:49:43 -07:00
Terence Parr 3894d0b664 add 2012-10-12 10:17:00 -07:00
Terence Parr 2ecfe2671a size!=cardinality with BitSet. 2012-10-11 20:20:02 -07:00
Terence Parr badb48a987 almost there. 2012-10-11 18:47:47 -07:00
Terence Parr 2db3691f6d added -depend cmd-line option; fixes #71 2012-09-30 18:27:36 -07:00
Terence Parr 68dd847c04 * Fixed the unbuffered streams, which actually buffered everything
up by mistake. tweaked a few comments.

* Added a getter to IntStream for the token factory
2012-09-30 16:45:30 -07:00
Terence Parr ac29e6cdac got unbufferedchar working I think. 2012-09-30 12:37:35 -07:00
Terence Parr 3575e9c3c7 fix playground 2012-09-29 17:02:33 -07:00
Terence Parr b56cd0f587 simplified delete configs algorithm. 2012-09-29 12:48:20 -07:00
Terence Parr e78ecd418a rm isGreedy from DecisionState, but allow ATN construction for lexer to be nongreedy. error if '.' in parser. rm unit tests for parser nongreedy 2012-09-29 12:33:00 -07:00
Terence Parr ea652962ea allow "tokens {}" 2012-09-28 16:39:36 -07:00
Terence Parr 4d8158c6f3 mixed this up in branch, but fixing $attr refs in a grammar. 2012-09-27 11:45:59 -07:00
Terence Parr 19782e6d77 first wack at fixing nongreedy (ACTION | .)* for recursive rules. 2012-09-27 11:44:51 -07:00
Terence Parr 332c9f4452 push 2012-09-25 16:39:08 -07:00
parrt faff63366c tweak 2012-09-25 16:33:50 -07:00
Terence Parr 4bde79a666 playing with tests. 2012-09-24 08:54:32 -07:00
Terence Parr f43cd15dd9 rm'd $foo references from lexer actions and added a good error message. 2012-09-23 18:20:04 -07:00
Terence Parr 262a331a5b recursive rule bug in lexer; the lexer ATN simulator was not checking for empty stack at rule stop states. 2012-09-23 18:04:46 -07:00
Terence Parr 913bb717bd added -package option. 2012-09-22 17:36:14 -07:00
Terence Parr 91bad33f57 comment out attributes for lexical rule references. 2012-09-22 15:01:54 -07:00
Terence Parr 01b5510be1 Exceptions now work on rules. If you specify at least one catch, then it overrides all catches that ANTLR generates. Otherwise, there would be no way to override the generic recognition exception clause. 2012-09-22 11:58:41 -07:00
Terence Parr 3638073efe *.g cmdline works now to topologically sort by tokenVocab dependencies. 2012-09-08 12:26:32 -07:00
Terence Parr b3b02a5449 rm T='literal' in tokens { }. Also it's comma-separated not ';' terminated now. tokens { A,B } 2012-09-06 14:50:44 -07:00
Terence Parr 26bf5acf19 made "a4 -message-format antlr T.g" work; deactivated the options that don't work yet. 2012-09-06 13:55:02 -07:00
Terence Parr e4a9a44671 grammar option cleanup. was a mess. -Doption=value works to override grammar options on cmd-line now. 2012-09-05 18:37:28 -07:00
Terence Parr 201db8b6d0 merge sam's pulls 2012-09-04 18:59:20 -07:00
Terence Parr 1eb258b8f8 tweak test 2012-08-27 11:25:54 -07:00
Terence Parr 60d99e62dc rm ParseListener; tested the tracer with left recursive rules; weird but deterministic for entry events. 2012-08-27 11:22:42 -07:00
Terence Parr e33e355d66 tweak comment 2012-08-26 16:32:28 -07:00
Terence Parr ad737ebdf6 tweak 2012-08-26 16:03:59 -07:00
Terence Parr 64c050f233 sets at top level work now: s : A | B ; in lexer and parser. 2012-08-05 10:17:00 -07:00
Terence Parr 799b7afc1c playwith grammar 2012-08-05 09:51:52 -07:00
Terence Parr 8637f31837 rm prints 2012-08-05 09:21:59 -07:00