Skip to content

Commit 81bb62a

Browse files
Various fixes and clean
1 parent ca8df08 commit 81bb62a

File tree

7 files changed

+297
-311
lines changed

7 files changed

+297
-311
lines changed

src/zkregex_fuzzer/chars.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import string
2+
3+
4+
def create_range(start_char: str, end_char: str) -> set[str]:
5+
"""
6+
Create a set of characters from start_char to end_char.
7+
"""
8+
return {chr(i) for i in range(ord(start_char), ord(end_char) + 1)}
9+
10+
11+
LATIN_EXT_CHARS = create_range("¡", "ƿ")
12+
GREEK_CHARS = create_range("Ͱ", "Ͽ")
13+
CYRILLIC_CHARS = create_range("Ѐ", "ӿ")
14+
ASCII_CHARS = set(string.printable)
15+
ALL_CHARS = ASCII_CHARS.union(LATIN_EXT_CHARS).union(GREEK_CHARS).union(CYRILLIC_CHARS)

src/zkregex_fuzzer/configs.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@
55
GrammarRegexGenerator,
66
)
77
from zkregex_fuzzer.runner import CircomRunner, NoirRunner, PythonReRunner
8-
from zkregex_fuzzer.vinpgen import ExrexGenerator, GrammarBasedGenerator, RstrGenerator
8+
from zkregex_fuzzer.vinpgen import (
9+
DFAWalkerGenerator,
10+
ExrexGenerator,
11+
GrammarBasedGenerator,
12+
RstrGenerator,
13+
)
914

1015
TARGETS = {
1116
"circom": CircomRunner,
@@ -21,6 +26,7 @@
2126
"grammar": GrammarBasedGenerator,
2227
"rstr": RstrGenerator,
2328
"exrex": ExrexGenerator,
29+
"dfa": DFAWalkerGenerator,
2430
}
2531

2632
GENERATORS = {

0 commit comments

Comments
 (0)