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

Key: ANTLR-97
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

gated predicate not tested in specialStateTransition on EOT transition

Created: 22/Mar/07 02:52 PM   Updated: 10/Apr/07 11:00 AM
Component/s: ANTLR Core
Affects Version/s: 3.0b6
Fix Version/s: 3.0b7


 Description  « Hide
lexer grammar A;
        
@members {int i;}
            
INT : {i==1}?=> '0'..'9'+ ;
FLOAT : '0'..'9'+ '.' '0'..'9'+ ;

Generates

if ( (LA4_1=='.') ) {s = 2;}
else if ( ((LA4_1>='0' && LA4_1<='9')) ) {s = 1;}
else s = 3;

which does not test i==1 on EOT transition. DFA shows it.



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Terence Parr - 10/Apr/07 11:00 AM
Fixed this yesterday when I was fixing something for Jim Idle. Wasn't correctly looking for gated preds I think.