################################################################################ # Copyright (c) 2006 IBM Corporation. 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 ################################################################################ # # 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 =([\w,.,/,(,),\\,\-,\+,\d]*):(\d*):.* command: grep -.*n.* grep file line pattern =([\w,.,/,(,),\\,\-,\+,\d]*):(\d*):.* command: grep .* grep file pattern =([\w,.,/,(,)\\,\-,\+,\d]*):.* command: pwd directory file pattern=([\w,.,/,(,),\\,\-,\+,\d,:]*) command: nmake.* error pattern=NMAKE : .* error file line pattern =([\w,.,\-,\+,(,),\\,:]*)\((\d*):(\d*)\) : error EDC.* error file pattern =[\w,.,\-,\+,(,),\\,:]*\(([\w,.,/,\\]*)\) : error LNK.* error file line pattern=([\w,.,/,\-,\+,(,),\\]*):(\d*):\d*\) : error .* warning file line pattern=([\w,.,/,\-,\+,(,),\\]*)\((\d*):\d*\) : warning .* informational file line pattern=([\w,.,/,\-,\+,(,),\\]*)\((\d*):\d*\) : informational .* command: make.* error file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\", line (\d*)\.\d*: \d*-\d* \(S\).* error file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\",, line (\d*)\.\d*: \d*-\d* \(E\).* warning file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\", line (\d*)\.\d*: \d*-\d* \(W\).* informational file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\", line (\d*)\.\d*: \d*-\d* \(I\).* warning file line pattern =([\w,.,/,(,),\-,\+,\\]*):(\d*): warning: .* warning file line pattern =([\w,.,/,\\,\-,\+,(,)]*):(\d*):\d*: warning: .* error file line pattern =([\w,.,/,\\,\-,\+,(,)]*):(\d*):.* informational file pattern =([\w,.,/,\\,\-,\+,(,)]*):.* informational file line pattern =In file included from ([\w,.,/,\\,\-,\+,(,)]*):(\d*): #iseries c compiler error file line pattern=[\w,.,/,\\]* Line \d* \"([\w,.,/,\\]*)\", line (\d*)\.\d*: .* error file line pattern=([\w,.,/,\\]*) Line (\d*)\s.* #makefile errors error file line pattern=\"([\w,\.,/,(,),\-,\+,\\]*)\", line (\d*): make:.* #xlc Options warnings warning pattern=\(W\) Option .* #c89 errors error file line pattern=ERROR CBC\d* ([\w,.,/,\\,\-,\+,(,)]*):(\d*) .* warning file line pattern=WARNING CBC\d* ([\w,.,/,\\,\-,\+,(,)]*):(\d*) .* informational pattern=CBC\d*\(I\) .* command: gmake.* error file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\", line (\d*)\.\d*: \d*-\d* \(S\).* warning file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\", line (\d*)\.\d*: \d*-\d* \(W\).* informational file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\", line (\d*)\.\d*: \d*-\d* \(I\).* warning file line pattern =([\w,.,/,(,),\-,\+,\\]*):(\d*): warning: .* warning file line pattern =([\w,.,/,\\,\-,\+,(,)]*):(\d*):\d*: warning: .* informational file line pattern =In file included from ([\w,.,/,\\,\-,\+,(,)]*):(\d*): # ixlc compiler error file line pattern=[\w,.,/,\\]* Line \d* \"([\w,.,/,\\]*)\", line (\d*)\.\d*: .* error file line pattern=([\w,.,/,\\]*) Line (\d*)\s.* # icc compiler error file line pattern =([\w,.,/,\\,\-,\+,(,)]*),\s(\d*)\.\d*:\s.* error file line pattern =\"([\w,.,/,\\,\-,\+,(,)]*)\",\sline\s(\d*)\.\d*:\s.* #generic error file line pattern =([\w,.,/,\\,\-,\+,(,)]*):(\d*):.* command: gcc\s.* error file line pattern=\"([\w,.,/,\\,\-,\+,(,)]*)\", line (\d*)\.\d*: \d*-\d* \(S\).* warning file line pattern=\"([\w,.,/,\\,\-,\+,(,)]*)\", line (\d*)\.\d*: \d*-\d* \(W\).* informational file line pattern=\"([\w,.,/,\\,\-,\+,(,)]*)\", line (\d*)\.\d*: \d*-\d* \(I\).* warning file line pattern =([\w,.,/,\\,\-,\+,(,)]*):(\d*): warning: .* warning file line pattern =([\w,.,/,\\,\-,\+,(,)]*):(\d*):\d*: warning: .* error file line pattern =([\w,.,/,\\,\-,\+,(,)]*):(\d*):.* informational file pattern =([\w,.,/,\\,\-,\+,(,)]*):.* informational file line pattern =In file included from ([\w,.,/,\\,\-,\+,(,)]*):(\d*): command: cc\s.* error file line pattern =([\w,.,/,\\,\-,\+,(,)]*):(\d*):.* command: CC\s.* error file line pattern =([\w,.,/,\\,\-,\+,(,)]*):(\d*):.* command: c89.* error file line pattern=ERROR CBC\d* ([\w,.,/,\\,\-,\+,(,)]*):(\d*) .* warning file line pattern=WARNING CBC\d* ([\w,.,/,\\,\-,\+,(,)]*):(\d*) .* informational pattern=CBC\d*\(I\) .* command: icc.* error file line pattern =([\w,.,/,\\,\-,\+,(,)]*),\s(\d*)\.\d*:\s.* error file line pattern =\"([\w,.,/,\\,\-,\+,(,)]*)\",\sline\s(\d*)\.\d*:\s.* command: javac.* warning file line pattern=([\w,.,/,\\,\-,\+,(,),:]*):(\d*): warning.* error file line pattern=([\w,.,/,\\,\-,\+,(,),:]*):(\d*):.* command: .*bat\s.* error file line pattern=\[javac\]\s([\w,.,/,\\,:]*):(\d*):.* error file line pattern=file:([\w,.,/,\\,:]*):(\d*):.* command: dir.* directory file pattern=\d{2}/\d{2}/\d*\s*\d{2}:\d{2}\s[a,p,AM,PM]+\s*\s*([\w,.,/,\\,\s,\-,\+,\d]*).* directory file pattern=.*\s*([\w,.,/,\\,\s,\-,\+,\d]*).* file file pattern=\d{2}/\d{2}/\d*\s*\d{2}:\d{2}\s[a,p,AM,PM]+\s*[\d,,]*\s*([\w,.,/,\\,\s,\-,\+,\d]*).* directory file pattern=[\d,/,\\,.,-]+.\s*\d{2}[:,.]\d{2}.\s*\s*([\w,.,/,\\,\s,\-,\+,\d]*) file file pattern=[\d,/,\\,.,-]+.\s*\d{2}[:,.]\d{2}.\s*[\d,,,.]*\s*([\w,.,/,\\,\s,\-,\+,\d]*) command: ls -l.* file file pattern=-[-,r,w,x]+\s.*\s[\d{4},\d{2}:\d{2}]+,\s([\w,.,/,(,),\\,\-,\+\s,\d]*) file file pattern=l[-,r,w,x]+\s.*\s[\d{4},\d{2}:\d{2}]+,\s([\w,.,/,(,),\\,\-,\+\s,\d]*)\s->\s[\w,.,/,(,),\\,\-,\+\s,\d]* file file pattern=-.*\d{2}:\d{2} ([\w,.,/,(,),\\,\-,\+,\s,\d]*) file file pattern=-.* \d{4} ([\w,.,/,(,),\\,\-,\+,\s,\d]*) file file pattern=l.*\d{2}:\d{2} ([\w,.,/,(,),\\,\-,\+,\s,\d]*)\s->\s[\w,.,/,(,),\\,\-,\+\s,\d]* file file pattern=l.* \d{4} ([\w,.,/,(,),\\,\-,\+,\s,\d]*)\s->\s[\w,.,/,(,),\\,\-,\+\s,\d]* directory file pattern=d.*\d{2}:\d{2} ([\w,.,/,(,),\\,\-,\+\s,\d]*) directory file pattern=d.*\d{4} ([\w,.,/,(,),\\,\-,\+,\s,\d]*) command: ls -a.* file file pattern=-.*\d{2}:\d{2} ([\w,.,/,(,),\\,\-,\+\s,\d]*) file file pattern=-.* \d{4} ([\w,.,/,(,),\\,\-,\+\s,\d]*) directory file pattern=d.*\d{2}:\d{2} ([\w,.,/,(,),\\,\-,\+\s,\d]*) directory file pattern=d.*\d{4} ([\w,.,/,(,),\\,\-,\+\s,\d]*) command: ls file file pattern=([\w,\d,.,(,),\-,\+\s]+) command: ls\s.* file file pattern=([\w,\d,.,(,),\-,\+\s]+) command: .* prompt file pattern=([\w,.,/,(,),\\,\-,\+,\d,:,\s]*)>.* command: find .* file file pattern=([\w,.,/,\\,(,),\-]+) command: env pathenvvar file pattern=PATH\=(.*) libpathenvvar file pattern=LIBPATH\=(.*) libpathenvvar file pattern=LIB\=(.*) envvar pattern=[\w\d]+\=.* command: ps process pattern=[\s]*[\d]+\s.* command: ps .* process pattern=[\s]*[\d]+\s.* command: xl[C,c].* error file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\",, line (\d*)\.\d*: \d*-\d* \(S\).* error file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\", line (\d*)\.\d*: \d*-\d* \(E\).* warning file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\", line (\d*)\.\d*: \d*-\d* \(W\).* informational file line pattern=\"([\w,.,/,(,),\-,\+,\\]*)\", line (\d*)\.\d*: \d*-\d* \(I\).* command: ixlc.* error file line pattern=([\w,.,/,\\]*) Line (\d*)\s.* error file line pattern=[\w,.,/,\\]* Line \d* \"([\w,.,/,\\]*)\", 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: ([\w,.,/,\\]*): (\d*):.* warning file line pattern=([\w,.,/,\\]*):(\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 ([\w,.,/,\\]*), 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