ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional ANTLR.java
Date Wed, 25 Jun 2003 18:35:28 GMT
antoine     2003/06/25 11:35:28

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional ANTLR.java
  Log:
  All the tests in ANTLRTest.java involving a super-grammar file were failing on Windows.
  This change fixes the problem.
  
  Revision  Changes    Path
  1.28      +11 -1     ant/src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java
  
  Index: ANTLR.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- ANTLR.java	21 May 2003 13:29:55 -0000	1.27
  +++ ANTLR.java	25 Jun 2003 18:35:28 -0000	1.28
  @@ -66,6 +66,7 @@
   import org.apache.tools.ant.taskdefs.Execute;
   import org.apache.tools.ant.taskdefs.LogOutputStream;
   import org.apache.tools.ant.taskdefs.PumpStreamHandler;
  +import org.apache.tools.ant.taskdefs.condition.Os;
   import org.apache.tools.ant.types.Commandline;
   import org.apache.tools.ant.types.CommandlineJava;
   import org.apache.tools.ant.types.Path;
  @@ -143,9 +144,18 @@
   
       /**
        * Sets an optional super grammar file.
  +     * @TODO change the semantic from String to File
        */
       public void setGlib(String superGrammar) {
  -        this.superGrammar = superGrammar;
  +        String sg = null;
  +        if (Os.isFamily("dos")) {
  +            sg = superGrammar.replace('\\','/');
  +        }
  +        else
  +        {
  +            sg = superGrammar;
  +        }
  +        this.superGrammar = sg;
       }
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message