| 1 |
" Vim syntax highlighting rules for GCC match-and-simplify language. |
| 2 |
" |
| 3 |
" Copyright (C) 2018-2025 Free Software Foundation, Inc. |
| 4 |
" |
| 5 |
" This script is free software; you can redistribute it and/or modify |
| 6 |
" it under the terms of the GNU General Public License as published by |
| 7 |
" the Free Software Foundation; either version 3, or (at your option) |
| 8 |
" any later version |
| 9 |
|
| 10 |
if exists("b:current_syntax") |
| 11 |
finish |
| 12 |
endif |
| 13 |
|
| 14 |
" Some keywords have a question mark, e.g. 'convert?' |
| 15 |
setl isk=@,48-57,_,? |
| 16 |
|
| 17 |
syn keyword pdTodo contained TODO FIXME XXX |
| 18 |
|
| 19 |
syn keyword pdCtrl match simplify |
| 20 |
syn keyword pdCtrl define_predicates define_operator_list |
| 21 |
syn keyword pdCtrl if switch for with |
| 22 |
|
| 23 |
syn keyword pdType type |
| 24 |
|
| 25 |
syn keyword pdOp view_convert view_convert? |
| 26 |
\ convert convert? convert1 convert2 convert1? convert2? |
| 27 |
\ realpart imagpart |
| 28 |
\ cond vec_cond vec_perm |
| 29 |
\ pointer_plus pointer_diff |
| 30 |
\ plus minus mult mult_highpart |
| 31 |
\ trunc_div ceil_div floor_div round_div |
| 32 |
\ trunc_mod ceil_mod floor_mod round_mod |
| 33 |
\ rdiv exact_div |
| 34 |
\ fix_trunc float negate min max abs absu |
| 35 |
\ lshift rshift lrotate rrotate |
| 36 |
\ bit_ior bit_xor bit_and bit_not |
| 37 |
\ truth_andif truth_orif truth_and |
| 38 |
\ truth_or truth_xor truth_not |
| 39 |
\ lt le gt ge eq ne unordered ordered |
| 40 |
\ unlt unle ungt unge uneq ltgt |
| 41 |
\ addr_space_convert fixed_convert |
| 42 |
\ bit_insert complex conj |
| 43 |
\ reduc_max reduc_min reduc_plus |
| 44 |
\ dot_prod widen_sum sad fma |
| 45 |
\ widen_mult widen_mult_plus widen_mult_minus widen_lshift |
| 46 |
\ vec_widen_mult_hi vec_widen_mult_lo |
| 47 |
\ vec_widen_mult_even vec_widen_mult_odd |
| 48 |
\ vec_unpack_hi vec_unpack_lo |
| 49 |
\ vec_unpack_float_hi vec_unpack_float_lo |
| 50 |
\ vec_pack_trunc vec_pack_sat vec_pack_fix_trunc |
| 51 |
\ vec_widen_lshift_hi vec_widen_lshift_lo |
| 52 |
|
| 53 |
" Match commutative/single-use specifiers: :C, :c, :s, :cs, etc. |
| 54 |
syn match pdOpSpec ":[CcSs]\+\>" |
| 55 |
|
| 56 |
syn match pdCapture "@@\?[a-zA-Z0-9_]\+" |
| 57 |
|
| 58 |
syn region pdComment start="/\*" end="\*/" contains=pdTodo |
| 59 |
|
| 60 |
syn region pdPreProc start="^\s*#" skip="\\$" end="$" keepend |
| 61 |
|
| 62 |
hi def link pdCtrl Statement |
| 63 |
hi def link pdType Identifier |
| 64 |
hi def link pdOp Constant |
| 65 |
hi def link pdOpSpec Operator |
| 66 |
hi def link pdCapture Special |
| 67 |
hi def link pdComment Comment |
| 68 |
hi def link pdTodo Todo |
| 69 |
hi def link pdPreProc PreProc |
| 70 |
|
| 71 |
let b:current_syntax = "gcc-match" |