Why does the following Parslet parser not work for parsing comma-delimited lists? When I parse, it gets stuck and does not provide an error message:
class TestParser < Parslet::Parser
rule(:name) { match['a-z'].repeat >> str(',').maybe }
rule(:names) { name.repeat }
root(:names)
end
TestParser.new.parse_with_debug('tom,samantha,ricardo') # hangs here
I am aware of "Parslet word until delimeter present", and I know how to parse the list in other ways, but I don't understand why the above does not work.