2.1.0 regression involving nested delimitedLists
Brought to you by:
ptmcg
The below minimal example hangs on pyparsing 2.1.0 but correctly parses on 2.0.7 and 2.0.3.
from pyparsing import delimitedList, Group, Optional, Suppress, alphanums, Word, ZeroOrMore species_name = Word(alphanums+'+-*', min=1) + Optional(Suppress('%')) # constituent arrays are colon-delimited # each subarray can be comma- or space-delimited constituent_array = Group(delimitedList(Group(delimitedList(species_name, ',') & ZeroOrMore(species_name)), ':')) constituent_array.parseString("AL,FE")
I believes this works now in 2.1.8.