I was reading about compiler design principles and specifically the relationship between Buffering and Lookahead terms that i came to this question:
Question 1: Limitations of Buffering
If the main point of buffering is to increase the number of lookaheads in a compiler, then why is the usage of buffers is limited while constructing a compiler?
To clarify the question, the Buffering technique is used when a compiler is reading an input(Source Code). If it is capable of seeing more upcoming letters(Lexems professionally), Then the decisions can be made more precisely.
and my next question is about the number of lookaheads we can get by putting buffers in a compiler.
Question 2: The increase in lookaheads by adding each buffer
If we add a simple 50-Char sized buffer into our compiler, then how much is the lookahead increased?
Thanks for your great answers.