
use Parse::Lexer;

my $lexer = Parse::Lexer->new(
            PLUS => qr/\+/,
            MINUS => qr/\-/,
            NUMBER => qr/[0-9]+/,
            IDENT => qr/[a-z]+/,
			);

while (my ($token,$value) = $lexer->next) {
	printf "[%s]", $value;
	
	last unless ($token and $value); # XXX
}

