How does a Single Pass Compiler does parsing,analyzing and generating code all at once? I would like to know how a single pass compiler does parsing,analyzing and generating code all at once as said in P.14 of SIngle Pass Compilers.Is it possible to do all these at once since you can't generate an code without parsing or analyzing it which should be done earlier before producing the object code?
PROGRAM Demo
{
  INTEGER i;
  i= 4;
  WRITELN(i + 5);
}.



Line 1: enter the program name in the symbol table. Generate the program prologue.
Line 3: enter the declaration of variable i in the symbol table.
Line 4: evaluate the constant expression and generate code for the initialization of i.
Line 5: parse the function call and the argument expression. Generate code for the evaluation of the expression i + 5, the push on the stack and the call of the WRITELN predefined function.
Line 6: Generate the program epilogue.


Done.