1 |
On 09/30/2012 03:10 PM, Ulrich Mueller wrote: |
2 |
>>>>>> On Sun, 30 Sep 2012, Zac Medico wrote: |
3 |
> |
4 |
>>> tries to write a PM, likely fucking that up. If what you were |
5 |
>>> saying was the actual intention behind it, that assignment would've |
6 |
>>> just been along the lines of EAPI=("[^"]*"|'[^']*'|[^\t ]); aka |
7 |
>>> "here's how you grab what looks like an EAPI assignment". |
8 |
> |
9 |
>> I would have preferred a regex that just matches any assignment like |
10 |
>> this, but didn't feel like bikeshedding it, |
11 |
> |
12 |
> I doesn't really matter what the regexp is, as long as it matches a |
13 |
> superset of the allowed EAPI syntax. Unknown or invalid EAPIs that the |
14 |
> regexp doesn't match will still be rejected, because the results from |
15 |
> parsing and from sourcing the ebuild don't agree. |
16 |
> |
17 |
> And it is practically impossible to find a regexp that would match all |
18 |
> valid bash assignments. You would have to handle backslash escapes, |
19 |
> dollar signs, and whatnot. |
20 |
|
21 |
Still, it might make sense to replace ([A-Za-z0-9+_.-]*) with (.*), |
22 |
since that should work fine in practice. The spec is fine with me as it |
23 |
is, but I don't think a change like this would hurt. |
24 |
-- |
25 |
Thanks, |
26 |
Zac |