Skip to content

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

Open

Description

@njlr

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

Activity

  1. nojaf commented on Jul 10, 2024

    @nojaf
    Collaborator

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions