Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
88623d76
Kaydet (Commit)
88623d76
authored
Nis 03, 2010
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use our own locale independent ctype macros
requires building pyctype.o into pgen
üst
4ceeeb09
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
19 deletions
+4
-19
Makefile.pre.in
Makefile.pre.in
+1
-0
tokenizer.c
Parser/tokenizer.c
+3
-19
No files found.
Makefile.pre.in
Dosyayı görüntüle @
88623d76
...
...
@@ -230,6 +230,7 @@ PARSER_OBJS= $(POBJS) Parser/myreadline.o Parser/tokenizer.o
PGOBJS
=
\
Objects/obmalloc.o
\
Python/mysnprintf.o
\
Python/pyctype.o
\
Parser/tokenizer_pgen.o
\
Parser/printgrammar.o
\
Parser/pgenmain.o
...
...
Parser/tokenizer.c
Dosyayı görüntüle @
88623d76
...
...
@@ -92,22 +92,6 @@ char *_PyParser_TokenNames[] = {
"<N_TOKENS>"
};
/* Ensure that the locale does not interfere with tokenization. */
static
int
ascii_isalpha
(
int
c
)
{
return
(
'a'
<=
c
&&
c
<=
'z'
)
||
(
'A'
<=
c
&&
c
<=
'Z'
);
}
static
int
ascii_isalnum
(
int
c
)
{
return
ascii_isalpha
(
c
)
||
(
'0'
<=
c
&&
c
<=
'9'
);
}
/* Create and initialize a new tok_state structure */
static
struct
tok_state
*
...
...
@@ -245,7 +229,7 @@ get_coding_spec(const char *s, Py_ssize_t size)
}
while
(
t
[
0
]
==
'\x20'
||
t
[
0
]
==
'\t'
);
begin
=
t
;
while
(
ascii_isalnum
(
Py_CHARMASK
(
t
[
0
])
)
||
while
(
Py_ISALNUM
(
t
[
0
]
)
||
t
[
0
]
==
'-'
||
t
[
0
]
==
'_'
||
t
[
0
]
==
'.'
)
t
++
;
...
...
@@ -1355,7 +1339,7 @@ tok_get(register struct tok_state *tok, char **p_start, char **p_end)
}
/* Identifier (most frequent token!) */
if
(
ascii_isalpha
(
c
)
||
c
==
'_'
)
{
if
(
Py_ISALPHA
(
c
)
||
c
==
'_'
)
{
/* Process r"", u"" and ur"" */
switch
(
c
)
{
case
'b'
:
...
...
@@ -1381,7 +1365,7 @@ tok_get(register struct tok_state *tok, char **p_start, char **p_end)
goto
letter_quote
;
break
;
}
while
(
ascii_isalnum
(
c
)
||
c
==
'_'
)
{
while
(
Py_ISALNUM
(
c
)
||
c
==
'_'
)
{
c
=
tok_nextc
(
tok
);
}
tok_backup
(
tok
,
c
);
...
...
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