home *** CD-ROM | disk | FTP | other *** search
/ PCGUIA 2010 Software/Programs / PCGuia_programas.iso / Software / Utils / Universal Viewer / UniversalViewer.exe / Plugins / Syn2 / HL / PascalScript.lcf < prev    next >
Encoding:
Text File  |  2007-12-12  |  16.2 KB  |  731 lines

  1. object SyntAnal20: TLibSyntAnalyzer
  2.   Formats = <
  3.     item
  4.       DisplayName = 'Default'
  5.       Font.Charset = DEFAULT_CHARSET
  6.       Font.Color = clWindowText
  7.       Font.Height = -13
  8.       Font.Name = 'Courier New'
  9.       Font.Style = []
  10.       FormatType = ftCustomFont
  11.     end
  12.     item
  13.       DisplayName = 'Symbol'
  14.       Font.Charset = DEFAULT_CHARSET
  15.       Font.Color = clMaroon
  16.       Font.Height = -13
  17.       Font.Name = 'Courier New'
  18.       Font.Style = [fsBold]
  19.     end
  20.     item
  21.       DisplayName = 'Number'
  22.       Font.Charset = DEFAULT_CHARSET
  23.       Font.Color = clNavy
  24.       Font.Height = -13
  25.       Font.Name = 'Courier New'
  26.       Font.Style = [fsBold]
  27.     end
  28.     item
  29.       DisplayName = 'String'
  30.       Font.Charset = DEFAULT_CHARSET
  31.       Font.Color = clBlue
  32.       Font.Height = -13
  33.       Font.Name = 'Courier New'
  34.       Font.Style = []
  35.     end
  36.     item
  37.       DisplayName = 'Identifier'
  38.       Font.Charset = DEFAULT_CHARSET
  39.       Font.Color = clWindowText
  40.       Font.Height = -13
  41.       Font.Name = 'Courier New'
  42.       Font.Style = []
  43.     end
  44.     item
  45.       DisplayName = 'Reserved word'
  46.       Font.Charset = DEFAULT_CHARSET
  47.       Font.Color = clWindowText
  48.       Font.Height = -13
  49.       Font.Name = 'Courier New'
  50.       Font.Style = [fsBold]
  51.     end
  52.     item
  53.       DisplayName = 'Comment'
  54.       Font.Charset = DEFAULT_CHARSET
  55.       Font.Color = clRed
  56.       Font.Height = -13
  57.       Font.Name = 'Courier New'
  58.       Font.Style = [fsBold]
  59.     end
  60.     item
  61.       DisplayName = 'Preprocessor'
  62.       Font.Charset = DEFAULT_CHARSET
  63.       Font.Color = clGreen
  64.       Font.Height = -13
  65.       Font.Name = 'Courier New'
  66.       Font.Style = [fsItalic]
  67.     end
  68.     item
  69.       DisplayName = 'Marked block'
  70.       Font.Charset = DEFAULT_CHARSET
  71.       Font.Color = clHighlightText
  72.       Font.Height = -13
  73.       Font.Name = 'Courier New'
  74.       Font.Style = []
  75.       BgColor = clHighlight
  76.       FormatType = ftColor
  77.     end
  78.     item
  79.       DisplayName = 'Function separator'
  80.       Font.Charset = DEFAULT_CHARSET
  81.       Font.Color = clWindowText
  82.       Font.Height = -13
  83.       Font.Name = 'Courier New'
  84.       Font.Style = []
  85.       BgColor = clRed
  86.       FormatType = ftBackGround
  87.     end
  88.     item
  89.       DisplayName = 'Current block'
  90.       Font.Charset = DEFAULT_CHARSET
  91.       Font.Color = clPurple
  92.       Font.Height = -13
  93.       Font.Name = 'Courier New'
  94.       Font.Style = [fsBold]
  95.       BgColor = clInactiveCaptionText
  96.       FormatType = ftColor
  97.     end
  98.     item
  99.       DisplayName = 'Current function'
  100.       Font.Charset = DEFAULT_CHARSET
  101.       Font.Color = clMaroon
  102.       Font.Height = -13
  103.       Font.Name = 'Courier New'
  104.       Font.Style = []
  105.       BgColor = 16769505
  106.       FormatType = ftBackGround
  107.     end>
  108.   TokenRules = <
  109.     item
  110.       DisplayName = 'Any name'
  111.       StyleName = 'Identifier'
  112.       TokenType = 2
  113.       Expression = '[a-z_]\w*'
  114.       ColumnFrom = 0
  115.       ColumnTo = 0
  116.     end
  117.     item
  118.       DisplayName = 'String'
  119.       StyleName = 'String'
  120.       TokenType = 4
  121.       Expression = #39'.*?('#39'|$)'
  122.       ColumnFrom = 0
  123.       ColumnTo = 0
  124.     end
  125.     item
  126.       DisplayName = 'Float'
  127.       StyleName = 'Number'
  128.       TokenType = 6
  129.       Expression = 
  130.         '#with exp. dot is optional '#13#10'\d+ \.? \d+ e [\+\-]? \d+ |'#13#10'#witho' +
  131.         'ut exp. dot is required'#13#10'\d+ \. \d+'
  132.       ColumnFrom = 0
  133.       ColumnTo = 0
  134.     end
  135.     item
  136.       DisplayName = 'Integer'
  137.       StyleName = 'Number'
  138.       TokenType = 5
  139.       Expression = '\d+'
  140.       ColumnFrom = 0
  141.       ColumnTo = 0
  142.     end
  143.     item
  144.       DisplayName = 'Comment 1'
  145.       StyleName = 'Comment'
  146.       TokenType = 1
  147.       Expression = '(?s)\(\*.*?(\*\)|\Z)'
  148.       ColumnFrom = 0
  149.       ColumnTo = 0
  150.     end
  151.     item
  152.       DisplayName = 'Comment 2'
  153.       StyleName = 'Comment'
  154.       TokenType = 1
  155.       Expression = '(?s)\{.*?(\}|\Z)'
  156.       ColumnFrom = 0
  157.       ColumnTo = 0
  158.     end
  159.     item
  160.       DisplayName = 'Comment 3'
  161.       StyleName = 'Comment'
  162.       TokenType = 1
  163.       Expression = '//.*'
  164.       ColumnFrom = 0
  165.       ColumnTo = 0
  166.     end
  167.     item
  168.       DisplayName = 'HEX'
  169.       StyleName = 'Number'
  170.       TokenType = 7
  171.       Expression = '\$[a-f\d]+'
  172.       ColumnFrom = 0
  173.       ColumnTo = 0
  174.     end
  175.     item
  176.       DisplayName = 'Symbol'
  177.       StyleName = 'Symbol'
  178.       TokenType = 3
  179.       Expression = '[/\*,\.;:\(\)=<>\+\-\[\]]'
  180.       ColumnFrom = 0
  181.       ColumnTo = 0
  182.     end
  183.     item
  184.       DisplayName = 'Char'
  185.       StyleName = 'String'
  186.       TokenType = 8
  187.       Expression = '\#(\d+|\$[\da-f]+)'
  188.       ColumnFrom = 0
  189.       ColumnTo = 0
  190.     end>
  191.   BlockRules = <
  192.     item
  193.       DisplayName = 'Key words'
  194.       StyleName = 'Reserved word'
  195.       BlockType = btTagDetect
  196.       ConditionList = <
  197.         item
  198.           TagList.Strings = (
  199.             'abstract'
  200.             'and'
  201.             'array'
  202.             'as'
  203.             'asm'
  204.             'begin'
  205.             'case'
  206.             'class'
  207.             'const'
  208.             'constructor'
  209.             'contains'
  210.             'destructor'
  211.             'dispinterface'
  212.             'div'
  213.             'do'
  214.             'downto'
  215.             'dynamic'
  216.             'else'
  217.             'end'
  218.             'except'
  219.             'exports'
  220.             'file'
  221.             'finalization'
  222.             'finally'
  223.             'for'
  224.             'function'
  225.             'goto'
  226.             'if'
  227.             'implementation'
  228.             'in'
  229.             'index'
  230.             'inherited'
  231.             'initialization'
  232.             'inline'
  233.             'interface'
  234.             'is'
  235.             'label'
  236.             'library'
  237.             'mod'
  238.             'nil'
  239.             'not'
  240.             'object'
  241.             'of'
  242.             'or'
  243.             'out'
  244.             'override'
  245.             'package'
  246.             'packed'
  247.             'pascal'
  248.             'private'
  249.             'procedure'
  250.             'program'
  251.             'property'
  252.             'protected'
  253.             'public'
  254.             'published'
  255.             'raise'
  256.             'read'
  257.             'record'
  258.             'register'
  259.             'repeat'
  260.             'requires'
  261.             'resourcestring'
  262.             'safecall'
  263.             'set'
  264.             'shl'
  265.             'shr'
  266.             'stdcall'
  267.             'string'
  268.             'then'
  269.             'threadvar'
  270.             'to'
  271.             'try'
  272.             'type'
  273.             'unit'
  274.             'until'
  275.             'uses'
  276.             'var'
  277.             'virtual'
  278.             'while'
  279.             'with'
  280.             'write'
  281.             'xor')
  282.           TokenTypes = 4
  283.           IgnoreCase = True
  284.         end>
  285.       HighlightPos = cpAny
  286.       IgnoreAsParent = False
  287.     end
  288.     item
  289.       DisplayName = 'begin'
  290.       StyleName = 'Current block'
  291.       ConditionList = <
  292.         item
  293.           TagList.Strings = (
  294.             'begin'
  295.             'case'
  296.             'try')
  297.           TokenTypes = 4
  298.         end>
  299.       BlockEnd = 'End'
  300.       DisplayInTree = False
  301.       DynHighlight = dhBound
  302.       HighlightPos = cpRange
  303.       DynSelectMin = True
  304.       IgnoreAsParent = False
  305.     end
  306.     item
  307.       DisplayName = 'End'
  308.       BlockType = btRangeEnd
  309.       ConditionList = <
  310.         item
  311.           TagList.Strings = (
  312.             'end')
  313.           TokenTypes = 4
  314.           IgnoreCase = True
  315.         end>
  316.       HighlightPos = cpAny
  317.       IgnoreAsParent = False
  318.     end
  319.     item
  320.       DisplayName = 'asm'
  321.       ConditionList = <
  322.         item
  323.           TagList.Strings = (
  324.             'asm')
  325.           TokenTypes = 4
  326.           IgnoreCase = True
  327.         end>
  328.       BlockEnd = 'End'
  329.       Highlight = True
  330.       InvertColors = True
  331.       DisplayInTree = False
  332.       DynHighlight = dhRangeNoBound
  333.       HighlightPos = cpAny
  334.       IgnoreAsParent = False
  335.     end
  336.     item
  337.       DisplayName = 'until'
  338.       BlockType = btRangeEnd
  339.       ConditionList = <
  340.         item
  341.           TagList.Strings = (
  342.             'until')
  343.           TokenTypes = 4
  344.           IgnoreCase = True
  345.         end>
  346.       HighlightPos = cpAny
  347.       IgnoreAsParent = False
  348.     end
  349.     item
  350.       DisplayName = 'repeat'
  351.       ConditionList = <
  352.         item
  353.           TagList.Strings = (
  354.             'repeat')
  355.           TokenTypes = 4
  356.           IgnoreCase = True
  357.         end>
  358.       BlockEnd = 'until'
  359.       DisplayInTree = False
  360.       HighlightPos = cpAny
  361.       IgnoreAsParent = False
  362.     end
  363.     item
  364.       DisplayName = '('
  365.       StyleName = 'Current block'
  366.       ConditionList = <
  367.         item
  368.           TagList.Strings = (
  369.             '('
  370.             '[')
  371.           TokenTypes = 8
  372.         end>
  373.       BlockEnd = ')'
  374.       NotCollapsed = True
  375.       DisplayInTree = False
  376.       DynHighlight = dhBound
  377.       HighlightPos = cpBoundTag
  378.       DynSelectMin = True
  379.       IgnoreAsParent = False
  380.     end
  381.     item
  382.       DisplayName = ')'
  383.       BlockType = btRangeEnd
  384.       ConditionList = <
  385.         item
  386.           TagList.Strings = (
  387.             ')'
  388.             ']')
  389.           TokenTypes = 8
  390.         end>
  391.       HighlightPos = cpAny
  392.       IgnoreAsParent = False
  393.     end
  394.     item
  395.       DisplayName = 'Block comment'
  396.       BlockName = 'Block comment'
  397.       NotParent = True
  398.       ConditionList = <
  399.         item
  400.           TokenTypes = 2
  401.         end>
  402.       BlockEnd = 'Block comment end'
  403.       DisplayInTree = False
  404.       HighlightPos = cpAny
  405.       IgnoreAsParent = False
  406.     end
  407.     item
  408.       DisplayName = 'Block comment end'
  409.       BlockType = btRangeEnd
  410.       ConditionList = <
  411.         item
  412.           TokenTypes = 1021
  413.         end
  414.         item
  415.           TokenTypes = 2
  416.         end>
  417.       BlockOffset = 1
  418.       HighlightPos = cpAny
  419.       IgnoreAsParent = False
  420.     end
  421.     item
  422.       DisplayName = 'Function separator'
  423.       StyleName = 'Function separator'
  424.       BlockType = btLineBreak
  425.       ConditionList = <
  426.         item
  427.           TagList.Strings = (
  428.             'constructor'
  429.             'destructor'
  430.             'function'
  431.             'procedure')
  432.           TokenTypes = 4
  433.           IgnoreCase = True
  434.         end>
  435.       HighlightPos = cpAny
  436.       IgnoreAsParent = False
  437.     end
  438.     item
  439.       DisplayName = 'Single function'
  440.       ConditionList = <
  441.         item
  442.           TagList.Strings = (
  443.             '.')
  444.           CondType = tcNotEqual
  445.           TokenTypes = 8
  446.         end
  447.         item
  448.           TokenTypes = 4
  449.         end
  450.         item
  451.           TagList.Strings = (
  452.             'function'
  453.             'procedure')
  454.           TokenTypes = 4
  455.         end>
  456.       IdentIndex = 1
  457.       BlockOffset = 2
  458.       BlockEnd = 'End of function'
  459.       NameFmt = '%s2 %s1'
  460.       HighlightPos = cpAny
  461.       IgnoreAsParent = False
  462.     end
  463.     item
  464.       DisplayName = 'End of function'
  465.       BlockName = 'Single function'
  466.       StrictParent = True
  467.       BlockType = btRangeEnd
  468.       ConditionList = <
  469.         item
  470.           TagList.Strings = (
  471.             ';')
  472.           TokenTypes = 8
  473.         end
  474.         item
  475.           TagList.Strings = (
  476.             'end')
  477.           TokenTypes = 4
  478.         end>
  479.       HighlightPos = cpAny
  480.       IgnoreAsParent = False
  481.     end>
  482.   CodeTemplates = <
  483.     item
  484.       Name = 'be'
  485.       Description = 'begin end'
  486.       Code.Strings = (
  487.         'begin'
  488.         '  | '
  489.         'end;')
  490.     end
  491.     item
  492.       Name = 'arrayd'
  493.       Description = 'array declaration (var)'
  494.       Code.Strings = (
  495.         'array[0..|] of ;')
  496.     end
  497.     item
  498.       Name = 'arrayc'
  499.       Description = 'array declaration (const)'
  500.       Code.Strings = (
  501.         'array[0..|] of = ();')
  502.     end
  503.     item
  504.       Name = 'cases'
  505.       Description = 'case statement'
  506.       Code.Strings = (
  507.         'case | of'
  508.         '  : ;'
  509.         '  : ;'
  510.         'end;')
  511.     end
  512.     item
  513.       Name = 'casee'
  514.       Description = 'case statement (with else)'
  515.       Code.Strings = (
  516.         'case | of'
  517.         '  : ;'
  518.         '  : ;'
  519.         'else ;'
  520.         'end;')
  521.     end
  522.     item
  523.       Name = 'classf'
  524.       Description = 'class declaration (all parts)'
  525.       Code.Strings = (
  526.         'T| = class(T)'
  527.         'private'
  528.         ''
  529.         'protected'
  530.         ''
  531.         'public'
  532.         ''
  533.         'published'
  534.         ''
  535.         'end;')
  536.     end
  537.     item
  538.       Name = 'classd'
  539.       Description = 'class declaration (no parts)'
  540.       Code.Strings = (
  541.         'T| = class(T)'
  542.         ''
  543.         'end;')
  544.     end
  545.     item
  546.       Name = 'classc'
  547.       Description = 'class declaration (with Create/Destroy overrides)'
  548.       Code.Strings = (
  549.         'T| = class(T)'
  550.         'private'
  551.         ''
  552.         'protected'
  553.         ''
  554.         'public'
  555.         '  constructor Create; override;'
  556.         '  destructor Destroy; override;'
  557.         'published'
  558.         ''
  559.         'end;')
  560.     end
  561.     item
  562.       Name = 'fors'
  563.       Description = 'for (no begin/end)'
  564.       Code.Strings = (
  565.         'for | :=  to  do')
  566.     end
  567.     item
  568.       Name = 'forb'
  569.       Description = 'for statement'
  570.       Code.Strings = (
  571.         'for | :=  to  do'
  572.         'begin'
  573.         ''
  574.         'end;')
  575.     end
  576.     item
  577.       Name = 'function'
  578.       Description = 'function declaration'
  579.       Code.Strings = (
  580.         'function |(): ;'
  581.         'begin'
  582.         ''
  583.         'end;')
  584.     end
  585.     item
  586.       Name = 'ifs'
  587.       Description = 'if (no begin/end)'
  588.       Code.Strings = (
  589.         'if | then')
  590.     end
  591.     item
  592.       Name = 'ifb'
  593.       Description = 'if statement'
  594.       Code.Strings = (
  595.         'if | then'
  596.         'begin'
  597.         ''
  598.         'end;')
  599.     end
  600.     item
  601.       Name = 'ife'
  602.       Description = 'if then (no begin/end) else (no begin/end)'
  603.       Code.Strings = (
  604.         'if | then'
  605.         ''
  606.         'else')
  607.     end
  608.     item
  609.       Name = 'ifeb'
  610.       Description = 'if then else'
  611.       Code.Strings = (
  612.         'if | then'
  613.         'begin'
  614.         ''
  615.         'end'
  616.         'else'
  617.         'begin'
  618.         ''
  619.         'end;')
  620.     end
  621.     item
  622.       Name = 'procedure'
  623.       Description = 'procedure declaration'
  624.       Code.Strings = (
  625.         'procedure |();'
  626.         'begin'
  627.         ''
  628.         'end;')
  629.     end
  630.     item
  631.       Name = 'trye'
  632.       Description = 'try except'
  633.       Code.Strings = (
  634.         'try'
  635.         '  |'
  636.         'except'
  637.         ''
  638.         'end;')
  639.     end
  640.     item
  641.       Name = 'tryf'
  642.       Description = 'try finally'
  643.       Code.Strings = (
  644.         'try'
  645.         '  |'
  646.         'finally'
  647.         ''
  648.         'end;')
  649.     end
  650.     item
  651.       Name = 'trycf'
  652.       Description = 'try finally (with Create/Free)'
  653.       Code.Strings = (
  654.         '|variable := typename.Create;'
  655.         'try'
  656.         ''
  657.         'finally'
  658.         '  variable.Free;'
  659.         'end;')
  660.     end
  661.     item
  662.       Name = 'whileb'
  663.       Description = 'while statement'
  664.       Code.Strings = (
  665.         'while | do'
  666.         'begin'
  667.         ''
  668.         'end;')
  669.     end
  670.     item
  671.       Name = 'whiles'
  672.       Description = 'while (no begin)'
  673.       Code.Strings = (
  674.         'while | do')
  675.     end
  676.     item
  677.       Name = 'withb'
  678.       Description = 'with statement'
  679.       Code.Strings = (
  680.         'with | do'
  681.         'begin'
  682.         ''
  683.         'end;')
  684.     end
  685.     item
  686.       Name = 'withs'
  687.       Description = 'with (no begin)'
  688.       Code.Strings = (
  689.         'with | do')
  690.     end
  691.     item
  692.       Name = 'prop'
  693.       Description = 'property'
  694.       Code.Strings = (
  695.         'property | read  write;')
  696.     end>
  697.   SubAnalyzers = <>
  698.   SampleText.Strings = (
  699.     '{Syntax highlighting}'
  700.     'procedure Button1Click(Sender: TObject);'
  701.     'var'
  702.     ' Number: integer;'
  703.     ' FloatNumber: double;'
  704.     'begin'
  705.     ' Number := 123;  // View integer number style'
  706.     
  707.       ' Form.Caprion := '#39'This Number is '#39' + IntToStr(Number); // View s' +
  708.       'tring style'
  709.     ' Inc(Number, $1FA7); // View HEX style'
  710.     ' {Assembler style}'
  711.     ' asm'
  712.     '   MOV  AX, 1234H'
  713.     '   MOV Number, AX'
  714.     ' end;'
  715.     'end;')
  716.   TokenTypeNames.Strings = (
  717.     'Unknown'
  718.     'Comment'
  719.     'Identifier'
  720.     'Symbol'
  721.     'String'
  722.     'Integer const'
  723.     'Float const'
  724.     'Hex const'
  725.     'Char const')
  726.   MarkedBlockStyle = 'Marked block'
  727.   DefaultStyleName = 'Default'
  728.   LexerName = 'Pascal script'
  729.   Internal = True
  730. end
  731.