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
76f42ac5
Kaydet (Commit)
76f42ac5
authored
Agu 14, 2001
tarafından
Jeremy Hylton
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
First day's progress on documentation
üst
ce575bac
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
283 additions
and
0 deletions
+283
-0
astdocgen.py
Tools/compiler/doc/astdocgen.py
+30
-0
asttable.tex
Tools/compiler/doc/asttable.tex
+253
-0
compiler.tex
Tools/compiler/doc/compiler.tex
+0
-0
No files found.
Tools/compiler/doc/astdocgen.py
0 → 100644
Dosyayı görüntüle @
76f42ac5
# Lame substitute for a fine script to generate the table from ast.txt
from
compiler
import
astgen
AST_DEF
=
'../compiler/ast.txt'
def
sort
(
l
):
l
=
l
[:]
l
.
sort
(
lambda
a
,
b
:
cmp
(
a
.
name
,
b
.
name
))
return
l
def
main
():
nodes
=
astgen
.
parse_spec
(
AST_DEF
)
print
"
\\
begin{longtableiii}{lll}{class}{Node type}{Attribute}{Value}"
print
for
node
in
sort
(
nodes
):
if
node
.
argnames
:
print
"
\\
lineiii{
%
s}{
%
s}{}"
%
(
node
.
name
,
node
.
argnames
[
0
])
else
:
print
"
\\
lineiii{
%
s}{}{}"
%
node
.
name
for
arg
in
node
.
argnames
[
1
:]:
print
"
\\
lineiii{}{
%
s}{}"
%
arg
print
"
\\
hline"
,
"
\n
"
print
"
\\
end{longtableiii}"
if
__name__
==
"__main__"
:
main
()
Tools/compiler/doc/asttable.tex
0 → 100644
Dosyayı görüntüle @
76f42ac5
\begin{longtableiii}
{
lll
}{
class
}{
Node type
}{
Attribute
}{
Value
}
\lineiii
{
Add
}{
left
}{
left operand
}
\lineiii
{}{
right
}{
right operand
}
\hline
\lineiii
{
And
}{
nodes
}{
list of operands
}
\hline
\lineiii
{
AssAttr
}{}{
\emph
{
attribute as target of assignment
}}
\lineiii
{}{
expr
}{
expression on the left-hand side of the dot
}
\lineiii
{}{
attrname
}{
the attribute name, a string
}
\lineiii
{}{
flags
}{
XXX
}
\hline
\lineiii
{
AssList
}{
nodes
}{
list of list elements being assigned to
}
\hline
\lineiii
{
AssName
}{
name
}{
name being assigned to
}
\lineiii
{}{
flags
}{
XXX
}
\hline
\lineiii
{
AssTuple
}{
nodes
}{
list of tuple elements being assigned to
}
\hline
\lineiii
{
Assert
}{
test
}{
the expression to be tested
}
\lineiii
{}{
fail
}{
the value of the
\exception
{
AssertionError
}}
\hline
\lineiii
{
Assign
}{
nodes
}{
a list of assignment targets, one per equal sign
}
\lineiii
{}{
expr
}{
the value being assigned
}
\hline
\lineiii
{
AugAssign
}{
node
}{}
\lineiii
{}{
op
}{}
\lineiii
{}{
expr
}{}
\hline
\lineiii
{
Backquote
}{
expr
}{}
\hline
\lineiii
{
Bitand
}{
nodes
}{}
\hline
\lineiii
{
Bitor
}{
nodes
}{}
\hline
\lineiii
{
Bitxor
}{
nodes
}{}
\hline
\lineiii
{
Break
}{}{}
\hline
\lineiii
{
CallFunc
}{
node
}{
expression for the callee
}
\lineiii
{}{
args
}{
a list of arguments
}
\lineiii
{}{
star
_
args
}{
the extended *-arg value
}
\lineiii
{}{
dstar
_
args
}{
the extended **-arg value
}
\hline
\lineiii
{
Class
}{
name
}{
the name of the class, a string
}
\lineiii
{}{
bases
}{
a list of base classes
}
\lineiii
{}{
doc
}{
doc string, a string or
\code
{
None
}}
\lineiii
{}{
code
}{
the body of the class statement
}
\hline
\lineiii
{
Compare
}{
expr
}{}
\lineiii
{}{
ops
}{}
\hline
\lineiii
{
Const
}{
value
}{}
\hline
\lineiii
{
Continue
}{}{}
\hline
\lineiii
{
Dict
}{
items
}{}
\hline
\lineiii
{
Discard
}{
expr
}{}
\hline
\lineiii
{
Div
}{
left
}{}
\lineiii
{}{
right
}{}
\hline
\lineiii
{
Ellipsis
}{}{}
\hline
\lineiii
{
Exec
}{
expr
}{}
\lineiii
{}{
locals
}{}
\lineiii
{}{
globals
}{}
\hline
\lineiii
{
For
}{
assign
}{}
\lineiii
{}{
list
}{}
\lineiii
{}{
body
}{}
\lineiii
{}{
else
_}{}
\hline
\lineiii
{
From
}{
modname
}{}
\lineiii
{}{
names
}{}
\hline
\lineiii
{
Function
}{
name
}{
name used in def, a string
}
\lineiii
{}{
argnames
}{
list of argument names, as strings
}
\lineiii
{}{
defaults
}{
list of default values
}
\lineiii
{}{
flags
}{
xxx
}
\lineiii
{}{
doc
}{
doc string, a string or
\code
{
None
}}
\lineiii
{}{
code
}{
the body of the function
}
\hline
\lineiii
{
Getattr
}{
expr
}{}
\lineiii
{}{
attrname
}{}
\hline
\lineiii
{
Global
}{
names
}{}
\hline
\lineiii
{
If
}{
tests
}{}
\lineiii
{}{
else
_}{}
\hline
\lineiii
{
Import
}{
names
}{}
\hline
\lineiii
{
Invert
}{
expr
}{}
\hline
\lineiii
{
Keyword
}{
name
}{}
\lineiii
{}{
expr
}{}
\hline
\lineiii
{
Lambda
}{
argnames
}{}
\lineiii
{}{
defaults
}{}
\lineiii
{}{
flags
}{}
\lineiii
{}{
code
}{}
\hline
\lineiii
{
LeftShift
}{
left
}{}
\lineiii
{}{
right
}{}
\hline
\lineiii
{
List
}{
nodes
}{}
\hline
\lineiii
{
ListComp
}{
expr
}{}
\lineiii
{}{
quals
}{}
\hline
\lineiii
{
ListCompFor
}{
assign
}{}
\lineiii
{}{
list
}{}
\lineiii
{}{
ifs
}{}
\hline
\lineiii
{
ListCompIf
}{
test
}{}
\hline
\lineiii
{
Mod
}{
left
}{}
\lineiii
{}{
right
}{}
\hline
\lineiii
{
Module
}{
doc
}{
doc string, a string or
\code
{
None
}}
\lineiii
{}{
node
}{
body of the module, a
\class
{
Stmt
}}
\hline
\lineiii
{
Mul
}{
left
}{}
\lineiii
{}{
right
}{}
\hline
\lineiii
{
Name
}{
name
}{}
\hline
\lineiii
{
Not
}{
expr
}{}
\hline
\lineiii
{
Or
}{
nodes
}{}
\hline
\lineiii
{
Pass
}{}{}
\hline
\lineiii
{
Power
}{
left
}{}
\lineiii
{}{
right
}{}
\hline
\lineiii
{
Print
}{
nodes
}{}
\lineiii
{}{
dest
}{}
\hline
\lineiii
{
Printnl
}{
nodes
}{}
\lineiii
{}{
dest
}{}
\hline
\lineiii
{
Raise
}{
expr1
}{}
\lineiii
{}{
expr2
}{}
\lineiii
{}{
expr3
}{}
\hline
\lineiii
{
Return
}{
value
}{}
\hline
\lineiii
{
RightShift
}{
left
}{}
\lineiii
{}{
right
}{}
\hline
\lineiii
{
Slice
}{
expr
}{}
\lineiii
{}{
flags
}{}
\lineiii
{}{
lower
}{}
\lineiii
{}{
upper
}{}
\hline
\lineiii
{
Sliceobj
}{
nodes
}{
list of statements
}
\hline
\lineiii
{
Stmt
}{
nodes
}{}
\hline
\lineiii
{
Sub
}{
left
}{}
\lineiii
{}{
right
}{}
\hline
\lineiii
{
Subscript
}{
expr
}{}
\lineiii
{}{
flags
}{}
\lineiii
{}{
subs
}{}
\hline
\lineiii
{
TryExcept
}{
body
}{}
\lineiii
{}{
handlers
}{}
\lineiii
{}{
else
_}{}
\hline
\lineiii
{
TryFinally
}{
body
}{}
\lineiii
{}{
final
}{}
\hline
\lineiii
{
Tuple
}{
nodes
}{}
\hline
\lineiii
{
UnaryAdd
}{
expr
}{}
\hline
\lineiii
{
UnarySub
}{
expr
}{}
\hline
\lineiii
{
While
}{
test
}{}
\lineiii
{}{
body
}{}
\lineiii
{}{
else
_}{}
\hline
\lineiii
{
Yield
}{
value
}{}
\hline
\end{longtableiii}
Tools/compiler/doc/compiler.tex
0 → 100644
Dosyayı görüntüle @
76f42ac5
This diff is collapsed.
Click to expand it.
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