1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 package org.codehaus.mojo.scmchangelog.changelog.log.grammar;
25
26 import java.util.regex.Matcher;
27 import java.util.regex.Pattern;
28
29
30
31
32
33
34
35 public class RemyScmGrammar
36 extends AbstractRegexpScmGrammar
37 {
38
39 protected static final Pattern FIX_PATTERN = Pattern.compile( "[\\[][fF][iI][xX][\\s]*:[^\\]]*[\\]]" );
40 protected static final Pattern REMOVE_PATTERN = Pattern.compile( "[\\[][rR][eE][mM][oO][vV][eE][\\s]*:[^\\]]*[\\]]" );
41 protected static final Pattern ADD_PATTERN = Pattern.compile( "[\\[][aA][dD][dD][\\s]*:[^\\]]*[\\]]" );
42 protected static final Pattern UPDATE_PATTERN = Pattern.compile( "[\\[][uU][pP][dD][aA][tT][eE][\\s]*:[^\\]]*[\\]]" );
43 protected static final Pattern FIX_CLEANER_PATTERN = Pattern.compile( "[\\[][fF][iI][xX][\\s]*:" );
44 protected static final Pattern REMOVE_CLEANER_PATTERN = Pattern.compile( "[\\[][rR][eE][mM][oO][vV][eE][\\s]*:" );
45 protected static final Pattern ADD_CLEANER_PATTERN = Pattern.compile( "[\\[][aA][dD][dD][\\s]*:" );
46 protected static final Pattern UPDATE_CLEANER_PATTERN = Pattern.compile( "[\\[][uU][pP][dD][aA][tT][eE][\\s]*:" );
47
48 public Matcher getFixCleaner( String expression )
49 {
50 return FIX_CLEANER_PATTERN.matcher( expression );
51 }
52
53 public Matcher getUpdateCleaner( String expression )
54 {
55 return UPDATE_CLEANER_PATTERN.matcher( expression );
56 }
57
58 public Matcher getAddCleaner( String expression )
59 {
60 return ADD_CLEANER_PATTERN.matcher( expression );
61 }
62
63 public Matcher getRemoveCleaner( String expression )
64 {
65 return REMOVE_CLEANER_PATTERN.matcher( expression );
66 }
67
68 public Matcher getFixMatcher( String expression )
69 {
70 return FIX_PATTERN.matcher( expression );
71 }
72
73 public Matcher getAddMatcher( String expression )
74 {
75 return ADD_PATTERN.matcher( expression );
76 }
77
78 public Matcher getRemoveMatcher( String expression )
79 {
80 return REMOVE_PATTERN.matcher( expression );
81 }
82
83 public Matcher getUpdateMatcher( String expression )
84 {
85 return UPDATE_PATTERN.matcher( expression );
86 }
87 }