Skip to content

Commit

Permalink
ILASM: Add simple README.mddescribing how to use Bison to generate …
Browse files Browse the repository at this point in the history
…the ILASM parser. (#102217)

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

* Update README.md
  • Loading branch information
TIHan authored May 14, 2024
1 parent 714a442 commit 0d478a0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/coreclr/ilasm/README.md
Original file line number Diff line number Diff line change
@@ -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'
```

0 comments on commit 0d478a0

Please sign in to comment.