public boolean isFragment() {
		if ( modifiers==null ) return false;
		for (GrammarAST a : modifiers) {
			if ( a.getText().equals("fragment") ) return true;
		}
		return false;
	}
$x.y	Attribute: x is surrounding rule, label ref (in any alts)
tool/src/org/antlr/v4/tool/Rule.java