Contents    Page-10    Prev    Next    Page+10    Index   

Data Flow through the Compiler


  Source Program
I/O          IF I>J THEN K := 0
  Line Handler
Chars        IF I>J THEN K := 0
  Lexical Analyzer (Lexer)
       
Tokens     Res  Id  Op  Id  Res   Id  Op  Num
           IF   I   >   J   THEN  K   :=  0
       
  Syntax Analyzer (Parser)
       
                   IF
                 /    \ 
Trees           >      :=
              /  \    /  \ 
             I    J  K    0
       
  Code Generator
                  LDA    I
                  CMP    J
Code              BLE    L17
                  LDAI   0
                  STA    K
            L17: