Skip to content
Snippets Groups Projects
Commit a419a7b3 authored by Sander Mathijs van Veen's avatar Sander Mathijs van Veen
Browse files

Fixed merge conflict.

parent 2b1f8fd1
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment