Fix Grammar Mutator Submodule
Fixes: ("added the grammar mutator as a git submodule ...")
* Project pointer never pushed
* Reduces dirctory complexity
* Building and dependencies for the subproject should be isolated to the
subproject's documentation
* Fix broken link to README
* Use `--init` for `git submodule`
MODIFY
.gitmodules
.gitmodules
[submodule "unicorn_mode/unicornafl"]
path = unicorn_mode/unicornafl
url = https://github.com/AFLplusplus/unicornafl
-
-[submodule "custom_mutators/Grammar-Mutator"]
- path = custom_mutators/Grammar-Mutator
+[submodule "custom_mutators/grammar_mutator"]
+ path = custom_mutators/grammar_mutator
url = https://github.com/AFLplusplus/Grammar-Mutator
[submodule "qemu_mode/qemuafl"]
path = qemu_mode/qemuafl

MODIFY
custom_mutators/README.md
custom_mutators/README.md
@@ -7,15 +7,13 @@ For further information and documentation on how to write your own, read [the do
If you use git to clone afl++, then the following will incorporate our
excellent grammar custom mutator:
-```
-git submodule init
-git submodule update
+```sh
+git submodule update --init
```
-otherwise just use the script: `grammar_mutator/build_grammar_mutator.sh`
+Read the README in the [Grammar-Mutator] repository on how to use it.
-Read the [Grammar-Mutator/README.md](Grammar-Mutator/README.md) on how to use
-it.
+[Grammar-Mutator]: https://github.com/AFLplusplus/Grammar-Mutator
## Production-Ready Custom Mutators

ADD
custom_mutators/grammar_mutator
+Subproject commit b3c4fcfa6ae28918bc410f7747135eafd4fb7263

DELETE
custom_mutators/grammar_mutator/README.md
-# Grammar-Mutator
-
-This is just a stub directory that will clone the real grammar mutator
-directory.
-
-Execute `./build_grammar_mutator.sh` to set everything up.

DELETE
custom_mutators/grammar_mutator/build_grammar_mutator.sh
-#!/bin/sh
-
-test -d Grammar-Mutator || git clone --depth=1 https://github.com/AFLplusplus/Grammar-Mutator
-
-cd Grammar-Mutator || exit 1
-git stash ; git pull
-
-wget -c https://www.antlr.org/download/antlr-4.8-complete.jar
-
-echo
-echo
-echo "All successfully prepared!"
-echo "To build for your grammar just do:"
-echo " cd Grammar_Mutator"
-echo " make GRAMMAR_FILE=/path/to/your/grammar"
-echo "You will find a JSON and RUBY grammar in Grammar_Mutator/grammars to play with."
-echo

Fix Grammar Mutator Submodule (#623)

Fixes: 651ad18e2179 ("added the grammar mutator as a git submodule ...")

* Project pointer never pushed
* Reduces dirctory complexity
* Building and dependencies for the subproject should be isolated to the
  subproject's documentation
* Fix broken link to README
* Use `--init` for `git submodule`