[PR #1241] [MERGED] feat: Add McNaughton–Yamada–Thompson algorithm #1834

Open
opened 2026-01-29 15:25:07 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/TheAlgorithms/C/pull/1241
Author: @CascadingCascade
Created: 3/30/2023
Status: Merged
Merged: 4/12/2023
Merged by: @Panquesito7

Base: masterHead: regex


📝 Commits (10+)

📊 Changes

2 files changed (+723 additions, -0 deletions)

View changed files

📝 DIRECTORY.md (+2 -0)
misc/mcnaughton_yamada_thompson.c (+721 -0)

📄 Description

Description of Change

Added a NFA regex matcher based on the McNaughton–Yamada–Thompson algorithm

References

Checklist

  • Added description of change
  • Added file name matches File name guidelines
  • Added tests and example, test must pass
  • Relevant documentation/comments is changed or added
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes:
It's been awhile since my last PR, and this is what I've cooked up.😄 I tried my best, but a program this large is bound to have more bugs than what I managed to found, thanks in advance for sifting through ~700 lines of code.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/TheAlgorithms/C/pull/1241 **Author:** [@CascadingCascade](https://github.com/CascadingCascade) **Created:** 3/30/2023 **Status:** ✅ Merged **Merged:** 4/12/2023 **Merged by:** [@Panquesito7](https://github.com/Panquesito7) **Base:** `master` ← **Head:** `regex` --- ### 📝 Commits (10+) - [`cedfc70`](https://github.com/TheAlgorithms/C/commit/cedfc706218923d15fef1d8c28d215bd6d8e73f2) updating DIRECTORY.md - [`7efc40c`](https://github.com/TheAlgorithms/C/commit/7efc40cd7f3b7ae7ed1851580fee230a7d50fd67) Create mcnaughton_yamada_thompson.c - [`c3d32e4`](https://github.com/TheAlgorithms/C/commit/c3d32e4eff1f513be4291552c34524a2476c9fb7) updating DIRECTORY.md - [`76e6e1b`](https://github.com/TheAlgorithms/C/commit/76e6e1bdb1bb821a673388957e1e90e28e472579) Update mcnaughton_yamada_thompson.c - [`d022e1f`](https://github.com/TheAlgorithms/C/commit/d022e1f1431e480249c6999fa7c199003b925457) Merge branch 'regex' of https://github.com/CascadingCascade/C into regex - [`3afbd28`](https://github.com/TheAlgorithms/C/commit/3afbd28266b5bd4cf2a6f9d70f67db69f2e4592c) fix some memory leaks - [`fe3368c`](https://github.com/TheAlgorithms/C/commit/fe3368c2d5339e72c50a8070dabc85b402b688d1) fix another memory leak - [`e2f60ce`](https://github.com/TheAlgorithms/C/commit/e2f60cef3f532a603acb46f72631339422952bf7) Update mcnaughton_yamada_thompson.c - [`8275f3f`](https://github.com/TheAlgorithms/C/commit/8275f3f867e330890f199bb722c0aa0bbda446ca) added more test cases - [`97dc7f9`](https://github.com/TheAlgorithms/C/commit/97dc7f976488feccd3cc35700f19f60e887fe08b) a few formatting changes ### 📊 Changes **2 files changed** (+723 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `DIRECTORY.md` (+2 -0) ➕ `misc/mcnaughton_yamada_thompson.c` (+721 -0) </details> ### 📄 Description #### Description of Change Added a NFA regex matcher based on the [McNaughton–Yamada–Thompson algorithm](https://en.wikipedia.org/wiki/Thompson%27s_construction) <!-- Thank you for your Pull Request. Please provide a description above and review the requirements below. Contributors guide: https://github.com/TheAlgorithms/C/blob/master/CONTRIBUTING.md --> #### References <!-- Add any reference to previous pull-request or issue --> #### Checklist <!-- Remove items that do not apply. For completed items, change [ ] to [x]. --> - [x] Added description of change - [x] Added file name matches [File name guidelines](https://github.com/TheAlgorithms/C/blob/master/CONTRIBUTING.md#File-Name-guidelines) - [x] Added tests and example, test must pass - [x] Relevant documentation/comments is changed or added - [x] PR title follows semantic [commit guidelines](https://github.com/TheAlgorithms/C/blob/master/CONTRIBUTING.md#Commit-Guidelines) - [x] Search previous suggestions before making a new one, as yours may be a duplicate. - [x] I acknowledge that all my contributions will be made under the project's license. Notes: <!-- Please add a one-line description for developers or pull request viewers --> It's been awhile since my last PR, and this is what I've cooked up.:smile: I tried my best, but a program this large is bound to have more bugs than what I managed to found, thanks in advance for sifting through ~700 lines of code. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 15:25:07 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/C#1834