public static void main(String argv[]) {
        ConditionParser parser = new ConditionParser();
        //List<String> defines = parser.extractDefines("(LightMap && SeparateTexCoord) || !ColorMap");
        List<String> defines = parser.extractDefines("RoughnessMap && MetallicRoughnessMap");
        for (String string : defines) {
            System.err.println(string);
        }
        System.err.println(parser.formattedExpression);

        defines = parser.extractDefines("#if (defined(LightMap) && defined(SeparateTexCoord)) || !defined(ColorMap)");

        for (String string : defines) {
            System.err.println(string);
        }
        System.err.println(parser.formattedExpression);


//        System.err.println(parser.getFormattedExpression());
//        
//        parser.parse("ShaderNode.var.xyz");
//        parser.parse("var.xyz");
//        parser.parse("ShaderNode.var");
//        parser.parse("var");
    }
A utility class that parses a define condition in a GLSL language
style.

extractDefines is able to get a list of defines in an expression and update
the formatter expression with uppercased defines

@author Nehon
jme3-core/src/plugins/java/com/jme3/material/plugins/ConditionParser.java