AFLplusplus / Grammar-Mutator

A grammar-based custom mutator for AFL++
Apache License 2.0
211 stars 18 forks source link

Use of ANTLR grammar instead of json-formatted grammar #48

Open bendrissou opened 2 weeks ago

bendrissou commented 2 weeks ago

Hi,

Is there a way to produce the generator and mutator from an ANTLR grammar instead of a json-formatted grammar? I know that the antlr grammar is generated and used in intermediate steps, so there should be a way to initiate the process directly with ANTLR, example:

make GRAMMAR_FILE=grammars/ruby.g4

Thank you.

h1994st commented 2 weeks ago

It is possible, if we can parse antlr grammar and implement equivalent functionalities to f1_c_gen.py. Your help would be appreciated, if you have time to work on this :)

On the other hand, it is easy to parse the json file for us to understand the tree structure and produce tree generation functions.