private void formalParam() throws Exception
    {
        if(scan.sym == Token.openparen) {
            scan.next();
            if(scan.sym != Token.closeparen) {
                int argPosition = 0;
                Identifier i = ident();
                Instruction getArg = new Fetch(i, argPosition);
                currentBB.addInstruction(getArg);
                env.put(i, getArg);
                env.putType(i, new VarType(false, globals));
                argPosition++;
                while(scan.sym == Token.comma) {
                    scan.next();
                    i = ident();
                    getArg = new Fetch(i, argPosition);
                    currentBB.addInstruction(getArg);
                    env.put(i, getArg);
                    env.putType(i, new VarType(false, globals));
                    argPosition++;
                }
            }
            if(scan.sym == Token.closeparen) {
                scan.next();
            } else {
                throw new Exception("Formal parameters: no closing ')'");
            }
        } else {
            throw new Exception("Formal parameters: no opening '('");
        }
    }