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