Pete H
unread,Jul 22, 2011, 6:16:18 AM7/22/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Colorer
Hi
I'm attempting to put together a hrc based on UniVision Basic (a
variant of Pick Basic), initially based on the vbasic.hrc.
I'm stuggling to get the IF THEN/ELSE END compound statement to match
up for folding purposes, mainly when there are multiple of them within
each other, i.e:
IF this THEN
IF that THEN
IF theOther THEN
GOSUB thisAndThatAndTheOther
END ELSE
GOSUB thisAndThat
END
END ELSE
GOSUB this
END
END ELSE
IF theOther THEN
GOSUB theOther
END ELSE
CRT "Stumped!"
END
END
Perhaps a tad convoluted, but I'm finding that the IF and ENDs are not
matching up correctly, and only the inner IFs can be folded. If I
click on the inner END, the first IF is highlighted, but if I then
click on the inner IF, it correctly highlights the END I previously
click on. The relevant part from my hrc is:
<block start="/\b(IF|OPEN|PROCREAD|REWIND|(MAT)?READ(V|U|VU)?|READ(T|
TX|NEXT|PREVIOUS)|MATWRITE(U)?(IF)?|WRITE(V|VU|U)?(IF)?|DELETEIF|
INPUTIF|COPYLIST|GIVELIST|SAVELIST|KEY|ROOT|LOCATE|SEND(X|BREAK)?|
UCLOSE|UCREATE|UOPEN|UREAD(LINE)?|UUNLINK|UWRITE|WEOF)\b\M (.*\b(THEN|
ELSE|LOCKED)\b\s*($|\;\s*(REM|\!|\*).*$))?=/x"
end="/\M \b(END)\b(\s+(THEN|ELSE)\b)?!/x"
scheme="PairedConstructions"
region00="ubWord" region10="ubWord"
region01="PairStart" region11="PairEnd"/>
It looks more complicated than it is, there's just quite a few
statements in UniVision Basic that can have a THEN/ELSE tagged to
them.
Is this a known problem, or is it down to my RE statements?
Many thanks.
Pete