
|
If you were logged in you would be able to see more operations.
|
|
|
ANTLR v3
Created: 20/May/07 12:19 PM
Updated: 25/Dec/07 04:08 PM
|
|
| Component/s: |
analysis
|
| Affects Version/s: |
3.0
|
| Fix Version/s: |
3.1
|
|
|
rule stat shows:
[12:17:17] warning(200): L.g:19:4: Decision can match input such as "<EPSILON>" using multiple alternatives: 1, 2
As a result, alternative(s) 2 were disabled for that input
works for k=3.
grammar L;
classDef
: 'class' ID '{' method+ '}'
;
method
: type ID '(' ')' body
;
type: 'int' | 'float' | 'void' ;
body: '{' stat+ '}' ;
stat
options {
k=4;
}
: assignment ';'
| call ';'
;
call: id '(' expr (',' expr)* ')'
;
assignment
: id '=' expr
;
expr: INT
| id
;
id : ID ('.' ID)* ;
INT : '0'..'9'+ ;
ID : ('a'..'z'|'A'..'Z')+ ;
WS : (' '|'\t'|'\r'|'\n')+ {$channel=HIDDEN;} ;
|
|
Description
|
rule stat shows:
[12:17:17] warning(200): L.g:19:4: Decision can match input such as "<EPSILON>" using multiple alternatives: 1, 2
As a result, alternative(s) 2 were disabled for that input
works for k=3.
grammar L;
classDef
: 'class' ID '{' method+ '}'
;
method
: type ID '(' ')' body
;
type: 'int' | 'float' | 'void' ;
body: '{' stat+ '}' ;
stat
options {
k=4;
}
: assignment ';'
| call ';'
;
call: id '(' expr (',' expr)* ')'
;
assignment
: id '=' expr
;
expr: INT
| id
;
id : ID ('.' ID)* ;
INT : '0'..'9'+ ;
ID : ('a'..'z'|'A'..'Z')+ ;
WS : (' '|'\t'|'\r'|'\n')+ {$channel=HIDDEN;} ; |
Show » |
|