SMC_NCTokenizer.SetDelimiters (METH)¶
METHOD FINAL SetDelimiters : BOOL
Reconfigures delimiters for comment, string and variable tokens.
Returns TRUE
if configuration was accepted and the FB isn’t busy,
FALSE
otherwise. This method typically is called before SMC_NCTokenizer
is called in the first place.
Delimiter tokens may start with every character in aby*StartDelim, but must end with the character in aby*EndDelim with the same array index as the starting character. Only the following values/characters are allowed as delimiters:
33 ! , 34 " , 35 # , 36 $ , 37 % , 38 & , 39 ' ,
40 ( , 41 ) , 42 * , 43 + , 44 , , 45 - , 47 / ,
58 : , 59 ; , 60 < , 61 = , 62 > , 63 ? , 64 @ ,
91 [ , 92 \ , 93 ] , 94 ^ , 96 ´ , 123 { , 124 | ,
125 } , 126 ~
A maximum of 3 different pairs of delimiters can be configured for each token type. Delimiters will be checked for ambiguitiy against each other. Only operator characters not used as delimiter will be recognized as operators.
- InOut:
Scope
Name
Type
Comment
Return
SetDelimiters
BOOL
Inout Const
delimCfg
Output
aValOps
ARRAY [0..(SoftMotion_Token_Constants.c_numVarNameChars - 1)] OF BYTE
List of characters effectively handled as operators after substracting all configured delimiters; 0 value must be ignored.