#!/usr/bin/perl -w
#
# Create a dictionary of names -> 8 char unique identifiers
# 5/15/2003  Rowin Andruscavage
#
# usage : namepack.pl -[u|p] filename dictionary
#	-p :  pack (default)
#	-u : unpack using dictionary

my @switches = grep(/^-.*/, @ARGV);
my @ARGV = grep(!/^-.*/, @ARGV);

open(INFILE, defined($ARGV[0]) ? (filename => $ARGV[0]) : (ioref => \*STDIN));
my @text = <INFILE>;
close(INFILE);

#open(INFILE, defined($ARGV[0]) ? (filename => $ARGV[0]) : (ioref => \*STDIN));
#my @text = <INFILE>;
#close(INFILE);

my @reserved = (
		max,
		int
		);

my $comment = 0;
foreach my $token (split(/\s/, join('', @text))) {
    if ($token eq '/*') {
	$comment = 1;
    } 
    if ($comment) { 
	if ($token eq '*/') {
	    $comment = 0;
	}
	next; 
    }
    if ($token =~ /[a-z|A-Z]/) {
	
	print "var found: $token \n";
    }
}

#print $text;


