About OCaml Pattern Matching Algorithm

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

+6
source share
1 answer

There are some good template writing articles comparing some of the people behind OCaml. In particular, see Compiling Pattern Matching to Good Acceptance Trees and Optimizing Pattern Matching . It might be useful to go to fooobar.com/questions/199559 / ....

+10
source

Source: https://habr.com/ru/post/958899/


All Articles