Mercurial > vim
annotate runtime/syntax/pccts.vim @ 14252:b557af8dedab v8.1.0142
patch 8.1.0142: xterm and vt320 builtin termcap missing keypad keys
commit https://github.com/vim/vim/commit/e6882bdc44efbcea0af647f5759a8f48cf29e27c
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jul 3 17:16:59 2018 +0200
patch 8.1.0142: xterm and vt320 builtin termcap missing keypad keys
Problem: Xterm and vt320 builtin termcap missing keypad keys.
Solution: Add the escape sequences. (Kouichi Iwamoto, closes https://github.com/vim/vim/issues/2973)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 03 Jul 2018 17:30:08 +0200 |
parents | 46763b01cd9a |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: PCCTS | |
26 | 3 " Maintainer: Scott Bigham <dsb@killerbunnies.org> |
7 | 4 " Last Change: 10 Aug 1999 |
5 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
26
diff
changeset
|
6 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
26
diff
changeset
|
7 if exists("b:current_syntax") |
7 | 8 finish |
9 endif | |
10 | |
11 " Read the C++ syntax to start with | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
26
diff
changeset
|
12 syn include @cppTopLevel syntax/cpp.vim |
7 | 13 |
14 syn region pcctsAction matchgroup=pcctsDelim start="<<" end=">>?\=" contains=@cppTopLevel,pcctsRuleRef | |
15 | |
16 syn region pcctsArgBlock matchgroup=pcctsDelim start="\(>\s*\)\=\[" end="\]" contains=@cppTopLevel,pcctsRuleRef | |
17 | |
18 syn region pcctsString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=pcctsSpecialChar | |
19 syn match pcctsSpecialChar "\\\\\|\\\"" contained | |
20 | |
21 syn region pcctsComment start="/\*" end="\*/" contains=cTodo | |
22 syn match pcctsComment "//.*$" contains=cTodo | |
23 | |
24 syn region pcctsDirective start="^\s*#header\s\+<<" end=">>" contains=pcctsAction keepend | |
25 syn match pcctsDirective "^\s*#parser\>.*$" contains=pcctsString,pcctsComment | |
26 syn match pcctsDirective "^\s*#tokdefs\>.*$" contains=pcctsString,pcctsComment | |
27 syn match pcctsDirective "^\s*#token\>.*$" contains=pcctsString,pcctsAction,pcctsTokenName,pcctsComment | |
28 syn region pcctsDirective start="^\s*#tokclass\s\+[A-Z]\i*\s\+{" end="}" contains=pcctsString,pcctsTokenName | |
29 syn match pcctsDirective "^\s*#lexclass\>.*$" contains=pcctsTokenName | |
30 syn region pcctsDirective start="^\s*#errclass\s\+[^{]\+\s\+{" end="}" contains=pcctsString,pcctsTokenName | |
31 syn match pcctsDirective "^\s*#pred\>.*$" contains=pcctsTokenName,pcctsAction | |
32 | |
33 syn cluster pcctsInRule contains=pcctsString,pcctsRuleName,pcctsTokenName,pcctsAction,pcctsArgBlock,pcctsSubRule,pcctsLabel,pcctsComment | |
34 | |
35 syn region pcctsRule start="\<[a-z][A-Za-z0-9_]*\>\(\s*\[[^]]*\]\)\=\(\s*>\s*\[[^]]*\]\)\=\s*:" end=";" contains=@pcctsInRule | |
36 | |
37 syn region pcctsSubRule matchgroup=pcctsDelim start="(" end=")\(+\|\*\|?\(\s*=>\)\=\)\=" contains=@pcctsInRule contained | |
38 syn region pcctsSubRule matchgroup=pcctsDelim start="{" end="}" contains=@pcctsInRule contained | |
39 | |
40 syn match pcctsRuleName "\<[a-z]\i*\>" contained | |
41 syn match pcctsTokenName "\<[A-Z]\i*\>" contained | |
42 | |
43 syn match pcctsLabel "\<\I\i*:\I\i*" contained contains=pcctsLabelHack,pcctsRuleName,pcctsTokenName | |
44 syn match pcctsLabel "\<\I\i*:\"\([^\\]\|\\.\)*\"" contained contains=pcctsLabelHack,pcctsString | |
45 syn match pcctsLabelHack "\<\I\i*:" contained | |
46 | |
47 syn match pcctsRuleRef "\$\I\i*\>" contained | |
48 syn match pcctsRuleRef "\$\d\+\(\.\d\+\)\>" contained | |
49 | |
50 syn keyword pcctsClass class nextgroup=pcctsClassName skipwhite | |
51 syn match pcctsClassName "\<\I\i*\>" contained nextgroup=pcctsClassBlock skipwhite skipnl | |
52 syn region pcctsClassBlock start="{" end="}" contained contains=pcctsRule,pcctsComment,pcctsDirective,pcctsAction,pcctsException,pcctsExceptionHandler | |
53 | |
54 syn keyword pcctsException exception nextgroup=pcctsExceptionRuleRef skipwhite | |
55 syn match pcctsExceptionRuleRef "\[\I\i*\]" contained contains=pcctsExceptionID | |
56 syn match pcctsExceptionID "\I\i*" contained | |
57 syn keyword pcctsExceptionHandler catch default | |
58 syn keyword pcctsExceptionHandler NoViableAlt NoSemViableAlt | |
59 syn keyword pcctsExceptionHandler MismatchedToken | |
60 | |
61 syn sync clear | |
62 syn sync match pcctsSyncAction grouphere pcctsAction "<<" | |
63 syn sync match pcctsSyncAction "<<\([^>]\|>[^>]\)*>>" | |
64 syn sync match pcctsSyncRule grouphere pcctsRule "\<[a-z][A-Za-z0-9_]*\>\s*\[[^]]*\]\s*:" | |
65 syn sync match pcctsSyncRule grouphere pcctsRule "\<[a-z][A-Za-z0-9_]*\>\(\s*\[[^]]*\]\)\=\s*>\s*\[[^]]*\]\s*:" | |
66 | |
67 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
26
diff
changeset
|
68 " Only when an item doesn't have highlighting yet |
7 | 69 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
70 hi def link pcctsDelim Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
71 hi def link pcctsTokenName Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
72 hi def link pcctsRuleName Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
73 hi def link pcctsLabelHack Label |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
74 hi def link pcctsDirective PreProc |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
75 hi def link pcctsString String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
76 hi def link pcctsComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
77 hi def link pcctsClass Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
78 hi def link pcctsClassName Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
79 hi def link pcctsException Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
80 hi def link pcctsExceptionHandler Keyword |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
81 hi def link pcctsExceptionRuleRef pcctsDelim |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
82 hi def link pcctsExceptionID Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
83 hi def link pcctsRuleRef Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
84 hi def link pcctsSpecialChar SpecialChar |
7 | 85 |
86 | |
87 let b:current_syntax = "pccts" | |
88 | |
89 " vim: ts=8 |