1 Return-Path: <amdragon@mit.edu>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 9F864431FCB
\r
6 for <notmuch@notmuchmail.org>; Thu, 25 Oct 2012 11:58:20 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id Zd8ZJHWfDQc7 for <notmuch@notmuchmail.org>;
\r
16 Thu, 25 Oct 2012 11:58:20 -0700 (PDT)
\r
17 Received: from dmz-mailsec-scanner-7.mit.edu (DMZ-MAILSEC-SCANNER-7.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id 15149431FAE
\r
20 for <notmuch@notmuchmail.org>; Thu, 25 Oct 2012 11:58:20 -0700 (PDT)
\r
21 X-AuditID: 12074424-b7fce6d000000925-18-50898bcb02c7
\r
22 Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])
\r
23 by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id 96.F9.02341.BCB89805; Thu, 25 Oct 2012 14:58:19 -0400 (EDT)
\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
\r
26 by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id q9PIwIia012687;
\r
27 Thu, 25 Oct 2012 14:58:19 -0400
\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])
\r
29 (authenticated bits=0)
\r
30 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
31 by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q9PIwGQ9019986
\r
32 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
33 Thu, 25 Oct 2012 14:58:18 -0400 (EDT)
\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)
\r
35 (envelope-from <amdragon@MIT.EDU>)
\r
36 id 1TRSdE-0004NP-Iu; Thu, 25 Oct 2012 14:58:16 -0400
\r
37 Date: Thu, 25 Oct 2012 14:58:16 -0400
\r
38 From: Austin Clements <amdragon@MIT.EDU>
\r
39 To: Jani Nikula <jani@nikula.org>
\r
40 Subject: Re: [PATCH v5 2/9] parse-time-string: add a date/time parser to
\r
42 Message-ID: <20121025185816.GX14861@mit.edu>
\r
43 References: <cover.1350854171.git.jani@nikula.org>
\r
44 <a90d3b687895a26f765539d6c0420038a74ee42f.1350854171.git.jani@nikula.org>
\r
45 <20121022081444.GM14861@mit.edu>
\r
47 Content-Type: text/plain; charset=us-ascii
\r
48 Content-Disposition: inline
\r
49 In-Reply-To: <20121022081444.GM14861@mit.edu>
\r
50 User-Agent: Mutt/1.5.21 (2010-09-15)
\r
51 X-Brightmail-Tracker:
\r
52 H4sIAAAAAAAAA+NgFmpmleLIzCtJLcpLzFFi42IR4hRV1j3d3RlgsP+PpkXTdGeL6zdnMjsw
\r
53 edy6/5rd49mqW8wBTFFcNimpOZllqUX6dglcGV39DcwF13grZs3ewNrA+Jeri5GTQ0LARGLq
\r
54 hT2sELaYxIV769m6GLk4hAT2MUocPPaQGcLZwCixYe4ZFgjnJJNE/85fbCAtQgJLGCVubhUH
\r
55 sVkEVCVWNL1lB7HZBDQktu1fzghiiwgoSmw+uR/MZhaQlvj2u5kJxBYWCJL49f4uC4jNK6Aj
\r
56 8an9JDvEgoWMErc2tbFCJAQlTs58wgLRrCVx499LoGYOsEHL/3GAhDkFdCVWTm0AKxEVUJGY
\r
57 cnIb2wRGoVlIumch6Z6F0L2AkXkVo2xKbpVubmJmTnFqsm5xcmJeXmqRrrlebmaJXmpK6SZG
\r
58 UFizu6jsYGw+pHSIUYCDUYmHNyKlM0CINbGsuDL3EKMkB5OSKO+CWqAQX1J+SmVGYnFGfFFp
\r
59 TmrxIUYJDmYlEd7jxUA53pTEyqrUonyYlDQHi5I47/WUm/5CAumJJanZqakFqUUwWRkODiUJ
\r
60 3uWtQI2CRanpqRVpmTklCGkmDk6Q4TxAw++B1PAWFyTmFmemQ+RPMSpKifPOBkkIgCQySvPg
\r
61 emFp5xWjONArwrzbQap4gCkLrvsV0GAmoMFirGCDSxIRUlINjDuCJ20Q1Ck2/Pbt15x7q7rF
\r
62 Z+5NEb21cdOnNWVitj77eo5sDHg5bzlDZOD78/K8GQtDZX7P1X+U9DHDy271h7XsXK/mFX7I
\r
63 OT1h/8X+D9uPhTJtahd4WCirYPFx7pYzrR+tC9KsX1ScX/Ph0VNd4xOTXmYnbWi/3fHs3nv+
\r
64 2h3JU3wlFyY+kl2lxFKckWioxVxUnAgAV/o5exYDAAA=
\r
65 Cc: notmuch@notmuchmail.org
\r
66 X-BeenThere: notmuch@notmuchmail.org
\r
67 X-Mailman-Version: 2.1.13
\r
69 List-Id: "Use and development of the notmuch mail system."
\r
70 <notmuch.notmuchmail.org>
\r
71 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
72 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
73 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
74 List-Post: <mailto:notmuch@notmuchmail.org>
\r
75 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
76 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
77 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
78 X-List-Received-Date: Thu, 25 Oct 2012 18:58:20 -0000
\r
80 Quoth myself on Oct 22 at 4:14 am:
\r
81 > Overall this looks pretty good to me, and I must say, this parser is
\r
82 > amazingly flexible and copes well with a remarkably hostile grammar.
\r
84 > A lot of little comments below (sorry if any of this ground has
\r
85 > already been covered in the previous four versions).
\r
87 > I do have one broad comment. While I'm all for ad hoc parsers for ad
\r
88 > hoc grammars like dates, there is one piece of the literature I think
\r
89 > this parser suffers for by ignoring: tokenizing. I think it would
\r
90 > simplify a lot of this code if it did a tokenizing pass before the
\r
91 > parsing pass. It doesn't have to be a serious tokenizer with
\r
92 > streaming and keywords and token types and junk; just something that
\r
93 > first splits the input into substrings, possibly just non-overlapping
\r
94 > matches of [[:digit:]]+|[[:alpha:]]+|[-+:/.]. This would simplify the
\r
95 > handling of postponed numbers because, with trivial lookahead in the
\r
96 > token stream, you wouldn't have to postpone them. Likewise, it would
\r
97 > eliminate last_field. It would simplify keyword matching because you
\r
98 > wouldn't have to worry about matching substrings (I spent a long time
\r
99 > staring at that code before I figured out what it would and wouldn't
\r
100 > accept). Most important, I think it would make the parser more
\r
101 > predictable for users; for example, the parser currently accepts
\r
102 > things like "saturtoday" because it's aggressively single-pass.
\r
104 I should add that I am not at all opposed to this patch as it is
\r
105 currently designed. We need a date parser. My comment about
\r
106 separating tokenization is just a way that this code could probably be
\r
107 simplified if someone were so inclined or if simplifying the code
\r
108 would help it pass any hurdles.
\r