John Machin wrote:
On 13/05/2006 7:39 PM, Paddy wrote:
[snip]
Extension; named RE variables, with arguments
===
In this, all group definitions in the body of the variable definition
reference the literal contents of groups appearing after the variable
Paul McGuire wrote:
Paddy [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Proposal: Named RE variables
==
Hi Paul, please also refer to my reply to John.
By contrast, the event declaration expression in the pyparsing Verilog
parser is:
identLead =
Paddy [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
It's difficult to switch to parsers for me even though examples like
pyparsing seem readable, I do want to skip what I am not interested in
rather than having to write a parser for everything. But converely,
when something skipped
I have another use case.
If you want to match a comma separated list of words you end up writing
what constitutes a word twice, i.e:
r\w+[,\w+]
As what constitues a word gets longer, you have to repeat a longer RE
fragment so the fact that it is a match of a comma separated list is
lost, e.g:
Paddy [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I have another use case.
If you want to match a comma separated list of words you end up writing
what constitutes a word twice, i.e:
r\w+[,\w+]
As what constitues a word gets longer, you have to repeat a longer RE
fragment so
Paddy wrote:
I have another use case.
If you want to match a comma separated list of words you end up writing
what constitutes a word twice, i.e:
r\w+[,\w+]
That matches one or more alphanum characters followed by exactly one comma,
plus, or alphanum. I think you meant
r'\w+(,\w+)*'
or
Proposal: Named RE variables
==
The problem I have is that I am writing a 'good-enough' verilog tag
extractor as a long regular expression (with the 'x' flag for
readability), and find myself both
1) Repeating sections of the RE, and
2) Wanting to add '(?Psome_clarifier...)
On 13/05/2006 7:39 PM, Paddy wrote:
[snip]
Extension; named RE variables, with arguments
===
In this, all group definitions in the body of the variable definition
reference the literal contents of groups appearing after the variable
name, (but within the
Paddy [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Proposal: Named RE variables
==
The problem I have is that I am writing a 'good-enough' verilog tag
extractor as a long regular expression (with the 'x' flag for
readability), and find myself both
1)