Skip to content

Commit 25eb16f

Browse files
authored
Fix wrongly indented nested list in compiler.rst (#1183)
1 parent 40e97a8 commit 25eb16f

1 file changed

Lines changed: 74 additions & 69 deletions

File tree

internals/compiler.rst

Lines changed: 74 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -511,107 +511,112 @@ Important files
511511
===============
512512

513513
* :cpy-file:`Parser/`
514-
* :cpy-file:`Parser/Python.asdl`: ASDL syntax file.
515514

516-
* :cpy-file:`Parser/asdl.py`: Parser for ASDL definition files.
517-
Reads in an ASDL description and parses it into an AST that describes it.
515+
* :cpy-file:`Parser/Python.asdl`: ASDL syntax file.
518516

519-
* :cpy-file:`Parser/asdl_c.py`: Generate C code from an ASDL description.
520-
Generates :cpy-file:`Python/Python-ast.c` and
521-
:cpy-file:`Include/internal/pycore_ast.h`.
517+
* :cpy-file:`Parser/asdl.py`: Parser for ASDL definition files.
518+
Reads in an ASDL description and parses it into an AST that describes it.
522519

523-
* :cpy-file:`Parser/parser.c`: The new PEG parser introduced in Python 3.9.
524-
Generated by :cpy-file:`Tools/peg_generator/pegen/c_generator.py`
525-
from the grammar :cpy-file:`Grammar/python.gram`. Creates the AST from
526-
source code. Rule functions for their corresponding production rules
527-
are found here.
520+
* :cpy-file:`Parser/asdl_c.py`: Generate C code from an ASDL description.
521+
Generates :cpy-file:`Python/Python-ast.c` and
522+
:cpy-file:`Include/internal/pycore_ast.h`.
528523

529-
* :cpy-file:`Parser/peg_api.c`: Contains high-level functions which are
530-
used by the interpreter to create an AST from source code.
524+
* :cpy-file:`Parser/parser.c`: The new PEG parser introduced in Python 3.9.
525+
Generated by :cpy-file:`Tools/peg_generator/pegen/c_generator.py`
526+
from the grammar :cpy-file:`Grammar/python.gram`. Creates the AST from
527+
source code. Rule functions for their corresponding production rules
528+
are found here.
531529

532-
* :cpy-file:`Parser/pegen.c`: Contains helper functions which are used
533-
by functions in :cpy-file:`Parser/parser.c` to construct the AST.
534-
Also contains helper functions which help raise better error messages
535-
when parsing source code.
530+
* :cpy-file:`Parser/peg_api.c`: Contains high-level functions which are
531+
used by the interpreter to create an AST from source code.
536532

537-
* :cpy-file:`Parser/pegen.h`: Header file for the corresponding
538-
:cpy-file:`Parser/pegen.c`. Also contains definitions of the ``Parser``
539-
and ``Token`` structs.
533+
* :cpy-file:`Parser/pegen.c`: Contains helper functions which are used
534+
by functions in :cpy-file:`Parser/parser.c` to construct the AST.
535+
Also contains helper functions which help raise better error messages
536+
when parsing source code.
537+
538+
* :cpy-file:`Parser/pegen.h`: Header file for the corresponding
539+
:cpy-file:`Parser/pegen.c`. Also contains definitions of the ``Parser``
540+
and ``Token`` structs.
540541

541542
* :cpy-file:`Python/`
542-
* :cpy-file:`Python/Python-ast.c`: Creates C structs corresponding to
543-
the ASDL types. Also contains code for marshalling AST nodes (core
544-
ASDL types have marshalling code in :cpy-file:`Python/asdl.c`).
545-
"File automatically generated by :cpy-file:`Parser/asdl_c.py`".
546-
This file must be committed separately after every grammar change
547-
is committed since the ``__version__`` value is set to the latest
548-
grammar change revision number.
549543

550-
* :cpy-file:`Python/asdl.c`: Contains code to handle the ASDL sequence type.
551-
Also has code to handle marshalling the core ASDL types, such as number
552-
and identifier. Used by :cpy-file:`Python/Python-ast.c` for marshalling
553-
AST nodes.
544+
* :cpy-file:`Python/Python-ast.c`: Creates C structs corresponding to
545+
the ASDL types. Also contains code for marshalling AST nodes (core
546+
ASDL types have marshalling code in :cpy-file:`Python/asdl.c`).
547+
"File automatically generated by :cpy-file:`Parser/asdl_c.py`".
548+
This file must be committed separately after every grammar change
549+
is committed since the ``__version__`` value is set to the latest
550+
grammar change revision number.
551+
552+
* :cpy-file:`Python/asdl.c`: Contains code to handle the ASDL sequence type.
553+
Also has code to handle marshalling the core ASDL types, such as number
554+
and identifier. Used by :cpy-file:`Python/Python-ast.c` for marshalling
555+
AST nodes.
554556

555-
* :cpy-file:`Python/ast.c`: Used for validating the AST.
557+
* :cpy-file:`Python/ast.c`: Used for validating the AST.
556558

557-
* :cpy-file:`Python/ast_opt.c`: Optimizes the AST.
559+
* :cpy-file:`Python/ast_opt.c`: Optimizes the AST.
558560

559-
* :cpy-file:`Python/ast_unparse.c`: Converts the AST expression node
560-
back into a string (for string annotations).
561+
* :cpy-file:`Python/ast_unparse.c`: Converts the AST expression node
562+
back into a string (for string annotations).
561563

562-
* :cpy-file:`Python/ceval.c`: Executes byte code (aka, eval loop).
564+
* :cpy-file:`Python/ceval.c`: Executes byte code (aka, eval loop).
563565

564-
* :cpy-file:`Python/compile.c`: Emits bytecode based on the AST.
566+
* :cpy-file:`Python/compile.c`: Emits bytecode based on the AST.
565567

566-
* :cpy-file:`Python/symtable.c`: Generates a symbol table from AST.
568+
* :cpy-file:`Python/symtable.c`: Generates a symbol table from AST.
567569

568-
* :cpy-file:`Python/pyarena.c`: Implementation of the arena memory manager.
570+
* :cpy-file:`Python/pyarena.c`: Implementation of the arena memory manager.
569571

570-
* :cpy-file:`Python/opcode_targets.h`: One of the files that must be
571-
modified if :cpy-file:`Lib/opcode.py` is.
572+
* :cpy-file:`Python/opcode_targets.h`: One of the files that must be
573+
modified if :cpy-file:`Lib/opcode.py` is.
572574

573575
* :cpy-file:`Include/`
574-
* :cpy-file:`Include/cpython/code.h`: Header file for
575-
:cpy-file:`Objects/codeobject.c`; contains definition of ``PyCodeObject``.
576576

577-
* :cpy-file:`Include/opcode.h`: One of the files that must be modified if
578-
:cpy-file:`Lib/opcode.py` is.
577+
* :cpy-file:`Include/cpython/code.h`: Header file for
578+
:cpy-file:`Objects/codeobject.c`; contains definition of ``PyCodeObject``.
579+
580+
* :cpy-file:`Include/opcode.h`: One of the files that must be modified if
581+
:cpy-file:`Lib/opcode.py` is.
579582

580-
* :cpy-file:`Include/internal/pycore_ast.h`: Contains the actual definitions
581-
of the C structs as generated by :cpy-file:`Python/Python-ast.c`.
582-
"Automatically generated by :cpy-file:`Parser/asdl_c.py`".
583+
* :cpy-file:`Include/internal/pycore_ast.h`: Contains the actual definitions
584+
of the C structs as generated by :cpy-file:`Python/Python-ast.c`.
585+
"Automatically generated by :cpy-file:`Parser/asdl_c.py`".
583586

584-
* :cpy-file:`Include/internal/pycore_asdl.h`: Header for the corresponding
585-
:cpy-file:`Python/ast.c`.
587+
* :cpy-file:`Include/internal/pycore_asdl.h`: Header for the corresponding
588+
:cpy-file:`Python/ast.c`.
586589

587-
* :cpy-file:`Include/internal/pycore_ast.h`: Declares ``_PyAST_Validate()``
588-
external (from :cpy-file:`Python/ast.c`).
590+
* :cpy-file:`Include/internal/pycore_ast.h`: Declares ``_PyAST_Validate()``
591+
external (from :cpy-file:`Python/ast.c`).
589592

590-
* :cpy-file:`Include/internal/pycore_symtable.h`: Header for
591-
:cpy-file:`Python/symtable.c`. ``struct symtable`` and ``PySTEntryObject``
592-
are defined here.
593+
* :cpy-file:`Include/internal/pycore_symtable.h`: Header for
594+
:cpy-file:`Python/symtable.c`. ``struct symtable`` and ``PySTEntryObject``
595+
are defined here.
593596

594-
* :cpy-file:`Include/internal/pycore_parser.h`: Header for the
595-
corresponding :cpy-file:`Parser/peg_api.c`.
597+
* :cpy-file:`Include/internal/pycore_parser.h`: Header for the
598+
corresponding :cpy-file:`Parser/peg_api.c`.
596599

597-
* :cpy-file:`Include/internal/pycore_pyarena.h`: Header file for the
598-
corresponding :cpy-file:`Python/pyarena.c`.
600+
* :cpy-file:`Include/internal/pycore_pyarena.h`: Header file for the
601+
corresponding :cpy-file:`Python/pyarena.c`.
599602

600603
* :cpy-file:`Objects/`
601-
* :cpy-file:`Objects/codeobject.c`: Contains PyCodeObject-related code
602-
(originally in :cpy-file:`Python/compile.c`).
603604

604-
* :cpy-file:`Objects/frameobject.c`: Contains the ``frame_setlineno()``
605-
function which should determine whether it is allowed to make a jump
606-
between two points in a bytecode.
605+
* :cpy-file:`Objects/codeobject.c`: Contains PyCodeObject-related code
606+
(originally in :cpy-file:`Python/compile.c`).
607+
608+
* :cpy-file:`Objects/frameobject.c`: Contains the ``frame_setlineno()``
609+
function which should determine whether it is allowed to make a jump
610+
between two points in a bytecode.
607611

608612
* :cpy-file:`Lib/`
609-
* :cpy-file:`Lib/opcode.py`: Master list of bytecode; if this file is
610-
modified you must modify several other files accordingly
611-
(see "`Introducing New Bytecode`_")
612613

613-
* :cpy-file:`Lib/importlib/_bootstrap_external.py`: Home of the magic number
614-
(named ``MAGIC_NUMBER``) for bytecode versioning.
614+
* :cpy-file:`Lib/opcode.py`: Master list of bytecode; if this file is
615+
modified you must modify several other files accordingly
616+
(see "`Introducing New Bytecode`_")
617+
618+
* :cpy-file:`Lib/importlib/_bootstrap_external.py`: Home of the magic number
619+
(named ``MAGIC_NUMBER``) for bytecode versioning.
615620

616621

617622
Known compiler-related experiments

0 commit comments

Comments
 (0)