Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Ferrazzutti2015-04-29 22:43:12 +0000
committerAlexander Kurtakov2015-04-30 07:08:36 +0000
commitb4532560b3909515da5ff1fbe5e9ec80e0043358 (patch)
tree0cc4cca3d7ba6d511f1ae05b5b2db49294b62d0b /rpm/org.eclipse.linuxtools.rpmstubby
parentf8ec8024434bafeb169686eca24cf1ab36c04f98 (diff)
downloadorg.eclipse.linuxtools-b4532560b3909515da5ff1fbe5e9ec80e0043358.tar.gz
org.eclipse.linuxtools-b4532560b3909515da5ff1fbe5e9ec80e0043358.tar.xz
org.eclipse.linuxtools-b4532560b3909515da5ff1fbe5e9ec80e0043358.zip
Change tabs to spaces, remove trailing whitespace.
Change-Id: I69f8549575a68ef4d3a81587b162e61bd98b0243 Signed-off-by: Andrew Ferrazzutti <aferrazz@redhat.com> Reviewed-on: https://git.eclipse.org/r/46822 Tested-by: Hudson CI Reviewed-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'rpm/org.eclipse.linuxtools.rpmstubby')
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/parser/PerlMakefileParser.java22
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/parser/RubyGemParser.java14
2 files changed, 18 insertions, 18 deletions
diff --git a/rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/parser/PerlMakefileParser.java b/rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/parser/PerlMakefileParser.java
index 8a7de9db42..04f6b4a96d 100644
--- a/rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/parser/PerlMakefileParser.java
+++ b/rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/parser/PerlMakefileParser.java
@@ -37,14 +37,14 @@ public class PerlMakefileParser {
*
*/
private static final String WHITE_SPACE = "(?:\\s+)";
- private static final String COMMENT = "#.+"; // # comment
- private static final String LINE_WITH_COMMENT = "(?:(.*)#.+)"; // line # comment
+ private static final String COMMENT = "#.+"; // # comment
+ private static final String LINE_WITH_COMMENT = "(?:(.*)#.+)"; // line # comment
private static final String VARIABLE_PARAMS = "(?:my|local|our)";
- private static final String WORD = "(\\b\\w+\\b)"; // variable
+ private static final String WORD = "(\\b\\w+\\b)"; // variable
private static final String NON_WHITE_SPACE = "(\\S+)";
private static final String VARIABLE = "(?:" + VARIABLE_PARAMS
- + WHITE_SPACE + ")?(?:\\$|@|%)" + WORD + WHITE_SPACE + "?"; // %variable | my $variable | our @variable
+ + WHITE_SPACE + ")?(?:\\$|@|%)" + WORD + WHITE_SPACE + "?"; // %variable | my $variable | our @variable
private static final String ASSOCIATIVE_KEY = WHITE_SPACE + "?"
+ NON_WHITE_SPACE + WHITE_SPACE + "?";
@@ -54,16 +54,16 @@ public class PerlMakefileParser {
private static final String ASSOCIATIVE_OPERATOR = "=>";
private static final String SIMPLE_ASSIGNMENT = NON_CONDITIONAL
+ WHITE_SPACE + "?" + VARIABLE + "(?:" + ASSIGNMENT_OPERATOR + ")"
- + EXCLUDE_SPECIALS + "(?:(.+))"; // %var = value || [1] = [2]
+ + EXCLUDE_SPECIALS + "(?:(.+))"; // %var = value || [1] = [2]
private static final String ASSOCIATIVE_ASSIGNMENT = ASSOCIATIVE_KEY
- + ASSOCIATIVE_OPERATOR + "(?:(.+))"; // 'key' => 'value' || [1] => [2]
+ + ASSOCIATIVE_OPERATOR + "(?:(.+))"; // 'key' => 'value' || [1] => [2]
private static final String FUNCTION = "\\s*" + WORD
- + "*\\s*?\\((.*)\\)\\s*"; // foo(bar) | foo(foo(bar)) | foo() || [1]([2])
- private static final String BEGIN_END = "(?:[^#]*<<END)"; // [CS] test<<END | <<END
- private static final String END_END = "^END$"; // [CS]
- private static final String BEGIN_BC = "^=(?!cut)[a-z]\\S+(\\s)?\\S+"; // [CS] =test | =test test
- private static final String END_BC = "^=cut$"; // [CS]
+ + "*\\s*?\\((.*)\\)\\s*"; // foo(bar) | foo(foo(bar)) | foo() || [1]([2])
+ private static final String BEGIN_END = "(?:[^#]*<<END)"; // [CS] test<<END | <<END
+ private static final String END_END = "^END$"; // [CS]
+ private static final String BEGIN_BC = "^=(?!cut)[a-z]\\S+(\\s)?\\S+"; // [CS] =test | =test test
+ private static final String END_BC = "^=cut$"; // [CS]
private static final String MAKEFILE_FUNCTION_NAME = "WriteMakefile";
private static final String MAKEFILE_FUNCTION = "^.*"
diff --git a/rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/parser/RubyGemParser.java b/rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/parser/RubyGemParser.java
index 30dff65b5d..097f153f3b 100644
--- a/rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/parser/RubyGemParser.java
+++ b/rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/parser/RubyGemParser.java
@@ -34,15 +34,15 @@ public class RubyGemParser {
private Map<String, ArrayList<String>> mSetupDependencies;
private static final String SETUP_START = "^gem[:\\.]{1,2}specification[:\\.]{1,2}new(\\s+)?do(\\s+)?\\|(\\s+)?(\\w+)(\\s+)?\\|";
- private static final String STRING = "(?:\\\"([^\\\"]+)\\\"|'([^']+)'|(?:%q|%Q)(?:([^\\w])([^/3].+)[^\\w]))"; // (%q|%Q) "value" | 'value' | {value}
- private static final String LIST = "(?!%q|%Q)(?:%w|%W)?(?:([\\W])(.+)[\\W])"; // (%w|%W) [value, value2] | {"value", "value2"}
- private static final String STRING_LIST = "(?:\\\"([^\\\"]+)\\\"|'([^']+)')(?:[, ])??"; // "test", "test2" | 'test' 'test2'
- private static final String GENERIC_LIST = "(?:\\S+)(?:\\s+)??"; // test, test2 | test test2
+ private static final String STRING = "(?:\\\"([^\\\"]+)\\\"|'([^']+)'|(?:%q|%Q)(?:([^\\w])([^/3].+)[^\\w]))"; // (%q|%Q) "value" | 'value' | {value}
+ private static final String LIST = "(?!%q|%Q)(?:%w|%W)?(?:([\\W])(.+)[\\W])"; // (%w|%W) [value, value2] | {"value", "value2"}
+ private static final String STRING_LIST = "(?:\\\"([^\\\"]+)\\\"|'([^']+)')(?:[, ])??"; // "test", "test2" | 'test' 'test2'
+ private static final String GENERIC_LIST = "(?:\\S+)(?:\\s+)??"; // test, test2 | test test2
private static final String REPLACE_ME = "(%REPLACE_ME)";
- private String simpleDefineRx = "(\\s+)?(?!#)(?:\\b(%REPLACE_ME)\\b\\.(\\w+))(\\s+)?=(?!=)(\\s+)?(.*)"; // gem.variable = ...
- private String genericDefineRx = "(\\s+)?(?!#)(?:\\b(%REPLACE_ME)\\b\\.(\\w+))(\\s+)?(.*)"; // gem.variable...
- private String simpleFunctionRx = "(\\s+)?(?!#)(?:\\b(%REPLACE_ME)\\b\\.(\\w+))(\\s+)?(?:\\((.*)\\))(.*)?"; // gem.variable(...)
+ private String simpleDefineRx = "(\\s+)?(?!#)(?:\\b(%REPLACE_ME)\\b\\.(\\w+))(\\s+)?=(?!=)(\\s+)?(.*)"; // gem.variable = ...
+ private String genericDefineRx = "(\\s+)?(?!#)(?:\\b(%REPLACE_ME)\\b\\.(\\w+))(\\s+)?(.*)"; // gem.variable...
+ private String simpleFunctionRx = "(\\s+)?(?!#)(?:\\b(%REPLACE_ME)\\b\\.(\\w+))(\\s+)?(?:\\((.*)\\))(.*)?"; // gem.variable(...)
/**
* Initialize

Back to the top