It’s time to move haskell to code MUDA?

by syoyo


MUDA compiler uses Ocaml and BNF Converter [1].
I found today that BNF Converter for Ocaml output lacks user defined `token’ rules.
This is critical for MUDA.

I’d like to write a patch for BNF Converter to support this lacking feature,
but BNF Converter is written in Haskell, so I must learn Haskell ๐Ÿ™‚

Anyway, I had a plan that coding MUDA compiler with Haskell in the future.
(because Haskell seems much elegant than Ocaml)

So I’ve decided to shift to Haskell from Ocaml for writing MUDA compiler from now.


ไปŠๆ—ฅใ€BNF Converter ใงใ€ใ‚ซใ‚นใ‚ฟใƒ ใƒซใƒผใƒซ(16 ้€ฒๆ•ฐใฎใƒ‘ใƒผใ‚นใจใ‹)ใŒ
ocaml ๅ‡บๅŠ›ใฎใจใใ ใ‘ใ‚ตใƒใƒผใƒˆใ•ใ‚Œใฆใ„ใชใ„ใฎใŒๅˆ†ใ‹ใ‚Šใพใ—ใŸใ€‚
BNF Converter ใฏ Haskell ใงๆ›ธใ‹ใ‚Œใฆใ„ใ‚‹ใฎใงใ€Haskell ใ‚’็ฟ’ๅพ—ใ—ใชใ‘ใ‚Œใฐใชใ‚Šใพใ›ใ‚“ใ€‚

ใพใŸใ€BNF Converter ใฏใ‚‚ใจใ‚‚ใจ Haskell ๅ‡บๅŠ›(Alex, Happy)ใŒใƒกใ‚คใƒณใชใ‚ˆใ†ใงใ™ใ—ใ€
ใ„ใšใ‚Œ MUDA ใ‚ณใƒณใƒ‘ใ‚คใƒฉใ‚‚ Haskell ใงๆ›ธใ็›ดใใ†ใจ่€ƒใˆใฆใ„ใŸใฎใงใ€
(ใชใ‚“ใจใชใ Haskell ใฎใปใ†ใŒใ‚จใƒฌใ‚ฌใƒณใƒˆใใ†ใชใฎใง ๐Ÿ™‚ )
ใƒ‘ใƒƒใƒใ‚’ๆ›ธใๆ™‚้–“ใŒใ‚ใฃใŸใ‚‰ใจใฃใจใจ Haskell ใธใฎ็งป่กŒใ‚’ๅ‰ๅ€’ใ—ใ—ใŸใปใ†ใŒใ‚ˆใ„ใจๅˆคๆ–ญใ—ใพใ—ใŸใ€‚

ใจใ„ใ†ใ‚ใ‘ใง Haskell ็งป่กŒใซไผดใ„ๅฐ‘ใ— MUDA ใฎๆฉŸ่ƒฝ้–‹็™บใฏๅœๆปžใ—ใพใ™ใ€‚