You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@locus.apache.org on 2000/07/24 16:22:16 UTC

cvs commit: apache-2.0/src/lib/apr/helpers scandoc

rbb         00/07/24 07:22:16

  Modified:    src/lib/apr/helpers scandoc
  Log:
  ScanDoc recently committed a change that correctly parsed "extern C".  I am
  adding that change to the scanDoc in our tree and removing the horrible
  hack I added to make it work in the meantime.
  
  Revision  Changes    Path
  1.2       +17 -10    apache-2.0/src/lib/apr/helpers/scandoc
  
  Index: scandoc
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/helpers/scandoc,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- scandoc	2000/07/23 18:11:14	1.1
  +++ scandoc	2000/07/24 14:22:16	1.2
  @@ -187,16 +187,16 @@
     
     $nest = 1;
     
  -#  for (;;) {
  -#    if (&matchRBracket) { $nest++; }
  -#    elsif (&matchLBracket) {
  -#      $nest--;
  -#      last if !$nest;
  -#    }
  -#    else { 
  -#      last if ((($valid,) = &matchKW( "[^\{\}]")) && !$valid);
  -#    }
  -#  }
  +  for (;;) {
  +    if (&matchRBracket) { $nest++; }
  +    elsif (&matchLBracket) {
  +      $nest--;
  +      last if !$nest;
  +    }
  +    else { 
  +      last if ((($valid,) = &matchKW( "[^\{\}]")) && !$valid);
  +    }
  +  }
   }
   
   # Skip a string. (multiline)
  @@ -612,6 +612,13 @@
     }
     elsif ((($valid,)=&matchKW( "friend\s*class" )) && $valid) {
       &skipToSemi;
  +  }
  +  elsif ((($valid, $token) = &matchKW("extern\\s*\\\"C\\\"")) && $valid) {
  +    &matchRBracket;
  +    while (!&matchLBracket) {
  +      &parseDeclaration( '' ) || die "Unmatched brace! line = $linenumber\n";
  +    }
  +    &matchSemi;
     }
     # elsif ($kw = &matchID) {
     #   $type = "$kw ";