private String[] getVariablesNamesInScope(Scope scope) {
		TreeSet<String> result = new TreeSet<String>();

		/*
		 * TODO: Frank, what to do with object/classes? For example test.test?
		 */

		boolean doneFirst = false;
		String suffix = "local";

		do {
			if (!doneFirst && scope instanceof AstRoot) {
				suffix = "global";
			}
			/* get the symboltable for the current scope */
			Map<String, Symbol> t = scope.getSymbolTable();
			if (t != null) {
				for (String key : t.keySet()) {
					/* read the symbol */
					Symbol symbol = t.get(key);
					/* only add variables and function parameters */
					if (symbol.getDeclType() == Token.LP
							|| symbol.getDeclType() == Token.VAR) {
						result.add(symbol.getName() + ":" + suffix);
					}
				}
			}

			doneFirst = true;
			suffix = "global";
			/* get next scope (upwards) */
			scope = scope.getEnclosingScope();
		} while (scope != null);

		/* return the result as a String array */
		return result.toArray(new String[0]);
	}