From MAILER-DAEMON Mon May 02 09:41:06 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QGtN4-0000pO-VB
	for mharc-help-source-highlight@gnu.org; Mon, 02 May 2011 09:41:06 -0400
Received: from eggs.gnu.org ([140.186.70.92]:53944)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1QGtN2-0000pH-Fc
	for help-source-highlight@gnu.org; Mon, 02 May 2011 09:41:05 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1QGtN0-0000Ma-H9
	for help-source-highlight@gnu.org; Mon, 02 May 2011 09:41:04 -0400
Received: from pianeta.di.unito.it ([130.192.156.1]:51388)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1QGtN0-0000Le-8y
	for help-source-highlight@gnu.org; Mon, 02 May 2011 09:41:02 -0400
X-MailScanner-From: bettini@dsi.unifi.it
X-SpamCheck: not spam, SpamAssassin (not cached, score=-102.228, required 3,
	autolearn=not spam, AUTHENTICATEDUSER -100.00, AWL 0.27,
	BAYES_00 -2.60, RDNS_NONE 0.10)
X-AntiVirus: Email Clean
X-dipinfo-MailScanner-ID: p42Dec8Q017965
X-dipinfo-MailScanner-Information: Please contact Department of Computer
	Science technical staff for more information
Received: from pianeta.di.unito.it ([130.192.156.1])
	by pianeta.di.unito.it (INFO-DIP) with ESMTP id p42Dec8Q017965
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO
	AuthenticatedUser=bettini ) for <help-source-highlight@gnu.org>;
	Mon, 2 May 2011 15:40:42 +0200 (CEST)
Message-ID: <4DBEB455.5090003@dsi.unifi.it>
Date: Mon, 02 May 2011 15:40:37 +0200
From: Lorenzo Bettini <bettini@dsi.unifi.it>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8
MIME-Version: 1.0
To: discussion list for source-highlight <help-source-highlight@gnu.org>
References: <20110501.110600.265688718228280988.yamato@redhat.com>
In-Reply-To: <20110501.110600.265688718228280988.yamato@redhat.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta)
X-Received-From: 130.192.156.1
Subject: Re: [Help-source-highlight] [patch] highlighting usertypes started
 with	`_'
X-BeenThere: help-source-highlight@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: discussion list for source-highlight <help-source-highlight@gnu.org>
List-Id: discussion list for source-highlight <help-source-highlight.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/help-source-highlight>, 
	<mailto:help-source-highlight-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/help-source-highlight>
List-Post: <mailto:help-source-highlight@gnu.org>
List-Help: <mailto:help-source-highlight-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/help-source-highlight>, 
	<mailto:help-source-highlight-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 02 May 2011 13:41:05 -0000

Hi

thanks for the report; actually _ should be used also for detecting 
variable name, so the complete diff is

  (usertype,usertype,normal) =
-`([[:alpha:]](?:[^[:punct:][:space:]]|[_])*)
+`([[:alpha:]_](?:[^[:punct:][:space:]]|[_])*)
  ((?:<.*>)?)
-(\s+(?=[*&]*[[:alpha:]][^[:punct:][:space:]]*\s*[[:punct:]\[\]]+))`
+(\s+(?=[*&]*[[:alpha:]_][^[:punct:][:space:]]*\s*[[:punct:]\[\]]+))`

you can find it in git

cheers
	Lorenzo

On 05/01/2011 04:06 AM, Masatake YAMATO wrote:
> Hi,
>
> In C program usertypes started with `_' are not highlighted expectedly.
> e.g.
>
>      typedef i __i;
>      __i j = 1;
>
> here __i is not recognized as usertype.
> Usetype started with _ is popular in linux kernel.
>
> 2011-05-01  Masatake YAMATO<yamato@redhat.com>
>
> 	* src/clike_vardeclaration.lang: Accept a usertype started with _.
>
> diff --git a/src/clike_vardeclaration.lang b/src/clike_vardeclaration.lang
> index 620c45f..bbee078 100644
> --- a/src/clike_vardeclaration.lang
> +++ b/src/clike_vardeclaration.lang
> @@ -1,4 +1,4 @@
>   (usertype,usertype,normal) =
> -`([[:alpha:]](?:[^[:punct:][:space:]]|[_])*)
> +`([[:alpha:]_](?:[^[:punct:][:space:]]|[_])*)
>   ((?:<.*>)?)
>   (\s+(?=[*&]*[[:alpha:]][^[:punct:][:space:]]*\s*[[:punct:]\[\]]+))`
>
> _______________________________________________
> Help-source-highlight mailing list
> Help-source-highlight@gnu.org
> https://lists.gnu.org/mailman/listinfo/help-source-highlight


-- 
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


From MAILER-DAEMON Sat May 14 03:10:43 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QL8zr-0006cQ-PE
	for mharc-help-source-highlight@gnu.org; Sat, 14 May 2011 03:10:43 -0400
Received: from eggs.gnu.org ([140.186.70.92]:55665)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1QL8zp-0006ba-J2
	for help-source-highlight@gnu.org; Sat, 14 May 2011 03:10:42 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1QL8zm-0006xZ-Nx
	for help-source-highlight@gnu.org; Sat, 14 May 2011 03:10:41 -0400
Received: from pianeta.di.unito.it ([130.192.156.1]:40528)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1QL8zm-0006xS-CJ
	for help-source-highlight@gnu.org; Sat, 14 May 2011 03:10:38 -0400
X-MailScanner-From: bettini@dsi.unifi.it
X-SpamCheck: not spam, SpamAssassin (not cached, score=-102.361, required 3,
	autolearn=not spam, AUTHENTICATEDUSER -100.00, AWL 0.14,
	BAYES_00 -2.60, RDNS_NONE 0.10)
X-AntiVirus: Email Clean
X-dipinfo-MailScanner-ID: p4E7AEoB005065
X-dipinfo-MailScanner-Information: Please contact Department of Computer
	Science technical staff for more information
Received: from pianeta.di.unito.it ([130.192.156.1])
	by pianeta.di.unito.it (INFO-DIP) with ESMTP id p4E7AEoB005065
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO
	AuthenticatedUser=bettini ) for <help-source-highlight@gnu.org>;
	Sat, 14 May 2011 09:10:19 +0200 (CEST)
Message-ID: <4DCE2AD3.9080202@dsi.unifi.it>
Date: Sat, 14 May 2011 09:10:11 +0200
From: Lorenzo Bettini <bettini@dsi.unifi.it>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10
MIME-Version: 1.0
To: discussion list for source-highlight <help-source-highlight@gnu.org>
References: <20110126193326.GF22136@intrepid.com>	<4D426DCC.7060006@dsi.unifi.it>
	<20110131141403.GC8858@intrepid.com>
In-Reply-To: <20110131141403.GC8858@intrepid.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta)
X-Received-From: 130.192.156.1
Subject: Re: [Help-source-highlight] build probs when maintainer mode
 is	disabled
X-BeenThere: help-source-highlight@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: discussion list for source-highlight <help-source-highlight@gnu.org>
List-Id: discussion list for source-highlight <help-source-highlight.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/help-source-highlight>, 
	<mailto:help-source-highlight-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/help-source-highlight>
List-Post: <mailto:help-source-highlight@gnu.org>
List-Help: <mailto:help-source-highlight-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/help-source-highlight>, 
	<mailto:help-source-highlight-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 14 May 2011 07:10:42 -0000

On 01/31/2011 03:14 PM, Gary Funck wrote:
> On 01/28/11 08:18:36, Lorenzo Bettini wrote:
>> could you please show me which files fail to build?
>
> Making all in doc
> make[2]: Entering directory `/a/src-highlite/doc'
> Makefile:1403: warning: overriding recipe for target `styleformatter.h.texinfo'
> Makefile:1394: warning: ignoring old recipe for target
> `styleformatter.h.texinfo'
> make[2]: *** No rule to make target `help-output.texinfo', needed by
> `source-highlight.info'.  Stop.
> make[2]: Leaving directory `/a/src-highlite/doc'
> make[1]: *** [all-recursive] Error 1
>
> commands:
>
>    git clone git://git.savannah.gnu.org/src-highlite.git
>    cd src-highlite
>    autoreconf -i
>    configure&&  make

sorry for the delay.

I've pushed changes to the git repo that should solve this issue, could 
you please check?

In case you still get errors, please use make -k so that it does not 
stop compilation on the first error

thanks in advance
cheers
	Lorenzo

-- 
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


From MAILER-DAEMON Fri May 20 10:57:30 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QNR8s-0006Zg-KN
	for mharc-help-source-highlight@gnu.org; Fri, 20 May 2011 10:57:30 -0400
Received: from eggs.gnu.org ([140.186.70.92]:37140)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <pwillis@aslenv.com>) id 1QNR8q-0006ZM-Db
	for help-source-highlight@gnu.org; Fri, 20 May 2011 10:57:28 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <pwillis@aslenv.com>) id 1QNR8p-0001eb-Jb
	for help-source-highlight@gnu.org; Fri, 20 May 2011 10:57:28 -0400
Received: from [199.175.106.51] (port=14638 helo=cluster2.islandnet.com)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <pwillis@aslenv.com>) id 1QNR8p-0001eS-D1
	for help-source-highlight@gnu.org; Fri, 20 May 2011 10:57:27 -0400
Received: from [64.251.74.18] (port=13672 helo=[10.19.86.68])
	by blade2.islandnet.com with ESMTPSA (TLSv1:CAMELLIA256-SHA:256)
	id 1QNR8n-0009hl-8z 
	for help-source-highlight@gnu.org; Fri, 20 May 2011 07:57:25 -0700
Message-ID: <4DD68154.1000107@aslenv.com>
Date: Fri, 20 May 2011 07:57:24 -0700
From: Peter Willis <pwillis@aslenv.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
	rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10
MIME-Version: 1.0
To: help-source-highlight@gnu.org
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 199.175.106.51
Subject: [Help-source-highlight] Regular Expression Explanation for
	'function.lang'
X-BeenThere: help-source-highlight@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: pwillis@aslenv.com,
	discussion list for source-highlight <help-source-highlight@gnu.org>
List-Id: discussion list for source-highlight <help-source-highlight.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/help-source-highlight>, 
	<mailto:help-source-highlight-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/help-source-highlight>
List-Post: <mailto:help-source-highlight@gnu.org>
List-Help: <mailto:help-source-highlight-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/help-source-highlight>, 
	<mailto:help-source-highlight-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 20 May 2011 14:57:29 -0000


Hello,

I have made an IDL syntax highlight file:
rsiidl.lang

One of the included files is 'function.lang'.
This works fine for functions that return a value
since the call syntax for functions is:

VARIABLE = SOMEFUNC(variable , variable, ...)

I now want to define 'procedure.lang' where
the call syntax is:

SOMEPROC, variable, variable, ...

As you can see the call to a procedure in IDL does
not include parenthesis.


'function.lang' reads as follows:


vardef FUNCTION = '(?:[[:alpha:]]|_)[[:word:]]*[[:blank:]]*(?=\()'
function = $FUNCTION




What format (of regex ??) is being used here?
How might I change this to test just the 'procedure' case?

Thanks

Peter


From MAILER-DAEMON Mon May 23 10:11:44 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QOVrE-0000kw-Gk
	for mharc-help-source-highlight@gnu.org; Mon, 23 May 2011 10:11:44 -0400
Received: from eggs.gnu.org ([140.186.70.92]:40770)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1QOVr8-0000kX-53
	for help-source-highlight@gnu.org; Mon, 23 May 2011 10:11:43 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1QOVr5-0003Tk-HV
	for help-source-highlight@gnu.org; Mon, 23 May 2011 10:11:38 -0400
Received: from pianeta.di.unito.it ([130.192.156.1]:61943)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1QOVr5-0003Om-98
	for help-source-highlight@gnu.org; Mon, 23 May 2011 10:11:35 -0400
X-MailScanner-From: bettini@dsi.unifi.it
X-SpamCheck: not spam, SpamAssassin (not cached, score=-102.384, required 3,
	autolearn=not spam, AUTHENTICATEDUSER -100.00, AWL 0.12,
	BAYES_00 -2.60, RDNS_NONE 0.10)
X-AntiVirus: Email Clean
X-dipinfo-MailScanner-ID: p4NEAgpg023408
X-dipinfo-MailScanner-Information: Please contact Department of Computer
	Science technical staff for more information
Received: from pianeta.di.unito.it ([130.192.156.1])
	by pianeta.di.unito.it (INFO-DIP) with ESMTP id p4NEAgpg023408
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO
	AuthenticatedUser=bettini ); Mon, 23 May 2011 16:10:43 +0200 (CEST)
Message-ID: <4DDA6AE4.6060001@dsi.unifi.it>
Date: Mon, 23 May 2011 16:10:44 +0200
From: Lorenzo Bettini <bettini@dsi.unifi.it>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10
MIME-Version: 1.0
To: pwillis@aslenv.com,
	discussion list for source-highlight <help-source-highlight@gnu.org>
References: <4DD68154.1000107@aslenv.com>
In-Reply-To: <4DD68154.1000107@aslenv.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta)
X-Received-From: 130.192.156.1
Subject: Re: [Help-source-highlight] Regular Expression Explanation
	for	'function.lang'
X-BeenThere: help-source-highlight@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: discussion list for source-highlight <help-source-highlight@gnu.org>
List-Id: discussion list for source-highlight <help-source-highlight.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/help-source-highlight>, 
	<mailto:help-source-highlight-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/help-source-highlight>
List-Post: <mailto:help-source-highlight@gnu.org>
List-Help: <mailto:help-source-highlight-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/help-source-highlight>, 
	<mailto:help-source-highlight-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 23 May 2011 14:11:43 -0000

On 05/20/2011 04:57 PM, Peter Willis wrote:
>
> Hello,
>

Hi Peter

> I have made an IDL syntax highlight file:
> rsiidl.lang
>
> One of the included files is 'function.lang'.
> This works fine for functions that return a value
> since the call syntax for functions is:
>
> VARIABLE = SOMEFUNC(variable , variable, ...)
>
> I now want to define 'procedure.lang' where
> the call syntax is:
>
> SOMEPROC, variable, variable, ...
>
> As you can see the call to a procedure in IDL does
> not include parenthesis.
>

please keep in mind that source-highlight does not perform real parsing 
(only scanning with some state functionalities), thus it can only 
highlight parts of a program that can be recognized through regular 
expressions...

>
> 'function.lang' reads as follows:
>
>
> vardef FUNCTION = '(?:[[:alpha:]]|_)[[:word:]]*[[:blank:]]*(?=\()'
> function = $FUNCTION
>
> What format (of regex ??) is being used here?
> How might I change this to test just the 'procedure' case?

that regular expression uses "Forward Lookahead Asserts" (see also 
http://www.gnu.org/software/src-highlite/source-highlight.html#Notes-on-regular-expressions), 
i.e., which are included in (?=   )

(?=\()

checks whether after the name there's a ( but does not consume it

can the syntax of your procedure definition be identified with a regular 
expression?

Can you make some examples of procedures?

cheers
	Lorenzo

-- 
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


From MAILER-DAEMON Tue May 24 11:28:03 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QOtWd-0007wd-NI
	for mharc-help-source-highlight@gnu.org; Tue, 24 May 2011 11:28:03 -0400
Received: from eggs.gnu.org ([140.186.70.92]:43261)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <pwillis@aslenv.com>) id 1QOtWa-0007vx-HX
	for help-source-highlight@gnu.org; Tue, 24 May 2011 11:28:01 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <pwillis@aslenv.com>) id 1QOtWZ-0007ZJ-Jx
	for help-source-highlight@gnu.org; Tue, 24 May 2011 11:28:00 -0400
Received: from [199.175.106.51] (port=26301 helo=cluster2.islandnet.com)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <pwillis@aslenv.com>) id 1QOtWZ-0007YP-FZ
	for help-source-highlight@gnu.org; Tue, 24 May 2011 11:27:59 -0400
Received: from [64.251.74.18] (port=25718 helo=[10.19.86.68])
	by blade2.islandnet.com with ESMTPSA (TLSv1:CAMELLIA256-SHA:256)
	id 1QOtWM-0002NV-7S 
	for help-source-highlight@gnu.org; Tue, 24 May 2011 08:27:46 -0700
Message-ID: <4DDBCE71.506@aslenv.com>
Date: Tue, 24 May 2011 08:27:45 -0700
From: Peter Willis <pwillis@aslenv.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
	rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10
MIME-Version: 1.0
To: help-source-highlight@gnu.org
References: <4DD68154.1000107@aslenv.com> <4DDA6AE4.6060001@dsi.unifi.it>
In-Reply-To: <4DDA6AE4.6060001@dsi.unifi.it>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 199.175.106.51
Subject: Re: [Help-source-highlight] Regular Expression Explanation
	for	'function.lang'
X-BeenThere: help-source-highlight@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: pwillis@aslenv.com,
	discussion list for source-highlight <help-source-highlight@gnu.org>
List-Id: discussion list for source-highlight <help-source-highlight.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/help-source-highlight>, 
	<mailto:help-source-highlight-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/help-source-highlight>
List-Post: <mailto:help-source-highlight@gnu.org>
List-Help: <mailto:help-source-highlight-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/help-source-highlight>, 
	<mailto:help-source-highlight-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 24 May 2011 15:28:01 -0000

On 5/23/2011 7:10 AM, Lorenzo Bettini wrote:

> (?=\()
>
> checks whether after the name there's a ( but does not consume it
>
> can the syntax of your procedure definition be identified with a regular
> expression?
>
> Can you make some examples of procedures?
>
> cheers
> Lorenzo


Hello,

In 'IDL' procedures are *called* in the following way:

PROCEDURE_NAME , ARGUMENT_1, ARGUMENT_2, ARGUMENT_3, .... , ARGUMENT_N

As you can see no brackets or parenthesis are used. The problem here is
a regex would need to deal with only the first case of the
comma positioned after 'PROCEDURE_NAME' and ignore all other groupings
until the end of the statement.

There is also on other problem in that statements can use continuation
where a '$' indicates the current statement continues on to the
next line:

PROCEDURE_NAME , ARGUMENT_1, $
ARGUMENT_2, ARGUMENT_3, $
.... , ARGUMENT_N

In this case regex needs to distinguish between the case of
'PRODEDURE_NAME' and cases where the statement has been continued.
ie: not highlight 'ARGUMENT_2' due to the comma following there.


Declarations for *both* functions and procedures are written in
similar ways. The difference is only the 'RETURN' value in the case
of functions:

FUNCTION function_name, arg_1, arg_2 $
                         arg_3, arg_4, ...., arg_n
	....<PROGRAM STATEMENTS>...

    RETURN, some_value
END


PRO procedure_name, arg_1, arg_2 arg_3, arg_4, ....,$
                     arg_n
	....<PROGRAM STATEMENTS>...
END



Best Regards,


Peter


From MAILER-DAEMON Fri May 27 04:58:49 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QPssb-0007Ti-E5
	for mharc-help-source-highlight@gnu.org; Fri, 27 May 2011 04:58:49 -0400
Received: from eggs.gnu.org ([140.186.70.92]:45599)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1QPssY-0007Sd-Ls
	for help-source-highlight@gnu.org; Fri, 27 May 2011 04:58:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1QPssW-0008L6-7Y
	for help-source-highlight@gnu.org; Fri, 27 May 2011 04:58:46 -0400
Received: from pianeta.di.unito.it ([130.192.156.1]:42450)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1QPssV-0008KA-Vs
	for help-source-highlight@gnu.org; Fri, 27 May 2011 04:58:44 -0400
X-MailScanner-From: bettini@dsi.unifi.it
X-SpamCheck: not spam, SpamAssassin (not cached, score=-102.406, required 3,
	autolearn=not spam, AUTHENTICATEDUSER -100.00, AWL 0.09,
	BAYES_00 -2.60, RDNS_NONE 0.10)
X-AntiVirus: Email Clean
X-dipinfo-MailScanner-ID: p4R8vuDQ023079
X-dipinfo-MailScanner-Information: Please contact Department of Computer
	Science technical staff for more information
Received: from pianeta.di.unito.it ([130.192.156.1])
	by pianeta.di.unito.it (INFO-DIP) with ESMTP id p4R8vuDQ023079
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO
	AuthenticatedUser=bettini ); Fri, 27 May 2011 10:57:57 +0200 (CEST)
Message-ID: <4DDF6794.7000303@dsi.unifi.it>
Date: Fri, 27 May 2011 10:57:56 +0200
From: Lorenzo Bettini <bettini@dsi.unifi.it>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10
MIME-Version: 1.0
To: pwillis@aslenv.com,
	discussion list for source-highlight <help-source-highlight@gnu.org>
References: <4DD68154.1000107@aslenv.com> <4DDA6AE4.6060001@dsi.unifi.it>
	<4DDBCE71.506@aslenv.com>
In-Reply-To: <4DDBCE71.506@aslenv.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta)
X-Received-From: 130.192.156.1
Subject: Re: [Help-source-highlight] Regular Expression
	Explanation	for	'function.lang'
X-BeenThere: help-source-highlight@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: discussion list for source-highlight <help-source-highlight@gnu.org>
List-Id: discussion list for source-highlight <help-source-highlight.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/help-source-highlight>, 
	<mailto:help-source-highlight-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/help-source-highlight>
List-Post: <mailto:help-source-highlight@gnu.org>
List-Help: <mailto:help-source-highlight-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/help-source-highlight>, 
	<mailto:help-source-highlight-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 27 May 2011 08:58:47 -0000

Hi

do procedure (and functions) are always called on a line?
I mean, is the procedure name always at the beginning of a line 
(possibly with some spaces before)?

Are commas used also in other contexts besides function and procedure 
invocation?

cheers
	Lorenzo

P.S. some examples of programs might be useful to do some tests; have 
you already a partial language definition for IDL to start from?

On 05/24/2011 05:27 PM, Peter Willis wrote:
> On 5/23/2011 7:10 AM, Lorenzo Bettini wrote:
>
>> (?=\()
>>
>> checks whether after the name there's a ( but does not consume it
>>
>> can the syntax of your procedure definition be identified with a regular
>> expression?
>>
>> Can you make some examples of procedures?
>>
>> cheers
>> Lorenzo
>
>
> Hello,
>
> In 'IDL' procedures are *called* in the following way:
>
> PROCEDURE_NAME , ARGUMENT_1, ARGUMENT_2, ARGUMENT_3, .... , ARGUMENT_N
>
> As you can see no brackets or parenthesis are used. The problem here is
> a regex would need to deal with only the first case of the
> comma positioned after 'PROCEDURE_NAME' and ignore all other groupings
> until the end of the statement.
>
> There is also on other problem in that statements can use continuation
> where a '$' indicates the current statement continues on to the
> next line:
>
> PROCEDURE_NAME , ARGUMENT_1, $
> ARGUMENT_2, ARGUMENT_3, $
> .... , ARGUMENT_N
>
> In this case regex needs to distinguish between the case of
> 'PRODEDURE_NAME' and cases where the statement has been continued.
> ie: not highlight 'ARGUMENT_2' due to the comma following there.
>
>
> Declarations for *both* functions and procedures are written in
> similar ways. The difference is only the 'RETURN' value in the case
> of functions:
>
> FUNCTION function_name, arg_1, arg_2 $
> arg_3, arg_4, ...., arg_n
> ....<PROGRAM STATEMENTS>...
>
> RETURN, some_value
> END
>
>
> PRO procedure_name, arg_1, arg_2 arg_3, arg_4, ....,$
> arg_n
> ....<PROGRAM STATEMENTS>...
> END
>
>
>
> Best Regards,
>
>
> Peter
>
> _______________________________________________
> Help-source-highlight mailing list
> Help-source-highlight@gnu.org
> https://lists.gnu.org/mailman/listinfo/help-source-highlight


-- 
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


From MAILER-DAEMON Fri May 27 16:53:36 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QQ42K-0001ZA-39
	for mharc-help-source-highlight@gnu.org; Fri, 27 May 2011 16:53:36 -0400
Received: from eggs.gnu.org ([140.186.70.92]:42202)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <pwillis@aslenv.com>) id 1QQ42H-0001Z1-91
	for help-source-highlight@gnu.org; Fri, 27 May 2011 16:53:34 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <pwillis@aslenv.com>) id 1QQ42F-0000HV-0q
	for help-source-highlight@gnu.org; Fri, 27 May 2011 16:53:33 -0400
Received: from [199.175.106.40] (port=13145 helo=cluster1.islandnet.com)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <pwillis@aslenv.com>) id 1QQ42E-0008V1-KT
	for help-source-highlight@gnu.org; Fri, 27 May 2011 16:53:30 -0400
Received: from [64.251.74.18] (port=12891 helo=[10.19.86.68])
	by blade1.islandnet.com with ESMTPSA (TLSv1:CAMELLIA256-SHA:256)
	id 1QQ421-000BtL-41 
	for help-source-highlight@gnu.org; Fri, 27 May 2011 13:53:17 -0700
Message-ID: <4DE00F40.8060005@aslenv.com>
Date: Fri, 27 May 2011 13:53:20 -0700
From: Peter Willis <pwillis@aslenv.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
	rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10
MIME-Version: 1.0
To: help-source-highlight@gnu.org
References: <4DD68154.1000107@aslenv.com> <4DDA6AE4.6060001@dsi.unifi.it>
	<4DDBCE71.506@aslenv.com> <4DDF6794.7000303@dsi.unifi.it>
In-Reply-To: <4DDF6794.7000303@dsi.unifi.it>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 199.175.106.40
Subject: Re: [Help-source-highlight] Regular Expression
	Explanation	for	'function.lang'
X-BeenThere: help-source-highlight@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: pwillis@aslenv.com,
	discussion list for source-highlight <help-source-highlight@gnu.org>
List-Id: discussion list for source-highlight <help-source-highlight.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/help-source-highlight>, 
	<mailto:help-source-highlight-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/help-source-highlight>
List-Post: <mailto:help-source-highlight@gnu.org>
List-Help: <mailto:help-source-highlight-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/help-source-highlight>, 
	<mailto:help-source-highlight-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 27 May 2011 20:53:34 -0000

Hello,

There is a 'Wikipedia' page for IDL located at:
http://en.wikipedia.org/wiki/IDL_(programming_language)

There is a complete IDL programming manual located:

http://idlastro.gsfc.nasa.gov/idl_html_help/Programming_in_IDL.html

Normally procedures an functions are called on one line unless
the line exceeds 64 (?) characters. In that case the line may use
'$' symbol to continue the call statement on the next line.

Procedures do not return values, hence they are never called
as variables.

Functions can happen in-line anywhere.

Commas are also used as delimiters for array members in IDL.

Below is the language definition for rsiidl.lang .


'procedure.lang' is just a duplicate of 'function.lang'
at this point.

Best Regards,


Peter

//////////RSIIDL.LANG BEGIN///////////////////////////

preproc = "include|include_once|require|require_once"

comment start ";"

include "number.lang"

string delim "\"" "\"" escape "\\" multiline
string delim "'" "'"  escape "\\" multiline

keyword = 
"COMMON|COMPILE_OPT|PRO|FUNCTION|BEGIN|BREAK|END|GOTO|IF|THEN|ELSE|ENDIF|CASE|OF|ENDCASE|SWITCH|ENDSWITCH|FOR|DO|CONTINUE|ENDFOR|WHILE|ENDWHILE|LT|LE|EQ|NE|GE|GT|>|<|NOT|OR|XOR|AND|MOD|FORWARD_FUNCTION|ON_ERROR|ON_IOERROR|REPEAT|UNTIL|.COMPILE|.CONTINUE|.EDIT|.FULL_RESET_SESSION|.GO|.OUT|.RESET_SESSION|.RETURN|.RNEW|.RUN|.SKIP|.STEP|.STEPOVER|.TRACE|A_CORRELATE|ABS|ACOS|ADAPT_HIST_EQUAL|ALOG|ALOG10|AMOEBA|ANNOTATE|APP_USER_DIR|APP_USER_DIR_QUERY|ARG_PRESENT|ARRAY_EQUAL|ARRAY_INDICES|ARROW|ASCII_TEMPLATE|ASIN|ASSOC|ATAN|BAR_PLOT|BESELI|BESELJ|BESELK|BESELY 
|BETA |BILINEAR |BIN_DATE |BINARY_TEMPLATE |BINDGEN |BINOMIAL |BLK_CON 
|BOX_CURSOR |BROYDEN |BYTARR |BYTE |BYTSCL |C_CORRELATE |CALDAT 
|CALENDAR |CALL_EXTERNAL |CALL_FUNCTION |CALL_METHOD |CEIL |CHEBYSHEV 
|CHECK_MATH |CHISQR_CVF |CHISQR_PDF |CHOLSOL |CINDGEN |CIR_3PNT 
|CLUST_WTS |CLUSTER |CLUSTER_TREE |COLOR_QUAN |COLORMAP_APPLICABLE 
|COMFIT |COMPLEX |COMPLEXARR |COMPLEXROUND |COMPUTE_MESH_NORMALS |COND 
|CONGRID |CONJ |CONVERT_COORD |CONVOL |COORD2TO3 |CORRELATE |COS |COSH 
|CRAMER |CREATE_CURSOR |CREATE_STRUCT |CREATE_VIEW |CROSSP |CRVLENGTH 
|CT_LUMINANCE |CTI_TEST |CURVEFIT |CV_COORD |CVTTOBM |CW_ANIMATE 
|CW_ANIMATE_GETP |CW_ANIMATE_LOAD |CW_ANIMATE_RUN |CW_ARCBALL |CW_BGROUP 
|CW_CLR_INDEX |CW_COLORSEL |CW_DEFROI |CW_FIELD |CW_FILESEL |CW_FORM 
|CW_FSLIDER |CW_LIGHT_EDITOR |CW_LIGHT_EDITOR_GET |CW_LIGHT_EDITOR_SET 
|CW_ORIENT |CW_PALETTE_EDITOR |CW_PALETTE_EDITOR_GET 
|CW_PALETTE_EDITOR_SET |CW_PDMENU |CW_RGBSLIDER |CW_TMPL |CW_ZOOM 
|DBLARR |DCINDGEN |DCOMPLEX |DCOMPLEXARR |DEFROI |DENDRO_PLOT 
|DENDROGRAM |DERIV |DERIVSIG |DETERM |DIAG_MATRIX |DIALOG_MESSAGE 
|DIALOG_PICKFILE |DIALOG_PRINTERSETUP |DIALOG_PRINTJOB 
|DIALOG_READ_IMAGE |DIALOG_WRITE_IMAGE |DIGITAL_FILTER |DILATE |DINDGEN 
|DISSOLVE |DIST |DISTANCE_MEASURE |DOC_LIBRARY |DOUBLE |EFONT |EIGENQL 
|EIGENVEC |ELMHES |EOF |ERF |ERFC |ERFCX |ERODE |ERRPLOT |EXECUTE |EXP 
|EXPAND |EXPAND_PATH |EXPINT |EXTRAC |EXTRACT_SLICE |F_CVF |F_PDF 
|FACTORIAL |FFT |FILE_BASENAME |FILE_DIRNAME |FILE_EXPAND_PATH 
|FILE_INFO |FILE_LINES |FILE_LINK |FILE_READLINK |FILE_SAME |FILE_SEARCH 
|FILE_TEST |FILE_WHICH |FILEPATH |FINDGEN |FINITE |FIX |FLICK |FLOAT 
|FLOOR |FLOW3 |FLTARR |FORMAT_AXIS_VALUES |FSTAT |FULSTR |FUNCT |FV_TEST 
|FX_ROOT |FZ_ROOTS |GAMMA |GAMMA_CT |GAUSS_CVF |GAUSS_PDF |GAUSS2DFIT 
|GAUSSFIT |GAUSSINT |GET_DRIVE_LIST |GET_KBRD |GET_LUN |GET_SCREEN_SIZE 
|GETENV |GRID_TPS |GRID3 |GRIDDATA |GS_ITER |H_EQ_CT |H_EQ_INT 
|H5_BROWSER |HANNING |HDF_BROWSER |HDF_READ |HILBERT |HIST_2D 
|HIST_EQUAL |HISTOGRAM |HLS |HOUGH |HQR |HSV |IBETA |ICONTOUR |IDENTITY 
|IDL_VALIDNAME |IDLITSYS_CREATETOOL |IGAMMA |IIMAGE |IMAGE_CONT 
|IMAGINARY |IMAP |INDGEN |INT_2D |INT_3D |INT_TABULATED |INTARR 
|INTERPOL |INTERPOLATE |INVERT |IOCTL |IPLOT |ISHFT |ISURFACE |ITCURRENT 
|ITDELETE |ITGETCURRENT |ITREGISTER |ITRESET |ITRESOLVE |IVOLUME |JULDAY 
|KEYWORD_SET |KRIG2D |KURTOSIS |KW_TEST |L64INDGEN |LA_CHOLMPROVE 
|LA_CHOLSOL |LA_DETERM |LA_EIGENPROBLEM |LA_EIGENQL |LA_EIGENVEC 
|LA_ELMHES |LA_GM_LINEAR_MODEL |LA_HQR |LA_INVERT 
|LA_LEAST_SQUARE_EQUALITY |LA_LEAST_SQUARES |LA_LINEAR_EQUATION 
|LA_LUMPROVE |LA_LUSOL |LA_TRIMPROVE |LA_TRISOL |LABEL_DATE 
|LABEL_REGION |LADFIT |LAGUERRE |LEEFILT |LEGENDRE |LINBCG |LINDGEN 
|LINFIT |LL_ARC_DISTANCE |LMFIT |LMGR |LNGAMMA |LNP_TEST |LOADCT 
|LOCALE_GET |LOGICAL_AND |LOGICAL_OR |LOGICAL_TRUE |LON64ARR |LONARR 
|LONG |LONG64 |LSODE |LU_COMPLEX |LUMPROVE |LUSOL |M_CORRELATE |MACHAR 
|MAKE_ARRAY |MAP_2POINTS |MAP_CONTINENTS |MAP_GRID |MAP_IMAGE |MAP_PATCH 
|MAP_PROJ_FORWARD |MAP_PROJ_IMAGE |MAP_PROJ_INFO |MAP_PROJ_INIT 
|MAP_PROJ_INVERSE |MAP_SET |MATRIX_MULTIPLY |MATRIX_POWER |MAX |MD_TEST 
|MEAN |MEANABSDEV |MEDIAN |MEMORY |MESH_CLIP |MESH_DECIMATE 
|MESH_ISSOLID |MESH_MERGE |MESH_NUMTRIANGLES |MESH_OBJ |MESH_SMOOTH 
|MESH_SURFACEAREA |MESH_VALIDATE |MESH_VOLUME |MESSAGE |MIN 
|MIN_CURVE_SURF |MK_HTML_HELP |MODIFYCT |MOMENT |MORPH_CLOSE 
|MORPH_DISTANCE |MORPH_GRADIENT |MORPH_HITORMISS |MORPH_OPEN |MORPH_THIN 
|MORPH_TOPHAT |MPEG_CLOSE |MPEG_OPEN |MPEG_PUT |MPEG_SAVE |MULTI 
|N_ELEMENTS |N_PARAMS |N_TAGS |NEWTON |NORM |OBJ_CLASS |OBJ_ISA |OBJ_NEW 
|OBJ_VALID |OBJARR |OPEN |OPLOTERR |P_CORRELATE |PATH_SEP |PCOMP 
|PLOT_3DBOX |PLOT_FIELD |PLOTERR |PNT_LINE |POLAR_CONTOUR |POLAR_SURFACE 
|POLY |POLY_2D |POLY_AREA |POLY_FIT |POLYFILLV |POLYSHADE |POLYWARP 
|POPD |PRIMES |PRODUCT |PROFILE |PROJECT_VOL |PS_SHOW_FONTS |PSAFM 
|PSEUDO |PTR_NEW |PTR_VALID |PTRARR |QGRID3 |QROMB |QROMO |QSIMP 
|QUERY_BMP |QUERY_DICOM |QUERY_GIF |QUERY_IMAGE |QUERY_JPEG 
|QUERY_JPEG2000 |QUERY_MRSID |QUERY_PICT |QUERY_PNG |QUERY_PPM 
|QUERY_SRF |QUERY_TIFF |QUERY_WAV |R_CORRELATE |R_TEST |RADON |RANDOMN 
|RANDOMU |RANKS |RDPIX |READ_ASCII |READ_BINARY |READ_BMP |READ_DICOM 
|READ_IMAGE |READ_JPEG2000 |READ_MRSID |READ_PNG |READ_SPR |READ_SYLK 
|READ_TIFF |READ_WAV |READ_XWD |REAL_PART |REBIN |RECALL_COMMANDS 
|RECON3 |REFORM |REGION_GROW |REGRESS |REPLICATE |RETALL |REVERSE |RK4 
|ROBERTS |ROT |ROTATE |ROUND |ROUTINE_INFO |RS_TEST |S_TEST |SAVGOL 
|SCOPE_LEVEL |SCOPE_VARFETCH |SCOPE_VARNAME |SEARCH2D |SEARCH3D |SFIT 
|SHIFT |SHMDEBUG |SHMVAR |SIMPLEX |SIN |SINDGEN |SINH |SIZE |SKEWNESS 
|SMOOTH |SOBEL |SORT |SPH_SCAT |SPHER_HARM |SPL_INIT |SPL_INTERP |SPLINE 
|SPRSAB |SPRSAX |SPRSIN |SPRSTP |SQRT |STANDARDIZE |STDDEV |STRARR 
|STRCMP |STRCOMPRESS |STREGEX |STRING |STRJOIN |STRLEN |STRLOWCASE 
|STRMATCH |STRMESSAGE |STRMID |STRPOS |STRSPLIT |STRTRIM |STRUPCASE 
|SVDFIT |SVSOL |SWAP_ENDIAN |SYSTIME |T_CVF |T_PDF |TAG_NAMES |TAN |TANH 
|TEMPORARY |TETRA_CLIP |TETRA_SURFACE |TETRA_VOLUME |THIN |THREED 
|TIMEGEN |TM_TEST |TOTAL |TRACE |TRANSPOSE |TRI_SURF |TRIANGULATE 
|TRIGRID |TRIQL |TRISOL |TS_COEF |TS_DIFF |TS_FCAST |TS_SMOOTH |TV |TVRD 
|UINDGEN |UINT |UINTARR |UL64INDGEN |ULINDGEN |ULON64ARR |ULONARR |ULONG 
|ULONG64 |UNIQ |UNSHARP_MASK |VALUE_LOCATE |VARIANCE |VERT_T3D |VOIGT 
|VOXEL_PROJ |WARP_TRI |WATERSHED |WF_DRAW |WHERE |WIDGET_ACTIVEX 
|WIDGET_BASE |WIDGET_BUTTON |WIDGET_COMBOBOX |WIDGET_DISPLAYCONTEXTMENU 
|WIDGET_DRAW |WIDGET_DROPLIST |WIDGET_EVENT |WIDGET_INFO |WIDGET_LABEL 
|WIDGET_LIST |WIDGET_PROPERTYSHEET |WIDGET_SLIDER |WIDGET_TAB 
|WIDGET_TABLE |WIDGET_TEXT |WIDGET_TREE |WRITE_SYLK |WTN|AXIS|BLAS_AXPY 
|BLAS_AXPY |BYTEORDER |CALL_PROCEDURE |CATCH |CD |CHOLDC |CLOSE 
|COLOR_CONVERT |CONSTRAINED_MIN |CONTOUR |COPY_LUN |CPU |CURSOR 
|DEFINE_KEY |DEFINE_MSGBLK |DEFINE_MSGBLK_FROM_FILE |DEFSYSV |DELVAR 
|DEVICE |DFPMIN |DLM_LOAD |DLM_REGISTER |DRAW_ROI |EMPTY |ENABLE_SYSRTN 
|ERASE |EXIT |FILE_CHMOD |FILE_COPY |FILE_DELETE |FILE_MKDIR |FILE_MOVE 
|FLUSH |FREE_LUN |GRID_INPUT |HEAP_FREE |HEAP_GC |HELP |IMAGE_STATISTICS 
|INTERVAL_VOLUME |ISOCONTOUR |ISOSURFACE |JOURNAL |LA_CHOLDC |LA_LUDC 
|LA_SVD |LA_TRIDC |LA_TRIQL |LA_TRIRED |LINKIMAGE |LUDC |MAKE_DLL 
|OBJ_DESTROY |ONLINE_HELP |ONLINE_HELP_PDF_INDEX |OPLOT |PARTICLE_TRACE 
|PATH_CACHE |PLOT |PLOTS |POINT_LUN |POLYFILL |POWELL 
|PRINT|PRINTD|PRINTF |PROFILER |PROFILES |PTR_FREE |PUSHD |QHULL 
|READ|READ_GIF |READ_INTERFILE |READ_JPEG |READ_PICT |READ_PPM |READ_SRF 
|READ_WAVE |READ_X11_BITMAP |READF |READS |READU |REDUCE_COLORS 
|REGISTER_CURSOR |REPLICATE_INPLACE |RESOLVE_ALL |RESOLVE_ROUTINE 
|RESTORE |SAVE |SCALE3 |SCALE3D |SET_PLOT |SET_SHADING |SETENV 
|SETUP_KEYS |SHADE_SURF |SHADE_SURF_IRR |SHADE_VOLUME |SHMMAP |SHMUNMAP 
|SHOW3 |SHOWFONT |SKIP_LUN |SLICER3 |SLIDE_IMAGE |SOCKET |SPAWN 
|SPH_4PNT |SPLINE_P |STOP |STREAMLINE |STRETCH |STRPUT |STRUCT_ASSIGN 
|STRUCT_HIDE |SURFACE |SURFR |SVDC |SWAP_ENDIAN_INPLACE |T3D |TEK_COLOR 
|TIME_TEST2 |TRIRED |TRUNCATE_LUN |TVCRS |TVLCT |TVSCL |USERSYM 
|VECTOR_FIELD |VEL |VELOVECT |VORONOI |WAIT |WDELETE |WIDGET_CONTROL 
|WINDOW |WRITE_BMP |WRITE_GIF |WRITE_IMAGE |WRITE_JPEG |WRITE_JPEG2000 
|WRITE_NRIF |WRITE_PICT |WRITE_PNG |WRITE_PPM |WRITE_SPR |WRITE_SRF 
|WRITE_TIFF |WRITE_WAV |WRITE_WAVE |WRITEU |WSET |WSHOW |XBM_EDIT 
|XDISPLAYFILE |XDXF |XFONT |XINTERANIMATE |XLOADCT |XMANAGER |XMNG_TMPL 
|XMTOOL |XOBJVIEW |XOBJVIEW_ROTATE |XOBJVIEW_WRITE_IMAGE |XPALETTE 
|XPCOLOR |XPLOT3D |XREGISTERED |XROI |XSQ_TEST |XSURFACE |XVAREDIT 
|XVOLUME |XVOLUME_ROTATE |XVOLUME_WRITE_IMAGE|XYOUTS |ZOOM 
|ZOOM_24|CDF_ATTCREATE|CDF_ATTDELETE|CDF_ATTEXISTS|CDF_ATTGET|CDF_ATTINQ|CDF_ATTNUM|CDF_ATTPUT|CDF_ATTRENAME|CDF_CLOSE|CDF_CONTROL|CDF_CREATE|CDF_DELETE|CDF_DOC|CDF_ENCODE_EPOCH|CDF_EPOCH|CDF_ERROR|CDF_EXISTS|CDF_INQUIRE|CDF_LIB_INFO|CDF_OPEN|CDF_PARSE_EPOCH|CDF_VARCREATE|CDF_VARDELETE|CDF_VARGET|CDF_VARGET1|CDF_VARINQ|CDF_VARNUM|CDF_VARPUT|CDF_VARRENAME|HDF_CLOSE|HDF_DELDD|HDF_DF24_ADDIMAGE|HDF_DF24_GETIMAGE|HDF_DF24_GETINFO|HDF_DF24_LASTREF|HDF_DF24_NIMAGES|HDF_DF24_READREF|HDF_DF24_RESTART|HDF_DFAN_ADDFDS|HDF_DFAN_ADDFID|HDF_DFAN_GETDESC|HDF_DFAN_GETFDS|HDF_DFAN_GETFID|HDF_DFAN_GETLABEL|HDF_DFAN_LABLIST|HDF_DFAN_LASTREF|HDF_DFAN_PUTDESC|HDF_DFAN_PUTLABEL|HDF_DFP_ADDPAL|HDF_DFP_GETPAL|HDF_DFP_LASTREF|HDF_DFP_NPALS|HDF_DFP_PUTPAL|HDF_DFP_READREF|HDF_DFP_RESTART|HDF_DFP_WRITEREF|HDF_DFR8_ADDIMAGE|HDF_DFR8_GETIMAGE|HDF_DFR8_GETINFO|HDF_DFR8_LASTREF|HDF_DFR8_NIMAGES|HDF_DFR8_PUTIMAGE|HDF_DFR8_READREF|HDF_DFR8_RESTART|HDF_DFR8_SETPALETTE|HDF_DFSD_ADDDATA|HDF_DFSD_DIMGET|HDF_DFS
D_DIMSET|HDF_DFSD_ENDSLICE|HDF_DFSD_GETDATA|HDF_DFSD_GETINFO|HDF_DFSD_GETSLICE|HDF_DFSD_PUTSLICE|HDF_DFSD_READREF|HDF_DFSD_SETINFO|HDF_DFSD_STARTSLICE|HDF_DUPDD|HDF_EXISTS|HDF_ISHDF|HDF_LIB_INFO|HDF_NEWREF|HDF_NUMBER|HDF_OPEN|HDF_GR_ATTRINFO|HDF_SD_ATTRFIND|HDF_SD_ATTRINFO|HDF_SD_ATTRSET|HDF_SD_CREATE|HDF_SD_DIMGET|HDF_SD_DIMGETID|HDF_SD_DIMSET|HDF_SD_END|HDF_SD_ENDACCESS|HDF_SD_FILEINFO|HDF_SD_GETDATA|HDF_SD_GETINFO|HDF_SD_IDTOREF|HDF_SD_ISCOORDVAR|HDF_SD_NAMETOINDEX|HDF_SD_REFTOINDEX|HDF_SD_SELECT|HDF_SD_SETEXTFILE|HDF_SD_SETINFO|HDF_SD_START|HDF_VD_ATTACH|HDF_VD_DETACH|HDF_VD_FDEFINE|HDF_VD_FEXIST|HDF_VD_FIND|HDF_VD_GET|HDF_VD_GETID|HDF_VD_GETINFO|HDF_VD_GETNEXT|HDF_VD_INSERT|HDF_VD_ISVD|HDF_VD_ISVG|HDF_VD_LONE|HDF_VD_READ|HDF_VD_SEEK|HDF_VD_SETINFO|HDF_VD_WRITE|HDF_VG_ADDTR|HDF_VG_ATTACH|HDF_VG_DETACH|HDF_VG_GETID|HDF_VG_GETINFO|HDF_VG_GETNEXT|HDF_VG_GETTR|HDF_VG_GETTRS|HDF_VG_INQTR|HDF_VG_INSERT|HDF_VG_ISVD|HDF_VG_ISVG|HDF_VG_LONE|HDF_VG_NUMBER|HDF_VG_SETINFO|NCDF_ATTCOP
Y|NCDF_ATTDEL|NCDF_ATTGET|NCDF_ATTINQ|NCDF_ATTNAME|NCDF_ATTPUT|NCDF_ATTRENAME|NCDF_CLOSE|NCDF_CONTROL|NCDF_CREATE|NCDF_DIMDEF|NCDF_DIMID|NCDF_DIMINQ|NCDF_DIMRENAME|NCDF_EXISTS|NCDF_INQUIRE|NCDF_OPEN|NCDF_VARDEF|NCDF_VARGET|NCDF_VARGET1|NCDF_VARID|NCDF_VARINQ|NCDF_VARPUT|NCDF_VARRENAME|ENDELSE|RETURN"

comment delim "/*" "*/" multiline nested

type = '(?:\$[#]?|@|%)[[:word:]]+'

include "symbols.lang"

cbracket = "{|}"

include "function.lang"
include "procedure.lang"

variable = '[[:upper:]][[:word:]]*|_'

///////////////////RSIIDL.LANG END////////////////////////////////




On 5/27/2011 1:57 AM, Lorenzo Bettini wrote:
> Hi
>
> do procedure (and functions) are always called on a line?
> I mean, is the procedure name always at the beginning of a line
> (possibly with some spaces before)?
>
> Are commas used also in other contexts besides function and procedure
> invocation?
>
> cheers
> Lorenzo
>
> P.S. some examples of programs might be useful to do some tests; have
> you already a partial language definition for IDL to start from?
>
> On 05/24/2011 05:27 PM, Peter Willis wrote:
>> On 5/23/2011 7:10 AM, Lorenzo Bettini wrote:
>>
>>> (?=\()
>>>
>>> checks whether after the name there's a ( but does not consume it
>>>
>>> can the syntax of your procedure definition be identified with a regular
>>> expression?
>>>
>>> Can you make some examples of procedures?
>>>
>>> cheers
>>> Lorenzo
>>
>>
>> Hello,
>>
>> In 'IDL' procedures are *called* in the following way:
>>
>> PROCEDURE_NAME , ARGUMENT_1, ARGUMENT_2, ARGUMENT_3, .... , ARGUMENT_N
>>
>> As you can see no brackets or parenthesis are used. The problem here is
>> a regex would need to deal with only the first case of the
>> comma positioned after 'PROCEDURE_NAME' and ignore all other groupings
>> until the end of the statement.
>>
>> There is also on other problem in that statements can use continuation
>> where a '$' indicates the current statement continues on to the
>> next line:
>>
>> PROCEDURE_NAME , ARGUMENT_1, $
>> ARGUMENT_2, ARGUMENT_3, $
>> .... , ARGUMENT_N
>>
>> In this case regex needs to distinguish between the case of
>> 'PRODEDURE_NAME' and cases where the statement has been continued.
>> ie: not highlight 'ARGUMENT_2' due to the comma following there.
>>
>>
>> Declarations for *both* functions and procedures are written in
>> similar ways. The difference is only the 'RETURN' value in the case
>> of functions:
>>
>> FUNCTION function_name, arg_1, arg_2 $
>> arg_3, arg_4, ...., arg_n
>> ....<PROGRAM STATEMENTS>...
>>
>> RETURN, some_value
>> END
>>
>>
>> PRO procedure_name, arg_1, arg_2 arg_3, arg_4, ....,$
>> arg_n
>> ....<PROGRAM STATEMENTS>...
>> END
>>
>>
>>
>> Best Regards,
>>
>>
>> Peter
>>
>> _______________________________________________
>> Help-source-highlight mailing list
>> Help-source-highlight@gnu.org
>> https://lists.gnu.org/mailman/listinfo/help-source-highlight
>
>



