Possible duplicate for this question however for me it\'s not specific enough.
The python grammar is claimed to be LL(1), but I\'ve noticed some expressions in the P
You're correct that constructs like 'is' | 'is' 'not'
aren't LL(1). They can be left-factored to LL(1) quite easily by changing it to 'is' notOpt
where notOpt: 'not' | ϵ
or, if you allow EBNF syntax, just 'is' 'not'?
(or 'is' ['not']
depending on the flavor of EBNF).
So the language is LL(1), but the grammar technically is not. I assume the Python designers decided that this was okay because the left-factored version would be more difficult to read without much benefit and the current version can still be used as the basis for an LL(1) parser without much difficulty.