public inbox for gentoo-pms@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-pms] [gentoo-pms-abnf] Generation of regex from ABNF!
@ 2013-09-23  7:16 Walter
  0 siblings, 0 replies; only message in thread
From: Walter @ 2013-09-23  7:16 UTC (permalink / raw
  To: gentoo-pms

[-- Attachment #1: Type: text/plain, Size: 1230 bytes --]

Hear ye, formalistic entity definition fans!

Aforementioned evil project to interpret the PMS docs and recast them
unofficially as a go-to formal grammar has advanced to its next stage of
world domination! (Complete no-show by the forecast army of worker-gnomes
notwithstanding.)

As of a few minutes ago, thanks to some quirky ruby, almost-correct*
regular expressions can now be generated for each of the various
identifiers, which could be used in any tools.

From a transparency/maintenance perspective it may be preferable to
generate these for any package-related tools since it means everyone is
sourcing their grammar - without error prone manual processes - from the
same single point of truth, removing an entire class of bugs.

Code @ https://github.com/globalcitizen/gentoo-pms-abnf
Related bug @ https://bugs.gentoo.org/show_bug.cgi?id=456892 (full of
unbelievers)

- Walter

* 'Almost correct' because entities like "a" are not officially allowed in
ABNF, but desirable in spec for readability and ease of editing. An
intermediate script is thus needed prior to regex generation to simply
convert strings in to escaped entities ('%xxx' IIRC) to get properly solid
output. Easy one but I'm otherwise disposed today.

[-- Attachment #2: Type: text/html, Size: 1512 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-09-23  7:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-23  7:16 [gentoo-pms] [gentoo-pms-abnf] Generation of regex from ABNF! Walter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox