Back to Dotnet

Generating the Parser using Bison

src/coreclr/ilasm/README.md

11.0.100629 B
Original Source

Generating the Parser using Bison

To generate asmparse.cpp, run either of following:

  • Unix: yacc asmparse.y -o prebuilt/asmparse.cpp
  • Windows: win_bison asmparse.y -o prebuilt\asmparse.cpp

Docker

bash
$ cd runtime

# run a throw-away-after-exit container with --rm
$ docker run --rm -v$(pwd):/runtime -w /runtime/src/coreclr/ilasm alpine \
    sh -c 'apk add bison && yacc asmparse.y -o prebuilt/asmparse.cpp'

To generate grammar, see GrammarExtractor README.