Keywords

Discussion in 'Software' started by matt.chugg, Jul 17, 2006.

  1. matt.chugg

    matt.chugg MajorGeek

    Hi has anyone got a list of keywords I could have.

    Im making a vbCode Syntax highlighter so you can use syntax highlighting for other languages in a 'code' block

    If anyone has any idea where there are lists of keywords i'd appreciate it.

    Matt

    something like this hopefully:

    Code:
    [color=blue]Private[/color] [color=blue]Sub[/color] SearchForFiles(sRoot As String)  
      
       [color=blue]Dim[/color] WFD As WIN32_FIND_DATA  
       [color=blue]Dim[/color] hFile As [color=blue]Long[/color]  
        
       hFile = FindFirstFile(sRoot & ALL_FILES, WFD)  
        
       [color=blue]If[/color] hFile <> INVALID_HANDLE_VALUE [color=blue]Then[/color]  
         
          [color=blue]Do[/color]  
                        
    [color=green]        'if a folder, [color=blue]and[/color] recurse specified, call[/color] 
    [color=green]        'method again[/color] 
             [color=blue]If[/color] (WFD.dwFileAttributes [color=blue]And[/color] vbDirectory) [color=blue]Then[/color]  
                [color=blue]If[/color] Asc(WFD.cFileName) <> vbDot [color=blue]Then[/color]  
      
                 [color=blue]If[/color] fp.bRecurse [color=blue]Then[/color]  
                      SearchForFiles sRoot & TrimNull(WFD.cFileName) & vbBackslash  
                   [color=blue]End[/color] [color=blue]If[/color]  
                [color=blue]End[/color] [color=blue]If[/color]  
                  
             [color=blue]Else[/color]  
               
    [color=green]           'must be a file..[/color] 
                [color=blue]If[/color] MatchSpec(WFD.cFileName, fp.sFileNameExt) [color=blue]Then[/color]  
                   fp.nCount = fp.nCount + [color=orange]1[/color]  
                   List1.AddItem sRoot & TrimNull(WFD.cFileName)  
                [color=blue]End[/color] [color=blue]If[/color]  'If MatchSpec  
            
             [color=blue]End[/color] [color=blue]If[/color] 'If WFD.dwFileAttributes  
            
             fp.nSearched = fp.nSearched + [color=orange]1[/color]  
            
          [color=blue]Loop[/color] [color=blue]While[/color] FindNextFile(hFile, WFD)  
         
       [color=blue]End[/color] [color=blue]If[/color] 'If hFile  
        
       [color=blue]Call[/color] FindClose(hFile)  
      
    [color=blue]End[/color] [color=blue]Sub[/color]  
    
    Theres still a couple of bugs in there lol but thats vb6 highlighting on vb.net code, it'd need its own keywords but im still in the development stages
     
    Last edited: Jul 17, 2006
  2. Kodo

    Kodo SNATCHSQUATCH

  3. matt.chugg

    matt.chugg MajorGeek

    Actually I was after keywords for various differnt languages, like all the c ones, php, and any other 'popular' languages. The project will be a web application eventually where people can paste their code, select their language and then it will give the the vbCode to include syntax highlighting when posting in a [ code ] [ / code ] block.

    I could probably compile my own keywords list but Im pretty sure there must be some out there somewhere what with all the syntax highlighting notepad replacements.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds