[Haskell-cafe] Idiomatic way to parse bytecodes
ky3 at atamo.com
Sun Aug 30 03:46:40 UTC 2015
On Sun, Aug 30, 2015 at 6:12 AM, Gautier DI FOLCO <gautier.difolco at gmail.com
> I have two main goals:
> * print the signification of each bytecodes (a more explicit one than the
> hexadecimal value of the bytecode)
> * Do some analysis on it, spot patterns, apply markov model on it and so
Work backwards, a piece at a time.
The output of parsing is a piece of structured data. So you need to design
your data type. Start with the bare minimum. Write the pretty printing
code. What do the type signatures of your analysis functions look like?
E.g. "Apply markov model" is way too vague.
The key thing is to iterate and improve on the design of your data type.
Once the data type looks good, the implementation of parsing becomes clear
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe