#
#               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*<DIR>\s*([\w,.,/,\\,\s,\-,\+,\d]*).*
	 directory     file              pattern=.*<DIR>\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*<DIR>\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:
#	<obj-name> <match-info> "pattern="<reg-ex>
#
# where:
# 	<obj-name>:	The type of object that will be created in the Output View if
#			a line of output matches this pattern.  If you have put an
#			icon called "<object-name>.gif" in the com.ibm.etools.systems.dstore.core/icons
#			directory, then the icon will be displayed in the view.
#	
# 	<match-info>:	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).
#	
# 	<reg-ex>: 	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


