1" syntax file for Protocol Buffers - Google's data interchange format 2" 3" Copyright 2008 Google Inc. All rights reserved. 4" 5" Permission is hereby granted, free of charge, to any person obtaining a copy 6" of this software and associated documentation files (the "Software"), to deal 7" in the Software without restriction, including without limitation the rights 8" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9" copies of the Software, and to permit persons to whom the Software is 10" furnished to do so, subject to the following conditions: 11" 12" The above copyright notice and this permission notice shall be included in 13" all copies or substantial portions of the Software. 14" 15" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21" THE SOFTWARE. 22" 23" http://code.google.com/p/protobuf/ 24 25if version < 600 26 syntax clear 27elseif exists("b:current_syntax") 28 finish 29endif 30 31syn case match 32 33syn keyword protoTodo contained TODO FIXME XXX 34syn cluster protoCommentGrp contains=protoTodo 35 36syn keyword protoSyntax syntax import option 37syn keyword protoStructure package message group 38syn keyword protoRepeat optional required repeated 39syn keyword protoDefault default 40syn keyword protoExtend extend extensions to max 41syn keyword protoRPC service rpc returns 42 43syn keyword protoType int32 int64 uint32 uint64 sint32 sint64 44syn keyword protoType fixed32 fixed64 sfixed32 sfixed64 45syn keyword protoType float double bool string bytes 46syn keyword protoTypedef enum 47syn keyword protoBool true false 48 49syn match protoInt /-\?\<\d\+\>/ 50syn match protoInt /\<0[xX]\x+\>/ 51syn match protoFloat /\<-\?\d*\(\.\d*\)\?/ 52syn region protoComment start="\/\*" end="\*\/" contains=@protoCommentGrp 53syn region protoComment start="//" skip="\\$" end="$" keepend contains=@protoCommentGrp 54syn region protoString start=/"/ skip=/\\./ end=/"/ 55syn region protoString start=/'/ skip=/\\./ end=/'/ 56 57hi def link protoTodo Todo 58 59hi def link protoSyntax Include 60hi def link protoStructure Structure 61hi def link protoRepeat Repeat 62hi def link protoDefault Keyword 63hi def link protoExtend Keyword 64hi def link protoRPC Keyword 65hi def link protoType Type 66hi def link protoTypedef Typedef 67hi def link protoBool Boolean 68 69hi def link protoInt Number 70hi def link protoFloat Float 71hi def link protoComment Comment 72hi def link protoString String 73 74let b:current_syntax = "proto" 75