@@ -0,0 +1,1532 @@
+package com.mlefevre.maths.parser;%0A%0Aimport com.sgcib.fip.common.maths.domain.Formula;%0Aimport com.sgcib.fip.common.maths.domain.FormulaElement;%0Aimport com.sgcib.fip.common.maths.domain.FormulaElements;%0Aimport com.sgcib.fip.common.maths.domain.enumeration.FormulaElementType;%0A%0Apublic class PmpParser implements FormulaParser %7B%0A%0A    public Formula parse(String chain) %7B%0A        Formula formula = new Formula();%0A        if(null == chain) %7B%0A            return formula;%0A        %7D%0A%0A        FormulaElements elements = new FormulaElements();%0A%0A        FormulaElement element = new FormulaElement();%0A%0A%0A        char%5B%5D characters = chain.toCharArray();%0A%0A        StringBuffer buffer = new StringBuffer();%0A        for(char character : characters) %7B%0A            if('%7B' == character) %7B%0A                if(%22sum%22.equals(buffer.toString())) %7B%0A                    element.setType(FormulaElementType.SUM);%0A                %7D%0A%0A            %7D else if('/' == character) %7B%0A                element.setType(FormulaElementType.FRACTION);%0A%0A                FormulaElement start = new FormulaElement();%0A                start.setValue(buffer.toString());%0A                element.addElement(start);%0A                buffer = new StringBuffer();%0A            %7D else %7B%0A                buffer.append(character);%0A            %7D%0A        %7D%0A%0A        FormulaElement end = new FormulaElement();%0A        end.setValue(buffer.toString());%0A        element.addElement(end);%0A%0A        elements.addElement(element);%0A        formula.setElements(elements);%0A        return formula;%0A    %7D%0A%0A%7D%0A

Create PmpParser.java