From 92ba6fc79ebecf55e77504fd2e7fa215d3c1a849 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sat, 24 Nov 2001 23:35:58 +0000 Subject: Added --eparser to call ethereal parser generator. (This used to be commit e1f191a9dc563648f9d151c56020e3324854f52f) --- source4/build/pidl/pidl.pl | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'source4/build/pidl') diff --git a/source4/build/pidl/pidl.pl b/source4/build/pidl/pidl.pl index 7ac7d5860f..6b32ade75a 100755 --- a/source4/build/pidl/pidl.pl +++ b/source4/build/pidl/pidl.pl @@ -13,6 +13,7 @@ use Parse::RecDescent; use dump; use header; use parser; +use eparser; use util; my($opt_help) = 0; @@ -21,6 +22,7 @@ my($opt_dump) = 0; my($opt_diff) = 0; my($opt_header) = 0; my($opt_parser) = 0; +my($opt_eparser) = 0; ##################################################################### # parse an IDL file returning a structure containing all the data @@ -60,6 +62,7 @@ sub ShowHelp() --dump dump a pidl file back to idl --header create a C header file --parser create a C parser + --eparser create an ethereal parser --diff run diff on the idl and dumped output \n"; exit(0); @@ -72,6 +75,7 @@ GetOptions ( 'dump' => \$opt_dump, 'header' => \$opt_header, 'parser' => \$opt_parser, + 'eparser' => \$opt_eparser, 'diff' => \$opt_diff ); @@ -107,7 +111,14 @@ if ($opt_parser) { my($idl) = util::LoadStructure($pidl_file); my($parser) = util::ChangeExtension($idl_file, "c"); print "Generating $parser\n"; - util::FileSave($parser, IdlParser::Dump($idl)); + util::FileSave($parser, IdlParser::Parse($idl)); +} + +if ($opt_eparser) { + my($idl) = util::LoadStructure($pidl_file); + my($parser) = util::ChangeExtension($idl_file, "c"); + print "Generating $parser for ethereal\n"; + util::FileSave($parser, IdlEParser::Parse($idl)); } if ($opt_diff) { -- cgit