Parsing output of external tool
Posted: 06.05.2018 13:00
Hello. I'm sure this is a silly question, but I can't figure it out. Sorry.
I've installed CudaText on my Mac, installed the GreatCowBasic lexer(s) and set up the GreatCowBasic compiler to run using the cuda_exttools plugin. I can't figure out how to parse the error messages returned by the compiler so that when clicked in the output panel they navigate to the correct line in the editor. I have tried many combinations of regex searches that should return the line numbers, but have not been able to get the 'Line', 'Column' or 'Filename' fields to show any information at all (which is probably why clicking on the line in the output window is not working). Would anyone be kind enough to suggest the format of regex I would need to enter into the 'Pattern' entry box to give me the required 'Line', 'Column', 'Filename' entries to make this work? The sample patterns are all blank which doesn't help.
This is a sample line from an error message that the compiler returns, and is displayed in the output panel:
/Users/mkstevo/Desktop/uSD_MusicBox_4.03.gcb (1234): Error: Variable SWITCHVALUE was not explicitly declared
Clearly, 1234 is the line number, and /Users/mkstevo/Desktop/uSD_MusicBox_4.03.gcb is the filename.
Could I also mention that on making changes to the external tools, closing the dialog causes an error on my Mac? It seems not to cause problems other than the Tools > Config menu option doesn't work until CudaText is closed and restarted.
I've installed CudaText on my Mac, installed the GreatCowBasic lexer(s) and set up the GreatCowBasic compiler to run using the cuda_exttools plugin. I can't figure out how to parse the error messages returned by the compiler so that when clicked in the output panel they navigate to the correct line in the editor. I have tried many combinations of regex searches that should return the line numbers, but have not been able to get the 'Line', 'Column' or 'Filename' fields to show any information at all (which is probably why clicking on the line in the output window is not working). Would anyone be kind enough to suggest the format of regex I would need to enter into the 'Pattern' entry box to give me the required 'Line', 'Column', 'Filename' entries to make this work? The sample patterns are all blank which doesn't help.
This is a sample line from an error message that the compiler returns, and is displayed in the output panel:
/Users/mkstevo/Desktop/uSD_MusicBox_4.03.gcb (1234): Error: Variable SWITCHVALUE was not explicitly declared
Clearly, 1234 is the line number, and /Users/mkstevo/Desktop/uSD_MusicBox_4.03.gcb is the filename.
Could I also mention that on making changes to the external tools, closing the dialog causes an error on my Mac? It seems not to cause problems other than the Tools > Config menu option doesn't work until CudaText is closed and restarted.