Q: Is type checking done by semantic analyzer? #4
-
I'm pretty new to the semantic analysis concept. In the guide we are calling the binding + type checking semantic analysis. But I'm seeing different names for semantic analysis step in different projects. For example pyright has separate components for this binding type: And mypy calls the binding phase semantic analysis: I'm curios to know if there's any different between semantic analysis, and binding + type checking. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Thanks for the links. I need some time to look at those references. Just to give a quick answer in the meantime, my references are the dragon book and the compilers class at stanford. |
Beta Was this translation helpful? Give feedback.
-
According to my notes: yes, type checking is (typically) done in the Semantic Analysis step.
Ref. Dragon book 2nd edition, Section 1.2 (specifically, 1.2.3)
Again according to my notes and references, binding+type checking is just one of the things done by a Semantic Analyzer. |
Beta Was this translation helpful? Give feedback.
According to my notes: yes, type checking is (typically) done in the Semantic Analysis step.
Broadly speaking:
Ref. Dragon book 2nd edition, Section 1.2 (specifically, 1.2.3)