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
a322862e
Kaydet (Commit)
a322862e
authored
Agu 17, 1994
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added #diagram:... comments for Kees Blom's railroad diagram generator
üst
2828e9db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
Grammar
Grammar/Grammar
+19
-3
No files found.
Grammar/Grammar
Dosyayı görüntüle @
a322862e
...
@@ -2,6 +2,9 @@
...
@@ -2,6 +2,9 @@
# Change log:
# Change log:
# 17-Aug-94:
# Added #diagram:... comments for Kees Blom's railroad diagram generator
# 3-May-94:
# 3-May-94:
# Added else clause to try-except
# Added else clause to try-except
...
@@ -92,6 +95,16 @@
...
@@ -92,6 +95,16 @@
# eval_input is the input for the eval() and input() functions.
# eval_input is the input for the eval() and input() functions.
# NB: compound_stmt in single_input is followed by extra NEWLINE!
# NB: compound_stmt in single_input is followed by extra NEWLINE!
#diagram:token NAME
#diagram:token NUMBER
#diagram:token STRING
#diagram:token NEWLINE
#diagram:token ENDMARKER
#diagram:token INDENT
#diagram:output\input python.bla
#diagram:token DEDENT
#diagram:output\textwidth 20.04cm\oddsidemargin 0.0cm\evensidemargin 0.0cm
#diagram:rules
single_input: NEWLINE | simple_stmt | compound_stmt NEWLINE
single_input: NEWLINE | simple_stmt | compound_stmt NEWLINE
file_input: (NEWLINE | stmt)* ENDMARKER
file_input: (NEWLINE | stmt)* ENDMARKER
eval_input: testlist NEWLINE* ENDMARKER
eval_input: testlist NEWLINE* ENDMARKER
...
@@ -117,17 +130,20 @@ return_stmt: 'return' [testlist]
...
@@ -117,17 +130,20 @@ return_stmt: 'return' [testlist]
raise_stmt: 'raise' test [',' test]
raise_stmt: 'raise' test [',' test]
import_stmt: 'import' NAME (',' NAME)* | 'from' NAME 'import' ('*' | NAME (',' NAME)*)
import_stmt: 'import' NAME (',' NAME)* | 'from' NAME 'import' ('*' | NAME (',' NAME)*)
global_stmt: 'global' NAME (',' NAME)*
global_stmt: 'global' NAME (',' NAME)*
access_stmt: 'access' ('*' | NAME (',' NAME)*) ':' accesstype (',' accesstype)*
access_stmt: ('access' ('*' | NAME (',' NAME)*) ':' #diagram:break
accesstype (',' accesstype)*)
accesstype: NAME+
accesstype: NAME+
# accesstype should be ('public' | 'protected' | 'private') ['read'] ['write']
# accesstype should be ('public' | 'protected' | 'private') ['read'] ['write']
# but can't be because that would create undesirable reserved words!
# but can't be because that would create undesirable reserved words!
exec_stmt: 'exec' expr ['in' test [',' test]]
exec_stmt: 'exec' expr ['in' test [',' test]]
compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | funcdef | classdef
compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | funcdef | classdef
if_stmt: 'if' test ':' suite ('elif' test ':' suite)* ['else' ':' suite]
if_stmt: ('if' test ':' suite ('elif' test ':' suite)* #diagram:break
['else' ':' suite])
while_stmt: 'while' test ':' suite ['else' ':' suite]
while_stmt: 'while' test ':' suite ['else' ':' suite]
for_stmt: 'for' exprlist 'in' testlist ':' suite ['else' ':' suite]
for_stmt: 'for' exprlist 'in' testlist ':' suite ['else' ':' suite]
try_stmt: 'try' ':' suite (except_clause ':' suite)+ ['else' ':' suite] | 'try' ':' suite 'finally' ':' suite
try_stmt: ('try' ':' suite (except_clause ':' suite)+ #diagram:break
['else' ':' suite] | 'try' ':' suite 'finally' ':' suite)
# NB compile.c makes sure that the default except clause is last
# NB compile.c makes sure that the default except clause is last
except_clause: 'except' [test [',' test]]
except_clause: 'except' [test [',' test]]
suite: simple_stmt | NEWLINE INDENT stmt+ DEDENT
suite: simple_stmt | NEWLINE INDENT stmt+ DEDENT
...
...
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