The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
#!perl

use strict;
use warnings;

#------------------------------------------------------------------------------
# lexer
sub make_lexer {
	my($_) = @_;

	return sub {
		/\G[ \t]+/gc;
		return [NUM  => $1] if /\G(\d+)/gc;
		return [NAME => $1] if /\G([a-z]\w*)/gci;
		return [$1   => $1] if /\G(.)/gcs;
		return;
	};
}

1;