robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
ab20681c52
master
1" Vim compiler file 2" Language: abnf 3" Maintainer: A4-Tacks <wdsjxhno1001@163.com> 4" Last Change: 2025 Mar 05 5" Upstream: https://github.com/A4-Tacks/abnf.vim 6 7" Implementing RFC-5234, RFC-7405 8 9if exists ( 'b:current_syntax' ) 10finish 11endif 12 13syn case ignore 14 15syn match abnfError /[ <>" ] / 16syn match abnfComment /;. * / 17syn match abnfOption /[ [/\] ] / 18syn region abnfString start = /\(% [ si ] \)\=" /end = /" /oneline 19syn region abnfProse start = /< /end = /> /oneline 20syn match abnfNumVal /\v\%b [ 01 ] +%(%(\. [ 01 ] +)+|- [ 01 ] +)=> / 21syn match abnfNumVal /\v\%d\d+%(%(\.\d+)+|-\d+)=> / 22syn match abnfNumVal /\v\%x [ 0-9a-f ] +%(%(\. [ 0-9a-f ] +)+|- [ 0-9a-f ] +)=> / 23syn match abnfRepeat /\v%(%(<\d+)=\*\d * |<\d+ =)\ze [ ^ \t\r\n0-9*/)\] ] / 24 25hi def link abnfError Error 26hi def link abnfComment Comment 27hi def link abnfOption PreProc 28hi def link abnfString String 29hi def link abnfProse String 30hi def link abnfNumVal Number 31hi def link abnfRepeat Repeat 32 33" vim:noet:ts=8:sts=8:nowrap