Introduce query language (resembling reprepro syntax).

This commit is contained in:
Andrey Smirnov
2014-07-10 21:28:02 +04:00
parent d262a131cc
commit ada3ae0094
8 changed files with 577 additions and 2 deletions

17
query/query.go Normal file
View File

@@ -0,0 +1,17 @@
// Package query implements query language for
package query
/*
Query language resembling Debian dependencies and reprepro
queries: http://mirrorer.alioth.debian.org/reprepro.1.html
Query := A | A '|' Query
A := B | B ',' A
B := C | '!' B
C := '(' Query ')' | D
D := <field> <condition>
field := <package-name> | <field> | $special_field
condition := '(' <operator> value ')' |
operator := | << | < | <= | > | >> | >= | = | % | ~
*/