Author Topic: Begin end pairs for PL/X  (Read 3182 times)

rfb

  • Junior Community Member
  • Posts: 3
  • Hero Points: 0
Begin end pairs for PL/X
« on: August 17, 2007, 06:08:50 PM »
PL/X is a PL/I like language with some extensions that cause problems for Slick edit's Begin/End processing.
We use the PL/I parser for colour coding

For 'normal' blocks such as:
Code: [Select]
test: proc;

   begin;
     do;
       do;
         select;
            when
            otherwise
         end;
       end;
     end;
   end ;

 end  test;
a simple begin/end specification works well
Code: [Select]
(do),(select),(procedure),(begin),(proc)|(end);I
However the language also allows the statement type to be specified on the end statement
e.g.
Code: [Select]
test: proc;

   begin;
     do;
       do;
         select;
            when
            otherwise
         end select;
       end do;
     end;
   end begin;

 end proc test;
This helps the compiler and user spot mismatched begin/ends by limiting the scope but it drives the Slick Edit begin/end parser wild - it matches the word following end with the next end statement.
i.e. it matches the select of 'end select' with the end in 'end do' and so on.

Is there any way to get begin end/pairs to work with this type of code?

I have tried a few options but haven't found anything that allows for muti word pair ends.
« Last Edit: August 17, 2007, 08:17:41 PM by rfb »