YAPP(1)
π NAME π
okay bestie, meet yapp β that's YAPP(1) from the User Contributed Perl Documentation corner π«Ά. It's a Perl frontend to the Parse::Yapp module, and honestly? It's giving compiler-core main character energy: it compiles Parse::Yapp grammar input files into Perl LALR(1) OO parser modules β¨.
β¨ SYNOPSYS β¨
Not me matching the original section spelling β it really is SYNOPSYS π
. Here's the invocation tea:
yapp [options] grammar[.yp]
yapp -V
yapp -h
π DESCRIPTION π
So yapp is a frontend to the Parse::Yapp module, no cap. It lets you compile Parse::Yapp grammar input files into Perl LALR(1) OO parser modules. Grammar goes in, parser module comes out β that's the whole vibe πΈ.
π¦ OPTIONS π¦
Options, as of today, are all optionals :-) β collect them like stickers, bestie.
-vβ creates a filegrammar.outputdescribing your parser. It will show you a summary of conflicts, rules, the DFA (Deterministic Finite Automaton) states, and overall usage of the parser. Very "let's look under the hood" energy π₯.-sβ creates a standalone module in which the driver is included. Note: if you have more than one parser module called from a program, to have it standalone, you need this option only for one of your parser modules.-nβ disables source file line numbering embedded in your parser module. ngl I don't know why one should need it, but it's there π.-m moduleβ gives your parser module the package name (or name space or module name or class name or whatever-you-call-it) ofmodule. It defaults togrammar.-o outfileβ the compiled output file will be namedoutfilefor your parser module. It defaults togrammar.pmor, if you specified the option-m A::Module::Name(see below), toName.pm, in the current working directory.-t filenameβ lets you specify a file which should be used as template for generating the parser output. The default is to use the internal template defined inParse::Yapp::Output.pm. For how to write your own template and which substitutions are available, have a look at the moduleParse::Yapp::Output.pm: it should be obvious π.-b shebangβ if you work on systems that understand so-called shebangs, and your generated parser is directly an executable script, you can specify one with the-boption, ie:
yapp -b '/usr/local/bin/perl -w' -o myscript.pl myscript.yp
This will output a file called myscript.pl whose very first line is:
#!/usr/local/bin/perl -w
The argument is mandatory, but if you specify an empty string, the value of $Config{perlpath} will be used instead.
grammarβ the input grammar file. If no suffix is given, and the file does not exists (keeping the original grammar, bestie), an attempt to open the file with a suffix of.ypis tried before exiting.-Vβ display current version ofParse::Yappand gracefully exits. Slay, graceful exit π .-hβ display the usage screen.
πΈ BUGS πΈ
None known now :-) β we love a clean bug list, periodt.
π AUTHOR π
William N. Braswell, Jr. <wbraswell_cpan@NOSPAM.nym.hush.com> (remove "NOSPAM"). Yes bestie, remove the NOSPAM part β that's the whole instruction π«Ά.
π COPYRIGHT π
Copyright Β© 1998, 1999, 2000, 2001, Francois Desarmenien. Copyright Β© 2017 William N. Braswell, Jr.
See Parse::Yapp(3) for legal use and distribution rights.
π SEE ALSO π
Parse::Yapp(3) Perl(1) yacc(1) bison(1) β go read the friends, bestie π.
π
cute sign-off: this page says perl v5.42.0, dated 2017-08-05, and yes it's YAPP(1) β mwah π«Ά.
π¦ where this page comes from
- opensuse-leap 16.0: perl-Parse-Yapp 1.21-160000.2.2 Β· Artistic-1.0 or GPL-2.0+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms