Date:        Mon, 30 Jul 2018 15:42:43 +0100
    From:        Ralph Corderoy <ra...@inputplus.co.uk>
    Message-ID:  <20180730144243.7a36721...@orac.inputplus.co.uk>

  | No problem.  I didn't realise you had fingers in that pie.

Unfortunately, yes...   (a cow pie?)

  | One thing I noticed when looking at
  |  [...]
  | the other day is yylex() uses any leading run of `-' and '+' to set a
  | last-wins `sign' flag, and otherwise ignores them, i.e. they don't have
  | to be followed by digits.

Yes, many noise characters are just ignored, that allows them to be
used as separators, etc.   parsedate() is not attempting to validate
date strings, it is trying to take what humans type (originally from its
uses with NetNews headers) and turn that into something that may be
a timestamp.    Some people might write "30 Jul 2018" and others
"31jul2018" and others "31-jul-2018"  and the grammar wants to
parse all those as DD MNAME YEAR, so the other chars just get
dropped by the lexer.

parsedate() is all VERY VERY hairy...   It also mostly works for
various reasonable inputs.

kre


-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers

Reply via email to