YAPP(1p)
π NAME π
yapp β a perl frontend to the Parse::Yapp module. yes bestie, it's giving compiler-girlie π
β¨ SYNOPSYS β¨
yapp [options] grammar[.yp]
yapp -V
yapp -h
π¦ DESCRIPTION π¦
okay so real talk: yapp is a frontend to the Parse::Yapp module, and what it does is literally take your Parse::Yapp grammar input files and compile them into Perl LALR(1) OO parser modules. that's the whole vibe. iconic. π
π OPTIONS π
Options, as of today, are all optionals :-) (the original said it, I'm not making this up, we love a low-stakes API)
-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. receipts, basically. π§Ύ-sβ Create a standalone module in which the driver is included. π note that 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 module.-nβ Disable source file line numbering embedded in your parser module. I don't know why one should need it, but it's there. π€·ββοΈ (not me questioning the lore, it fr fr just is)-mmodule β Gives your parser module the package name (or name space or module name or class name or whatever-you-call-it) of module. It defaults togrammar.-ooutfile β The compiled output file will be named outfile for 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. π«Ά-tfilename β The-t filenameoption allows you to 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 to the moduleParse::Yapp::Output.pm: it should be obvious. π-bshebang β If you work on systems that understand so called shebangs, and your generated parser is directly an executable script, you can specifie 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, an attempt to open the file with a suffix of
.ypis tried before exiting. -Vβ Display current version ofParse::Yappand gracefully exits. π graceful queen behaviour-hβ Display the usage screen.
π BUGS π
None known now :-) (we're thriving, no cap π)
π AUTHOR π
William N. Braswell, Jr. <wbraswell_cpan@NOSPAM.nym.hush.com> (Remove "NOSPAM".)
πΈ 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)
and that's the whole page bestie π this one shipped with perl v5.38.2, dated 2024-06-19, under the manual name YAPP(1p) β slay, go compile something cute β¨π¦
π¦ where this page comes from
- debian trixie: libparse-yapp-perl 1.21-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libparse-yapp-perl 1.21-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libparse-yapp-perl 1.21-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms