ILASM: Add simple `README.md`describing how to use Bison to generate the ILASM parser. (#102217)

* Add simple README.md describing how to use Bison to generate the ILASM parser

* Update README.md
This commit is contained in:
Will Smith 2024-05-14 16:42:58 -07:00 committed by GitHub
parent 714a442080
commit 0d478a0578
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,18 @@
# Generating the Parser using Bison
- Bison for Windows: https://github.com/lexxmark/winflexbison
- Other platforms: https://www.gnu.org/software/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'
```