Having troubles defining a language "function regex&quo

Get help with the installation and running of the Zeus IDE. Please do not post bug reports or feature requests here. When in doubt post your question here.
Post Reply
carverrn
Posts: 1
Joined: Thu Oct 13, 2005 10:41 pm

Having troubles defining a language "function regex&quo

Post 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
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post 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
Post Reply