YAPP(1p)

πŸ“¦
version 1.21 Β· 4 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– 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 file grammar.output describing 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)
  • -m module β€” 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 to grammar.
  • -o outfile β€” The compiled output file will be named outfile for your parser module. It defaults to grammar.pm or, if you specified the option -m A::Module::Name (see below), to Name.pm, in the current working directory. 🫢
  • -t filename β€” The -t filename option 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 in Parse::Yapp::Output.pm. For how to write your own template and which substitutions are available, have a look to the module Parse::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 specifie one with the -b option, 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 .yp is tried before exiting.
  • -V β€” Display current version of Parse::Yapp and 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 Β© 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