title: why is the error of Undefined symbol detected in semantic analysis?
body: <p>According to me ,An undefined symbol should be detected in parsing phase since after token is made in the lexical phase , then its type is undefined and if we try to assign a value to that undefined symbol , then how is the parse tree constructed without any error ?</p>
  
  <pre><code>int a;
  b=19;
  </code></pre>
  
  <p>Here , the for symbol b , token has already been generated by the lexical analyser and value is as well associated with it , so what is done in the parsing phase due to which the undefined symbol is not detected in this phase ?</p>