mike-french/myrex
View on GitHub ↗ ★ 5 Elixir
Match regular expressions using NFA process networks (Elixir)
5 mentions on Hacker News by 1 person: 0 stories, 5 comments · first 2023-08-12 · latest 2024-05-21
20082026
-
It is possible to implement NFAs directly, in parallel: https://github.com/mike-french/myrex Just fan-out messages to all downstream states. Let a fair runtime system evaluate all progress, then tally results along all paths, for example:…
comment by mikhailfranco · 2024-05-21 · in Regular expression matching can be simple and fast (2007) -
…How many ways can (a?){m}(a*){m} match the string a{m} i.e. input m repetitions of the letter 'a'. https://github.com/mike-french/myrex#ambiguous-example The answer is a dot product of two vectors sliced from Pascal's Triangle. For m=9,…
comment by mikhailfranco · 2023-09-12 · in Calculate the difference and intersection of any two regexes -
You could implement the NFA directly with concurrent exploration of all paths: https://github.com/mike-french/myrex
comment by mikhailfranco · 2023-09-12 · in Calculate the difference and intersection of any two regexes -
…has an interesting implementation in Elixir, which converts the NFA directy into a process network: https://github.com/mike-french/myrex The network runs all possible traversals concurrently without back-tracking. It automatically scales…
comment by mikhailfranco · 2023-08-12 · in Programming Techniques: Regular expression search algorithm (1968)