import java.util.*;

public class MathsParser
{
    public MathsParser (boolean debug)
    {
        _debug = debug;
    }

    /**
     * All numbers within expressions are single digit so we can continue to use them as
     * characters.
     * 
     * Handle different precedence  to part 1.
     */

    public long parse (Vector<String> data)
    {
        long finalResult = 0L;

        /*
         * Since + has precedence, we need to unwind the entire
         * equation and compute those values first before doing *
         */

        for (int i = 0; i < data.size(); i++)
        {
            String currentLine = data.elementAt(i);
            char[] lineArray = currentLine.trim().replaceAll("\\s", "").toCharArray(); // remove all spaces
            Stack<Character> operators = new Stack<Character>();
            Stack<Character> nested = new Stack<Character>();
            Stack<Long> values = new Stack<Long>();

            for (int j = 0; j < lineArray.length; j++)
            {
                switch (lineArray[j])
                {
                    case Tokens.OPEN_BRACE:
                    {
                        nested.push(lineArray[j]);
                    }
                    break;
                    case Tokens.CLOSE_BRACE:
                    {

                    }
                    break;
                    default:
                    {

                    }
                    break;
                }
            }
        }

        return finalResult;
    }

    private boolean _debug;
}
@@ -753,37 +753,38 @@
 ces%0A            
-Stack
+Vector
 %3CCharacter%3E oper
@@ -783,29 +783,29 @@
 er%3E 
-operators
+unrolled
  = new 
-Stack
+Vector
 %3CCha
@@ -1280,32 +1280,429 @@
               %7B%0A
+                        boolean done = false;%0A%0A                        while (!done && !nested.isEmpty())%0A                        %7B%0A                            Character c = nested.pop();%0A%0A                            if (c != Tokens.OPEN_BRACE)%0A                                unrolled.add(c);%0A                            else%0A                                done = true;%0A                        %7D
 %0A               

Update MathsParser.java