Hi all,
I would like parse a file of that structure:
-=-=-=-
1. Lorem ipsum dolor sit amet, <important
text> Cras sit amet elit euismod,
sodales nulla ac.
1. Lorem ipsum dolor <important text>, consectetur
adipiscing elit. Cras sit amet elit euismod,
2. Lorem ipsum dolor sit amet, consectetur
adipiscing elit. <important text 3> Cras sit
amet elit euismod.
2. Lorem ipsum dolor….
…
-=-=-=-=-
What is the best strategy to implement a parser using PetitParser? I need to identify each
list, their nesting, and the <important text>.
I have tried to detect (i) first line of each list (#blank asParser, #number asParser
plus, …), (ii) then the other lines and in the “==> [:node |…]” block to compute the
indent. But I have failed and I do consider the <important text>.
Thank you for any idea!
Cheers,
Juraj
Show replies by date