Command-line tool for the Parseidon parser generator.
$ dotnet add package dotnet-parseidonGlobal dotnet tool that compiles .pgram grammar files into C# parsers, TextMate grammars, or full VS Code language packages. Project home: https://github.com/parseidon/parseidon
dotnet tool install -g dotnet-parseidon
parser: generate a C# parser file. Options: --namespace|-n overrides the generated namespace, --class-name|-c overrides the generated parser class name.vscode: emit a VS Code package (package.json, language-configuration.json, syntaxes/*.tmLanguage.json).textmate: write a standalone TextMate grammar JSON.ast: generate an AST by first compiling a parser from the grammar file and then parsing a code file. Usage: dotnet parseidon ast GRAMMAR-FILE CODE-FILE OUTPUT-FILE.Common option: --override|-o {ask|abort|backup|override} controls how existing outputs are handled.
# Create a parser and keep any existing file as .bak
dotnet parseidon parser hello.pgram DemoParser.cs -o backup
# Generate a VS Code package with a specific version and override file
dotnet parseidon vscode hello.pgram out/vscode -o override -v 1.0.0 --package-json-override ./package.patch.json
# Export a TextMate grammar only
dotnet parseidon textmate hello.pgram syntaxes/demo.tmLanguage.json
See the full CLI reference at https://github.com/parseidon/parseidon/blob/main/docs/cli.md