Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pybison
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
pybison
Commits
a419a7b3
Commit
a419a7b3
authored
Mar 14, 2012
by
Sander Mathijs van Veen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed merge conflict.
parent
2b1f8fd1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
src/c/bison_callback.c
src/c/bison_callback.c
+2
-5
src/pyrex/bison_.pyx
src/pyrex/bison_.pyx
+2
-1
No files found.
src/c/bison_callback.c
View file @
a419a7b3
...
@@ -153,15 +153,12 @@ void py_input(PyObject *parser, char *buf, int *result, int max_size)
...
@@ -153,15 +153,12 @@ void py_input(PyObject *parser, char *buf, int *result, int max_size)
Py_DECREF
(
handle
);
Py_DECREF
(
handle
);
Py_DECREF
(
arglist
);
Py_DECREF
(
arglist
);
if
(
unlikely
(
!
res
))
{
return
;
}
if
(
unlikely
(
!
res
))
return
;
}
}
// Read the input string and catch keyboard interrupt exceptions.
// Read the input string and catch keyboard interrupt exceptions.
handle
=
PyObject_GetAttr
(
parser
,
py_attr_read_name
);
handle
=
PyObject_GetAttr
(
parser
,
py_attr_read_name
);
if
(
unlikely
(
!
handle
))
{
if
(
unlikely
(
!
handle
))
return
;
// TODO: set exception message for missing attribute error
return
;
}
arglist
=
Py_BuildValue
(
"(i)"
,
max_size
);
arglist
=
Py_BuildValue
(
"(i)"
,
max_size
);
if
(
unlikely
(
!
arglist
))
{
Py_DECREF
(
handle
);
return
;
}
if
(
unlikely
(
!
arglist
))
{
Py_DECREF
(
handle
);
return
;
}
...
...
src/pyrex/bison_.pyx
View file @
a419a7b3
...
@@ -361,7 +361,8 @@ cdef class ParserEngine:
...
@@ -361,7 +361,8 @@ cdef class ParserEngine:
if option[i] == '%prec':
if option[i] == '%prec':
i = i - 1
i = i - 1
break # hack for rules using '%prec'
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
# now, we have the correct terms count
action = action % (i + 1)
action = action % (i + 1)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment