CLI.JS(1)
π 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β forcesjisonto 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 arecommonjs,amd, orjs. default is[commonjs]. pick your packaging aesthetic. π¦-p TYPE,--parser-type TYPEβ the type of algorithm to use for the parser. your options arelr0,slr,lalr, orlr. default is[lalr]. yesslrandlalrare 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
- debian bookworm: jison 0.4.17+dfsg-5 Β· MIT
- debian trixie: jison 0.4.17+dfsg-5 Β· MIT
- ubuntu jammy: jison 0.4.17+dfsg-5 Β· MIT
- ubuntu noble: jison 0.4.17+dfsg-5 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms