semantic

파서에서 만든 AST에 attribute Grammar라는 개념으로 노드마다 attribute 추가해서 처리하는게 일반적인듯? IR을 생성한다는게 이 decorated AST를 말하는건가? https://www.baeldung.com/cs/how-compilers-work#4-intermediate-code-generation 이거보면 annotated AST는 semantic analysis에서 하고 그 다음 IR생성단계에선 머신코드에 가까운 machine-independant한 코드를 생성한다는듯. Type Checking이 여기단계에서 진행되는데, 완벽한 타입체크(soundness and completeness를 동시에 만족하는 타입체크)는 불가능하다고 했던거같다.

how-compilers-work#4-intermediate-code-generation

https://home.adelphi.edu/~siegfried/cs372/372l8.pdf

https://www.tutorialspoint.com/what-is-intermediate-code-generation