History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: ANTLR-94
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Terence Parr
Reporter: Terence Parr
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
ANTLR v3

duplicate variable definitions in switches for acyclic DFA

Created: 13/Mar/07 06:21 PM   Updated: 10/Apr/07 12:57 PM
Component/s: ANTLR Core
Affects Version/s: 3.0b6
Fix Version/s: 3.0b7


 Description  « Hide
    54. int LA3_1 = input.LA(3);
                                ^---^
*** Semantic Error: Duplicate declaration of local variable "LA3_1".

from:

grammar T;

/* WORKS:
a : (A | B | ) X Y
  | (A | B | ) X Z
  ;
*/

// does NOT compile
a : (| A | B) X Y
  | (| A | B) X Z
  ;


 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Terence Parr - 10/Apr/07 12:57 PM
Just wrapped state switch-case in curlies.