[Swift-commit] r2117 - in trunk: resources tests/language/working-base
noreply at svn.ci.uchicago.edu
noreply at svn.ci.uchicago.edu
Tue Jul 15 02:47:40 CDT 2008
Author: benc
Date: 2008-07-15 02:47:39 -0500 (Tue, 15 Jul 2008)
New Revision: 2117
Modified:
trunk/resources/swiftscript.g
trunk/tests/language/working-base/039-montage.xml
trunk/tests/language/working-base/q16.xml
trunk/tests/language/working-base/q17.xml
Log:
part 2 of commits for bug 148. change handling of backslash symbol in string literals.
Modified: trunk/resources/swiftscript.g
===================================================================
--- trunk/resources/swiftscript.g 2008-07-15 07:46:50 UTC (rev 2116)
+++ trunk/resources/swiftscript.g 2008-07-15 07:47:39 UTC (rev 2117)
@@ -50,7 +50,9 @@
}
String quote(String s) {
- return s.replaceAll("\\\\\"", """);
+ String s1 = s.replaceAll("\\\\\"", """);
+ String s2 = s1.replaceAll("\\\\\\\\", "\\\\");
+ return s2;
}
}
Modified: trunk/tests/language/working-base/039-montage.xml
===================================================================
--- trunk/tests/language/working-base/039-montage.xml 2008-07-15 07:46:50 UTC (rev 2116)
+++ trunk/tests/language/working-base/039-montage.xml 2008-07-15 07:47:39 UTC (rev 2117)
@@ -86,16 +86,16 @@
<mapping descriptor="regexp_mapper">
<param name="source"><function name="filename">
<variableReference>img</variableReference></function></param>
- <param name="match"><stringConstant>.*\\/(.*)</stringConstant></param>
- <param name="transform"><stringConstant>proj_\\1</stringConstant></param>
+ <param name="match"><stringConstant>.*\/(.*)</stringConstant></param>
+ <param name="transform"><stringConstant>proj_\1</stringConstant></param>
</mapping>
</dataset>
<dataset name="areaImg" type="Image">
<mapping descriptor="regexp_mapper">
<param name="source"><function name="filename">
<variableReference>projImg</variableReference></function></param>
- <param name="match"><stringConstant>(.*)\\.(.*)</stringConstant></param>
- <param name="transform"><stringConstant>\\1_area.\\2</stringConstant></param>
+ <param name="match"><stringConstant>(.*)\.(.*)</stringConstant></param>
+ <param name="transform"><stringConstant>\1_area.\2</stringConstant></param>
</mapping>
</dataset>
<call proc="mProjectPP" src="line 27">
@@ -225,8 +225,8 @@
<mapping descriptor="regexp_mapper">
<param name="source"><function name="filename">
<variableReference>image1</variableReference></function></param>
- <param name="match"><stringConstant>(.*)\\.(.*)</stringConstant></param>
- <param name="transform"><stringConstant>\\1_area.\\2</stringConstant></param>
+ <param name="match"><stringConstant>(.*)\.(.*)</stringConstant></param>
+ <param name="transform"><stringConstant>\1_area.\2</stringConstant></param>
</mapping>
</dataset>
<variable name="image2" type="Image"><structureMember>
@@ -237,8 +237,8 @@
<mapping descriptor="regexp_mapper">
<param name="source"><function name="filename">
<variableReference>image2</variableReference></function></param>
- <param name="match"><stringConstant>(.*)\\.(.*)</stringConstant></param>
- <param name="transform"><stringConstant>\\1_area.\\2</stringConstant></param>
+ <param name="match"><stringConstant>(.*)\.(.*)</stringConstant></param>
+ <param name="transform"><stringConstant>\1_area.\2</stringConstant></param>
</mapping>
</dataset>
<dataset name="diffImg" type="Image">
@@ -255,7 +255,7 @@
<param name="source"><function name="filename">
<variableReference>diffImg</variableReference></function></param>
<param name="match"><stringConstant>diff(.*)fits</stringConstant></param>
- <param name="transform"><stringConstant>fit\\1txt</stringConstant></param>
+ <param name="transform"><stringConstant>fit\1txt</stringConstant></param>
</mapping>
</dataset>
<call proc="mDiffFit" src="line 59">
@@ -439,15 +439,15 @@
<param name="source"><function name="filename">
<variableReference>projImg</variableReference></function></param>
<param name="match"><stringConstant>proj_(.*)</stringConstant></param>
- <param name="transform"><stringConstant>corr_\\1</stringConstant></param>
+ <param name="transform"><stringConstant>corr_\1</stringConstant></param>
</mapping>
</dataset>
<dataset name="corrArea" type="Image">
<mapping descriptor="regexp_mapper">
<param name="source"><function name="filename">
<variableReference>corrImg</variableReference></function></param>
- <param name="match"><stringConstant>(.*)\\.(.*)</stringConstant></param>
- <param name="transform"><stringConstant>\\1_area.\\2</stringConstant></param>
+ <param name="match"><stringConstant>(.*)\.(.*)</stringConstant></param>
+ <param name="transform"><stringConstant>\1_area.\2</stringConstant></param>
</mapping>
</dataset>
<call proc="mBackground" src="line 94">
Modified: trunk/tests/language/working-base/q16.xml
===================================================================
--- trunk/tests/language/working-base/q16.xml 2008-07-15 07:46:50 UTC (rev 2116)
+++ trunk/tests/language/working-base/q16.xml 2008-07-15 07:47:39 UTC (rev 2117)
@@ -38,7 +38,7 @@
<param name="source"><function name="filename">
<variableReference>inputfile</variableReference></function></param>
<param name="match"><stringConstant>(.*)txt</stringConstant></param>
- <param name="transform"><stringConstant>\\1count</stringConstant></param>
+ <param name="transform"><stringConstant>\1count</stringConstant></param>
</mapping>
</dataset>
<call proc="countwords" src="line 14">
Modified: trunk/tests/language/working-base/q17.xml
===================================================================
--- trunk/tests/language/working-base/q17.xml 2008-07-15 07:46:50 UTC (rev 2116)
+++ trunk/tests/language/working-base/q17.xml 2008-07-15 07:47:39 UTC (rev 2117)
@@ -43,7 +43,7 @@
<param name="source"><function name="filename">
<variableReference>f</variableReference></function></param>
<param name="match"><stringConstant>(.*)txt</stringConstant></param>
- <param name="transform"><stringConstant>\\1count</stringConstant></param>
+ <param name="transform"><stringConstant>\1count</stringConstant></param>
</mapping>
</dataset>
<call proc="countwords" src="line 17">
More information about the Swift-commit
mailing list