################################################################################ # Copyright (c) 2006, 2007 IBM Corporation and others. All rights reserved. # This program and the accompanying materials are made available under the terms # of the Eclipse Public License v1.0 which accompanies this distribution, and is # available at http://www.eclipse.org/legal/epl-v10.html # # Initial Contributors: # The following IBM employees contributed to the Remote System Explorer # component that contains this file: David McKnight, Kushal Munir, # Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, # Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. # # Contributors: # Martin Oberhuber (Wind River) - Adapted from RSE services.local/patterns.dat # Martin Oberhuber (Wind River) - [181550] support Unicode characters in patterns ################################################################################ # # parse command line output. # # CLICK THIS LINE TO EDIT THIS FILE (PATTERNS.DAT). (When viewing from the Output view) command: grep -n.* grep file line pattern =([\p{L}_\d!@$\-\+,./()\\]*):(\d*):.* command: grep -.*n.* grep file line pattern =([\p{L}_\d!@$\-\+,./()\\]*):(\d*):.* command: grep .* grep file pattern =([\p{L}_\d!@$\-\+,./()\\]*):.* command: pwd directory file pattern=([\p{L}_\d!@$\-\+,./()\\,:]*) command: nmake.* error pattern=NMAKE : .* error file line pattern =([\p{L}_\d!@$\-\+,./()\\:]*)\((\d*):(\d*)\) : error EDC.* error file pattern =[\p{L}_\d!@$\-\+,./()\\:]*\(([\p{L}_\d!@$,./\\]*)\) : error LNK.* error file line pattern=([\p{L}_\d!@$\-\+,./()\\]*):(\d*):\d*\) : error .* warning file line pattern=([\p{L}_\d!@$\-\+,./()\\]*)\((\d*):\d*\) : warning .* informational file line pattern=([\p{L}_\d!@$\-\+,./()\\]*)\((\d*):\d*\) : informational .* command: make.* error file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\", line (\d*)\.\d*: \d*-\d* \(S\).* error file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\",, line (\d*)\.\d*: \d*-\d* \(E\).* warning file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\", line (\d*)\.\d*: \d*-\d* \(W\).* informational file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\", line (\d*)\.\d*: \d*-\d* \(I\).* warning file line pattern =([\p{L}_\d!@$\-\+,./()\\]*):(\d*): warning: .* warning file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):\d*: warning: .* error file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):.* informational file pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):.* informational file line pattern =In file included from ([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*): #iseries c compiler error file line pattern=[\p{L}_\d!@$,./\\]* Line \d* \"([\p{L}_\d!@$,./\\]*)\", line (\d*)\.\d*: .* error file line pattern=([\p{L}_\d!@$,./\\]*) Line (\d*)\s.* #makefile errors error file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\", line (\d*): make:.* #xlc Options warnings warning pattern=\(W\) Option .* #c89 errors error file line pattern=ERROR CBC\d* ([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*) .* warning file line pattern=WARNING CBC\d* ([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*) .* informational pattern=CBC\d*\(I\) .* command: gmake.* error file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\", line (\d*)\.\d*: \d*-\d* \(S\).* warning file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\", line (\d*)\.\d*: \d*-\d* \(W\).* informational file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\", line (\d*)\.\d*: \d*-\d* \(I\).* warning file line pattern =([\p{L}_\d!@$\-\+,./()\\]*):(\d*): warning: .* warning file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):\d*: warning: .* informational file line pattern =In file included from ([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*): # ixlc compiler error file line pattern=[\p{L}_\d!@$,./\\]* Line \d* \"([\p{L}_\d!@$,./\\]*)\", line (\d*)\.\d*: .* error file line pattern=([\p{L}_\d!@$,./\\]*) Line (\d*)\s.* # icc compiler error file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*),\s(\d*)\.\d*:\s.* error file line pattern =\"([\p{L}_\d!@$,./\\,\-,\+,(,)]*)\",\sline\s(\d*)\.\d*:\s.* #generic error file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):.* command: gcc\s.* error file line pattern=\"([\p{L}_\d!@$,./\\,\-,\+,(,)]*)\", line (\d*)\.\d*: \d*-\d* \(S\).* warning file line pattern=\"([\p{L}_\d!@$,./\\,\-,\+,(,)]*)\", line (\d*)\.\d*: \d*-\d* \(W\).* informational file line pattern=\"([\p{L}_\d!@$,./\\,\-,\+,(,)]*)\", line (\d*)\.\d*: \d*-\d* \(I\).* warning file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*): warning: .* warning file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):\d*: warning: .* error file line pattern =([\p{L}_\d!@$\-\+,./()\\]*):(\d*): error: .* error file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):\d*: [\p{L}_\d!@$,./\\,\-,\+,(,)]*: .* error file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):.* informational file pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):.* informational file line pattern =In file included from ([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*): command: cc\s.* error file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):.* command: CC\s.* error file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*):.* command: c89.* error file line pattern=ERROR CBC\d* ([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*) .* warning file line pattern=WARNING CBC\d* ([\p{L}_\d!@$,./\\,\-,\+,(,)]*):(\d*) .* informational pattern=CBC\d*\(I\) .* command: icc.* error file line pattern =([\p{L}_\d!@$,./\\,\-,\+,(,)]*),\s(\d*)\.\d*:\s.* error file line pattern =\"([\p{L}_\d!@$,./\\,\-,\+,(,)]*)\",\sline\s(\d*)\.\d*:\s.* command: javac.* warning file line pattern=([\p{L}_\d!@$,./\\,\-,\+,(,),:]*):(\d*): warning.* error file line pattern=([\p{L}_\d!@$,./\\,\-,\+,(,),:]*):(\d*):.* command: .*bat\s.* error file line pattern=\[javac\]\s([\p{L}_\d!@$,./\\,:]*):(\d*):.* error file line pattern=file:([\p{L}_\d!@$,./\\,:]*):(\d*):.* command: dir.* directory file pattern=\d{2}/\d{2}/\d*\s*\d{2}:\d{2}\s[a,p,AM,PM]+\s*\s*([\p{L}_\d!@$,./\\,\s,\-,\+,\d]*).* directory file pattern=.*\s*([\p{L}_\d!@$,./\\,\s,\-,\+,\d]*).* file file pattern=\d{2}/\d{2}/\d*\s*\d{2}:\d{2}\s[a,p,AM,PM]+\s*[\d,,]*\s*([\p{L}_\d!@$,./\\,\s,\-,\+,\d]*).* directory file pattern=[\d,/,\\,.,-]+.\s*\d{2}[:,.]\d{2}.\s*\s*([\p{L}_\d!@$,./\\,\s,\-,\+,\d]*) file file pattern=[\d,/,\\,.,-]+.\s*\d{2}[:,.]\d{2}.\s*[\d,,,.]*\s*([\p{L}_\d!@$,./\\,\s,\-,\+,\d]*) command: ls -l.* file file pattern=-[-,r,w,x]+\s.*\s[\d{4},\d{2}:\d{2}]+,\s([\p{L}_\d!@$\-\+,./()\\\s]*) file file pattern=l[-,r,w,x]+\s.*\s[\d{4},\d{2}:\d{2}]+,\s([\p{L}_\d!@$\-\+,./()\\\s]*)\s->\s[\p{L}_\d!@$\-\+,./()\\\s]* file file pattern=-.*\d{2}:\d{2} ([\p{L}_\d!@$\-\+,./()\\\s]*) file file pattern=-.* \d{4} ([\p{L}_\d!@$\-\+,./()\\\s]*) file file pattern=l.*\d{2}:\d{2} ([\p{L}_\d!@$\-\+,./()\\\s]*)\s->\s[\p{L}_\d!@$\-\+,./()\\\s]* file file pattern=l.* \d{4} ([\p{L}_\d!@$\-\+,./()\\\s]*)\s->\s[\p{L}_\d!@$\-\+,./()\\\s]* directory file pattern=d.*\d{2}:\d{2} ([\p{L}_\d!@$\-\+,./()\\\s]*) directory file pattern=d.*\d{4} ([\p{L}_\d!@$\-\+,./()\\\s]*) command: ls -a.* file file pattern=-.*\d{2}:\d{2} ([\p{L}_\d!@$\-\+,./()\\\s]*) file file pattern=-.* \d{4} ([\p{L}_\d!@$\-\+,./()\\\s]*) directory file pattern=d.*\d{2}:\d{2} ([\p{L}_\d!@$\-\+,./()\\\s]*) directory file pattern=d.*\d{4} ([\p{L}_\d!@$\-\+,./()\\\s]*) command: ls file file pattern=([\p{L}_\d!@$\-\+,.()\s]+) command: ls\s.* file file pattern=([\p{L}_\d!@$\-\+,.()\s]+) command: .* prompt file pattern=([\p{L}_\d!@$\-\+,./()\\,:,\s]*)>.* command: find .* file file pattern=([\p{L}_\d!@$\-\+,./()\\]+) command: env envvar pattern=[\p{L}_\d!@$]+\=.* command: ps process pattern=[\s]*[\d]+\s.* command: ps .* process pattern=[\s]*[\d]+\s.* command: xl[C,c].* error file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\",, line (\d*)\.\d*: \d*-\d* \(S\).* error file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\", line (\d*)\.\d*: \d*-\d* \(E\).* warning file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\", line (\d*)\.\d*: \d*-\d* \(W\).* informational file line pattern=\"([\p{L}_\d!@$\-\+,./()\\]*)\", line (\d*)\.\d*: \d*-\d* \(I\).* command: ixlc.* error file line pattern=([\p{L}_\d!@$,./\\]*) Line (\d*)\s.* error file line pattern=[\p{L}_\d!@$,./\\]* Line \d* \"([\p{L}_\d!@$,./\\]*)\", line (\d*)\.\d*: .* command: cat.*patterns.* warning file pattern=# .*(PATTERNS.DAT).* Output pattern=command: .* #statement pattern=#.* statement pattern=.* pattern.*=.* # special for autoconf command: ./bootstrap.sc.* error file line pattern=aclocal: ([\p{L}_\d!@$,./\\]*): (\d*):.* warning file line pattern=([\p{L}_\d!@$,./\\]*):(\d*):.* command: ./configure.* error file line pattern=./(configure): line (\d*): .* # How Patterns Work # ----------------- # # Patterns are used by the Output View to allow lines that contain file names and # perhaps line numbers to be clicked to cause the file location to be opened in an Editor. # A line in this file can be 1 of 3 things: # 1. An empty line or a comment line (denoted by a # in column 1) # 2. The start of a command description (denoted by a 'command:' at the beginning of the line) # 3. A pattern description. # A formal description of the syntax of this file is included at the bottom of this file. # # # Command Descriptions # -------------------- # # A Command Description consists of 2 things: A regular expression that describes the # command invocation, and a list of Pattern Descriptions. The regular expression # is used to determine what set of Pattern Descriptons to use when parsing command output. # For example, if you type the command 'gmake clean', the Command Descriptions are checked and # .*make.* would match that command. Therefore the Pattern Descriptions for .*make.* would # be used to parse the output of the 'gmake clean'. # Note: The first Command Description that is found to match the command is used, so make # sure you put the most specific patterns first. For example, if the nmake.* Command # Description appeared after .*make.*, then 'nmake install' would be matched by the .*make.* # Command Descripton, which is probably not what was intended. # # # Pattern Descriptions # -------------------- # # A Pattern Description has the following form: # "pattern=" # # where: # : The type of object that will be created in the Output View if # a line of output matches this pattern. # # : This is some combination of the words "file" and "line" or nothing # at all. This is used to define how the backreferences in the # regular expression are to be interpreted. So "file line" means # that the first back-reference is a file, and the second is a # line number. This may seem unnecessary, but we added this capability # in the event that future releases support other types of information # that may be useful, such as column info (once we support it). # # : A regular expression that describes a line of output. Backreferences # are used to store (instead of just match) the filename and line # number. To store a filename use the backreference ([\p{L}_\d!@$,./\\]*), and # to store a line number, use (\d*) # # # Note: The patterns are checked against command output and only exact matches are dealt with # So as an example, if you forget the .* (match everything) at the end of a pattern, # the match will fail if there are trailing characters in the output not accounted for by # the pattern # # # Pattern File Syntax # ------------------- # # The pattern file syntax should be easy to grasp by looking at the ones # above, but for those of you who like formal grammars, here it is: # # patterns-file: # commands # # commands: # command # commands new-line command # # command: # "command:" reg-ex new-line patterns # # patterns: # pattern # patterns new-line pattern # # pattern: # command-name match-list "pattern=" reg-ex # # command-name: # String that denotes what type of object will be created if some output matches this pattern # # match-list: # file-or-line # match-list space file-or-line # # file-or-line: # "file" | "line" # # reg-ex: # A regular expression # # new-line: # The new-line character \n # # space: # The space character