⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 menuc.pl

📁 linux下从网卡远程启动
💻 PL
字号:
#!/usr/bin/perl -w# Program to compile a menu description into a binary file# Placed under GNU Public License by Ken Yap, January 2001# This Perl program requires Parse::RecDescent# If you cannot install this module in the standard directory, then# install RecDescent.pm in a directory that you can in and# edit the line below to include this directory in the search path.## BEGIN {# 	push(@INC, '/usr/local/lib/mknbi');# }use strict;use Getopt::Long;use Socket;use Parse::RecDescent;use constant;use constant DEBUG => 0;use constant MAXINPUT => 102400;use vars qw($output $status $text $grammar $parser $result);$grammar = q(	specs:		spec(s?) eofile		{ $return = 1 }	spec:		global_option | menu | <error>	global_option:	timeout	timeout:	'timeout' number ';'	number:		'number'	menu:		'menu' name '{' menu_body '}'	name:		'name'	menu_body:	'title' strings ';'			| menu_option			| items	strings:	string(s)	string:		<perl_quotelike>	menu_option:	timeout	items:		item(s)	item:		'item'	eofile:		/^\Z/);$::RD_HINT = 1;GetOptions('output=s' => \$output);# If an output file is specified, redirect stdout to itif (defined($output)) {	die "$output: $!\n" unless open(STDOUT, ">$output");}binmode(STDOUT);# If an input file is specified, redirect stdin from itif ($#ARGV >= 0) {	die "$ARGV[0]: $!\n" unless open(STDIN, "$ARGV[0]");}print "Menuc doesn't work yet\n";$parser = new Parse::RecDescent($grammar);# Read up to the maximum number of bytes allowed in a specification$status = read(STDIN, $text, MAXINPUT);die "read: $!\n" unless defined($status);$result = $parser->specs($text);unless (defined($result)) {	print "Syntax error in specification\n";}__END__=head1 NAMEmenuc - compile a menu description into a binary file=head1 SYNOPSISB<menuc> [--output=I<outputfile>] [I<inputfile>]=head1 DESCRIPTIONB<menuc> compiles menu descriptions to data file suitable forinterpretation by an Etherboot menu extension program.B<--output=>I<outputfile> Specify the output file, can be used withall variants.  Stdout is the default.The package must be installed in the destination location before theexecutables can be run, because it looks for library files.=head1 BUGSPlease report all bugs to the author.=head1 SEE ALSOEtherboot tutorial at C<http://etherboot.sourceforge.net/>=head1 COPYRIGHTB<menuc> is under the GNU Public License=head1 AUTHORKen Yap (C<ken_yap@users.sourceforge.net>)=head1 DATEVersion 0.9 January 2001

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -