sample = """
{
 stage = 3;
 some.param1 = [10,20];
}
{
 stage = 4;
 param3 = [100,150,200,250,300];
}
 endparam = [0,1];
 """
parsed = tree.parseString(sample)
parsed.pprint()
Convert BNF grammar to pyparsing