have tried to use A51 with Codewright (V5.1 to V7) and found that the _KeilC51ErrorInfo error parser contained in errpar32.dll cannot do the job with A51 output. Expression suggested by codewright support application is ^\**[ \t]+(error|warning).*line[ \t]+([0-9]+)[ \t]+of[ \t]+(.*): (.*)$ and is definitely wrong for my A51 version. That is somewhat confusing because even my A51 output is not identical with the current Keil documentaion what list Error numbers dezimal. My output is: A51 MACRO ASSEMBLER V6.02 - SN: A1S3P-U5074E COPYRIGHT KEIL ELEKTRONIK GmbH 1987 - 2000 MACRO ASSEMBLER A51 V6.02 NO OBJECT MODULE REQUESTED ASSEMBLER INVOKED BY: d:\programme\keil\c51\bin\a51.exe eeprom.a51 EP LOC OBJ LINE SOURCE 428 rts ;-> es liegt kein Kommando fuer das Eeprom an *** _________________________________^ *** ERROR #A9 IN 428 (eeprom.a51, LINE 115): SYNTAX ERROR ASSEMBLY COMPLETE. 0 WARNING(S), 1 ERROR(S) make: *** [eeprom.obj] Error 2 Cannot find #A9 in manual and whats the 428? Somebody knows the correct regular expression for that Keil Message ?
here is the solution I found: ^\*\*\* +(ERROR|WARNING) #+([0-9A-F]*) IN +([0-9]*) \x28+(.*), LINE +([0-9]*)\x29: +(.*)\xd$ - First characters in Error lines start with 3 stars (***). (The expression \*{3} should also work but regex seems also buggy?) - after that followed by a blank and either the - Keywords error or warning in capital letters followed by - a blank and the # with a hexadezimal error number - followed by a blank and the Keyword "IN" - followed by a dezimal number followed by a blank - followed by a opening bracket - followed by the filename what consists of any characters - followed by a comma separator and a blank - followed by the Keyword "LINE" and a blank - followed by the line numer in dezimal format - followed by a closing bracket, a colon an a blank - followed by a error message string what constists of any characters - followed by a formfeed at the end of the line (\f should also work) Filename is position 4 Linenumber is position 5 and Error Message is positon 6 Another (more easy feasable) way is to use the similar syntax of _FRANKASM51_494 what can be found in err32.dll