1YAPP(1) User Contributed Perl Documentation YAPP(1)
2
3
4
6 yapp - A perl frontend to the Parse::Yapp module
7
9 yapp [options] grammar[.yp]
10
11 yapp -V
12
13 yapp -h
14
16 yapp is a frontend to the Parse::Yapp module, which lets you compile
17 Parse::Yapp grammar input files into Perl LALR(1) OO parser modules.
18
20 Options, as of today, are all optionals :-)
21
22 -v Creates a file grammar.output describing your parser. It will show
23 you a summary of conflicts, rules, the DFA (Deterministic Finite
24 Automaton) states and overall usage of the parser.
25
26 -s Create a standalone module in which the driver is included. Note
27 that if you have more than one parser module called from a program,
28 to have it standalone, you need this option only for one of your
29 parser module.
30
31 -n Disable source file line numbering embedded in your parser module.
32 I don't know why one should need it, but it's there.
33
34 -m module
35 Gives your parser module the package name (or name space or module
36 name or class name or whatever-you-call-it) of module. It defaults
37 to grammar
38
39 -o outfile
40 The compiled output file will be named outfile for your parser
41 module. It defaults to grammar.pm or, if you specified the option
42 -m A::Module::Name (see below), to Name.pm.
43
44 -t filename
45 The -t filename option allows you to specify a file which should be
46 used as template for generating the parser output. The default is
47 to use the internal template defined in Parse::Yapp::Output.pm.
48 For how to write your own template and which substitutions are
49 available, have a look to the module Parse::Yapp::Output.pm : it
50 should be obvious.
51
52 -b shebang
53 If you work on systems that understand so called shebangs, and your
54 generated parser is directly an executable script, you can specifie
55 one with the -b option, ie:
56
57 yapp -b '/usr/local/bin/perl -w' -o myscript.pl myscript.yp
58
59 This will output a file called myscript.pl whose very first line
60 is:
61
62 #!/usr/local/bin/perl -w
63
64 The argument is mandatory, but if you specify an empty string, the
65 value of $Config{perlpath} will be used instead.
66
67 grammar
68 The input grammar file. If no suffix is given, and the file does
69 not exists, an attempt to open the file with a suffix of .yp is
70 tried before exiting.
71
72 -V Display current version of Parse::Yapp and gracefully exits.
73
74 -h Display the usage screen.
75
77 None known now :-)
78
80 Francois Desarmenien <francois@fdesar.net>
81
83 (c) Copyright 1998-1999 Francois Desarmenien, all rights reserved. See
84 Parse::Yapp(3) for legal use and distribution rights
85
87 Parse::Yapp(3) Perl(1) yacc(1) bison(1)
88
89
90
91perl v5.16.3 2001-02-11 YAPP(1)