formatError assumes string sequence

Bug #587112 reported by Cory Dodt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PyMeta
New
Undecided
Unassigned

Bug Description

Here's a simple test case. This prints an AttributeError for lines = input.split('\n') inside formatError.

#--------------------------------------------------------------------
from pymeta.grammar import OMeta
g = """xyz ::= [ "xx":a "yy":b "zz":c ] => 'pass'"""
XYZ = OMeta.makeGrammar(g, {}, "XYZ")
input = ['xx', 'OOPS', 'zz']
try:
    print XYZ([input]).apply('xyz')[0]
except Exception, e:
    print e
    print e.formatError(input)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.