" Vim syntax file " Language: Attribute Grammars " Maintainer: Juan Jose Olivera " URL: http://j2.punku.org/scripts/vim/ag.vim " Last Change: $Date: 2006-05-12 17:36:43 " Filenames: *.ag " Version: 0.0.1 " Bugs: {-- and { problem " if !exists("main_syntax") if version < 600 syntax clear elseif exists("b:current_syntax") finish endif let main_syntax = 'ag' endif "program keywords syntax keyword agKeywords DATA EXT ATTR SEM TYPE USE loc lhs INCLUDE hd tl syntax keyword agType String Int Char Bool "Characters syn match agSpecialChar contained "\\\([4-9]\d\|[0-3]\d\d\|[\"\\'ntbrf]\|u\x\{4\}\)" "Comments syntax region agComments start="--*" end="\n" syntax region agBigComments start="{--*" end="--}" "Operators syntax match agOps "|\|=\|+\|++\|\*\|\\\|@\|\[\|]\|->\|(\|)\|{\|}\|:\|\." "Strings syntax region agString start=+"+ end=+"+ end=+$+ contains=agSpecialChar,@Spell syntax sync fromstart syntax sync maxlines=300 "Define the default highlighting "Controling for versions earlier than 5.8, for later versions only if some "item doesn't have highlighting if version >= 508 || !exists("did_ag_syn_inits") let did_ag_syn_inits = 1 hi link agKeywords KeyWord hi link agComments Comment hi link agOps KeyWord hi link agString string hi link agSpecialChar string hi link agType Type hi link agBigComments Comment endif " Removing , while it didn't work because we are loaded " firs " t. " "syntax clear ag let b:current_syntax = "ag" if main_syntax == 'ag' unlet main_syntax endif