@onStateBecomesCurrent(state = "expression")
    public void handleExpression(StateMachineEvent<SyntaxTokensEnum> theEvent, State<SyntaxTokensEnum> prevState) {
        try {
            switch (theEvent.getEventType()) {
                case CLOSING_BRACKET:
                    updateExpressionValue();
                    if (curExpression.parent == null) {
                        fsm.generateInternalEvent(new SyntaxToken.ErrorToken((SyntaxToken) theEvent));
                    } else {
                        curFactor = curExpression.parent;
                        try {
                            fsm.generateInternalEvent(theEvent);
                        } catch (InvalidEventException ex) {
                        }
                    }
                    break;
                case END_OF_INPUT:
                    updateExpressionValue();
                    if (curExpression.parent != null)// missing closing bracket(s)
                    {
                        fsm.generateInternalEvent(theEvent);
                    }
                    break;
                case ADD_SUBSTRACT:
                    updateExpressionValue();
                    fsm.generateInternalEvent(theEvent);
            }
        } catch (InvalidEventException ex) {
            throw new ExpressionParserException("got unexpected exception", ex,
                    ExpressionParserException.INTERNAL_ERROR, -1);
        }
    }