Subj : Re: Compiler and an interpreter To : comp.programming From : Chris Dollin Date : Fri Jul 29 2005 06:07 pm anjali wrote: > Suppose in a source-code file, the 4th line contains the first syntax > error.Can anybody please tell me how the compiler and interpreter will > behave when the given file will be the input to them? > > My guess is that the compiler will go through the entire file and will > report all the syntax errors in the file while the interpreter will > stop its execution exactly after the 4th line and will say that there > is a syntax error in the 4th line. I know a compiler that will bomb out at the first syntax error (the Poplog Pop11 incremental compiler) and doubtless there are interpreters that will attempt to recover and continue. Whether or not its a compiler or interpreter has little to do with it; what matters is what decisions the designer made, and they can make them either way. -- Chris "electric hedgehog" Dollin predicting self-predictors' predictions is predictably unpredictable. .