On Mon, 8 Mar 2010 11:23:30 -0800 (PST), Can wrote:
From: Nick Treleaven nick.treleaven@btinternet.com Subject: Re: [Geany-devel] [Patch] - Improve PHP parser (call tips) To: geany-devel@uvena.de Date: Monday, March 8, 2010, 12:18 PM On Sun, 7 Mar 2010 19:20:37 +0100 Enrico Tröger enrico.troeger@uvena.de wrote:
You put a weird pattern: [public|protected|private|static]* If you wanted to group, you should use ()
I didn't want to group, we don't need to know the actual modifier, we just want to allow only this subset. And yes, it was a group before but there is just no need to.
I think Can is right, [] brackets are only for character ranges, not string matching. So () brackets are necessary for matching even when ignoring the group.
Actually, I'm very uncomfortable with my name being recorded in that patch's log (r4729). That regex is funny, it exhibits an ignorance in the subject and it's not what I submitted. So, I demand my name
Well, yes, obviously I made a mistake in the commited regexp. One sentence about my motivation for the changes between the current version in trunk and those of your patch: before your patch, 'public function foo' was matched, after your patch those functions didn't match anymore. I tried to improve this by the changes we are talking about. Without a doubt, I did it wrong. Sorry for crediting my changes to your changes with your name. Usually, people appreciate this more than not being credited at all. But in any case, it's too late.
The only thing I don't understand is your indignation now, after the yesterday's commit, you showed up in IRC and you probably remember we talked about exactly this then. For me, it sounded like you want to fix my mistake, though probably I misunderstood you. Just for the records and those who were not on IRC, here is the relevant log (the full log can be found on http://irc.geany.org/logs/log_20100307.html):
18:25 cankoy has joined #geany 18:43 cankoy eht16: a bracket expression in regex matches single char. ,not strings. 18:43 eht16 dammit, you are right 18:44 cankoy actually your pattern works, but pnly by luck :-) 18:44 eht16 gimme a second to answer to your other patches, then we'll fix it 18:44 eht16 hates regexps 18:44 eht16 not because they are bad but because eht16 always use them wrong 18:44 cankoy well, that's why I asked you not to do everything :-) 18:45 eht16 haha 18:58 eht16 cankoy: is there a difference between [[:space:]]* and [ \t]* ? 18:59 cankoy yes by definition, but not in current mode of regex in ctags 18:59 eht16 I think we should use one of both then 19:00 cankoy I was thinking about doing \n matches in the future, that's why I kept [:space:] 19:00 cankoy feel free to change 19:01 eht16 I don't get it working for function foo() 19:01 cankoy eht16: my initial patch was matching that. 19:01 eht16 no 19:02 eht16 I thought I tested this 19:02 eht16 well, I try it again to get sure 19:04 eht16 ah, yeah, of course 19:04 eht16 but it didn't work with modifiers 19:05 cankoy eht16: let me take this over. You don't have to commit until it matures. 19:05 eht16 ok, just fix it as you think it should be and sorry for destroying your work :( 19:05 cankoy np, I know you don't have much time. 19:31 cankoy eht16: Harold's regex is also not correct, e.g. it does not match "public static function..." I'll try to fix that too. 19:32 cankoy eht16: no, sorry. It matches that actually. 19:32 eht16 I didn't even know that's possible in PHP :)
I thought we agreed that I made a mistake and this can be fixed. I don't understand why you now raise such a hard voice.
removed from the logs for that patch.
Done, at least for the ChangeLog. As the others said, removing it from the SVN commit message isn't possible.
Regards, Enrico