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