Debian Codegraph @

homepage/script-docs/stag-parse.html

raw
1 <HTML>
2 <HEAD>
3 <TITLE>stag-parse</TITLE>
4 <LINK REV="made" HREF="mailto:[email protected]">
5 </HEAD>
6
7 <BODY>
8
9 <A NAME="__index__"></A>
10 <!-- INDEX BEGIN -->
11
12 <UL>
13
14 <LI><A HREF="#name">NAME</A></LI>
15 <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
16 <LI><A HREF="#description">DESCRIPTION</A></LI>
17 <LI><A HREF="#arguments">ARGUMENTS</A></LI>
18 <LI><A HREF="#see also">SEE ALSO</A></LI>
19 </UL>
20 <!-- INDEX END -->
21
22 <HR>
23 <P>
24 <H1><A NAME="name">NAME</A></H1>
25 <P>stag-parse.pl - parses a file and fires events (e.g. sxpr to xml)</P>
26 <P>
27 <HR>
28 <H1><A NAME="synopsis">SYNOPSIS</A></H1>
29 <PRE>
30 # convert XML to IText
31 stag-parse.pl -p xml -w itext file1.xml file2.xml</PRE>
32 <PRE>
33 # use a custom parser/generator and a custom writer/generator
34 stag-parse.pl -p MyMod::MyParser -w MyMod::MyWriter file.txt</PRE>
35 <P>
36 <HR>
37 <H1><A NAME="description">DESCRIPTION</A></H1>
38 <P>script wrapper for the Data::Stag modules</P>
39 <P>feeds in files into a parser object that generates nestarray events,
40 and feeds the events into a handler/writer class</P>
41 <P>
42 <HR>
43 <H1><A NAME="arguments">ARGUMENTS</A></H1>
44 <DL>
45 <DT><STRONG><A NAME="item_%2Dp%7Cparser_FORMAT">-p|parser FORMAT</A></STRONG><BR>
46 <DD>
47 FORMAT is one of xml, sxpr or itext, or the name of a perl module
48 <P>this is the class that parsers the input <CODE>file(s)</CODE> and generates stag
49 events</P>
50 <P>xml assumed as default</P>
51 <P></P>
52 <DT><STRONG><A NAME="item_%2Dw%7Cwriter_FORMAT">-w|writer FORMAT</A></STRONG><BR>
53 <DD>
54 FORMAT is one of xml, sxpr or itext, or the name of a perl module
55 <P>this is the class that catches the events thrown by the parser; it can
56 be any class, but the class is typically a writer</P>
57 <P>xml assumed as default</P>
58 <P></P>
59 <DT><STRONG><A NAME="item_%2Do%7Cout_FILE">-o|out FILE</A></STRONG><BR>
60 <DD>
61 the writer will use this file (defaults to STDOUT)
62 <P></P>
63 <DT><STRONG><A NAME="item_%2De%7Cerrf_FILE">-e|errf FILE</A></STRONG><BR>
64 <DD>
65 file to store parse error handler output
66 <P></P>
67 <DT><STRONG><A NAME="item_%2Derrhandler_FORMAT%2FMODULE">-errhandler FORMAT/MODULE</A></STRONG><BR>
68 <DD>
69 FORMAT is one of xml, sxpr or itext, or the name of a perl module
70 <P>all parse error events go to this module</P>
71 <P></P>
72 <DT><DD>
73 <DT><STRONG><A NAME="item_%2Dr%7Croot_NODE_NAME">-r|root NODE_NAME</A></STRONG><BR>
74 <DD>
75 if this is specified, NODE_NAME becomes the root of the stag tree, and
76 anything that was previously the root is placed below this.
77 <P>this happens automatically if more than one file is parsed (because
78 there can only be one tree root)</P>
79 <P></P>
80 <DT><STRONG><A NAME="item_%2Dcolor">-color</A></STRONG><BR>
81 <DD>
82 Works only if the output handler is able to provide ASCII-colors
83 (currently supported for itext and xml)
84 <P></P></DL>
85 <P>
86 <HR>
87 <H1><A NAME="see also">SEE ALSO</A></H1>
88 <P><A HREF="./Data/Stag.html">the Data::Stag manpage</A></P>
89 <P>This script is a wrapper for the method</P>
90 <PRE>
91 Data::Stag-&gt;parse()</PRE>
92
93 </BODY>
94
95 </HTML>