public override SymbolCollection parseFile(string filename, out List<CodeBlock> newCodeBlocks, out List<AxisHelper> newAxisHelpers)
{
newCodeBlocks = new List<CodeBlock>();
SymbolCollection newSymbols = new SymbolCollection();
newAxisHelpers = new List<AxisHelper>();
byte[] allBytes = File.ReadAllBytes(filename);
string boschnumber = ExtractBoschPartnumber(allBytes);
string softwareNumber = ExtractSoftwareNumber(allBytes);
partNumberConverter pnc = new partNumberConverter();
VerifyCodeBlocks(allBytes, newSymbols, newCodeBlocks);
for (int t = 0; t < allBytes.Length - 1; t++)
{
CheckMap(t, allBytes, newSymbols, newCodeBlocks);
}
newSymbols.SortColumn = "Flash_start_address";
newSymbols.SortingOrder = GenericComparer.SortOrder.Ascending;
newSymbols.Sort();
NameKnownMaps(allBytes, newSymbols, newCodeBlocks);
BuildAxisIDList(newSymbols, newAxisHelpers);
MatchAxis(newSymbols, newAxisHelpers);
FindSVBL(allBytes, filename, newSymbols, newCodeBlocks);
FindMAPMAFSwitch(allBytes, filename, newSymbols, newCodeBlocks);
SymbolTranslator strans = new SymbolTranslator();
foreach (SymbolHelper sh in newSymbols)
{
sh.Description = strans.TranslateSymbolToHelpText(sh.Varname);
}
// check for must have maps... if there are maps missing, report it
return newSymbols;
}