public static Pair<Integer, Integer> _parsePostfixDecl(Attribute attr, String decl, ActionAST a, Grammar g) {
		int start = -1;
		int stop = -1;
		int colon = decl.indexOf(':');
		int namePartEnd = colon == -1 ? decl.length() : colon;

		// look for start of name
		for (int i = 0; i < namePartEnd; ++i) {
			char ch = decl.charAt(i);
			if (Character.isLetterOrDigit(ch) || ch == '_') {
				start = i;
				break;
			}
		}

		if (start == -1) {
			start = 0;
			g.tool.errMgr.grammarError(ErrorType.CANNOT_FIND_ATTRIBUTE_NAME_IN_DECL, g.fileName, a.token, decl);
		}

		// look for stop of name
		for (int i = start; i < namePartEnd; ++i) {
			char ch = decl.charAt(i);
			if (!(Character.isLetterOrDigit(ch) || ch == '_')) {
				stop = i;
				break;
			}
			if (i == namePartEnd - 1) {
				stop = namePartEnd;
			}
		}

		if (stop == -1) {
			stop = start;
		}

		// extract name from decl
		attr.name =  decl.substring(start, stop);

		// extract type from decl (could be empty)
		if (colon == -1) {
			attr.type = "";
		}
		else {
			attr.type = decl.substring(colon + 1, decl.length());
		}
		attr.type = attr.type.trim();

		if (attr.type.length() == 0) {
			attr.type = null;
		}
		return new Pair<Integer, Integer>(start, stop);
	}
For decls like "String foo" or "char *foo32[]" compute the ID
and type declarations.  Also handle "int x=3" and 'T t = new T("foo")'
but if the separator is ',' you cannot use ',' in the initvalue
unless you escape use "\," escape.
tool/src/org/antlr/v4/parse/ScopeParser.java