Commit 21420334 authored by Lev Walkin's avatar Lev Walkin

removed useless clyx2asn1 conversion

parent 101c26db
dist_bin_SCRIPTS = crfc2asn1.pl clyx2asn1.pl dist_bin_SCRIPTS = crfc2asn1.pl
ASN1_SOURCE_1 = rfc3280.txt ASN1_SOURCE_1 = rfc3280.txt
ASN1_FILES_1 = \ ASN1_FILES_1 = \
......
...@@ -189,7 +189,7 @@ target_alias = @target_alias@ ...@@ -189,7 +189,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
dist_bin_SCRIPTS = crfc2asn1.pl clyx2asn1.pl dist_bin_SCRIPTS = crfc2asn1.pl
ASN1_SOURCE_1 = rfc3280.txt ASN1_SOURCE_1 = rfc3280.txt
ASN1_FILES_1 = \ ASN1_FILES_1 = \
rfc3280-PKIX1Explicit88.asn1 \ rfc3280-PKIX1Explicit88.asn1 \
......
...@@ -25,8 +25,6 @@ This directory contains a few examples. ...@@ -25,8 +25,6 @@ This directory contains a few examples.
UserPlane Location Protocol decoder. Before trying to compile, read the UserPlane Location Protocol decoder. Before trying to compile, read the
README file in that directory. README file in that directory.
The clyx2asn1.pl script can be used to extract ASN.1 data from LyX editor files.
The crfc2asn1.pl script can be used to extract ASN.1 data from RFC texts. The crfc2asn1.pl script can be used to extract ASN.1 data from RFC texts.
For instance, it is used to extract X.509, MEGACO, and LDAPv3 ASN.1 modules For instance, it is used to extract X.509, MEGACO, and LDAPv3 ASN.1 modules
from the corresponding RFC texts (rfc3280.txt, rfc3525.txt, rfc4211.txt). from the corresponding RFC texts (rfc3280.txt, rfc3525.txt, rfc4211.txt).
......
#!/usr/bin/env perl
#
# $Id$
# $Author$
#
# Simple tool to extract known ASN.1 modules from the stream of LyX data.
#
if($#ARGV == -1) {
print STDERR "Extract known modules from LyX data\n";
print STDERR "Usage: cat *.lyx | $0 <ASN-Module-Name> ...\n";
exit 64;
}
# Convert arguments into a hash for quicker search.
for(my $i; $i <= $#ARGV; $i++) {
$modules{$ARGV[$i]} = $ARGV[$i].".asn1";
}
# Process incoming stream in search for ASN.1 modules.
while(<STDIN>) {
chop;
if($inmodule) {
next if(/^$/);
if(/^\\layout /) {
print O "\n";
next;
}
if(/^\\begin_inset Quotes/) {
print O '"';
next;
}
next if(/^\\/);
print O;
if(/^END$/) {
$inmodule = 0;
print O "\n";
}
} else {
/^([A-Za-z0-9-]+)(\s*{.*)?$/;
next unless $modules{$1};
open(O, '> '.$modules{$1});
print O;
$inmodule = 1;
delete $modules{$1};
}
}
# Make sure noone's missing.
die "Modules not found: " . join(", ", keys %modules) . "\n" if keys %modules;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment