Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 418329 - Ambiguous definition for EAPI parsing
Summary: Ambiguous definition for EAPI parsing
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: PMS/EAPI (show other bugs)
Hardware: All Linux
: Normal trivial
Assignee: Package Manager Specification
URL: http://git.overlays.gentoo.org/gitweb...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-31 05:59 UTC by Martin von Gagern
Modified: 2012-05-31 16:44 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2012-05-31 05:59:35 UTC
This is a very minor thing, but I thought I'd report this nevertheless…

Current section 7.3.1 of the PMS states that EAPI parsing was done using the regexp “^[ \t]*EAPI=(['"]?)([A-Za-z0-9+_.-]*)\1[ \t]*([ \t]#.*)?$” and subsequently states that “the EAPI is the substring matched by the capturing parentheses”. However, as you can see, there are TWO pairs of capturing patentheses. So perhaps you should change this to “second capture group” or something like that.
Comment 1 Ulrich Müller gentoo-dev 2012-05-31 06:59:39 UTC
In principle you're right. However, PMS has always assumed "a sensible and cooperative reader" (cf. 2008-08-28 council meeting), and for such a reader it should be clear which of the subexpressions is meant here.

So, I tend to close this. Other opinions?
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-05-31 11:24:47 UTC
Honestly, I'd prefer seeing BNF-like grammar there rather than regexps. Spec should provide a formal definition of what needs to be done, rather than implementation.
Comment 3 Ulrich Müller gentoo-dev 2012-05-31 16:27:27 UTC
(In reply to comment #2)
> Honestly, I'd prefer seeing BNF-like grammar there rather than regexps.
> Spec should provide a formal definition of what needs to be done, rather
> than implementation.

Then why didn't you bring this up before the current wording was approved by the council? The topic was really extensively discussed both on gentoo-pms and gentoo-dev mailing lists (and you even participated in that discussion).

Closing.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-05-31 16:44:32 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Honestly, I'd prefer seeing BNF-like grammar there rather than regexps.
> > Spec should provide a formal definition of what needs to be done, rather
> > than implementation.
> 
> Then why didn't you bring this up before the current wording was approved by
> the council? The topic was really extensively discussed both on gentoo-pms
> and gentoo-dev mailing lists (and you even participated in that discussion).

I'd guess the right answer would be: because I'm not brilliant enough to come up with all the good ideas on time.