Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/MLRISC/Tools/mdl.vim
ViewVC logotype

Annotation of /sml/trunk/src/MLRISC/Tools/mdl.vim

Parent Directory Parent Directory | Revision Log Revision Log


Revision 744 - (view) (download)

1 : leunga 744 " Vim syntax file
2 :     " Language: SML/NJ Machine Description Tool
3 :     " Maintainer: Allen Leung <leunga@cs.nyu.edu>
4 :     " Last change: Nov 21, 2000
5 :     " For version 3.0 MDL
6 :    
7 :     " Remove any old syntax stuff hanging around
8 :     syn clear
9 :    
10 :     syn keyword mdStatement structure struct signature sig functor
11 :     syn keyword mdStatement architecture end opcode instruction
12 :     syn keyword mdStatement register cell cells cellset little big endian bits
13 :     syn keyword mdStatement field fields vliw superscalar name version
14 :     syn keyword mdStatement fun fn let in val rec of and raise handle as
15 :     syn keyword mdStatement type eqtype datatype exception sharing where
16 :     syn keyword mdStatement withtype with abstype open local ordering
17 :     syn keyword mdStatement is are format formats to encode encoding
18 :     syn keyword mdStatement signed unsigned assembly at
19 :     syn keyword mdStatement uppercase lowercase section delayslot nodelayslot
20 :     syn keyword mdStatement span dependent always never candidate semantics
21 :     syn keyword mdStatement nullified aggregable aliasing
22 :     syn keyword mdStatement called locations storage internal latency pipeline
23 :     syn keyword mdStatement mc asm rtl padding cpu resource
24 :     syn keyword mdConditional if else then case include
25 :     syn keyword mdRepeat while infix infixr nonfix
26 :     "syn match mdLabel "\#[a-zA-Z'][a-zA-Z0-9_']*\>"
27 :    
28 :     syn keyword mdTodo contained TODO
29 :    
30 :     " String
31 :     syn match mdSpecial contained "\\x\x\+\|\\\o\{1,3\}\|\\.\|\\$"
32 :     syn region mdString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=mdSpecial
33 :     syn region mdChar start=+#"+ skip=+\\\\\|\\"+ end=+"+ contains=mdSpecial
34 :    
35 :     syn match mdIdentifier "\<[a-zA-Z][a-zA-Z0-9_']*\>"
36 :     syn match mdType "'\<[a-zA-Z][a-zA-Z0-9_']*\>"
37 :    
38 :     "syn match mdDelimiter "[(){}\[\]]"
39 :     syn match mdNumber "\<\d\+\>"
40 :     syn match mdNumber "\<\d\+\.\d\+[eE]\~?\d\+\>"
41 :     syn match mdWord "0xw[0-9a-fA-F]+"
42 :     syn match mdWord "0w\d+"
43 :    
44 :     " If you don't like tabs
45 :     "syn match mdShowTab "\t"
46 :     "syn match mdShowTabc "\t"
47 :    
48 :     syn region mdComment start="(\*" end="\*)" contains=mdTodo
49 :     "syn region mdComment start="{" end="}" contains=mdTodo
50 :    
51 :     syn keyword mdOperator andalso orelse not div mod
52 :     syn keyword mdOperator false true
53 :     syn keyword mdType char string int real exn bool word list option
54 :     syn keyword mdType array vector unit ref
55 :     syn keyword mdType "\->"
56 :     syn keyword mdType "\*"
57 :    
58 :     "syn keyword mdFunction fun
59 :    
60 :     syn sync lines=250
61 :    
62 :     if !exists("did_md_syntax_inits")
63 :     let did_md_syntax_inits = 1
64 :     " The default methods for highlighting. Can be overridden later
65 :     hi link mdStatement Statement
66 :     hi link mdLabel Label
67 :     hi link mdConditional Conditional
68 :     hi link mdRepeat Repeat
69 :     hi link mdTodo Todo
70 :     hi link mdString String
71 :     hi link mdChar String
72 :     hi link mdNumber Number
73 :     hi link mdWord Number
74 :     hi link mdOperator Operator
75 :     hi link mdFunction Function
76 :     hi link mdType Type
77 :     hi link mdComment Comment
78 :     hi link mdStatement Statement
79 :    
80 :     "optional highlighting
81 :     hi link mdDelimiter Identifier
82 :    
83 :     "hi link mdShowTab Error
84 :     "hi link mdShowTabc Error
85 :    
86 :     hi link mdIdentifier Identifier
87 :     endif
88 :    
89 :     let b:current_syntax = "md"
90 :    
91 :     " vim: ts=8

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0