Line by line parsing of the statements written in an editor of an IDE

I just wanted to ask that during our typing on the editor of any IDE ,we are always prompted for errors whenever we try to make some syntactical mistakes or any mistakes like reassigning a value to a final variable,or making the local variable static,so actually how does it all happens because all this is the work of compiler and during just writing the program on the editor,how does a particular IDE is able to manage this stuff,is it that during typing only,some interpreter works for whom similar parse tables are made as for the complier.

Replies

  • rahul69
    rahul69
    radha gogia
    I just wanted to ask that during our typing on the editor of any IDE ,we are always prompted for errors whenever we try to make some syntactical mistakes ..... how does a particular IDE is able to manage this stuff,is it that during typing only,some interpreter works for whom similar parse tables are made as for the complier.
    Actual process may differ for different IDE's but basic idea is the following.
    When we write code in IDE, it starts building a parse tree, and if it broken, it may flash
    error (by making color red etc.) However, this checking may not be exhaustive like that of compiler and so we need compiler to check it (eg in case of some semantic errors).
    Similar approach is used in auto-complete option of IDE's.
  • radha gogia
    radha gogia
    rahul69
    Actual process may differ for different IDE's but basic idea is the following.
    When we write code in IDE, it starts building a parse tree, and if it broken, it may flash
    error (by making color red etc.) However, this checking may not be exhaustive like that of compiler and so we need compiler to check it (eg in case of some semantic errors).
    Similar approach is used in auto-complete option of IDE's.
    I just wanted to know that if the lexical analyser or parser would generate the parse trees then is it so that they have the information of keywords which the compiler has because the IDE's usually tend to display the error when we try to write any invalid keyword and also then there must be some means by which actually they tend to even prompt for error messages like return statement not found.

You are reading an archived discussion.

Related Posts

Hi, Does any body knows how to extract old historical twitter data. Via Twitter Api all I can get is recent one week last old data. But I want old...
This year Motorola Mobility introduced two second generation smartphones in their MOTO line-up. After a flagship MOTO X and budget phone MOTO G, it is time to upgrade the low...
One of the fastest growing mobile devices company in India, Spice mobiles has launched the Stellar MI 520n exclusively on Amazon India. Expanding its Stellar smartphone series, Spice today unveiled...
Russian mobile broadband services provider and smartphone manufacturer, Yota, announced in February of this year that the YotaPhone 2 will go on sale by the end of the year. The...
I'm only looking for success stories - small or big does NOT matter. I believe each one of us has a success story; no matter how big or small. It...