I am writing a compiler for a functional language that I created with OCaml. I want my little language to have a pattern matching function, however, I'm stuck in developing an algorithm to implement it. It seems very complicated when I delve into the problem. I can not find a lot of useful information about the corresponding algorithm with Google. I would appreciate it if someone could give me some hint or point me to resources. Or are there any tricks to take advantage of OCaml versus sample to solve this problem, so I donβt need to implement it? Thank you
source share