02 q program repeat 4 repeat 3 go
- Slides: 42
02. 미니 언어 q 미니 프로그램의 예 (계속) – program repeat 4 repeat 3 go right go left end right end end 을 3번 반복 덕성여대 컴퓨터학부 8
02. 미니 언어 q terminal expression과 non-terminal expression – terminal expression § 문법 규칙에서, 더 이상 전개되지 않는 expression § 문법 규칙의 종착점을 의미함 § 예: go | right | left – non-terminal expression § 문법 규칙에서, 계속해서 다시 전개되는 expression § 예: <program> 또는 <command> 덕성여대 컴퓨터학부 12
03. 예제 프로그램 q 2절의 미니 언어를 해석하는 프로그램 – 예: “program repeat 4 go right end” 라는 미니 프로그램이 주어지면, 구문 해석을 통해 다음과 같은 구문 트리(syntax tree)가 만들어 진다. <program> program <command list> end <command> <repeat command> repeat 4 <command list> <command> <primitive command> go 덕성여대 컴퓨터학부 right end 14
03. 예제 프로그램 q Repeat. Command. Node 클래스 – <repeat command> : : = repeat <number> <command list> 에서 <repeat command>를 나타냄 – number 필드: <number> 부분이 저장됨 – command. List. Node 필드: <command list> 부분이 저장됨 – parse( ) § 재귀성을 가진다. Primitive. Command. Node의 parse( )는 다른 parse( ) 메소드를 호출하지 않는다. Repeat. Command. Node Command. List. Node Command. Node parse( ) { } Repeat. Command. Node Command. List. Node Command. Node Primitive. Command. Node parse( ) { } 덕성여대 컴퓨터학부 27
연습문제 q 23 -1 (계속) – Interpreter. Facade § 기존의 인터프리터 관련 클래스들을 사용하기 좋게 하기 위한 창 구 역할을 한다. – Main의 main( )는, § Interpreter. Facade 객체만을 이용해서 인터프리터를 사용한다. Main Interpreter. Facade parse( ) execute( ) Context Command. Node Program. Node Repeat. Command. Node 덕성여대 컴퓨터학부 Command. List. Node Primitive. Command. Node 39
- Struktur perulangan
- Sequential program and an event-driven program?
- Perangkat lunak yang digunakan pada komputer disebut
- Merancang program tahunan dan program semester
- Microsoft excel merupakan salah satu program aplikasi
- Aplikasi pengolah angka buatan microsoft adalah ….
- Langkah langkah memulai microsoft word
- Task 1 listen and repeat after your teacher
- Jelaskan tujuan perulangan 'repeat' digunakan.
- Sentence pattern 9 examples
- Repeat percentage change
- Struktur looping adalah
- Contoh algoritma repeat until
- Listen and repeat the words
- Repeat 8 fd 50 rt 45
- Listen and repeat after me
- Please raise your right hand and repeat after me
- Combs ford surgery repeat prescriptions
- Polymer repeat unit
- Synthetic organic polymers
- Contoh algoritma pengulangan
- Past simple de repeat
- Mcvs
- Repeated percentage change worksheet
- Repeat breeding tanuvas
- Function flowchart symbol
- Pokus sa layon at pokus na tagaganap
- "интернет" сервис or провайдер
- Listen and chant
- Selective repeat
- Magnetic storage examples
- Jelaskan tujuan dari perulangan repeat digunakan
- Fd msw
- Listen and repeat the names of the countries
- Listen repeat and color
- Lệnh repeat 3 fd 100 rt 360/3 vẽ được hình nào
- Palindrome and mirror repeat
- Repeat
- Repeating what someone says
- Repeat game
- Short tandem repeat
- Listen and repeat the words and sounds
- Listen and repeat these sentences