This one is a little esoteric but impacts a large number of programs here.
An include file has itself an include that looks like this:
{{&programname}{&*}}
to optionally include another file at this point in the include (I.e. as a kind of primitive template method).
This appears to work fine, but programname is optionally included, and in a case where programname is undefined AND one of the cascading arguments is a multi-line argument, the value of the multiline argument does not have its newlines escaped in the program listing file causing a parse error.
org.prorefactor.refactor.RefactorException: Invalid token in Proparse listing file.
Token: Line: 11
Here is a simple, if artificial, example created by paring down a sample from the wild, I"ve also included these as attachments:
================= include-sample.p ============
DISPLAY "Some title information" AT 15
WITH CENTERED NO-BOX ROW 2 OVERLAY FRAME f-Line WIDTH 78.
DEF FRAME f-A WITH 16 DOWN NO-LABELS ROW 3 OVERLAY
TITLE "col1 col2 col3 " +
" col4 col5 col6 col7".
{an-include.i
&frame = "f-A"
&xtra-code = "IF yes THEN DO:
MESSAGE 'this line causes an error because the line feed was not escaped'
END."}
================ an-include.i ====================
REPEAT WITH FRAME {&frame}:
PAUSE 0 BEFORE-HIDE.
{{&undefined-argument}{&*}}
================ prorefactor/temp/listingfile.txt =====================
0 7 1 include 1 an-include.i
0 0 0 incarg frame f-A
0 0 0 incarg xtra-code IF yes THEN DO:\n MESSAGE 'this line causes an error because the line feed was not escaped' \n END.
1 3 19 macroref frame
0 0 0 macrorefend
1 7 6 macroref undefined-argument
0 0 0 macrorefend
1 7 27 macroref &*
0 0 0 macrorefend
1 7 5 macroref frame="f-a" &xtra-code="if yes then do:
message 'this line causes an error because the line feed was not escaped'
end."
0 0 0 macrorefend
0 0 0 incend
0 0 0 fileindex 0 include-sample.p
0 0 0 fileindex 1 .\an-include.i
Attachment | Size |
---|---|
listingfile.txt | 53.65 KB |
include-sample.p | 463 bytes |
an-include.i | 124 bytes |
Fantastic! I shall retest
Fantastic! I shall retest this week. Cheers, djm
Re: nested include with {&*}
I just posted a new release which should fix this. Fingers crossed. :-)
Fixed
Confirmed fixed, cheers.
Very well done isolating
Very well done isolating that one!