Skip to content

Commit 0d478a0

Browse files
authored
ILASM: Add simple README.mddescribing how to use Bison to generate the ILASM parser. (dotnet#102217)
* Add simple README.md describing how to use Bison to generate the ILASM parser * Update README.md
1 parent 714a442 commit 0d478a0

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/coreclr/ilasm/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generating the Parser using Bison
2+
3+
- Bison for Windows: https://github.com/lexxmark/winflexbison
4+
- Other platforms: https://www.gnu.org/software/bison
5+
6+
To generate `asmparse.cpp`, run either of following:
7+
- Unix: `yacc asmparse.y -o prebuilt/asmparse.cpp`
8+
- Windows: `win_bison asmparse.y -o prebuilt\asmparse.cpp`
9+
10+
## Docker
11+
```bash
12+
$ cd runtime
13+
14+
# run a throw-away-after-exit container with --rm
15+
$ docker run --rm -v$(pwd):/runtime -w /runtime/src/coreclr/ilasm alpine \
16+
sh -c 'apk add bison && yacc asmparse.y -o prebuilt/asmparse.cpp'
17+
```
18+

0 commit comments

Comments
 (0)