CLI.JS(1)

πŸ“¦
version 0.4.17 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸ‘‘ CLI.JS(1) β€” like, the manual page for cli.js, bestie

okay so welcome to the cli.js manual page (section 1, User Commands, we're in the big leagues πŸ’…). if you've ever wanted to conjure a parser out of thin air, this is your girl.


✨ NAME ✨

cli.js β€” a JS bottom-up parsers generator. she makes parsers. bottom-up ones. in JS. iconic behaviour, no cap. πŸ¦‹


🌸 SYNOPSIS 🌸

jison [file] [lexfile] [options]

that's it, that's the whole vibe. hand her a grammar, optionally hand her a lexer, sprinkle on some options, and she'll cook. πŸ”₯


πŸ’– DESCRIPTION πŸ’–

so like, here's the tea on the two positional args you can pass:

  • file β€” the file containing a grammar. your main character. the blueprint. ✨
  • lexfile β€” the file containing a lexical grammar. the supporting bestie that handles the tokenizing. 🫢

πŸŽ€ OPTIONS πŸŽ€

one bullet per flag, bestie, we're not skipping a single one:

  • -j, --json β€” forces jison to expect a grammar in JSON format. like, don't try to be cute with your custom grammar syntax, she's expecting JSON and she will not be flexible about it. πŸ™ˆ
  • -o FILE, --outfile FILE β€” the filename and base module name of the generated parser. basically you're naming your baby. 🍼
  • -t, --debug β€” Debug mode. default is [false]. turn it on when things are giving chaos and you need to see what's actually happening. πŸ”
  • -m TYPE, --module-type TYPE β€” the type of module to generate. your choices are commonjs, amd, or js. default is [commonjs]. pick your packaging aesthetic. πŸ“¦
  • -p TYPE, --parser-type TYPE β€” the type of algorithm to use for the parser. your options are lr0, slr, lalr, or lr. default is [lalr]. yes slr and lalr are written with that exact spacing in the source, we respect the original typography here. πŸ‘‘
  • -V, --version β€” prints the version and exits. that's it. she tells you who she is and then she leaves. main character exit. πŸ’€

ngl, --debug defaults to off, so if your parser is acting up and you're staring at your terminal like πŸ‘οΈπŸ‘„πŸ‘οΈ β€” that's your sign.

🧚 cute little sign-off 🧚

this page is documenting cli.js version 0.4.17, dated December 2021, and it lives in the CLI.JS(1) manual, section 1 (User Commands). slay, honestly. go generate some parsers. periodt. πŸ’œπŸŒˆβ­

πŸ“¦ where this page comes from