Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
e8e258c3
Commit
e8e258c3
authored
Mar 27, 1992
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lint fluff
parent
a75dcc74
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
Modules/regexpr.c
Modules/regexpr.c
+12
-1
Parser/acceler.c
Parser/acceler.c
+3
-4
No files found.
Modules/regexpr.c
View file @
e8e258c3
...
...
@@ -37,10 +37,16 @@ $Header$
#include <stdlib.h>
#include <string.h>
#else
#ifdef __STDC__
/* Don't mess around, use the standard headers */
#include <stdlib.h>
#include <string.h>
#else
char
*
malloc
();
void
free
();
char
*
realloc
();
#endif
#endif
/* __STDC__ */
#endif
/* THINK_C */
#define MACRO_BEGIN do {
#define MACRO_END } while (0)
...
...
@@ -508,6 +514,7 @@ regexp_t bufp;
goto
normal_char
;
opcode
=
Ceol
;
goto
store_opcode
;
/* NOTREACHED */
break
;
case
Roptional
:
if
(
beginning_context
)
...
...
@@ -1504,6 +1511,8 @@ regexp_registers_t regs;
startpos
,
range
,
regs
,
size
);
}
#ifdef UNUSED
static
struct
re_pattern_buffer
re_comp_buf
;
char
*
re_comp
(
s
)
...
...
@@ -1532,6 +1541,8 @@ char *s;
return
re_search
(
&
re_comp_buf
,
s
,
len
,
0
,
len
,
(
regexp_registers_t
)
NULL
)
>=
0
;
}
#endif
#ifdef TEST_REGEXP
int
main
()
...
...
Parser/acceler.c
View file @
e8e258c3
...
...
@@ -40,7 +40,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* Forward references */
static
void
fixdfa
PROTO
((
grammar
*
,
dfa
*
));
static
void
fixstate
PROTO
((
grammar
*
,
dfa
*
,
state
*
));
static
void
fixstate
PROTO
((
grammar
*
,
state
*
));
void
addaccelerators
(
g
)
...
...
@@ -69,13 +69,12 @@ fixdfa(g, d)
int
j
;
s
=
d
->
d_state
;
for
(
j
=
0
;
j
<
d
->
d_nstates
;
j
++
,
s
++
)
fixstate
(
g
,
d
,
s
);
fixstate
(
g
,
s
);
}
static
void
fixstate
(
g
,
d
,
s
)
fixstate
(
g
,
s
)
grammar
*
g
;
dfa
*
d
;
state
*
s
;
{
arc
*
a
;
...
...
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