Re: [gentoo-portage-dev] BNF for DEPEND in EAPI0 and EAPI1
On Sun, 13 Apr 2008 20:04:41 +0200 Björn Michaelsen [EMAIL PROTECTED] wrote: Hi there, I worked through the current PMS and tried to formalize the grammar for DEPEND a little better. Maybe someone could have a look at it and check it for correctness. It could even become part of the gentoo development docs or be an appendix to the PMS. The other grammars (SRC_URI etc.) should be fairly easy. Any comments? Offhand the 'package name' part is wrong/incomplete, pretty sure even PMS says that they can't start/end with underscores or dashes (it's a real PITA to get it right). Haven't really read the non-terminals section as it's hard to read in this form, using EBNF or some markup language might help with that. Marius -- gentoo-portage-dev@lists.gentoo.org mailing list
Re: [gentoo-portage-dev] BNF for DEPEND in EAPI0 and EAPI1
Am Mon, 14 Apr 2008 14:22:12 +0200 schrieb Marius Mauch [EMAIL PROTECTED]: Offhand the 'package name' part is wrong/incomplete, pretty sure even PMS says that they can't start/end with underscores or dashes (it's a real PITA to get it right). I havent found anything like that in the PMS at the appropriate places. It only limits the characters and restricts a package name not to end in a hyphen followed by number literals. However, if there is a need to restrict the package name like that it _should_ be in the PMS of cause. Other wierd package names allowed by this regexp and by the PMS: ---, ___1, 1-2a PMS even allows 137 or , while the regexp does not. That would be easily fixed, but I guess that is not even intended. Haven't really read the non-terminals section as it's hard to read in this form, using EBNF or some markup language might help with that. EBNF would be easy. What kind of markup do you have in mind? (Also I need to get rid of the left recursion in the BNF) Have Fun, Björn signature.asc Description: PGP signature
[gentoo-portage-dev] BNF for DEPEND in EAPI0 and EAPI1
Hi there, I worked through the current PMS and tried to formalize the grammar for DEPEND a little better. Maybe someone could have a look at it and check it for correctness. It could even become part of the gentoo development docs or be an appendix to the PMS. The other grammars (SRC_URI etc.) should be fairly easy. Any comments? Have Fun, Björn = EAPI 0/1 package dependency specification in Backus-Naur-Form = The terminals are described as regular expressions. The nonterminal dependencies is what is allowed in the DEPENDs. terminals: category name ::= [A-Za-z0-9+_][A-Za-z0-9+_.-]* close parenthesis ::= [)] colon ::= : (not in EAPI0) dependency group or operator ::= [|][|] empty ::= equal ::= = exclamation mark ::= ! general package operator ::= |=|~||= open parenthesis ::= [(] package name ::= [A-Za-z0-9+_-]*([A-Za-z+_-]|[A-Za-z+_][0-9]+) package version alpha part ::= [a-z] package version number part ::= [0-9]+([.][0-9]+)* package version suffix ::= _(alpha|beta|pre|rc|p)[0-9]* question mark ::= ? slash ::= / slot name ::= [A-Za-z0-9+_][A-Za-z0-9+_.-]* (not in EAPI0) space ::= star ::= * useflag name ::= [EMAIL PROTECTED] non-terminals: all-of group ::= open parenthesisspacegroup contentsspaceclose parenthesis any-of group ::= dependency group or operatorspaceall-of group blocked package dependency ::= exclamation markpackage dependency dependencies ::= empty|group contents dependency item ::= blocked package dependency|package dependency|all-of group|any-of group|use conditional group group contents ::= dependency item|group contentsspacedependency item limited package dependency ::= dependency operatorpackage with version limited package dependency likeness ::= equalpackage with version|equalpackage with versionstar package dependency ::= unslotted package dependency|slotted package dependency package version ::= package version number partpackage version alpha partpackage version suffix part package version suffix part ::= empty|package version suffix partpackage version suffix package with version ::= qualified package name-package version qualified package name ::= category nameslashpackage name slotted package dependency ::= unslotted package dependencycolonslot name (not in EAPI0) unslotted package dependency ::= qualified package name|limited package dependency|limited package dependency likeness use conditional group ::= use conditionalspaceany-of group use condition ::= useflag name|exclamation markuseflag name signature.asc Description: PGP signature