Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
8b86dc48
Commit
8b86dc48
authored
Aug 23, 2014
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add sed script to move declarators to types.
parent
7a787e18
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
bin/move-declarators.sed
bin/move-declarators.sed
+21
-0
No files found.
bin/move-declarators.sed
0 → 100644
View file @
8b86dc48
# Moves
#
# use: sed [-E | -r] -i -f move-declarators.sed [files]
# Arrays
# cdef int a[5] -> cdef int[5] a
s
/
^
([
\t
]
*
)
cdef +
([
_
0-9a-zA-Z
.
]
+
)
+
([
_
0-9a-zA-Z
]
+
)((
\[
[
0-9
]
*
\]
)
+
)
$
/
\1
cdef
\2\4
\3
/
# Pointers
# cdef int a, *b -> cdef int a \n cdef int *b
s
/
^
([
\t
]
*
)
cdef +
([
_
0-9a-zA-Z
.
]
+
)(
+
[
_
0-9a-zA-Z
]
+ +
(
=
[^
()
]
+
)
?
)
,
(
*
[
*
]
+
*
)([^
()
]
+
)/
\1
cdef
\2\3\
\1
cdef
\2\5\6
/
s
/
^
([
\t
]
*
)
cdef +
([
_
0-9a-zA-Z
.
]
+
)(
+
[
_
0-9a-zA-Z
]
+ +
(
=
[^
()
]
+
)
?
)
,
(
*
[
*
]
+
*
)([^
()
]
+
)/
\1
cdef
\2\3\
\1
cdef
\2\5\6
/
s
/
^
([
\t
]
*
)
cdef +
([
_
0-9a-zA-Z
.
]
+
)(
+
[
_
0-9a-zA-Z
]
+ +
(
=
[^
()
]
+
)
?
)
,
(
*
[
*
]
+
*
)([^
()
]
+
)/
\1
cdef
\2\3\
\1
cdef
\2\5\6
/
s
/
^
([
\t
]
*
)
cdef +
([
_
0-9a-zA-Z
.
]
+
)(
+
[
_
0-9a-zA-Z
]
+ +
(
=
[^
()
]
+
)
?
)
,
(
*
[
*
]
+
*
)([^
()
]
+
)/
\1
cdef
\2\3\
\1
cdef
\2\5\6
/
s
/
^
([
\t
]
*
)
cdef +
([
_
0-9a-zA-Z
.
]
+
)(
+
[
_
0-9a-zA-Z
]
+ +
(
=
[^
()
]
+
)
?
)
,
(
*
[
*
]
+
*
)([^
()
]
+
)/
\1
cdef
\2\3\
\1
cdef
\2\5\6
/
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