KPEG(1)

πŸ“¦
version 1.3.3 Β· 3 versions
, in ubuntu resolute, ubuntu stonking

✨ KPEG β€” the manual page, but make it a group chat πŸ’…

okay bestie, buckle up, we're talking about kpeg from the User command section, and honestly? it's giving parser-generator royalty πŸ‘‘


🌸 NAME 🌸

kpeg β€” a ruby parser generator that builds your parser straight out of a PEG grammar. no cap. πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

 kpeg [ options ]

that's it, that's the whole vibe. you just run it with whatever options you want and let it cook πŸ”₯


πŸ’– DESCRIPTION πŸ’–

so like, here's the tea πŸ“: kpeg generates a ruby parser from a PEG (parsing expression grammar) file. you write the grammar, it hands you back a parser. iconic behaviour, truly. ✨

the grammar syntax is described on the kpeg home page, which lives right here:

<https://github.com/evanphx/kpeg>

literally go read it, iykyk πŸ“š


✨ OPTIONS ✨

okay this is the part where we get into the flags, and there are exactly eight of them, so let's go one by one like the organized queen you are πŸ‘‘

  • -t, --test β€” just syntax check the file, nothing else. it's the "am i doing this right?" button πŸ™ˆ
  • --reformat β€” reformat your grammar and write it right back out. glow-up for your grammar file πŸ’…
  • -o, --output FILE β€” tells it where the output should go. FILE is your destination, bestie πŸ“
  • -n, --name NAME β€” the class name to use for the parser. NAME it and claim it πŸŽ€
  • -f, --force β€” overwrite the output if it already exists. consent matters, so this is the explicit yes βœ…
  • -s, --stand-alone β€” write the parser so it can run standalone. independent main character energy fr fr πŸ‘‘
  • -v, --[no-]verbose β€” run verbosely. yes, the [no-] is real β€” you can turn it off too. talkative or mysterious, your call πŸ—£οΈ
  • -d, --debug β€” debug the parsing of the file. for when it's not giving what it's supposed to give 😭
heads up bestie: -f, --force is the one that overwrites things. if your output file already exists and you didn't pass it, that's a whole situation. be careful out there 🫢

🌈 AUTHOR 🌈

this manual page was written by Dominique Dumont <dod@debian.org>, for the Debian GNU/Linux system (but may be used by others). absolute legend, we stan 🌟


πŸ¦‹ SEE ALSO πŸ¦‹


and that's the whole page, babe 🧚 this was kpeg, dated 2024-09-24, and it's a KPEG(1) situation β€” so go forth, write your grammar, and generate something beautiful. periodt. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from