]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Comparison operators '<=' '>' '<>' are now 1 token.
authorGuido van Rossum <guido@python.org>
Sun, 20 Oct 1991 20:10:09 +0000 (20:10 +0000)
committerGuido van Rossum <guido@python.org>
Sun, 20 Oct 1991 20:10:09 +0000 (20:10 +0000)
Also support '!=' and '==' as alternatives for '<>' and '='.

Grammar/Grammar

index c3ab3c32c65cfb4fb7b487edd22c40f6d733c06c..90a43f513a19c59dcb13e78afc1646ef81e2db38 100644 (file)
@@ -1,4 +1,8 @@
-# Grammar for Python, version 5
+# Grammar for Python, version 6
+
+# Changes since version 5:
+#      Comparison operators '<=' '>' '<>' are now 1 token
+#      Also support '!=' and '==' as alternatives for '<>' and '='
 
 # Changes compared to version 4:
 #      Blank lines and lines only containing a comment are now eaten
@@ -68,7 +72,7 @@ test: and_test ('or' and_test)*
 and_test: not_test ('and' not_test)*
 not_test: 'not' not_test | comparison
 comparison: expr (comp_op expr)*
-comp_op: '<'|'>'|'='|'>' '='|'<' '='|'<' '>'|'in'|'not' 'in'|'is'|'is' 'not'
+comp_op: '<'|'>'|'='|'>='|'<='|'<>'|'!='|'=='|'in'|'not' 'in'|'is'|'is' 'not'
 expr: term (('+'|'-') term)*
 term: factor (('*'|'/'|'%') factor)*
 factor: ('+'|'-') factor | atom trailer*