목록전공/프로그래밍언어론 (7)
수정입니다
Chapter 8. Statement - Level Control Structures (Selection Statements , Iterative Statements 까지 일 듯) Levels of control Flow Within expressions(ch.7) --> operator associativity and precedence level Among program units(ch.9) --> subprograms Among program statements (this chapter) Contol Statements Imperative language 명령형 언어에서의 computation : expression을 평가하고 resulting value를 variable에 assig..
Chapter 7. Expressions and Assignment Statements Introduction Expressions : PL에서 computation을 나타내는 fundamental 수단 --> syntax, semantic 의미를 이해하는 것이 중요 expression을 잘 이해하기 위해 operator와 operand의 연산 순서가 중요 --> associativity 와 precedence rule 에 의해 결정 Essence of imperative languages is dominant role of assignment statements --> 할당을 하는것 -> 변수의 값 변경(side effect)이 야기됨 Arithmetic Expressions one of t..

Record Types heterogeneous aggregate of data elements in which the individual elements are identified by names 동일한 타입이나 크기가 아닌 collection of data를 모델링 ex) C, C++, C# : struct Design issues --> What is the syntactic form of refernces to the field? --> Are elliptical references allowed (생략 허용 or not) Definition of Records in COBOL 01 EMPLOYEE-RECORD. 02 EMPLOYEE-NAME. 05 FIRST PICTURE IS X(20). ..

Chapter 6. Data Types Introduction data type은 data objects 의 모임과 그 값들에 대한 predefined operations의 집합을 정의한다 descriptor는 변수들의 속성의 모임이다 object란 user-defined type의 instance를 의미한다 One design issue for all data types --> What operatons are defined and how are they specified? Primitive Data types 대부분의 PL들이 제공하는 기본 데이터 타입 ex) int, char.. 다른 type들의 관점에서는 정의되지 않은 type 을 primitive data type이라 한다. 어떤 pri..
Scope the range of statements over which it is visible local variable -> 어떤 프로그램 or 블록 내에서 정의된 변수 nonlocal variable -> 그 지역 내에서 정의되지 않았는데 visible한 변수 global -> non-local의 special category Static Scope 두가지 유형 - nested subprogram(함수안에 함수 정의) 허용 or 비허용 작성 위치에 따라 scope가 달라짐 Search process : 변수가 정의된 부분을 찾아야함. 지금 내 지역부터, 더 큰 지역.. 계속 찾을 때까지 탐색 static ancestor : subprogram을 포함하고 있는 모든 program 전부 stati..
Chapter 5. Name, Bindings, and Scope Introduction 이 장은 PL에서 사용하는 변수에 관한 기본적인 의미적 논점에 대해 이야기함 Imperative language are abstractions of von Neumann architecture 폰노이만 구조의 두 가지 주요 요소 Memory (instruction & data 저장) Processor(memory 내용을 변경하기 위한 연산을 제공) Variables are characterized by attributes 변수들은 여러 속성들의 모임으로 정의 됨 scope, lifetime, type checking, initialization, type compatibility Variables..

Bottom - up parsing - reverse of right most derivation The parsing problem is finding the correct RHS in a right sentential form to reduce to get the previous right sentential form in the derivaton. 주어진 input 에서 시작 -> 시작 기호(여기서 E)만 남을 때까지 sequence 생성 각 단계에서 이전 sentential form을 얻기 위해 특정 RHS(handle)을 찾아야함 right sentential form 에서 handle은 unique 하다. ex) id + id * id E -> E + T | T T -> T * F | F ..