[Python-checkins] devguide: Replace tabs with spaces in compiler.rst to satisfy the checkwhitespace hook.
ned.deily
python-checkins at python.org
Thu Oct 6 22:35:43 CEST 2011
http://hg.python.org/devguide/rev/ddcf4a0ece4e
changeset: 454:ddcf4a0ece4e
user: Ned Deily <nad at acm.org>
date: Thu Oct 06 13:32:42 2011 -0700
summary:
Replace tabs with spaces in compiler.rst to satisfy the checkwhitespace hook.
files:
compiler.rst | 60 ++++++++++++++++++++--------------------
1 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/compiler.rst b/compiler.rst
--- a/compiler.rst
+++ b/compiler.rst
@@ -48,22 +48,22 @@
macros (which are all defined in Include/token.h):
``CHILD(node *, int)``
- Returns the nth child of the node using zero-offset indexing
+ Returns the nth child of the node using zero-offset indexing
``RCHILD(node *, int)``
- Returns the nth child of the node from the right side; use
- negative numbers!
+ Returns the nth child of the node from the right side; use
+ negative numbers!
``NCH(node *)``
- Number of children the node has
+ Number of children the node has
``STR(node *)``
- String representation of the node; e.g., will return ``:`` for a
- COLON token
+ String representation of the node; e.g., will return ``:`` for a
+ COLON token
``TYPE(node *)``
- The type of node as specified in ``Include/graminit.h``
+ The type of node as specified in ``Include/graminit.h``
``REQ(node *, TYPE)``
- Assert that the node is the type that is expected
+ Assert that the node is the type that is expected
``LINENO(node *)``
- retrieve the line number of the source code that led to the
- creation of the parse rule; defined in Python/ast.c
+ retrieve the line number of the source code that led to the
+ creation of the parse rule; defined in Python/ast.c
To tie all of this example, consider the rule for 'while'::
@@ -99,10 +99,10 @@
module Python
{
- stmt = FunctionDef(identifier name, arguments args, stmt* body,
- expr* decorators)
- | Return(expr? value) | Yield(expr value)
- attributes (int lineno)
+ stmt = FunctionDef(identifier name, arguments args, stmt* body,
+ expr* decorators)
+ | Return(expr? value) | Yield(expr value)
+ attributes (int lineno)
}
The preceding example describes three different kinds of statements;
@@ -221,13 +221,13 @@
in Python/asdl.c and Include/asdl.h:
``asdl_seq_new()``
- Allocate memory for an asdl_seq for the specified length
+ Allocate memory for an asdl_seq for the specified length
``asdl_seq_GET()``
- Get item held at a specific position in an asdl_seq
+ Get item held at a specific position in an asdl_seq
``asdl_seq_SET()``
- Set a specific index in an asdl_seq to the specified value
+ Set a specific index in an asdl_seq to the specified value
``asdl_seq_LEN(asdl_seq *)``
- Return the length of an asdl_seq
+ Return the length of an asdl_seq
If you are working with statements, you must also worry about keeping
track of what line number generated the statement. Currently the line
@@ -426,7 +426,7 @@
asdl_c.py
"Generate C code from an ASDL description." Generates
- Python/Python-ast.c and Include/Python-ast.h .
+ Python/Python-ast.c and Include/Python-ast.h .
spark.py
SPARK_ parser generator
@@ -435,9 +435,9 @@
Python-ast.c
Creates C structs corresponding to the ASDL types. Also
- contains code for marshaling AST nodes (core ASDL types have
- marshaling code in asdl.c). "File automatically generated by
- Parser/asdl_c.py". This file must be committed separately
+ contains code for marshaling AST nodes (core ASDL types have
+ marshaling code in asdl.c). "File automatically generated by
+ Parser/asdl_c.py". This file must be committed separately
after every grammar change is committed since the __version__
value is set to the latest grammar change revision number.
@@ -456,14 +456,14 @@
Emits bytecode based on the AST.
symtable.c
- Generates a symbol table from AST.
+ Generates a symbol table from AST.
pyarena.c
Implementation of the arena memory manager.
import.c
Home of the magic number (named ``MAGIC``) for bytecode versioning
-
+
+ Include/
@@ -479,12 +479,12 @@
Declares PyAST_FromNode() external (from Python/ast.c).
code.h
- Header file for Objects/codeobject.c; contains definition of
- PyCodeObject.
+ Header file for Objects/codeobject.c; contains definition of
+ PyCodeObject.
symtable.h
- Header for Python/symtable.c . struct symtable and
- PySTEntryObject are defined here.
+ Header for Python/symtable.c . struct symtable and
+ PySTEntryObject are defined here.
pyarena.h
Header file for the corresponding Python/pyarena.c .
@@ -496,8 +496,8 @@
+ Objects/
codeobject.c
- Contains PyCodeObject-related code (originally in
- Python/compile.c).
+ Contains PyCodeObject-related code (originally in
+ Python/compile.c).
+ Lib/
--
Repository URL: http://hg.python.org/devguide
More information about the Python-checkins
mailing list