2 $BEAUT_PATH = realpath(
".").
"/Services/COPage/syntax_highlight/php";
 
    4 require_once(
"$BEAUT_PATH/Beautifier/HFile.php");
 
   20 $this->colours          = array(
"blue", 
"purple", 
"gray", 
"brown", 
"blue", 
"purple", 
"gray", 
"brown");
 
   21 $this->quotecolour              = 
"blue";
 
   22 $this->blockcommentcolour       = 
"green";
 
   23 $this->linecommentcolour        = 
"green";
 
   27 $this->indent                   = array(
"#IF", 
"#LOOP", 
"#FOR");
 
   28 $this->unindent                 = array(
"#ENDIF", 
"#ENDLOOP", 
"#ENDFOR");
 
   32 $this->stringchars              = array(
"'");
 
   33 $this->delimiters               = array(
"~", 
"{", 
"}", 
"@", 
"^", 
"&", 
"*", 
"(", 
")", 
"-", 
"+", 
"=", 
"|", 
"\\", 
"/", 
"[", 
"]", 
";", 
"\"", 
"'", 
">", 
".", 
",");
 
   38 $this->linecommenton            = array(
"#!");
 
   39 $this->blockcommenton           = array(
"");
 
   40 $this->blockcommentoff          = array(
"");
 
   44 $this->keywords                 = array(
 
   46                         "#APPLICATION" => 
"1", 
 
   57                         "#ENDRESTRICT" => 
"1", 
 
   79                         "#ENDGLOBALDATA" => 
"2", 
 
   80                         "#ENDLOCALDATA" => 
"2", 
 
  109                         "#ENDPREPARE" => 
"3", 
 
  135                         "#ENDSECTION" => 
"4", 
 
  172                         "%ActiveTemplate" => 
"6", 
 
  173                         "%ActiveTemplateInstance" => 
"6", 
 
  174                         "%ActiveTemplateOwnerInstance" => 
"6", 
 
  175                         "%ActiveTemplateParentInstance" => 
"6", 
 
  176                         "%ActiveTemplatePrimaryInstance" => 
"6", 
 
  178                         "%Application" => 
"6", 
 
  179                         "%ApplicationDebug" => 
"6", 
 
  180                         "%ApplicationLocalLibrary" => 
"6", 
 
  181                         "%ApplicationTemplate" => 
"6", 
 
  182                         "%ApplicationTemplateInstance" => 
"6", 
 
  183                         "%ApplicationTemplateParentInstance" => 
"6", 
 
  184                         "%BytesOutput" => 
"6", 
 
  185                         "%ConditionalGenerate" => 
"6", 
 
  187                         "%ControlAlert" => 
"6", 
 
  188                         "%ControlDefaultHeight" => 
"6", 
 
  189                         "%ControlDefaultWidth" => 
"6", 
 
  190                         "%ControlEvent" => 
"6", 
 
  191                         "%ControlField" => 
"6", 
 
  192                         "%ControlFieldFormat" => 
"6", 
 
  193                         "%ControlFieldHasColor" => 
"6", 
 
  194                         "%ControlFieldHasIcon" => 
"6", 
 
  195                         "%ControlFieldHasLocator" => 
"6", 
 
  196                         "%ControlFieldHasTree" => 
"6", 
 
  197                         "%ControlFieldHeading" => 
"6", 
 
  198                         "%ControlFieldPicture" => 
"6", 
 
  199                         "%ControlFrom" => 
"6", 
 
  200                         "%ControlIndent" => 
"6", 
 
  201                         "%ControlInstance" => 
"6", 
 
  202                         "%ControlMenu" => 
"6", 
 
  203                         "%ControlMenuBar" => 
"6", 
 
  204                         "%ControlOriginal" => 
"6", 
 
  205                         "%ControlParameter" => 
"6", 
 
  206                         "%ControlParent" => 
"6", 
 
  207                         "%ControlParentTab" => 
"6", 
 
  208                         "%ControlParentType" => 
"6", 
 
  209                         "%ControlStatement" => 
"6", 
 
  210                         "%ControlTemplate" => 
"6", 
 
  211                         "%ControlTool" => 
"6", 
 
  212                         "%ControlToolBar" => 
"6", 
 
  213                         "%ControlType" => 
"6", 
 
  214                         "%ControlUnsplitStatement" => 
"6", 
 
  215                         "%ControlUse" => 
"6", 
 
  216                         "%CreateLocalMap" => 
"6", 
 
  217                         "%DictionaryChanged" => 
"6", 
 
  218                         "%DictionaryFile" => 
"6", 
 
  220                         "%DriverBinMemo" => 
"6", 
 
  221                         "%DriverCreate" => 
"6", 
 
  222                         "%DriverDescription" => 
"6", 
 
  224                         "%DriverEncrypt" => 
"6", 
 
  226                         "%DriverMaxKeys" => 
"6", 
 
  227                         "%DriverMemo" => 
"6", 
 
  228                         "%DriverOpcode" => 
"6", 
 
  229                         "%DriverOwner" => 
"6", 
 
  230                         "%DriverReclaim" => 
"6", 
 
  231                         "%DriverRequired" => 
"6", 
 
  233                         "%DriverType" => 
"6", 
 
  234                         "%DriverUniqueKey" => 
"6", 
 
  235                         "%EditFilename" => 
"6", 
 
  236                         "%EditProcedure" => 
"6", 
 
  237                         "%EmbedDescription" => 
"6", 
 
  239                         "%EmbedParameters" => 
"6", 
 
  243                         "%FieldChoices" => 
"6", 
 
  244                         "%FieldDescription" => 
"6", 
 
  245                         "%FieldDimension1" => 
"6", 
 
  246                         "%FieldDimension2" => 
"6", 
 
  247                         "%FieldDimension3" => 
"6", 
 
  248                         "%FieldDimension4" => 
"6", 
 
  249                         "%FieldDisplayPicture" => 
"6", 
 
  251                         "%FieldFormatWidth" => 
"6", 
 
  252                         "%FieldHeader" => 
"6", 
 
  253                         "%FieldHelpID" => 
"6", 
 
  255                         "%FieldIdent" => 
"6", 
 
  256                         "%FieldInitial" => 
"6", 
 
  257                         "%FieldJustIndent" => 
"6", 
 
  258                         "%FieldJustType" => 
"6", 
 
  259                         "%FieldLongDesc" => 
"6", 
 
  260                         "%FieldLookup" => 
"6", 
 
  261                         "%FieldMemoImage" => 
"6", 
 
  262                         "%FieldMemoSize" => 
"6", 
 
  264                         "%FieldPicture" => 
"6", 
 
  265                         "%FieldPlaces" => 
"6", 
 
  266                         "%FieldQuickOptions" => 
"6", 
 
  267                         "%FieldRangeHigh" => 
"6", 
 
  268                         "%FieldRangeLow" => 
"6", 
 
  269                         "%FieldRecordPicture" => 
"6", 
 
  270                         "%FieldReportControl" => 
"6", 
 
  271                         "%FieldReportControlHeight" => 
"6", 
 
  272                         "%FieldReportControlWidth" => 
"6", 
 
  273                         "%FieldScreenControl" => 
"6", 
 
  274                         "%FieldScreenControlHeight" => 
"6", 
 
  275                         "%FieldScreenControlWidth" => 
"6", 
 
  276                         "%FieldStatement" => 
"6", 
 
  277                         "%FieldStruct" => 
"6", 
 
  279                         "%FieldUserOptions" => 
"6", 
 
  280                         "%FieldValidation" => 
"6", 
 
  282                         "%File32BitOnly" => 
"6", 
 
  283                         "%FileBindable" => 
"6", 
 
  284                         "%FileCreate" => 
"6", 
 
  285                         "%FileDescription" => 
"6", 
 
  286                         "%FileDriver" => 
"6", 
 
  287                         "%FileDriverParameter" => 
"6", 
 
  288                         "%FileEncrypt" => 
"6", 
 
  289                         "%FileExternal" => 
"6", 
 
  290                         "%FileExternalModule" => 
"6", 
 
  293                         "%FileKeyField" => 
"6", 
 
  294                         "%FileKeyFieldLink" => 
"6", 
 
  295                         "%FileLongDesc" => 
"6", 
 
  298                         "%FilePrefix" => 
"6", 
 
  299                         "%FilePrimaryKey" => 
"6", 
 
  300                         "%FileQuickOptions" => 
"6", 
 
  301                         "%FileReclaim" => 
"6", 
 
  302                         "%FileRelationType" => 
"6", 
 
  303                         "%FileStatement" => 
"6", 
 
  304                         "%FileStruct" => 
"6", 
 
  305                         "%FileStructEnd" => 
"6", 
 
  306                         "%FileStructRec" => 
"6", 
 
  307                         "%FileStructRecEnd" => 
"6", 
 
  308                         "%FileThreaded" => 
"6", 
 
  310                         "%FileUserOptions" => 
"6", 
 
  311                         "%FirstProcedure" => 
"6", 
 
  313                         "%FormulaClass" => 
"6", 
 
  314                         "%FormulaDescription" => 
"6", 
 
  315                         "%FormulaExpression" => 
"6", 
 
  316                         "%FormulaExpressionCase" => 
"6", 
 
  317                         "%FormulaExpressionFalse" => 
"6", 
 
  318                         "%FormulaExpressionTrue" => 
"6", 
 
  319                         "%FormulaExpressionType" => 
"6", 
 
  320                         "%FormulaInstance" => 
"6", 
 
  321                         "%GlobalData" => 
"6", 
 
  322                         "%GlobalDataStatement" => 
"6", 
 
  326                         "%KeyDescription" => 
"6", 
 
  327                         "%KeyDuplicate" => 
"6", 
 
  328                         "%KeyExcludeNulls" => 
"6", 
 
  330                         "%KeyFieldSequence" => 
"6", 
 
  335                         "%KeyLongDesc" => 
"6", 
 
  338                         "%KeyPrimary" => 
"6", 
 
  339                         "%KeyQuickOptions" => 
"6", 
 
  340                         "%KeyStatement" => 
"6", 
 
  342                         "%KeyUserOptions" => 
"6", 
 
  344                         "%LocalDataStatement" => 
"6", 
 
  345                         "%MenuBarStatement" => 
"6", 
 
  347                         "%ModuleBase" => 
"6", 
 
  348                         "%ModuleChanged" => 
"6", 
 
  349                         "%ModuleData" => 
"6", 
 
  350                         "%ModuleDataStatement" => 
"6", 
 
  351                         "%ModuleExtension" => 
"6", 
 
  352                         "%ModuleExternal" => 
"6", 
 
  353                         "%ModuleInclude" => 
"6", 
 
  354                         "%ModuleLanguage" => 
"6", 
 
  355                         "%ModuleProcedure" => 
"6", 
 
  356                         "%ModuleReadOnly" => 
"6", 
 
  357                         "%ModuleTemplate" => 
"6", 
 
  359                         "%OtherFiles" => 
"6", 
 
  361                         "%PrimaryInstance" => 
"6", 
 
  362                         "%PrimaryKey" => 
"6", 
 
  364                         "%ProcedureCalled" => 
"6", 
 
  365                         "%ProcedureDateChanged" => 
"6", 
 
  366                         "%ProcedureDateCreated" => 
"6", 
 
  367                         "%ProcedureDescription" => 
"6", 
 
  368                         "%ProcedureExported" => 
"6", 
 
  369                         "%ProcedureIsGlobal" => 
"6", 
 
  370                         "%ProcedureLanguage" => 
"6", 
 
  371                         "%ProcedureLongDescription" => 
"6", 
 
  372                         "%ProcedureReadOnly" => 
"6", 
 
  373                         "%ProcedureReturnType" => 
"6", 
 
  374                         "%ProcedureTemplate" => 
"6", 
 
  375                         "%ProcedureTimeChanged" => 
"6", 
 
  376                         "%ProcedureTimeCreated" => 
"6", 
 
  377                         "%ProcedureToDo" => 
"6", 
 
  378                         "%ProcedureType" => 
"6", 
 
  380                         "%ProgramDateChanged" => 
"6", 
 
  381                         "%ProgramDateCreated" => 
"6", 
 
  382                         "%ProgramExtension" => 
"6", 
 
  383                         "%ProgramTimeChanged" => 
"6", 
 
  384                         "%ProgramTimeCreated" => 
"6", 
 
  386                         "%QuickProcedure" => 
"6", 
 
  387                         "%RegistryChanged" => 
"6", 
 
  389                         "%RelationAlias" => 
"6", 
 
  390                         "%RelationConstraintDelete" => 
"6", 
 
  391                         "%RelationConstraintUpdate" => 
"6", 
 
  392                         "%RelationKey" => 
"6", 
 
  393                         "%RelationKeyField" => 
"6", 
 
  394                         "%RelationKeyFieldLink" => 
"6", 
 
  395                         "%RelationPrefix" => 
"6", 
 
  396                         "%RelationQuickOptions" => 
"6", 
 
  397                         "%RelationUserOptions" => 
"6", 
 
  399                         "%ReportControl" => 
"6", 
 
  400                         "%ReportControlField" => 
"6", 
 
  401                         "%ReportControlIndent" => 
"6", 
 
  402                         "%ReportControlInstance" => 
"6", 
 
  403                         "%ReportControlLabel" => 
"6", 
 
  404                         "%ReportControlOriginal" => 
"6", 
 
  405                         "%ReportControlStatement" => 
"6", 
 
  406                         "%ReportControlTemplate" => 
"6", 
 
  407                         "%ReportControlType" => 
"6", 
 
  408                         "%ReportControlUse" => 
"6", 
 
  409                         "%ReportStatement" => 
"6", 
 
  411                         "%SecondaryTo" => 
"6", 
 
  412                         "%SecondaryType" => 
"6", 
 
  414                         "%ToolbarStatement" => 
"6", 
 
  417                         "%ViewFileField" => 
"6", 
 
  418                         "%ViewFileFields" => 
"6", 
 
  420                         "%ViewFileStruct" => 
"6", 
 
  421                         "%ViewFileStructEnd" => 
"6", 
 
  422                         "%ViewFilter" => 
"6", 
 
  423                         "%ViewJoinedTo" => 
"6", 
 
  424                         "%ViewPrimary" => 
"6", 
 
  425                         "%ViewPrimaryField" => 
"6", 
 
  426                         "%ViewPrimaryFields" => 
"6", 
 
  427                         "%ViewStatement" => 
"6", 
 
  428                         "%ViewStruct" => 
"6", 
 
  429                         "%ViewStructEnd" => 
"6", 
 
  431                         "%WindowEvent" => 
"6", 
 
  432                         "%WindowStatement" => 
"6", 
 
  433                         "%pClassName" => 
"7", 
 
  434                         "%pClassIncFile" => 
"7", 
 
  435                         "%pClassMethod" => 
"7", 
 
  436                         "%pClassMethodPrototype" => 
"7", 
 
  437                         "%pClassMethodPrivate" => 
"7", 
 
  438                         "%pClassMethodVirtual" => 
"7", 
 
  439                         "%pClassMethodProtected" => 
"7", 
 
  440                         "%pClassMethodProcAttribute" => 
"7", 
 
  441                         "%pClassMethodInherited" => 
"7", 
 
  442                         "%pClassMethodReturnType" => 
"7", 
 
  443                         "%pClassMethodParentCall" => 
"7", 
 
  444                         "%pClassProperty" => 
"7", 
 
  445                         "%pClassPropertyPrototype" => 
"7", 
 
  446                         "%pClassPropertyPrivate" => 
"7", 
 
  447                         "%pClassPropertyProtected" => 
"7", 
 
  448                         "%pClassPropertyInherited" => 
"7", 
 
  449                         "%ClassMethodList" => 
"7", 
 
  450                         "%SysActiveInvisible" => 
"7", 
 
  451                         "%SysAllowUnfilled" => 
"7", 
 
  452                         "%SysRetainRow" => 
"7", 
 
  453                         "%SysResetOnGainFocus" => 
"7", 
 
  454                         "%SysAutoToolbar" => 
"7", 
 
  455                         "%SysAutoRefresh" => 
"7", 
 
  456                         "%PropertyList" => 
"7", 
 
  457                         "%MethodList" => 
"7", 
 
  458                         "%ObjectList" => 
"7", 
 
  459                         "%ObjectListType" => 
"7", 
 
  460                         "%CWTemplateVersion" => 
"7", 
 
  461                         "%IsExternal" => 
"7", 
 
  462                         "%SaveCreateLocalMap" => 
"7", 
 
  463                         "%GlobalIncludeList" => 
"7", 
 
  464                         "%ModuleIncludeList" => 
"7", 
 
  465                         "%CalloutModules" => 
"7", 
 
  466                         "%ClassDeclarations" => 
"7", 
 
  467                         "%OOPConstruct" => 
"7", 
 
  469                         "%IncludePrototype" => 
"7", 
 
  471                         "%ProcFilesUsed" => 
"7", 
 
  472                         "%UsedDriverDLLs" => 
"7", 
 
  473                         "%PrintPreviewUsed" => 
"7", 
 
  474                         "%FileExternalFlag" => 
"7", 
 
  475                         "%FileThreadedFlag" => 
"7", 
 
  476                         "%IniFileName" => 
"7", 
 
  477                         "%GenerationCompleted" => 
"7", 
 
  478                         "%GenerateModule" => 
"7", 
 
  482                         "%LastTarget32" => 
"7", 
 
  483                         "%LastProgramExtension" => 
"7", 
 
  484                         "%LastApplicationDebug" => 
"7", 
 
  485                         "%LastApplicationLocalLibrary" => 
"7", 
 
  486                         "%CustomGlobalMapModule" => 
"7", 
 
  487                         "%CustomGlobalMapProcedure" => 
"7", 
 
  488                         "%CustomGlobalMapProcedurePrototype" => 
"7", 
 
  489                         "%CustomGlobalData" => 
"7", 
 
  490                         "%CustomGlobalDataDeclaration" => 
"7", 
 
  491                         "%CustomGlobalDataBeforeFiles" => 
"7", 
 
  492                         "%CustomGlobalDataComponent" => 
"7", 
 
  493                         "%CustomGlobalDataComponentIndent" => 
"7", 
 
  494                         "%CustomGlobalDataComponentDeclaration" => 
"7", 
 
  495                         "%CustomModuleMapModule" => 
"7", 
 
  496                         "%CustomModuleMapProcedure" => 
"7", 
 
  497                         "%CustomModuleMapProcedurePrototype" => 
"7", 
 
  498                         "%CustomModuleData" => 
"7", 
 
  499                         "%CustomModuleDataDeclaration" => 
"7", 
 
  500                         "%CustomModuleDataComponent" => 
"7", 
 
  501                         "%CustomModuleDataComponentIndent" => 
"7", 
 
  502                         "%CustomModuleDataComponentDeclaration" => 
"7", 
 
  503                         "%CustomGlobalMapIncludes" => 
"7", 
 
  504                         "%CustomGlobalDeclarationIncludes" => 
"7", 
 
  505                         "%CustomFlags" => 
"7", 
 
  506                         "%CustomFlagSetting" => 
"7", 
 
  507                         "%AccessMode" => 
"7", 
 
  509                         "%BuildHeader" => 
"7", 
 
  510                         "%BuildInclude" => 
"7", 
 
  511                         "%ExportFile" => 
"7", 
 
  512                         "%ValueConstruct" => 
"7", 
 
  513                         "%HoldConstruct" => 
"7", 
 
  514                         "%RegenerateGlobalModule" => 
"7", 
 
  516                         "%UpdateRelationPrimary" => 
"7", 
 
  517                         "%UpdateRelationSecondary" => 
"7", 
 
  518                         "%UpdateAttachedFile" => 
"7", 
 
  519                         "%DeleteRelationPrimary" => 
"7", 
 
  520                         "%DeleteRelationSecondary" => 
"7", 
 
  521                         "%DeleteAttachedFile" => 
"7", 
 
  524                         "%GlobalRegenerate" => 
"7", 
 
  525                         "%FilesPerBCModule" => 
"7", 
 
  526                         "%RelatesPerRoutine" => 
"7", 
 
  558 $this->linkscripts      = array(