/[suikacvs]/messaging/manakai/bin/disc.pl
Suika

Contents of /messaging/manakai/bin/disc.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Sun Feb 26 14:32:38 2006 UTC (18 years, 9 months ago) by wakaba
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +0 -0 lines
File MIME type: text/plain
FILE REMOVED
++ manakai/t/ChangeLog	26 Feb 2006 14:32:29 -0000
	* Makefile (distclean): New rule.

2006-02-26  Wakaba  <wakaba@suika.fam.cx>

++ manakai/bin/ChangeLog	26 Feb 2006 14:18:44 -0000
	* daf.pl: Request for |fe:GenericLS| feature was missing.
	Sets the |pc:preserve-line-break| parameter for test
	code as |dac2test.pl| had been.

	* dac.pl, dac2pm.pl, dac2test.pl: Removed.

	* disc.pl, cdis2pm.pl, cdis2rdf.pl: Removed.

2006-02-26  Wakaba  <wakaba@suika.fam.cx>

++ manakai/lib/Message/ChangeLog	26 Feb 2006 14:19:17 -0000
2006-02-26  Wakaba  <wakaba@suika.fam.cx>

	* Makefile (distclean): New rule.

++ manakai/lib/Message/Body/ChangeLog	26 Feb 2006 14:19:35 -0000
2006-02-26  Wakaba  <wakaba@suika.fam.cx>

	* Makefile (distclean): New rule.

++ manakai/lib/Message/Field/ChangeLog	26 Feb 2006 14:24:08 -0000
2006-02-26  Wakaba  <wakaba@suika.fam.cx>

	* Makefile (distclean): New rule.

++ manakai/lib/Message/MIME/ChangeLog	26 Feb 2006 14:24:31 -0000
2006-02-26  Wakaba  <wakaba@suika.fam.cx>

	* Makefile (distclean): New rule.

++ manakai/lib/Message/Markup/ChangeLog	26 Feb 2006 14:24:49 -0000
	* Makefile (distclean): New rule.

2006-02-26  Wakaba  <wakaba@suika.fam.cx>

++ manakai/lib/Message/Util/ChangeLog	26 Feb 2006 14:27:24 -0000
	* PerlCode.dis (PerlStringLiteral.stringify): If some character
	are escaped, the string should have been quoted by |QUOTATION MARK|.

	* Makefile (.discore-all.pm): The parameter for |DIS/DPG.dis|
	module was misplaced.
	(distclean): New rule.
	(clean): Cleans subdirectories, too.

2006-02-26  Wakaba  <wakaba@suika.fam.cx>

++ manakai/lib/Message/Util/DIS/ChangeLog	26 Feb 2006 14:31:14 -0000
	* Perl.dis (plUpdate): Reads |dis:DefaultFor| property
	from the source if it is not available from the module
	in the database, i.e. the |readProperties| method
	is not performed for the module.
	(getPerlInterfaceMemberCode): Renamed
	from |getPerlErrorInterfaceMemberCode|.
	(DISLang:Const.getPerlInterfaceMemberCode): New
	method implementation.  Constants defined in interfaces
	were not reflected to the generated Perl module code
	since the split of |plGeneratePerlModule| method.

	* DPG.dis (Require): Reference to |DIS:Perl| module was missing.

2006-02-26  Wakaba  <wakaba@suika.fam.cx>

++ manakai/lib/Message/DOM/ChangeLog	26 Feb 2006 14:21:51 -0000
	* SimpleLS.dis (Require): Reference to the |MDOM:Tree|
	module was missing.

	* ManakaiDOMLS2003.dis: Some property names was incorrect.

	* Makefile (distclean): New rule.

2006-02-26  Wakaba  <wakaba@suika.fam.cx>

	* DOMLS.dis: Removed from the CVS repository, since
	it has been no longer required to make the |daf| system
	itself.

2006-02-26  Wakaba  <wakaba@suika.fam.cx>

++ manakai/lib/manakai/ChangeLog	26 Feb 2006 14:32:09 -0000
	* Makefile (distclean): New rule.

2006-02-26  Wakaba  <wakaba@suika.fam.cx>

++ manakai/lib/ChangeLog	26 Feb 2006 14:19:00 -0000
2006-02-26  Wakaba  <wakaba@suika.fam.cx>

	* Makefile (distclean): New rule.

1 wakaba 1.1 #!/usr/bin/perl -w
2     use strict;
3     use Message::Util::QName::Filter {
4     ManakaiDOM => q<http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom#>,
5     };
6    
7     use Getopt::Long;
8     use Pod::Usage;
9     use Storable qw/nstore retrieve/;
10     my %Opt;
11     GetOptions (
12     'for=s' => \$Opt{For},
13     'help' => \$Opt{help},
14     'input-cdis-file-name=s' => \$Opt{input_file_name},
15     'output-file-name=s' => \$Opt{output_file_name},
16 wakaba 1.2 'search-path|I=s' => ($Opt{module_file_search_path} = []),
17 wakaba 1.1 'undef-check!' => \$Opt{no_undef_check},
18     'verbose!' => $Opt{verbose},
19     ) or pod2usage (2);
20     pod2usage ({-exitval => 0, -verbose => 1}) if $Opt{help};
21     $Opt{file_name} = shift;
22     pod2usage ({-exitval => 2, -verbose => 0}) unless $Opt{file_name};
23     pod2usage ({-exitval => 2, -verbose => 0}) unless $Opt{output_file_name};
24     $Opt{no_undef_check} = defined $Opt{no_undef_check}
25     ? $Opt{no_undef_check} ? 0 : 1 : 0;
26 wakaba 1.2 push @{$Opt{module_file_search_path}}, '.';
27 wakaba 1.1
28     BEGIN {
29     require 'manakai/genlib.pl';
30     require 'manakai/dis.pl';
31     }
32    
33     eval q{
34     sub impl_msg ($;%) {
35     warn shift () . "\n";
36     }
37     } unless $Opt{verbose};
38    
39     our $State;
40     if (defined $Opt{input_file_name}) {
41     $State = retrieve ($Opt{input_file_name})
42     or die "$0: $Opt{input_file_name}: Cannot load";
43     }
44     $State->{DefaultFor} = $Opt{For} if defined $Opt{For};
45 wakaba 1.3 $State->{Namespace} = {};
46     $State->{ETBinding} = {};
47     undef $State->{module};
48 wakaba 1.2 my $source = dis_load_module_file
49     (module_file_name => $Opt{file_name},
50     For => $Opt{For},
51     use_default_for => 1,
52     module_file_search_path => $Opt{module_file_search_path});
53     $State->{def_required}->{For}->{$State->{DefaultFor}} ||= 1;
54 wakaba 1.1 dis_check_undef_type_and_for () unless $Opt{no_undef_check};
55     if (dis_uri_for_match (ExpandedURI q<ManakaiDOM:Perl>, $State->{DefaultFor})) {
56     dis_perl_init ($source, For => $State->{DefaultFor});
57     }
58    
59     nstore $State, $Opt{output_file_name};
60    
61     __END__
62    
63     =head1 NAME
64    
65     disc - dis compiler
66    
67     =head1 SYNOPSIS
68    
69     perl disc.pl Source.dis --output-file-name=s.tmp [options...]
70     perl disc.pl --help
71    
72     =head1 DESCRIPTION
73    
74     C<disc> is a disc compiler that read "dis" files (a dis file specified
75     as a command-line argument and other dis files, if any, referred from that file),
76     convert it to the internal object and write it down to a file.
77     The compiled file can be used as an input for dis to some format converter
78     such as L<dis2pm> or L<dis2rdf>.
79    
80     Note: Compiled dis files depend on the version of dis utilities.
81    
82     =head2 OPTIONS
83    
84     =over 4
85    
86     =item I<Source.dis>
87    
88     A dis file that is first parsed.
89    
90     =item --help
91    
92     Show the help message.
93    
94     =item --for=I<ForURI>
95    
96     A "For" URI referenece that is first set. This is optional;
97     if missing, the C<Module/DefaultFor> attribute of I<Source.dis>
98     is used.
99    
100     =item --input-cdis-file-name=I<s.orig>
101    
102     A compiled dis file that is loaded before the parse of I<Source.dis>
103     as base of new compiled dis. In other word, I<Source.dis> (and
104     other included files) are merged to I<s.orig> data.
105    
106     =item --output-file-name=I<s.tmp>
107    
108     A file name the result compiled dis is written to.
109    
110     =back
111    
112     =head1 LICENSE
113    
114     Copyright 2004 Wakaba <w@suika.fam.cx>. All rights reserved.
115    
116     This program is free software; you can redistribute it and/or
117     modify it under the same terms as Perl itself.
118    
119     =cut
120    

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24