Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: possible to run this as a CLI tool or as a dotnet tool? #212

Open
njlr opened this issue Jul 10, 2024 · 1 comment
Open

Question: possible to run this as a CLI tool or as a dotnet tool? #212

njlr opened this issue Jul 10, 2024 · 1 comment

Comments

@njlr
Copy link

njlr commented Jul 10, 2024

I was wondering if it possible to run this outside of MSBuild.

For example like this:

dotnet tool install FsLexYacc
dotnet tool run fsyacc

I think this would be possible by adding an extra file to the Nuget package?

Settings file 'DotnetToolSettings.xml' was not found in the package.

Or perhaps this is already possible and I am missing something 🙂

Maybe related: #64

@nojaf
Copy link
Collaborator

nojaf commented Jul 10, 2024

Hello, this is currently not distributed as a tool (some properties are missing in https://github.com/fsprojects/FsLexYacc/blob/master/src/FsYacc/fsyacc.fsproj).

Downloading the FsLexYacc nuget package does contain the command line tool:

dotnet "C:\Users\nojaf\.nuget\packages\fslexyacc\11.2.0\build\fsyacc\net6.0\fsyacc.dll" --help

gives

fsyacc <filename>
        -o <string>: Name the output file.
        -v: Produce a listing file.
        --module <string>: Define the F# module name to host the generated parser.
        --internal: Generate an internal module
        --open <string>: Add the given module to the list of those to open in both the generated signature and implementation.
        --light: (ignored)
        --light-off: Add #light "off" to the top of the generated file
        --ml-compatibility: Support the use of the global state from the 'Parsing' module in FSharp.PowerPack.dll.
        --tokens: Simply tokenize the specification file itself.
        --lexlib <string>: Specify the namespace for the implementation of the lexer (default: FSharp.Text.Lexing)
        --parslib <string>: Specify the namespace for the implementation of the parser table interpreter (default: FSharp.Text.Parsing)
        --codepage <int>: Assume input lexer specification file is encoded with the given codepage.
        --buffer-type-argument <string>: Generic type argument of the LexBuffer type.
        --help: display this list of options
        -help: display this list of options

Any reason the MSBuild integration is not working for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants