//======================================================================= //================ Lex class support ==================================== //======================================================================= // lexClass: // name = c_CPPString // parent = c_CPP // parent:dyn = c_CPP // // children = 0 // children = class1, class2, ... // // previous:class = // previous:tag = // previous:tag:separators = // // start:class = // start:Tag = '"' // // skip:Tag = '\"' // // end:class = // // end:Tag = '"' // end:separators = ' ' // // Token:tag = 'if', 'for', 'while', 'do' // Token:start:separators = // Token:end:separators = //----------------------------------------------------------------------- //---------------- Attributes ------------------------------------------- //----------------------------------------------------------------------- // txt:colorFG = 0xffc0c0 // color value in hex format. default: black // txt:colorBK = 0xffc0c0 // color value in hex format. default: white // // txt:colorSelFG = 0xffc0c0 // color value in hex format. default: white // txt:colorSelBK = 0xffc0c0 // color value in hex format. default: black // // txt:Bold = 1 // {1,0} default: 0 // txt:Italic = 1 // {1,0} default: 0 // txt:Underline = 1 // {1,0} default: 0 // // caseSensitive = 1 // {1,0} default: 0 // // Collapsable = 1 // {1,0} default: 0 // CollapsedText = '/*...*/' // quoted string value. default: '[..]' // // ParseOnScreen = 1 // {1,0} default: 0 // //----------------------------------------------------------------------- //* Global attributes *************************************************** //----------------------------------------------------------------------- // global:FirstParseInSeparateThread = 1 // {0,1} default=1 // global:EditReparceInSeparateThread = 1 // {0,1} default=1 // global:ConfigChangedReparceInSeparateThread= 1 // {0,1} default=1 // global:EditReparceTimeout_ms = 500 // default= 500 ms; time out for start reparse after last key was pressed. // global:MaxBackParseOffset = 100 // default= 100 chars; maximum back buffer size. Some times parser look back for the text from current position. // global:OnScreenSchCacheLifeTime_sec = 180 // default= 180 sec; -1 and 0 means infinite; time out for on screen parsed pices of text. for memory using optimization. // global:ParserThreadIdleLifeTime_sec = 60 // default=60 sec; -1 and 0 means infinite; time out for existing of parser thread when parser idle (no parse requests). ///////////////////////////////////////////////////////////////////////// //======================================================================= //================ Variables support ==================================== //======================================================================= // NON operation - example: @alpha:not // // @alpha = a-z, A-Z // @digit = 0-9 // @HexDdigit = 0-9, a-f, A-F // @specs = "~`!@#$%^&*()_-+=\\|{}[];:'\",.<>/?" // @EOL = End Of Line //--------------------------------------------- // special tags: '\\', '\'', '\t', '\r', '\n' ///////////////////////////////////////////////////////////////////////// /// HTML /// lexClass: parent:file = <*.xaml|*.xaml> name = c_XAML //caseSensitive = 0 txt:colorFG = 0x000000 DisplayName = 'Normal Text' //============================================================================= //*** XAMLScript colorization *** ========================================== //============================================================================= lexClass: name = c_XAMLComment parent = c_XAML start:Tag = '\'' end:separators = @EOL txt:colorFG = 0x008200 DisplayName = 'XAML Comment' //:lexClass lexClass: name = c_XAMLStr parent = c_XAML ParseOnScreen = 0 start:Tag ='"' end:Tag ='"', @EOL txt:colorFG = 0x840000 DisplayName = 'XAML Script String' //:lexClass lexClass: name = c_XAMLNumber10 parent = c_XAML ParseOnScreen = 1 previous:tag = @specs, ' ', '\t', @EOL start:Tag = @digit end:separators = @digit:not txt:colorFG = 0x008284 DisplayName = 'XAML Script Number' //:lexClass lexClass: name = c_XAML_Language_Keywords parent = c_XAML ParseOnScreen = 0 token:start:separators = ' ', '\t', '=', '', '<', '(', ')', @eol txt:colorFG = 0x0000FF txt:Bold = 1 token:tag = 'Bold' token:tag = 'Italic' token:tag = 'Width' token:tag = 'Height' token:tag = 'Margin' token:tag = 'ClipToBounds' token:tag = 'HorizontalAlignment' token:tag = 'VerticalAlignment' token:tag = 'MinWidth' token:tag = 'MaxWidth' token:tag = 'MinHeight' token:tag = 'MaxHeight' token:tag = 'Padding' token:tag = 'Background' token:tag = 'BorderThickness' token:tag = 'BorderBrush' token:tag = 'TextWrapping' token:tag = 'TextAlignment' token:tag = 'TextDecorations' token:tag = 'FontSize' token:tag = 'FontWeight' token:tag = 'FontFamily' token:tag = 'FontStyle' token:tag = 'BaselineAlignment' token:tag = 'Text' token:tag = 'Points' token:tag = 'VerticalScrollBarVisibility' token:tag = 'HorizontalScrollBarVisibility' token:tag = 'ColumnDefinitions' token:tag = 'RowDefinitions' token:tag = 'Left' token:tag = 'Right' token:tag = 'Top' token:tag = 'Bottom' token:tag = 'Orientation' token:tag = 'Background' token:tag = 'Foreground' token:tag = 'ItemHeight' token:tag = 'ItemWidth' token:tag = 'Content' token:tag = 'Color' token:tag = 'StartPoint' token:tag = 'EndPoint' token:tag = 'GradientStops' token:tag = 'Offset' token:tag = 'TargetType' token:tag = 'BasedOn' token:tag = 'Resources' DisplayName = 'XAML Keywords' //:lexClass lexClass: name = c_XAML_Functions parent = c_XAML ParseOnScreen = 0 token:start:separators = ' ', '\t', '<', '>', '', '(', ')', @eol txt:colorFG = 0x8000FF token:tag = 'Page' token:tag = 'Border' token:tag = 'TextBlock' token:tag = 'Image' token:tag = 'Run' token:tag = 'LineBreak' token:tag = 'Span' token:tag = 'Panel' token:tag = 'StackPanel' token:tag = 'WrapPanel' token:tag = 'Canvas' token:tag = 'Grid' token:tag = 'ColumnDefinition' token:tag = 'RowDefinition' token:tag = 'Polygon' token:tag = 'Polyline' token:tag = 'Rectangle' token:tag = 'Line' token:tag = 'Ellipse' token:tag = 'Line ' token:tag = 'Button' token:tag = 'CheckBox' token:tag = 'RadioButton' token:tag = 'ScrollViewer' token:tag = 'SolidColorBrush' token:tag = 'LinearGradientBrush' token:tag = 'GradientStop' token:tag = 'Style' DisplayName = 'XAML Functions' //:lexClass ///////////////////////////////////////////////////////////// // Operators Arithmetic // "^" // "*" // "/" // "\" // "+" // "-" // "&" // Operators Comparison // "=" // "<>" // "<" // "<=" // ">" // ">=" // Operators Logical // "~" ///////////////////////////////////////////////////////////// //=============================================================================