diff options
author | Georg Brandl <georg@python.org> | 2013-01-12 15:06:30 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2013-01-12 15:06:30 +0100 |
commit | b791a2396bb845284f93597d728758bd39fdeb6c (patch) | |
tree | d6a5ab17865748bb3ff894a79cf8b526df2db6e2 | |
parent | d1bf5aa4a25005e8630bb639053c4340475bff6e (diff) | |
download | pygments-b791a2396bb845284f93597d728758bd39fdeb6c.tar.gz |
Fix stuff in new lexers found by regexlint.
-rw-r--r-- | pygments/lexers/agile.py | 3 | ||||
-rw-r--r-- | pygments/lexers/asm.py | 4 | ||||
-rw-r--r-- | pygments/lexers/compiled.py | 2 | ||||
-rw-r--r-- | pygments/lexers/foxpro.py | 150 | ||||
-rw-r--r-- | pygments/lexers/jvm.py | 2 | ||||
-rw-r--r-- | pygments/lexers/other.py | 30 | ||||
-rw-r--r-- | pygments/lexers/text.py | 2 | ||||
-rw-r--r-- | pygments/lexers/web.py | 2 |
8 files changed, 98 insertions, 97 deletions
diff --git a/pygments/lexers/agile.py b/pygments/lexers/agile.py index 90f9ecd3..8bcb1d46 100644 --- a/pygments/lexers/agile.py +++ b/pygments/lexers/agile.py @@ -607,7 +607,8 @@ class RubyLexer(ExtendedRegexLexer): r'rescue|raise|retry|return|super|then|undef|unless|until|when|' r'while|yield)\b', Keyword), # start of function, class and module names - (r'(module)(\s+)([a-zA-Z_][a-zA-Z0-9_]*(::[a-zA-Z_][a-zA-Z0-9_]*)*)', + (r'(module)(\s+)([a-zA-Z_][a-zA-Z0-9_]*' + r'(?:::[a-zA-Z_][a-zA-Z0-9_]*)*)', bygroups(Keyword, Text, Name.Namespace)), (r'(def)(\s+)', bygroups(Keyword, Text), 'funcname'), (r'def(?=[*%&^`~+-/\[<>=])', Keyword, 'funcname'), diff --git a/pygments/lexers/asm.py b/pygments/lexers/asm.py index 5f1d808a..7ff64bcc 100644 --- a/pygments/lexers/asm.py +++ b/pygments/lexers/asm.py @@ -376,7 +376,7 @@ class Ca65Lexer(RegexLexer): 'root': [ (r';.*', Comment.Single), (r'\s+', Text), - (r'[\w.@$][\w.@$\d]*:', Name.Label), + (r'[a-z_.@$][\w.@$]*:', Name.Label), (r'((ld|st)[axy]|(in|de)[cxy]|asl|lsr|ro[lr]|adc|sbc|cmp|cp[xy]' r'|cl[cvdi]|se[cdi]|jmp|jsr|bne|beq|bpl|bmi|bvc|bvs|bcc|bcs' r'|p[lh][ap]|rt[is]|brk|nop|ta[xy]|t[xy]a|txs|tsx|and|ora|eor' @@ -388,7 +388,7 @@ class Ca65Lexer(RegexLexer): (r'\$[0-9a-f]+|[0-9a-f]+h\b', Number.Hex), (r'\d+|%[01]+', Number.Integer), (r'[#,.:()=]', Punctuation), - (r'[\w.@$][\w.@$\d]*', Name), + (r'[a-z_.@$][\w.@$]*', Name), ] } diff --git a/pygments/lexers/compiled.py b/pygments/lexers/compiled.py index b6fbbba5..e0b86684 100644 --- a/pygments/lexers/compiled.py +++ b/pygments/lexers/compiled.py @@ -3363,7 +3363,7 @@ class CobolLexer(RegexLexer): # Data Types (r'(^|(?<=[^0-9a-z_\-]))' r'(PIC\s+.+?(?=(\s|\.\s))|PICTURE\s+.+?(?=(\s|\.\s))|' - r'(COMPUTATIONAL)([-][1-5X])?|(COMP)([-][1-5X])?|' + r'(COMPUTATIONAL)(-[1-5X])?|(COMP)(-[1-5X])?|' r'BINARY-C-LONG|' r'BINARY-CHAR|BINARY-DOUBLE|BINARY-LONG|BINARY-SHORT|' r'BINARY)\s*($|(?=[^0-9a-z_\-]))', Keyword.Type), diff --git a/pygments/lexers/foxpro.py b/pygments/lexers/foxpro.py index 8973adba..51cd499b 100644 --- a/pygments/lexers/foxpro.py +++ b/pygments/lexers/foxpro.py @@ -127,15 +127,15 @@ class FoxProLexer(RegexLexer): r'_THROTTLE|_TOOLBOX|_TOOLTIPTIMEOUT|_TRANSPORT|_TRIGGERLEVEL|' r'_UNIX|_VFP|_WINDOWS|_WIZARD|_WRAP', Keyword.Pseudo), - (r'THIS|THISFORM|THISFORMSET', Name.Builtin), + (r'THISFORMSET|THISFORM|THIS', Name.Builtin), (r'Application|CheckBox|Collection|Column|ComboBox|' - r'CommandButton|CommandGroup|Container|Control|Cursor|' - r'CursorAdapter|Custom|DataEnvironment|DataObject|EditBox|' - r'Empty|Exception|Fields|File|Files|Form|FormSet|FoxCode|' + r'CommandButton|CommandGroup|Container|Control|CursorAdapter|' + r'Cursor|Custom|DataEnvironment|DataObject|EditBox|' + r'Empty|Exception|Fields|Files|File|FormSet|Form|FoxCode|' r'Grid|Header|Hyperlink|Image|Label|Line|ListBox|Objects|' - r'OptionButton|OptionGroup|Page|PageFrame|Project|ProjectHook|' - r'Projects|Relation|ReportListener|Separator|Server|Servers|' + r'OptionButton|OptionGroup|PageFrame|Page|ProjectHook|Projects|' + r'Project|Relation|ReportListener|Separator|Servers|Server|' r'Session|Shape|Spinner|Tables|TextBox|Timer|ToolBar|' r'XMLAdapter|XMLField|XMLTable', Name.Class), @@ -144,7 +144,7 @@ class FoxProLexer(RegexLexer): (r'\.(ActiveColumn|ActiveControl|ActiveForm|ActivePage|' r'ActiveProject|ActiveRow|AddLineFeeds|ADOCodePage|Alias|' - r'Align|Alignment|AllowAddNew|AllowAutoColumnFit|' + r'Alignment|Align|AllowAddNew|AllowAutoColumnFit|' r'AllowCellSelection|AllowDelete|AllowHeaderSizing|' r'AllowInsert|AllowModalMessages|AllowOutput|AllowRowSizing|' r'AllowSimultaneousFetch|AllowTabs|AllowUpdate|' @@ -154,11 +154,11 @@ class FoxProLexer(RegexLexer): r'AutoIncrement|AutoOpenTables|AutoRelease|AutoSize|' r'AutoVerbMenu|AutoYield|BackColor|ForeColor|BackStyle|' r'BaseClass|BatchUpdateCount|BindControls|BorderColor|' - r'BorderStyle|BorderWidth|Bound|BoundColumn|BoundTo|' - r'BreakOnError|BufferMode|BufferModeOverride|' + r'BorderStyle|BorderWidth|BoundColumn|BoundTo|Bound|' + r'BreakOnError|BufferModeOverride|BufferMode|' r'BuildDateTime|ButtonCount|Buttons|Cancel|Caption|' r'Centered|Century|ChildAlias|ChildOrder|ChildTable|' - r'Class|ClassLibrary|ClipControls|Closable|CLSID|CodePage|' + r'ClassLibrary|Class|ClipControls|Closable|CLSID|CodePage|' r'ColorScheme|ColorSource|ColumnCount|ColumnLines|' r'ColumnOrder|Columns|ColumnWidths|CommandClauses|' r'Comment|CompareMemo|ConflictCheckCmd|ConflictCheckType|' @@ -166,11 +166,11 @@ class FoxProLexer(RegexLexer): r'ControlSource|ConversionFunc|Count|CurrentControl|' r'CurrentDataSession|CurrentPass|CurrentX|CurrentY|' r'CursorSchema|CursorSource|CursorStatus|Curvature|' - r'Database|DataSession|DataSessionID|DataSource|' - r'DataSourceType|DataType|DateFormat|DateMark|Debug|' - r'DeclareXMLPrefix|DEClass|DEClassLibrary|Default|' - r'DefaultFilePath|DefOLELCID|DeleteCmd|DeleteCmdDataSource|' - r'DeleteCmdDataSourceType|DeleteMark|Description|Desktop|' + r'Database|DataSessionID|DataSession|DataSourceType|' + r'DataSource|DataType|DateFormat|DateMark|Debug|' + r'DeclareXMLPrefix|DEClassLibrary|DEClass|DefaultFilePath|' + r'Default|DefOLELCID|DeleteCmdDataSourceType|DeleteCmdDataSource|' + r'DeleteCmd|DeleteMark|Description|Desktop|' r'Details|DisabledBackColor|DisabledForeColor|' r'DisabledItemBackColor|DisabledItemForeColor|' r'DisabledPicture|DisableEncode|DisplayCount|' @@ -183,112 +183,112 @@ class FoxProLexer(RegexLexer): r'DynamicFontShadow|DynamicFontSize|DynamicInputMask|' r'DynamicLineHeight|EditorOptions|Enabled|' r'EnableHyperlinks|Encrypted|ErrorNo|Exclude|Exclusive|' - r'FetchAsNeeded|FetchMemo|FetchMemoCmdList|' - r'FetchMemoDataSource|FetchMemoDataSourceType|FetchSize|' - r'FileClass|FileClassLibrary|FillColor|FillStyle|Filter|' + r'FetchAsNeeded|FetchMemoCmdList|FetchMemoDataSourceType|' + r'FetchMemoDataSource|FetchMemo|FetchSize|' + r'FileClassLibrary|FileClass|FillColor|FillStyle|Filter|' r'FirstElement|FirstNestedTable|Flags|FontBold|FontItalic|' r'FontStrikethru|FontUnderline|FontCharSet|FontCondense|' r'FontExtend|FontName|FontOutline|FontShadow|FontSize|' r'ForceCloseTag|Format|FormCount|FormattedOutput|Forms|' r'FractionDigits|FRXDataSession|FullName|GDIPlusGraphics|' r'GridLineColor|GridLines|GridLineWidth|HalfHeightCaption|' - r'HeaderClass|HeaderClassLibrary|HeaderHeight|Height|' - r'HelpContextID|HideSelection|Highlight|HighlightBackColor|' - r'HighlightForeColor|HighlightStyle|HighlightRow|' - r'HighlightRowLineWidth|HomeDir|Hours|HostName|' - r'HScrollSmallChange|hWnd|Icon|Increment|IncrementalSearch|' - r'InitialSelectedAlias|InputMask|InsertCmd|' - r'InsertCmdDataSource|InsertCmdDataSourceType|' - r'InsertCmdRefreshCmd|InsertCmdRefreshFieldList|' - r'InsertCmdRefreshKeyFieldList|Instancing|IntegralHeight|' + r'HeaderClassLibrary|HeaderClass|HeaderHeight|Height|' + r'HelpContextID|HideSelection|HighlightBackColor|' + r'HighlightForeColor|HighlightStyle|HighlightRowLineWidth|' + r'HighlightRow|Highlight|HomeDir|Hours|HostName|' + r'HScrollSmallChange|hWnd|Icon|IncrementalSearch|Increment|' + r'InitialSelectedAlias|InputMask|InsertCmdDataSourceType|' + r'InsertCmdDataSource|InsertCmdRefreshCmd|' + r'InsertCmdRefreshFieldList|InsertCmdRefreshKeyFieldList|' + r'InsertCmd|Instancing|IntegralHeight|' r'Interval|IMEMode|IsAttribute|IsBase64|IsBinary|IsNull|' r'IsDiffGram|IsLoaded|ItemBackColor,|ItemData|ItemIDData|' r'ItemTips|IXMLDOMElement|KeyboardHighValue|KeyboardLowValue|' r'Keyfield|KeyFieldList|KeyPreview|KeySort|LanguageOptions|' - r'Left|LeftColumn|LineContents|LineNo|LineSlant|LinkMaster|' - r'List|ListCount|ListenerType|ListIndex|ListItem|ListItemID|' - r'LockColumns|LockColumnsLeft|LockScreen|MacDesktop|' + r'LeftColumn|Left|LineContents|LineNo|LineSlant|LinkMaster|' + r'ListCount|ListenerType|ListIndex|ListItemID|ListItem|' + r'List|LockColumnsLeft|LockColumns|LockScreen|MacDesktop|' r'MainFile|MapN19_4ToCurrency|MapBinary|MapVarchar|Margin|' r'MaxButton|MaxHeight|MaxLeft|MaxLength|MaxRecords|MaxTop|' - r'MaxWidth|MDIForm|MemberClass|MemberClassLibrary|' + r'MaxWidth|MDIForm|MemberClassLibrary|MemberClass|' r'MemoWindow|Message|MinButton|MinHeight|MinWidth|' r'MouseIcon|MousePointer|Movable|MoverBars|MultiSelect|' r'Name|NestedInto|NewIndex|NewItemID|NextSiblingTable|' - r'NoCpTrans|NoData|NoDataOnLoad|NullDisplay|' + r'NoCpTrans|NoDataOnLoad|NoData|NullDisplay|' r'NumberOfElements|Object|OLEClass|OLEDragMode|' r'OLEDragPicture|OLEDropEffects|OLEDropHasData|' r'OLEDropMode|OLEDropTextInsertion|OLELCID|' r'OLERequestPendingTimeout|OLEServerBusyRaiseError|' r'OLEServerBusyTimeout|OLETypeAllowed|OneToMany|' - r'OpenViews|OpenWindow|Optimize|Order|OrderDirection|' + r'OpenViews|OpenWindow|Optimize|OrderDirection|Order|' r'OutputPageCount|OutputType|PageCount|PageHeight|' r'PageNo|PageOrder|Pages|PageTotal|PageWidth|' - r'Panel|PanelLink|Parent|ParentAlias|ParentClass|' - r'ParentTable|Partition|PasswordChar|Picture|' - r'PictureMargin|PicturePosition|PictureSpacing|' - r'PictureSelectionDisplay|PictureVal|Prepared|' + r'PanelLink|Panel|ParentAlias|ParentClass|ParentTable|' + r'Parent|Partition|PasswordChar|PictureMargin|' + r'PicturePosition|PictureSpacing|PictureSelectionDisplay|' + r'PictureVal|Picture|Prepared|' r'PolyPoints|PreserveWhiteSpace|PreviewContainer|' - r'PrintJobName|Procedure|PROCESSID|ProgID|ProjectHook|' - r'ProjectHookClass|ProjectHookLibrary|QuietMode|' + r'PrintJobName|Procedure|PROCESSID|ProgID|ProjectHookClass|' + r'ProjectHookLibrary|ProjectHook|QuietMode|' r'ReadCycle|ReadLock|ReadMouse|ReadObject|ReadOnly|' - r'ReadSave|ReadTimeout|RecordMark|RecordSource|' - r'RecordSourceType|RefreshAlias|RefreshCmd|' - r'RefreshCmdDataSource|RefreshCmdDataSourceType|' + r'ReadSave|ReadTimeout|RecordMark|RecordSourceType|' + r'RecordSource|RefreshAlias|' + r'RefreshCmdDataSourceType|RefreshCmdDataSource|RefreshCmd|' r'RefreshIgnoreFieldList|RefreshTimeStamp|RelationalExpr|' r'RelativeColumn|RelativeRow|ReleaseType|Resizable|' r'RespectCursorCP|RespectNesting|RightToLeft|RotateFlip|' - r'Rotation|RowColChange|RowHeight|RowSource|' - r'RowSourceType|ScaleMode|SCCProvider|SCCStatus|ScrollBars|' - r'Seconds|SelectCmd|Selected|SelectedID|' - r'SelectedItemBackColor|SelectedItemForeColor|' + r'Rotation|RowColChange|RowHeight|RowSourceType|' + r'RowSource|ScaleMode|SCCProvider|SCCStatus|ScrollBars|' + r'Seconds|SelectCmd|SelectedID|' + r'SelectedItemBackColor|SelectedItemForeColor|Selected|' r'SelectionNamespaces|SelectOnEntry|SelLength|SelStart|' - r'SelText|SendGDIPlusImage|SendUpdates|ServerClass|' - r'ServerClassLibrary|ServerHelpFile|ServerName|' + r'SelText|SendGDIPlusImage|SendUpdates|ServerClassLibrary|' + r'ServerClass|ServerHelpFile|ServerName|' r'ServerProject|ShowTips|ShowInTaskbar|ShowWindow|' r'Sizable|SizeBox|SOM|Sorted|Sparse|SpecialEffect|' r'SpinnerHighValue|SpinnerLowValue|SplitBar|StackLevel|' - r'StartMode|StatusBar|StatusBarText|Stretch|StrictDateEntry|' + r'StartMode|StatusBarText|StatusBar|Stretch|StrictDateEntry|' r'Style|TabIndex|Tables|TabOrientation|Tabs|TabStop|' r'TabStretch|TabStyle|Tag|TerminateRead|Text|Themes|' - r'ThreadID|TimestampFieldList|TitleBar|ToolTipText|Top|' - r'TopIndex|TopItemID|TwoPassProcess|Type|TypeLibCLSID|' - r'TypeLibDesc|TypeLibName|Unicode|UpdatableFieldList|' - r'UpdateCmd|UpdateCmdDataSource|UpdateCmdDataSourceType|' + r'ThreadID|TimestampFieldList|TitleBar|ToolTipText|' + r'TopIndex|TopItemID|Top|TwoPassProcess|TypeLibCLSID|' + r'TypeLibDesc|TypeLibName|Type|Unicode|UpdatableFieldList|' + r'UpdateCmdDataSourceType|UpdateCmdDataSource|' r'UpdateCmdRefreshCmd|UpdateCmdRefreshFieldList|' - r'UpdateCmdRefreshKeyFieldList|UpdateGram|' - r'UpdateGramSchemaLocation|UpdateNameList|UpdateType|' + r'UpdateCmdRefreshKeyFieldList|UpdateCmd|' + r'UpdateGramSchemaLocation|UpdateGram|UpdateNameList|UpdateType|' r'UseCodePage|UseCursorSchema|UseDeDataSource|UseMemoSize|' - r'UserValue|UseTransactions|UTF8Encoded|Value|Version|' - r'VersionComments|VersionCompany|VersionCopyright|' - r'VersionDescription|VersionNumber|VersionProduct|' - r'VersionTrademarks|VFPXMLProgID|ViewPortHeight|ViewPortLeft|' + r'UserValue|UseTransactions|UTF8Encoded|Value|VersionComments|' + r'VersionCompany|VersionCopyright|VersionDescription|' + r'VersionNumber|VersionProduct|VersionTrademarks|Version|' + r'VFPXMLProgID|ViewPortHeight|ViewPortLeft|' r'ViewPortTop|ViewPortWidth|VScrollSmallChange|View|Visible|' - r'VisualEffect|WhatsThisButton|WhatsThisHelp|WhatsThisHelpID|' + r'VisualEffect|WhatsThisButton|WhatsThisHelpID|WhatsThisHelp|' r'WhereType|Width|WindowList|WindowState|WindowType|WordWrap|' r'WrapCharInCDATA|WrapInCDATA|WrapMemoInCDATA|XMLAdapter|' - r'XMLConstraints|XMLName|XMLNameIsXPath|XMLNamespace|' + r'XMLConstraints|XMLNameIsXPath|XMLNamespace|XMLName|' r'XMLPrefix|XMLSchemaLocation|XMLTable|XMLType|' r'XSDfractionDigits|XSDmaxLength|XSDtotalDigits|' r'XSDtype|ZoomBox)', Name.Attribute), - (r'\.(ActivateCell|Add|Add|AddColumn|AddItem|AddListItem|' - r'AddObject|AddProperty|AddTableSchema|AddToSCC|' + (r'\.(ActivateCell|AddColumn|AddItem|AddListItem|AddObject|' + r'AddProperty|AddTableSchema|AddToSCC|Add|' r'ApplyDiffgram|Attach|AutoFit|AutoOpen|Box|Build|' r'CancelReport|ChangesToCursor|CheckIn|CheckOut|Circle|' - r'CleanUp|Clear|ClearData|ClearStatus|CloneObject|Close|' - r'CloseTables|Cls|CursorAttach|CursorDetach|CursorFill|' + r'CleanUp|ClearData|ClearStatus|Clear|CloneObject|CloseTables|' + r'Close|Cls|CursorAttach|CursorDetach|CursorFill|' r'CursorRefresh|DataToClip|DelayedMemoFetch|DeleteColumn|' r'Dock|DoMessage|DoScroll|DoStatus|DoVerb|Drag|Draw|Eval|' r'GetData|GetDockState|GetFormat|GetKey|GetLatestVersion|' r'GetPageHeight|GetPageWidth|Help|Hide|IncludePageInOutput|' - r'IndexToItemID|Item|ItemIDToIndex|LoadXML|Line|Modify|' - r'Move|MoveItem|Nest|OLEDrag|OnPreviewClose|OutputPage|' + r'IndexToItemID|ItemIDToIndex|Item|LoadXML|Line|Modify|' + r'MoveItem|Move|Nest|OLEDrag|OnPreviewClose|OutputPage|' r'Point|Print|PSet|Quit|ReadExpression|ReadMethod|' - r'RecordRefresh|Refresh|Release|ReleaseXML|Remove|' - r'RemoveFromSCC|RemoveItem|RemoveListItem|RemoveObject|' - r'Render|Requery|RequestData|Reset|ResetToDefault|Run|' - r'SaveAs|SaveAsClass|SetAll|SetData|SetFocus|SetFormat|' - r'SetMain|SetVar|SetViewPort|Show|ShowWhatsThis|' + r'RecordRefresh|Refresh|ReleaseXML|Release|RemoveFromSCC|' + r'RemoveItem|RemoveListItem|RemoveObject|Remove|' + r'Render|Requery|RequestData|ResetToDefault|Reset|Run|' + r'SaveAsClass|SaveAs|SetAll|SetData|SetFocus|SetFormat|' + r'SetMain|SetVar|SetViewPort|ShowWhatsThis|Show|' r'SupportsListenerType|TextHeight|TextWidth|ToCursor|' r'ToXML|UndoCheckOut|Unnest|UpdateStatus|WhatsThisMode|' r'WriteExpression|WriteMethod|ZOrder)', Name.Function), @@ -327,9 +327,9 @@ class FoxProLexer(RegexLexer): r'dbc_BeforeRenameView|dbc_BeforeValidateData|' r'dbc_CloseData|dbc_Deactivate|dbc_ModifyData|dbc_OpenData|' r'dbc_PackData|DblClick|Deactivate|Deleted|Destroy|DoCmd|' - r'DownClick|DragDrop|DragOver|DropDown|Error|ErrorMessage|' + r'DownClick|DragDrop|DragOver|DropDown|ErrorMessage|Error|' r'EvaluateContents|GotFocus|Init|InteractiveChange|KeyPress|' - r'Load|LoadReport|LostFocus|Message|MiddleClick|MouseDown|' + r'LoadReport|Load|LostFocus|Message|MiddleClick|MouseDown|' r'MouseEnter|MouseLeave|MouseMove|MouseUp|MouseWheel|Moved|' r'OLECompleteDrag|OLEDragOver|OLEGiveFeedback|OLESetData|' r'OLEStartDrag|OnMoveItem|Paint|ProgrammaticChange|' @@ -337,7 +337,7 @@ class FoxProLexer(RegexLexer): r'QueryRunFile|QueryUnload|RangeHigh|RangeLow|ReadActivate|' r'ReadDeactivate|ReadShow|ReadValid|ReadWhen|Resize|' r'RightClick|SCCInit|SCCDestroy|Scrolled|Timer|UIEnable|' - r'UnDock|Unload|UnloadReport|UpClick|Valid|When)', Name.Function), + r'UnDock|UnloadReport|Unload|UpClick|Valid|When)', Name.Function), (r'\s+', Text), # everything else is not colored diff --git a/pygments/lexers/jvm.py b/pygments/lexers/jvm.py index 6857cd7b..717621e9 100644 --- a/pygments/lexers/jvm.py +++ b/pygments/lexers/jvm.py @@ -355,7 +355,7 @@ class GosuLexer(RegexLexer): (r'(var|delegate|construct|function|private|internal|protected|' r'public|abstract|override|final|static|extends|transient|' r'implements|represents|readonly)\b', Keyword.Declaration), - (r'(property\s+)(get|set|)', Keyword.Declaration), + (r'(property\s+)(get|set)?', Keyword.Declaration), (r'(boolean|byte|char|double|float|int|long|short|void|block)\b', Keyword.Type), (r'(package)(\s+)', bygroups(Keyword.Namespace, Text)), diff --git a/pygments/lexers/other.py b/pygments/lexers/other.py index bd56e112..c8557922 100644 --- a/pygments/lexers/other.py +++ b/pygments/lexers/other.py @@ -1487,9 +1487,9 @@ class RebolLexer(RegexLexer): (r'}', Comment, '#pop'), ], 'commentBlock': [ - (r'\[',Comment, '#push'), - (r'\]',Comment, '#pop'), - (r'[^(\[\])]*', Comment), + (r'\[', Comment, '#push'), + (r'\]', Comment, '#pop'), + (r'[^(\[\])]+', Comment), ], } @@ -2845,7 +2845,7 @@ class BroLexer(RegexLexer): r'|pattern|port|record|set|string|subnet|table|time|timer' r'|vector)\b', Keyword.Type), (r'(T|F)\b', Keyword.Constant), - (r'(&)((?:add|delete|expire)_func|attr|(create|read|write)_expire' + (r'(&)((?:add|delete|expire)_func|attr|(?:create|read|write)_expire' r'|default|disable_print_hook|raw_output|encrypt|group|log' r'|mergeable|optional|persistent|priority|redef' r'|rotate_(?:interval|size)|synchronized)\b', bygroups(Punctuation, @@ -3312,19 +3312,19 @@ class NSISLexer(RegexLexer): include('macro'), include('interpol'), include('basic'), - (r'\$\{[a-zA-Z_\|][a-zA-Z0-9_\|]*\}', Keyword.Pseudo), - (r'\/[a-zA-Z_][a-zA-Z0-9_]*', Name.Attribute), + (r'\$\{[a-z_|][\w|]*\}', Keyword.Pseudo), + (r'/[a-z_]\w*', Name.Attribute), ('.', Text), ], 'basic': [ - (r'(\n)(Function)(\s+)([\.\_a-zA-Z][\.\_a-zA-Z0-9]*)\b', + (r'(\n)(Function)(\s+)([._a-z][.\w]*)\b', bygroups(Text, Keyword, Text, Name.Function)), - (r'\b([_a-zA-Z][_a-zA-Z0-9]*)(::)([a-zA-Z][a-zA-Z0-9]*)\b', + (r'\b([_a-z]\w*)(::)([a-z][a-z0-9]*)\b', bygroups(Keyword.Namespace, Punctuation, Name.Function)), - (r'\b([_a-zA-Z][_a-zA-Z0-9]*)(:)', bygroups(Name.Label, Punctuation)), + (r'\b([_a-z]\w*)(:)', bygroups(Name.Label, Punctuation)), (r'(\b[ULS]|\B)([\!\<\>=]?=|\<\>?|\>)\B', Operator), - (r'[\+\-\|]', Operator), - (r'[\\]', Punctuation), + (r'[|+-]', Operator), + (r'\\', Punctuation), (r'\b(Abort|Add(?:BrandingImage|Size)|' r'Allow(?:RootDirInstall|SkipFiles)|AutoCloseWindow|' r'BG(?:Font|Gradient)|BrandingText|BringToFront|Call(?:InstDLL)?|' @@ -3397,7 +3397,7 @@ class NSISLexer(RegexLexer): r'STARTMENU|SYSDIR|TEMP(?:LATES)?|VIDEOS|WINDIR|\{NSISDIR\})', Name.Builtin), (r'\$(CMDLINE|INSTDIR|OUTDIR|LANGUAGE)', Name.Variable.Global), - (r'\$[a-zA-Z_][a-zA-Z0-9_]*', Name.Variable), + (r'\$[a-z_]\w*', Name.Variable), ], 'str_double': [ (r'"', String, '#pop'), @@ -3457,8 +3457,8 @@ class RPMSpecLexer(RegexLexer): include('macro'), (r'(?i)^(Name|Version|Release|Epoch|Summary|Group|License|Packager|' r'Vendor|Icon|URL|Distribution|Prefix|Patch[0-9]*|Source[0-9]*|' - r'Requires\(?[a-z]*\)?|[A-Za-z]+Req|Obsoletes|Provides|Conflicts|' - r'Build[A-Za-z]+|[A-Za-z]+Arch|Auto[A-Za-z]+)(:)(.*)$', + r'Requires\(?[a-z]*\)?|[a-z]+Req|Obsoletes|Provides|Conflicts|' + r'Build[a-z]+|[a-z]+Arch|Auto[a-z]+)(:)(.*)$', bygroups(Generic.Heading, Punctuation, using(this))), (r'^%description', Name.Decorator, 'description'), (r'^%changelog', Name.Decorator, 'changelog'), @@ -3641,7 +3641,7 @@ class AutoItLexer(RegexLexer): ], 'labels': [ # sendkeys - (r'(^\s*)({[^\s]+?})', bygroups(Text, Name.Label)), + (r'(^\s*)({\S+?})', bygroups(Text, Name.Label)), ], 'numbers': [ (r'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?', Number.Float), diff --git a/pygments/lexers/text.py b/pygments/lexers/text.py index 8709e43a..65d3cd92 100644 --- a/pygments/lexers/text.py +++ b/pygments/lexers/text.py @@ -616,7 +616,7 @@ class MoinWikiLexer(RegexLexer): (r'(\'\'\'?|\|\||`|__|~~|\^|,,|::)', Comment), # Formatting # Lists (r'^( +)([.*-])( )', bygroups(Text, Name.Builtin, Text)), - (r'^( +)([a-zivx]{1,5}\.)( )', bygroups(Text, Name.Builtin, Text)), + (r'^( +)([a-z]{1,5}\.)( )', bygroups(Text, Name.Builtin, Text)), # Other Formatting (r'\[\[\w+.*?\]\]', Keyword), # Macro (r'(\[[^\s\]]+)(\s+[^\]]+?)?(\])', diff --git a/pygments/lexers/web.py b/pygments/lexers/web.py index 1f88e0fc..54783c69 100644 --- a/pygments/lexers/web.py +++ b/pygments/lexers/web.py @@ -3047,7 +3047,7 @@ class TypeScriptLexer(RegexLexer): # Match stuff like: constructor (r'\b(constructor|declare|interface|as|AS)\b', Keyword.Reserved), # Match stuff like: super(argument, list) - (r'(super)(\s*)\(([a-zA-Z0-9,_?.$\s]+\s*)\)', + (r'(super)(\s*)(\([a-zA-Z0-9,_?.$\s]+\s*\))', bygroups(Keyword.Reserved, Text), 'slashstartsregex'), # Match stuff like: function() {...} (r'([a-zA-Z_?.$][\w?.$]*)\(\) \{', Name.Other, 'slashstartsregex'), |