commaSeparatedList Not Working Accross Newline

Jim P
  • Jim P

    Jim P - 2014-03-14

    commaSeparatedList will not work across newlines:

    from pyparsing import *
    greet = commaSeparatedList
    hello = "Hello, World!\nyes,me\nwhat,yes"
    result = greet.parseString( hello )
    print result

    ['Hello', 'World!']

    If I wrap commaSeparatedList in OneOrMore it enters an infinite loop and I am not sure why. I would like to avoid going line by line and using commaSeparatedList.



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks