Re: [Ctags] new language regular expression
Brought to you by:
dhiebert
From: Darren H. <dhi...@us...> - 2006-11-23 04:17:28
|
Joseph, As Elliot pointed out, the best way is to put the '-' as either the first or last character of a the "list" operator (i.e. "[...]"). The '-' character cannot be escapes with the list operator. For a description of the "range operator" (i.e. '-'), see: http://www.delorie.com/gnu/docs/regex/regex_19.html Regards, Darren On Wednesday 22 November 2006 16:39, Joseph Xu wrote: > I'm trying to get ctags to work with a new language called Soar. > Here's what I wrote in my .ctags file: > > --langdef=soar > --langmap=soar:.soar > --regex-soar=/^\s*sp\s*\{\s*([a-zA-Z0-9_\-\*]+)/\1/p,production/ > > > I want to capture lines of code such as > > sp {apply*change-state-stack > > sp {propose*change-state-preserve-on > > The above regular expression is working, to an extent, but all the tag > names are cut off at the first occurrence of '-' characters, so I get > tags like this: > > propose*change blocksworld.soar /^sp {propose*change-state-stack$/;" p > apply*change blocksworld.soar /^sp {apply*change-state-stack$/;" p > > What's wrong with my regex? -- Darren Hiebert http://darrenhiebert.com http://ctags.sourceforge.net |