Answer the question
In order to leave comments, you need to log in
Can pyparsing rules be written as a string to a variable?
Here is a simple parsing rule:
grammar = pp.Word(pp.alphas).suppress() + pp.Optional(':') + pp.Word(pp.nums)('code')
grammar = '{{Suppress:(W:(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz)) [":"]} W:(0123456789)}'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question