ParseAgainMaxMethod

Applies to:uCalc Transform
Class:uCalc.uCalcTransform.RuleClass
Sets the maximum number of times a rule will cause a reparse at a given location
Syntax
ParseAgainMax(TrueFalse, RaiseError)
Parameters
TrueFalse
BOOLEAN
Maximum number of times this rule can cause a re-parse
RaiseError
BOOLEAN
Raises an error if the maximum is reached
Returns
Type: RuleClass
Sets the maximum number of times a rule will cause a reparse at a given location
Remarks
When ParseAgain is set to true, there is the potential for an infinite reparsing to take place. An obvious case is if a rule changes A to B, and another rule changes B to A. However, there are less obvious cases where text might be modified in several ways before ending up in an infinite loop.

This property allows uCalc to break out of the cycle after text has been reparsed at a given location a certain number of times.

Once the maximum is passed, if RaiseError is set to true, an error indicating that the maximum was passed will be raised. Otherwise, parsing will then silently continue from the end location of the modified text, as though ParseAgain were now false.

Error

EXPORT RuleClass ...(ByVal uCalcPtr RuleHandle, ByVal Int32 ..., // ... ByVal String ... // ... ) { return 0; } //S: ...

...

DLL import code
<DllImport(uCalcDLL, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.Cdecl, EntryPoint:="ParseAgainMax")> _

Private Function ParseAgainMax__(ByVal RuleHandle As IntPtr,ByVal TrueFalse As Int32 , ByVal RaiseError As Int32) As IntPtr
End Function
            
[DllImport(uCalcDLL, CharSet=CharSet.Ansi, CallingConvention=CallingConvention.Cdecl, EntryPoint="ParseAgainMax")]

protected static extern IntPtr ParseAgainMax_(IntPtr RuleHandle, bool TrueFalse ,  bool RaiseError);
            
{DLLImport}function ParseAgainMax__(RuleHandle: System.Pointer;TrueFalse: Integer ; RaiseError: Integer): System.Pointer; cdecl; external uCalcDLL name 'ParseAgainMax';

            
typedef uCalcPtr (* __ParseAgainMax)(void *RuleHandle, bool TrueFalse ,  bool RaiseError); 

            
[DllImport(uCalcLib, CharSet=CharSet::Ansi, CallingConvention=CallingConvention::Cdecl, EntryPoint = "ParseAgainMax")]

static uCalcPtr ParseAgainMax_(void *  RuleHandle, bool TrueFalse ,  bool RaiseError);
            
See also
Prev | Next