axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] A perl script to create an index of boot function defi


From: David MENTRE
Subject: [Axiom-developer] A perl script to create an index of boot function definitions
Date: Sun, 28 Sep 2003 17:16:10 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.2 (gnu/linux)

Hello,

Here is a small perl script that creates an index of all Boot function
definitions. 

This script can be used in a 'M-x grep' of Emacs.

#!/usr/bin/perl  -w

# This small script that the name of boot functions definition, with
# corresponding source file where it is defined.


# usage: THIS-SCRIPT *.boot.pamphlet

while ($target = shift) {
  open(IN,"<$target") or die "No files $target\n"; # for each file
  $line = 1;
  while (<IN>) { # for each line of $target file
      if ($_ =~ /^([^-\s;]+.*==)/ ) { # match a line that don't have a 
whitespace, 
                                      # a '-' or a ';' as first character and 
that
                                      # contains a '=='
          print "$target:$line: $1\n";
      }
      $line++;
  }
  close(IN);
}

# script end


Yours,
d.
-- 
 address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]