blob: 4cc276fd4d6130862e8c24515cf0e1612c2879ac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
/* dquote_static.c
*
* This file contains static inline functions that are related to
* parsing double-quotish expressions, but are used in more than
* one file.
*
* It is currently #included by regcomp.c and toke.c.
*/
#define PERL_IN_DQUOTE_STATIC_C
#include "proto.h"
#include "embed.h"
/*
- regcurly - a little FSA that accepts {\d+,?\d*}
Pulled from regcomp.c.
*/
PERL_STATIC_INLINE I32
S_regcurly(pTHX_ register const char *s)
{
PERL_ARGS_ASSERT_REGCURLY;
if (*s++ != '{')
return FALSE;
if (!isDIGIT(*s))
return FALSE;
while (isDIGIT(*s))
s++;
if (*s == ',') {
s++;
while (isDIGIT(*s))
s++;
}
if (*s != '}')
return FALSE;
return TRUE;
}
/*
* Local variables:
* c-indentation-style: bsd
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
*
* ex: set ts=8 sts=4 sw=4 noet:
*/
|