Re: Are commas allowed in BuildRequires ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/12/17 14:21, Marwan Rabbâa wrote:

Interesting.Â

Un fact I'm trying tout parse this lines.

An since spaces could be used for version separation and package separation it seems off tout parse

Not really, you just need a proper parser ;-)

Assuming that you have a lexer that splits tokens on whitespace and can identify tokens as NAME, OPERATOR or VERSION then a basic yacc/bison grammar for the value of a BuildRequire would look something like:

build-requires : build-requires build-require
               | build-require
               ;

build-require : NAME
              | NAME OP VERSION
              ;

Obviously that ignores the newer stuff around and/or and parentheses etc but I'm sure that's a SMOP ;-)

Tom

--
Tom Hughes (tom@xxxxxxxxxx)
http://compton.nu/
_______________________________________________
packaging mailing list -- packaging@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to packaging-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux