How to define grammar for minimum 1 of foo and maximum 1 of bar
In parsimonious, I’m trying to define a grammar where there has to be one occurrence of foo and zero to 1 occurrence of bar and in any order.
How do I get parsimonious to throw an error ?
how to get the xml subsection in parsimonious?
I have the below grammar and it works fine when the xml elements in the are in the same line. However, if they are on multiple lines, it does not. I have tried the “sm” regex flag and it still does not work.
How do I get the contents of the <section>
?