public boolean variable_declaration() {
        // check format: type identifier ["[" "]"] ["=" assignment_expression ] ";"
        boolean variableHasBeenAdded = false;
        Variable_SAR variableSar = null;

        typePush(new Type_SAR(lexicalAnalyzer.getToken(), scope));
        if (!typeExists()) {
            return false;
        }
        popSAS();

        String type = lexicalAnalyzer.getToken().getName();

        lexicalAnalyzer.nextToken();
        Tuple variable = lexicalAnalyzer.getToken();
        lexicalAnalyzer.nextToken();
        if (lexicalAnalyzer.getToken().getType().equals(LexicalAnalyzer.tokenTypesEnum.ARRAY_BEGIN.name())) {
            lexicalAnalyzer.nextToken();
            variableSar = new Variable_SAR(variable, scope, "V" + variableId++, "@:" + type);
            variablePush(variableSar);
            variableHasBeenAdded = true;
            lexicalAnalyzer.nextToken();
        }

        if (!variableHasBeenAdded) {
            variableSar = new Variable_SAR(variable, scope, "V" + variableId++, type);
            variablePush(variableSar);
        }

        String[] values = isInSymbolTable(variableSar);
        if (values == null) {
            errorList += "there is an error in class 'PassTwo' line: 665.\n";
            return false;
        }

        SAS.peek().setSarId(values[1]);

        if (values[0].equalsIgnoreCase(KeyConst.INT.getKey())) {
            iCodeList.add(new ICode(values[1], ICodeOprConst.CREATE_OPR.getKey(), ".INT", "", "", ""));
        } else {
            iCodeList.add(new ICode(values[1], ICodeOprConst.CREATE_OPR.getKey(), ".BYT", "", "", ""));
        }

        if (lexicalAnalyzer.getToken().getType().equals(LexicalAnalyzer.tokenTypesEnum.ASSIGNMENT_OPR.name())) {
            if (!operatorPush(new Opr_SAR(lexicalAnalyzer.getToken()))) {
                return false;
            }

            lexicalAnalyzer.nextToken();
            if (!assignment_expression()) {
                return false;
            }
        } else {
            popSAS();
        }

        if (!EOE()) {
            return false;
        }

        lexicalAnalyzer.nextToken();
        return true;
    }