Onboarding Parsec Library from Self-Defined Parser
Previously, I used my own parser to parse the solidity language syntax and finished the expression part. It's a combination of ExceptT
and State
to maintain the states and report error.
The original parser doesn't have error report at all, and it definitely is not the correct way. Moreover, I believe the open source parser library works better than mine as i'm still newbie to haskell. Hence, I choose to replace my custom parser by the parsec
parser.
This blog introduces the investigation of parsec and the problems I encountered during migration. Beside them, I will compare some pattern differences between parsec and mine.