All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Rast <trast@student.ethz.ch>
To: Gustaf Hendeby <hendeby@isy.liu.se>
Cc: Git List <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] Add built-in diff patterns for MATLAB code
Date: Tue, 15 Nov 2011 14:14:34 +0100	[thread overview]
Message-ID: <201111151414.34141.trast@student.ethz.ch> (raw)
In-Reply-To: <df238a1919b7c7d05749b4aa637fe2c7@isy.liu.se>

Gustaf Hendeby wrote:
>  On Tue, 15 Nov 2011 13:37:06 +0100, Thomas Rast wrote:
> > Gustaf Hendeby wrote:
> >> +PATTERNS("matlab",
> >> +	 
> >> "^[[:space:]]*((classdef|function)[[:space:]].*)$|^%%[[:space:]].*$",
> >> +	 "[a-zA-Z_][a-zA-Z0-9_]*|[-+0-9.e]+|[=~<>]=|\\|\\||&&"),
> >
> > Shouldn't you, for matlab, ensure that ./ "sticks" as a single word
> > since it is an operator?  At least we used the same logic for the C 
> > ||
> > and && operators, which you copied.
> 
>  Good point Thomas, I forgot all about the .-operators.  I will add 
>  \.[*/^'] as words, are there any other ones to consider?  Thanks for 
>  paying attention!

Uh, I'm afraid it's been years since I did matlab.  But

  http://www.mathworks.ch/help/techdoc/matlab_prog/f0-40063.html

seems to indicate you forgot '.\'.

Please also update the testcases to whether this splits correctly,
e.g., by changing './' to '/'.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

  reply	other threads:[~2011-11-15 13:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-13 13:42 [PATCH] Add built-in diff patterns for MATLAB code Gustaf Hendeby
2011-11-15 12:37 ` Thomas Rast
2011-11-15 12:47   ` Gustaf Hendeby
2011-11-15 13:14     ` Thomas Rast [this message]
2011-11-15 20:15       ` [PATCH v2] " Gustaf Hendeby

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=201111151414.34141.trast@student.ethz.ch \
    --to=trast@student.ethz.ch \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=hendeby@isy.liu.se \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.