diff options
Diffstat (limited to 'lexers/LexOthers.cxx')
| -rw-r--r-- | lexers/LexOthers.cxx | 13 | 
1 files changed, 10 insertions, 3 deletions
| diff --git a/lexers/LexOthers.cxx b/lexers/LexOthers.cxx index cdb4b3d17..f87e79275 100644 --- a/lexers/LexOthers.cxx +++ b/lexers/LexOthers.cxx @@ -954,15 +954,16 @@ static int RecogniseErrorListLine(const char *lineBuffer, unsigned int lengthLin  		// Common: <filename>(<line>): warning|error|note|remark|catastrophic|fatal  		// Common: <filename>(<line>) warning|error|note|remark|catastrophic|fatal  		// Microsoft: <filename>(<line>,<column>)<message> -		// CTags: \t<message> +		// CTags: <identifier>\t<filename>\t<message>  		// Lua 5 traceback: \t<filename>:<line>:<message>  		// Lua 5.1: <exe>: <filename>:<line>:<message>  		bool initialTab = (lineBuffer[0] == '\t');  		bool initialColonPart = false; +		bool canBeCtags = !initialTab;	// For ctags must have an identifier with no spaces then a tab  		enum { stInitial,  			stGccStart, stGccDigit, stGccColumn, stGcc,  			stMsStart, stMsDigit, stMsBracket, stMsVc, stMsDigitComma, stMsDotNet, -			stCtagsStart, stCtagsStartString, stCtagsStringDollar, stCtags, +			stCtagsStart, stCtagsFile, stCtagsStartString, stCtagsStringDollar, stCtags,  			stUnrecognized  		} state = stInitial;  		for (unsigned int i = 0; i < lengthLine; i++) { @@ -984,9 +985,11 @@ static int RecogniseErrorListLine(const char *lineBuffer, unsigned int lengthLin  					// May be Microsoft  					// Check against '0' often removes phone numbers  					state = stMsStart; -				} else if ((ch == '\t') && (!initialTab)) { +				} else if ((ch == '\t') && canBeCtags) {  					// May be CTags  					state = stCtagsStart; +				} else if (ch == ' ') { +					canBeCtags = false;  				}  			} else if (state == stGccStart) {	// <filename>:  				state = Is1To9(ch) ? stGccDigit : stUnrecognized; @@ -1047,6 +1050,10 @@ static int RecogniseErrorListLine(const char *lineBuffer, unsigned int lengthLin  					state = stUnrecognized;  				}  			} else if (state == stCtagsStart) { +				if (ch == '\t') { +					state = stCtagsFile; +				} +			} else if (state == stCtagsFile) {  				if ((lineBuffer[i - 1] == '\t') &&  				        ((ch == '/' && chNext == '^') || Is0To9(ch))) {  					state = stCtags; | 
