Converts a context-free grammar with at most one terminal to an equivalent NFA by tracking bounded multisets of pending variables. Returns an issue for an unsupported grammar shape or a reserved end marker, and reports budget exhaustion separately.
Converts a context-free grammar with at most one terminal to an equivalent NFA by tracking bounded multisets of pending variables. Returns an issue for an unsupported grammar shape or a reserved end marker, and reports budget exhaustion separately.