From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: Re: [idea] Converting sha1 evaluator into parser/interpreter
Date: Sun, 21 May 2006 10:06:45 +0200 [thread overview]
Message-ID: <e4p71u$t0s$1@sea.gmane.org> (raw)
Shawn Pearce wrote:
> There was just a short conversation on #git about converting
> the sha1 expression evaluator into a split parser/interpreter
> model. The idea here would be to convert an expression such as
>
> HEAD@{yesterday}~3^{tree}
>
> into a an expression tree such as (in LISP style):
>
> (peel-onion (walk-back 3 (date-spec yesterday (ref HEAD))))
Rather
(peel-onion 'tree (walk-back 3 (date-spec yesterday (ref HEAD))))
> with such a tree it is relatively easy to evaluate the expression,
> but its also easy to determine if a ref name is valid. Just pass
> it through the parser and see if you get back anything more complex
> then '(ref <input>)'.
Didn't you meant to see if we get correct tree (not a forest),
and if the root of said tree is '(ref <commit-ish>)' [1]?
Interpreting said parse tree anch checking if it folds to correct object
reference is the task of interpreter, not parser...
[*1*] if I understand currectly that <commit-ish> mean direct sha1,
shortened sha1, or ref (head or tag)? commit-ish is not in
git glossary...
--
Jakub Narebski
Warsaw, Poland
next reply other threads:[~2006-05-21 8:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-21 8:06 Jakub Narebski [this message]
2006-05-21 10:13 ` [idea] Converting sha1 evaluator into parser/interpreter Jakub Narebski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='e4p71u$t0s$1@sea.gmane.org' \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).