Created
April 8, 2012 11:02
-
-
Save pstuifzand/2336634 to your computer and use it in GitHub Desktop.
Vim syntax highlighting for Marpa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Vim syntax file | |
" Language: Marpa grammar | |
" Maintainer: Peter Stuifzand <peter@tweevijftig.nl> | |
" URL: http://peterstuifzand.nl | |
" Version: 1 | |
" Last Change: 2012 Apr 1 | |
" | |
" Read the HTML syntax to start with | |
if version < 600 | |
so <sfile>:p:h/perl.vim | |
else | |
runtime! syntax/perl.vim | |
unlet b:current_syntax | |
endif | |
if version < 600 | |
syntax clear | |
elseif exists("b:current_syntax") | |
finish | |
endif | |
syn match name /[A-Za-z]\+/ | |
syn match char /$./ | |
syn match operator /::=/ | |
syn region marpaCode start="{{" end="}}" contains=perlExpr | |
syn region marpaRegex start="=\s\*/" end="/\s\*\$" contains=perlInterpMatch | |
hi def link name Identifier | |
hi def link char String | |
hi def link operator Operator | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment