Merge pull request #714 from sharwell/fix-652

Deprecate ALL_OPS_NEED_SAME_ASSOC
This commit is contained in:
Terence Parr 2014-09-26 14:27:57 -07:00
commit c9bff2222c
2 changed files with 3 additions and 1 deletions

View File

@ -137,7 +137,7 @@ public class LeftRecursiveRuleAnalyzer extends LeftRecursiveRuleWalker {
}
if ( altAssociativity.get(alt)!=null && altAssociativity.get(alt)!=assoc ) {
tool.errMgr.toolError(ErrorType.ALL_OPS_NEED_SAME_ASSOC, alt);
tool.errMgr.toolError(ErrorType.INTERNAL_ERROR, "all operators of alt " + alt + " of left-recursive rule must have same associativity");
}
altAssociativity.put(alt, assoc);

View File

@ -429,6 +429,8 @@ public enum ErrorType {
* <p>
* all operators of alt <em>alt</em> of left-recursive rule must have same
* associativity</p>
*
* @deprecated This warning is no longer applicable with the current syntax for specifying associativity.
*/
ALL_OPS_NEED_SAME_ASSOC(118, "all operators of alt <arg> of left-recursive rule must have same associativity", ErrorSeverity.WARNING),
/**