call DBG_AUTOTAG 'AutoTagging is ' || YorN2OnorOff(AutoTagOn) || '. Have ' || ((AutoTagLast - AutoTagFirst) + 1) || ' tags available in state #' ||AutoTagStateCnt||DbgText1
call DBG 'Infinite loop detected, debug forced on for a few loops'
call DBGIND 1
call DBG InfiniteLoopWhen|| ' loops detected, possible actions:'
call DBGIND 1
call DBG 'Have have you forgotten to use "#option DefineMacroReplace=ON" somewhere?'
call DBG 'Use "/define:INFINITE_MACRO_LOOP_WHEN=0" to turn off detection'
call DBG 'Use "/define:INFINITE_MACRO_LOOP_WHEN=1000" to increase detection threshold'
call DBGIND-2
say ''
call DebugStateChanged
end
say ''
if ReplLoop>InfiniteLoopWhen+50 then
CryAndDie("Infinite loop detected (debug turned on above), current line now:", "",HashDefineString)
end
end
ReplLoop=ReplLoop+1
end
if InfiniteLoopDetected='Y' then
CryAndDie("Increase your loop detection value from " || InfiniteLoopWhen || ' with "/define:INFINITE_MACRO_LOOP_WHEN=Value"', "Increase to at least " || ReplLoop || '!')
if pos(StartsStdSymbolReplacement,HashDefineString)<>0 then
CryAndDie('Could not find a matching "' || MacroIndLeft || '" character for "' || MacroIndRight || '"', 'The invalid macro is:', ' ' ||s_MacName)
s_L=left(s_MacName,s_LbPos-1)
s_M=substr(s_MacName,s_LbPos+1,s_RbPos-s_LbPos-1)
s_R=substr(s_MacName,s_RbPos+1)
if OptionDebugOn='Y' then
do
call DBG_DEFINING 'Looking for: ' ||s_M
call DBGIND 1
end
s_RepType=''
if symbol(s_M)='VAR' then
do
s_RepType='REXX'
s_RepWith=value(s_M)
end
else
do
if CsReplacement='N' then
s_SavedAs='MACRO?.M?'||c2x(translate(s_M))
else
s_SavedAs='MACRO?.M?'||c2x(s_M)
if symbol(s_SavedAs)='VAR' then
do
s_RepType='PPWIZARD'
s_RepWith=value(s_SavedAs)
end
end
if OptionDebugOn='Y' then
do
if s_RepType='' then
call DBG_DEFINING 'No such REXX or PPWIZARD symbol!'
else
call DBG_DEFINING s_RepType|| ' symbol contained: ' ||s_RepWith
call DBGIND-1
end
if s_RepType='' then
do
if s_MacName=s_MacNameO then
s_Show=s_MacName
else
s_Show=s_MacName|| ' <= "' ||s_MacNameO
CryAndDie("Could not find a REXX variable or PPWIZARD macro matching:", ' ' || s_M, 'In the macro reference:', ' ' ||s_Show)
end
s_MacName=s_L||s_RepWith||s_R
if OptionDebugOn='Y' then
call DBG_DEFINING 'New macro reference is "' ||DebugRightArrow||s_MacName||DebugLeftArrow
s_RbPos=pos(MacroIndRight,s_MacName)
end
if OptionDebugOn='Y' then
call DBGIND-1
end
if pos(MacroIndLeft,s_MacName)<>0 then
CryAndDie('Could not find a matching "' || MacroIndRight || '" character for "' || MacroIndLeft || '"', 'The invalid macro is:', ' ' ||s_MacName)
ba_MN=s_MacName
if CsReplacement='N' then
ba_SA='MACRO?.M?'||c2x(translate(s_MacName))
else
ba_SA='MACRO?.M?'||c2x(s_MacName)
if symbol(ba_SA)='VAR' then
return(_valueG(ba_SA))
if arg(1)=ba_MN then
ba_New=''
else
ba_New=' ("' || ba_MN || '")'
CryAndDie('Macro named "' || arg(1) || '"' || ba_New || ' does not exist!',_MacroBitNotFoundText())
_SpecialPrm:
call DebugOutputVariableInfo_FOUNDVARPARMS "This is a special variable, it's value is: " ||arg(1)
return
_DieInvPrm:
CryAndDie('The "' || StartsMacroParm || ThisParmName || EndsMacroParm || '" parameter was not supplied (and there is no default value)', '', 'Did you mean to use "' || HidesMacroParm || ThisParmName || EndsMacroParm || '" to hide the reference?',_MacroBitNotFoundText())
call DebugOutputVariableInfo_FOUNDVARPARMS 'The "' || ParmName.ParmIndex || '" parameter was not referred to by the "' || VariableName || '" macro (either invalid or referenced only in unused default value of another parameter).'
CryAndDie(StartsStdSymbolReplacement_x||substr(RightBit,StartPos+3,(EndPos-StartPos)-3)||EndsMacroReplacement|| ' is not defined (use "#RexxVar =x=" command)!')
if pos(StartsStdSymbolReplacement_x,FileLine)<>0 then
FileLine=ReplaceTheXCodesWeKnowExist(FileLine)
end
end
if TransformCode<> '' then
do
BeforeLine=FileLine
FileRest=FileLine
FileAfter=''
AppendWith=''
do until FileRest==''
parse var FileRest FileLine (MarksNewLine) FileRest
call ExecRexxCmd TransformCode
FileAfter=FileAfter||AppendWith||FileLine
AppendWith=MarksNewLine
end
FileLine=FileAfter
if OptionDebugOn='Y' then
do
if BeforeLine==FileLine then
call DBG 'Line was not transformed'
else
call DBG 'Line transformed to ' ||DebugRightArrow||FileLine||DebugLeftArrow
end
end
if LineSrc='M' then
do
LineQueued=LineQueued||FileLine
iterate
end
do until FileLine == ''; parse var FileLine This1 (MarksNewLine) FileLine; if ProcessingMode = 'REXX' then call OutputRexxLine This1; else do; if ProcessingMode <> 'HTML' then call GenerateOneLine This1; else do; call GenerateOneLine This1; end; end; end
end
end
EofForced=''
call IncludeFileClose
if IncludeFragmentText<> '' then
CryAndDie('Did not find the END of the code fragment "' || IncludeFragmentText || '"!')
do until FileLine == ''; parse var FileLine This1 (MarksNewLine) FileLine; if ProcessingMode = 'REXX' then call OutputRexxLine This1; else do; if ProcessingMode <> 'HTML' then call GenerateOneLine This1; else do; call GenerateOneLine This1; end; end; end