cvsuser     05/04/01 23:25:39

  Modified:    .        MANIFEST
               config/auto perldoc.pl
               languages LANGUAGES.STATUS
               lib/Parrot/Configure RunSteps.pm
  Added:       config/auto antlr.pl
               config/auto/antlr .cvsignore test_python.g
  Log:
  Added a config check for 'antlr', as I'm starting on an ANTLR based
  implementation of bc, the POSIX basic calculator.
  ---
  Simplify config/auto/perldoc.pl.
  
  Revision  Changes    Path
  1.858     +4 -2      parrot/MANIFEST
  
  Index: MANIFEST
  ===================================================================
  RCS file: /cvs/public/parrot/MANIFEST,v
  retrieving revision 1.857
  retrieving revision 1.858
  diff -u -r1.857 -r1.858
  --- MANIFEST  26 Mar 2005 16:45:20 -0000      1.857
  +++ MANIFEST  2 Apr 2005 07:25:35 -0000       1.858
  @@ -134,10 +134,12 @@
   compilers/pge/pge_parse.c                         []
   compilers/pge/pge_parseglob.c                     []
   compilers/pge/pge_parsep5.c                       []
  -config/auto/alignptrs.pl                          []
  -config/auto/alignptrs/test_c.in                   []
   config/auto/aio.pl                                []
   config/auto/aio/aio.in                            []
  +config/auto/alignptrs.pl                          []
  +config/auto/alignptrs/test_c.in                   []
  +config/auto/antlr.pl                              []
  +config/auto/antlr/test_python.g                   []
   config/auto/byteorder.pl                          []
   config/auto/byteorder/test_c.in                   []
   config/auto/cgoto.pl                              []
  
  
  
  1.5       +8 -12     parrot/config/auto/perldoc.pl
  
  Index: perldoc.pl
  ===================================================================
  RCS file: /cvs/public/parrot/config/auto/perldoc.pl,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- perldoc.pl        16 Mar 2005 22:09:03 -0000      1.4
  +++ perldoc.pl        2 Apr 2005 07:25:36 -0000       1.5
  @@ -1,4 +1,4 @@
  -# Copyright: 2001-2004 The Perl Foundation.  All Rights Reserved.
  +# Copyright: 2001-2005 The Perl Foundation.  All Rights Reserved.
   # $Id$
   
   =head1 NAME
  @@ -7,7 +7,7 @@
   
   =head1 DESCRIPTION
   
  -Determines if Perldoc exists on the system.
  +Determines if perldoc exists on the system.
   
   =cut
   
  @@ -17,21 +17,17 @@
   use vars qw($description @args);
   use Parrot::Configure::Step ':auto';
   
  -$description = "Determining if your system has perldoc installed...";
  +$description = "Determining whether perldoc is installed...";
   
   @args = qw(verbose);
   
   sub runstep {
       my $a = `perldoc perldoc`;
  -    my $test;
  -    unless ($a =~ m/perldoc/) {
  -     Configure::Data->set(has_perldoc => 0);
  -    } else {
  -        $test = 1;
  -        Configure::Data->set(has_perldoc => 1);
  -    }
  +    my $has_perldoc = ($a =~ m/perldoc/) ? 1 : 0;
   
  -    $Configure::Step::result = $test ? 'yes' : 'no';
  +    Configure::Data->set(has_perldoc => $has_perldoc);
  +
  +    $Configure::Step::result = $has_perldoc ? 'yes' : 'no';
   }
   
   1;
  
  
  
  1.1                  parrot/config/auto/antlr.pl
  
  Index: antlr.pl
  ===================================================================
  # Copyright: 2005 The Perl Foundation.  All Rights Reserved.
  # $Id: antlr.pl,v 1.1 2005/04/02 07:25:36 bernhard Exp $
  
  =head1 NAME
  
  config/auto/antlr - Check whether antlr works
  
  =head1 DESCRIPTION
  
  Determines wheter antlr exists on the system.
  Is so, then check whether there is support for Python output.
  
  When antlr is not found, then something like
  
    export 
CLASSPATH=/home/bernhard/devel/antlr/antlr-2.7.5:/home/bernhard/devel/antlr/antlr-2.7.5/antlr-2.7.5.jar
  
  might help.
  
  =cut
  
  package Configure::Step;
  
  use strict;
  use vars qw($description @args);
  use Parrot::Configure::Step ':auto';
  
  $description = "Determining whether antlr is installed...";
  
  @args = qw(verbose);
  
  sub runstep {
      my $a = `antlr -h 2>&1`;
      my $has_antlr = ($a =~ m/ANTLR Parser Generator/) ? 1 : 0;
  
      Configure::Data->set(has_antlr => $has_antlr);
  
      my $has_antlr_with_python = 0;
      if ( $has_antlr ) {
          unlink <config/auto/antlr/*.py>; 
          my $a = `antlr -o config/auto/antlr config/auto/antlr/test_python.g 
2>&1`;
          $has_antlr_with_python = 1 if -e 'config/auto/antlr/test_python_l.py';
          $Configure::Step::result = $has_antlr_with_python ?
                                         'yes, with python' :
                                         'yes, no python';
      } else {
          $Configure::Step::result = ($a =~ m/NoClassDefFoundError/) ? 
                                       'no, NoClassDefFoundError' :
                                       'no';
      }
      Configure::Data->set(has_antlr_with_python => $has_antlr_with_python);
  }
  
  1;
  
  
  
  1.1                  parrot/config/auto/antlr/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  *.py
  *.txt
  
  
  
  1.1                  parrot/config/auto/antlr/test_python.g
  
  Index: test_python.g
  ===================================================================
  // Copyright: 2005 The Perl Foundation.  All Rights Reserved.
  // $Id: test_python.g,v 1.1 2005/04/02 07:25:37 bernhard Exp $
  
  // Test whether the installed antlr has python support
  
  options {
      language=Python;
  }
  
  class test_python_l extends Lexer;
  
  TEST : 't' 
       ;
  
  
  
  1.25      +7 -0      parrot/languages/LANGUAGES.STATUS
  
  Index: LANGUAGES.STATUS
  ===================================================================
  RCS file: /cvs/public/parrot/languages/LANGUAGES.STATUS,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- LANGUAGES.STATUS  28 Nov 2004 04:18:21 -0000      1.24
  +++ LANGUAGES.STATUS  2 Apr 2005 07:25:38 -0000       1.25
  @@ -20,6 +20,13 @@
   M: Yes
   V: 0.0.11
   
  +N: bc
  +A: Bernhard Schmalhofer
  +D: Needs antlr and Python
  +S: Not working
  +M: Yes
  +V: 0.1.2
  +
   N: befunge
   A: Jerome Quelin
   D: Functioning -93 interpreter (input routines may be funky).
  
  
  
  1.49      +4 -3      parrot/lib/Parrot/Configure/RunSteps.pm
  
  Index: RunSteps.pm
  ===================================================================
  RCS file: /cvs/public/parrot/lib/Parrot/Configure/RunSteps.pm,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- RunSteps.pm       17 Jan 2005 14:02:06 -0000      1.48
  +++ RunSteps.pm       2 Apr 2005 07:25:39 -0000       1.49
  @@ -1,4 +1,4 @@
  -# Copyright: 2001-2004 The Perl Foundation.  All Rights Reserved.
  +# Copyright: 2001-2005 The Perl Foundation.  All Rights Reserved.
   # $Id$
   
   =head1 NAME
  @@ -24,7 +24,7 @@
   use vars qw(@steps);
   
   # EDIT HERE TO ADD NEW TESTS
  [EMAIL PROTECTED](
  [EMAIL PROTECTED] = qw(
       init/manifest.pl
       init/data.pl
       init/miniparrot.pl
  @@ -60,6 +60,7 @@
       auto/gdbm.pl
       auto/snprintf.pl
       auto/perldoc.pl
  +    auto/antlr.pl
       gen/icu.pl
       gen/config_h.pl
       gen/core_pmcs.pl
  
  
  

Reply via email to