" " Syntax file for the Happy parser generator " " syn include @Haskell syntax/haskell.vim set isk-=' syn region happyHsSnippet matchgroup=happyDelim start="{%\?" end="}" contains=@Haskell,happySplice,happySpliceEscape,happyHsBraces " needed for the same reason as alex.vim syn region happyHsBraces matchgroup=hsDelimiter start="{" end="}" contains=@Haskell,happyHsBrace contained syn region happyString start="\k\@" syn match happyPrimeErr "\k\zs'\+" syn match happySplice "\\\@]\|\d\+\)" contained syn match happySpliceEscape "\\\ze\$" contained syn match happyComment "--.*" syn match happyDirError "%\K\k*\>" contains=happyDirName,happyDirPercent syn match happyDirPercent "%" contained syn keyword happyDirName contained tokentype token name partial monad lexer syn keyword happyDirName contained left right nonassoc expect error syn keyword happyDirName contained attributetype attribute syn match happyDblPercent "^%%$" syn match happyRuleName "\K\k*\ze\_s*:" " :, ::, and | syn match happyRuleOps "::\?\||" hi def link happyDelim Delimiter hi def link happyString String hi def link happyNumber Number hi def link happyPrimeErr Error hi def link happySplice Special hi def link happySpliceEscape Special hi def link happyComment Comment hi def link happyDirError Error hi def link happyDirPercent PreProc hi def link happyDirName PreProc hi def link happyDblPercent Special hi def link happyRuleName Structure hi def link happyRuleOps Keyword set autoindent copyindent