I coded a few robots.txt parsers
i.e.: (these are just the ones i cared to publish)
https://github.com/franzenzenhofer/simple-functional-robots-...
https://github.com/franzenzenhofer/robotstxt
and even though robots.txt seems like a very, very simple text based protocoll there are unanswered mysteries
the biggest mystery is user agent groups and comments
i.e.:
User-agent: googlebot
User-agent: bing
User-agent: yandex
Disallow: /
so i am disallowing everything for google, bing, yandex; easy enough, but: User-agent: googlebot
User-agent: yandex
Disallow: /
means that googlebot has no instructions, but yandex is disallowed all.if a whole line is commented out
User-agent: googlebot
#User-agent: bing
User-agent: yandex
Disallow: /
is a commented out line a blank line or a non existing line?if it is interpreted as a blank linke, the disallow only counts for yandex, if the line is non existant, it counts for googlebot and yandex.
i like simple things, but sometimes the complexity is between the lines.