26.12.2013 Views

Teknik Kompiler 1 - Lecturer

Teknik Kompiler 1 - Lecturer

Teknik Kompiler 1 - Lecturer

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Dynamic Structure of a<br />

Compiler<br />

character stream v al = 1 0 * va l + i<br />

lexical analysis (scanning)<br />

token stream 1<br />

(ident)<br />

"val"<br />

3<br />

(assign)<br />

-<br />

2<br />

(number)<br />

10<br />

4<br />

(times)<br />

-<br />

1<br />

(ident)<br />

"val"<br />

5<br />

(plus)<br />

-<br />

1<br />

(ident)<br />

"i"<br />

token number<br />

token value<br />

syntax analysis (parsing)<br />

syntax tree<br />

Statement<br />

Expression<br />

Term<br />

ident = number * ident + ident

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!