public void insert(Symbol sy) throws ParseException {
		if(containsLocal(sy)) {
			throw new  SemanticException(sy, "Symbol is already defined in scope " + identName);
		}
		switch(sy.kind) {
			case constKind:
				// is constant
				nrOfConstants++;
				break;
			case funcKind:
				// is function
				nrOfFunctions++;
				break;
			case parKind:
				// is parameter
				nrOfParams++;
				break;
			case varKind:
				// is local variable
				nrOfLocals++;
				break;
			case undefKind:
				// is undefined
				throw new SemanticException(sy, "Undefined symbol kind @ " + sy);
				//break;
			case fieldKind:
				// is class variable
				nrOfFields++;
				break;
		default:
			break;
		}
		if(locals == null) {
			locals = sy; // first local element in scope
		} else {
			locals.insert(sy, level); // add symbol to locals "chain"
		}
	}