//respond to problems from our file handler
includedFileSpec = includeHandler.getFileSpecificationForInclude(sourcePath, includeString);
//
if (includedFileSpec == null)
{
ICompilerProblem problem = new FileNotFoundProblem(token, filenameTokenText); //the text will be the path not found
problems.add(problem);
retVal = next();
return retVal;
}
if (includeHandler.isCyclicInclude(includedFileSpec.getPath()))
{
ICompilerProblem problem = new CyclicalIncludesProblem(token);
problems.add(problem);
retVal = next();
return retVal;
}
else
{
// Fork a tokenizer for the included file
try
{
forkIncludeTokenizer = createForIncludeFile(this, includedFileSpec, includeHandler);
retVal = forkIncludeTokenizer.next();
}
catch (FileNotFoundException fnfe)
{
includeHandler.handleFileNotFound(includedFileSpec);
ICompilerProblem problem = new FileNotFoundProblem(token, includedFileSpec.getPath());
problems.add(problem);
retVal = next();
return retVal;
}
}