Fixed merge conflict.

parent 2b1f8fd1
......@@ -153,15 +153,12 @@ void py_input(PyObject *parser, char *buf, int *result, int max_size)
Py_DECREF(handle);
Py_DECREF(arglist);
if (unlikely(!res)) { return; }
if (unlikely(!res)) return;
}
// Read the input string and catch keyboard interrupt exceptions.
handle = PyObject_GetAttr(parser, py_attr_read_name);
if (unlikely(!handle)) {
// TODO: set exception message for missing attribute error
return;
}
if (unlikely(!handle)) return;
arglist = Py_BuildValue("(i)", max_size);
if (unlikely(!arglist)) { Py_DECREF(handle); return; }
......
......@@ -361,7 +361,8 @@ cdef class ParserEngine:
if option[i] == '%prec':
i = i - 1
break # hack for rules using '%prec'
args.append('"%s", $%d' % (option[i], i+1))
o = option[i].replace('"', '\\"')
args.append('"%s", $%d' % (o, i+1))
# now, we have the correct terms count
action = action % (i + 1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment