Closed yuyuankang closed 8 months ago
@tahina-pro should comment.
But, using and_then directly is often inconvenient. parse_dtuple2 is often easier to use: https://github.com/project-everest/everparse/blob/master/src/lowparse/LowParse.Spec.Combinators.fsti#L1186
Also, if you really need to use and_then directly, then these lemmas (and others nearby in the same file) help with decomposing the injectivity proof: https://github.com/project-everest/everparse/blob/master/src/lowparse/LowParse.Spec.Combinators.fsti#L327
I tried parse_dtuple2
, it is indeed much easier to use. Thank you for the suggestions!
Hi,
I am currently working with LowParse to interpret some basic data structures in F*. Here is the data structure:
Additionally, I have developed the following parsers:
To merge the parsers
p
andp'
, such as inand_then p p'
, it requires me to formally demonstrate thatp'
is injective.Could there be a more efficient method to construct a parser for simple_struct? Are there any examples I could reference for using monadic parser combinators?
Thank you!