Skip to content
Snippets Groups Projects
Commit b464bced authored by Laurent Peuch's avatar Laurent Peuch
Browse files

[doc] start documenting list of difference between grammars (did that for python 3.3 grammar)

parent 9f5b0fa0
No related branches found
No related tags found
No related merge requests found
Showing
with 124 additions and 0 deletions
Loading
Loading
@@ -22,3 +22,127 @@ As a reference and an overview, here is screenshot of vimdiff showing the differ
.. image:: grammar-python-2.7-3.6-diff-1.png
 
.. image:: grammar-python-2.7-3.6-diff-1.png
List of differences
===================
**Some of the diff have been edited to isolate the focused difference of the
section**
Print function
~~~~~~~~~~~~~~
.. image:: ./grammar_diff/print_function.png
Already done since the start.
TODO
----
Typed arguments
~~~~~~~~~~~~~~~
.. image:: ./grammar_diff/typed_args.png
Function return type
~~~~~~~~~~~~~~~~~~~~
.. image:: ./grammar_diff/function_return_type.png
Nonlocal statement
~~~~~~~~~~~~~~~~~~
.. image:: ./grammar_diff/nonlocal_statement.png
Exec function
~~~~~~~~~~~~~
.. image:: ./grammar_diff/exec_function.png
*var generalisation
~~~~~~~~~~~~~~~~~~~
.. image:: ./grammar_diff/testlist_start_expressiong.png
.. image:: ./grammar_diff/star_expr.png
.. image:: ./grammar_diff/star_expr_in_testlist_comp.png
.. image:: ./grammar_diff/star_expr_in_expr_list.png
Raise from
~~~~~~~~~~
.. image:: ./grammar_diff/raise_from.png
Ellipsis in from import
~~~~~~~~~~~~~~~~~~~~~~~
.. image:: ./grammar_diff/ellipsis_in_from_import.png
New lambda grammar
~~~~~~~~~~~~~~~~~~
I have no idea on what to do with this one yet.
.. image:: ./grammar_diff/new_lambda_grammar.png
.. image:: ./grammar_diff/new_grammar_for_if_cond.png
Remove old list comprehension syntax
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I'm not sure on how to handle both situations (and it is needed? Old list
comprehension syntax is like super edgy, I really wonder if anyonne has
actually used that one that?)
.. image:: ./grammar_diff/remove_old_list_comprehension_syntax.png
.. image:: ./grammar_diff/no_more_list_for_rule.png
False|True|None|... are now atoms in the grammar
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Do I need to do anything about that?
.. image:: ./grammar_diff/more_atoms.png
Inheritance in class definition uses arglist now
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I have no idea on why this is here but that's easy to change.
.. image:: ./grammar_diff/class_inherit_is_arglist_now.png
Yield From
~~~~~~~~~~
.. image:: ./grammar_diff/yield_from.png
Nothing to do
-------------
Those are things that have been removed from python3 grammar but we still need
to support (and we already do) so we don't have to do anything.
No more commat syntax in except close
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. image:: ./grammar_diff/no_more_commat_in_execption_close.png
No more backquote syntax
~~~~~~~~~~~~~~~~~~~~~~~~
.. image:: ./grammar_diff/no_more_backquote_syntax.png
No more '.' '.' '.' in the grammar
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. image:: ./grammar_diff/ellipsis_is_first_class_now_not_needed_anymore.png
docs/grammar_diff/class_inherit_is_arglist_now.png

5.15 KiB

docs/grammar_diff/ellipsis_in_from_import.png

14.5 KiB

docs/grammar_diff/ellipsis_is_first_class_now_not_needed_anymore.png

3.39 KiB

docs/grammar_diff/exec_function.png

8.84 KiB

docs/grammar_diff/function_return_type.png

4.6 KiB

docs/grammar_diff/more_atoms.png

12.7 KiB

docs/grammar_diff/new_grammar_for_if_cond.png

3.72 KiB

docs/grammar_diff/new_lambda_grammar.png

37.9 KiB

docs/grammar_diff/no_more_backquote_syntax.png

13.4 KiB

docs/grammar_diff/no_more_commat_in_execption_close.png

5.2 KiB

docs/grammar_diff/no_more_list_for_rule.png

7.91 KiB

docs/grammar_diff/nonlocal_statement.png

13.1 KiB

docs/grammar_diff/print_function.png

36.5 KiB

docs/grammar_diff/raise_from.png

4.19 KiB

docs/grammar_diff/remove_old_list_comprehension_syntax.png

20.6 KiB

docs/grammar_diff/star_expr.png

2.29 KiB

docs/grammar_diff/star_expr_in_expr_list.png

4.71 KiB

docs/grammar_diff/star_expr_in_testlist_comp.png

7.39 KiB

docs/grammar_diff/testlist_start_expressiong.png

12.9 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment