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

Key: ANTLR-10
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
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

why does this get ambiguity warning?

Created: 06/Nov/06 06:11 PM   Updated: 10/Nov/06 05:41 PM
Component/s: ANTLR Core
Affects Version/s: 3.0
Fix Version/s: 3.0b5


 Description  « Hide
fragment
SL_COMMENT
    : '//' (options {greedy=false;} : .)* '\r'? '\n'
    ;
ANTLR.g:447:42: Decision can match input such as "'\r'" using multiple alternatives: 1, 2
Seems the greedy=false should fix it.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Terence Parr - 10/Nov/06 05:41 PM
Last alt that is wildcard does result in error now. This works too:

A : 'a'
  | .
  ;

Even (options {greedy=false;} : 'x'|.)* works now.