Open manfredlotz opened 3 years ago
This is Fedora 33, Python 3.9.1 and parsimonious-0.8.1.
Looking at the sample
from parsimonious.grammar import Grammar grammar = Grammar( """ bold_text = bold_open text bold_close text = ~"[A-Z 0-9]*"i bold_open = "((" bold_close = "))" """) print(grammar.parse('((bold stuff))'))
I am wondering how I would specify the grammar if I would allow single ( and ) in text so that for example
(
)
text
print(grammar.parse('((bold (or something) stuff))'))
could be parsed.
Thanks a lot.
This is Fedora 33, Python 3.9.1 and parsimonious-0.8.1.
Looking at the sample
I am wondering how I would specify the grammar if I would allow single
(
and)
intext
so that for examplecould be parsed.
Thanks a lot.