Page 1 of 1

Having troubles defining a language "function regex&quo

Posted: Thu Oct 13, 2005 10:49 pm
by carverrn
I have tried a number of times but I can't seem to define a proper regular expression for "function regex" that will let Zeus recognize functions for the PL/M programming language. Here is was a typical PL/M function looks like:

Add_These: procedure (param1, param2) word;
declare param1 word;
declare param2 word;
return(param1+param2);
end Add_These;

I can write one that works with the "Find" command but the same one doesn't work with "function regex".

I'm a current CodeWright user and looking to move to Zeus if I can get it to work with PL/M syntax.

Thanks for any help

Rich

Posted: Thu Oct 13, 2005 11:37 pm
by jussij
Try something like this:

Code: Select all

([0-9a-zA-Z_]+)(: procedure)
The ([0-9a-zA-Z_]+) will find any word and the + means must find at least one. The : procedure is just a straight out match for this text.

So in other words any line with a word followed by the : procedure string will be seen as a function.
I'm a current CodeWright user and looking to move to Zeus if I can get it to work with PL/M syntax.
What problems are you seeing with regard to syntax highlight :?:

Since Zeus can now import TextPad syntax files, an easy way to setup a PL/M document type would be to download the TextPad syntax file from here:

http://www.textpad.com/add-ons/synn2t.html

Then create a new document type and use the keywords import option to import the syn, remembering to select the syn file type once inside the import file open dialog.

Cheers Jussi