view runtime/syntax/esterel.vim @ 33988:7c30841c60a0 v9.0.2180

patch 9.0.2180: POSIX function name in exarg causes issues Commit: https://github.com/vim/vim/commit/6fdb6280821a822768df5689a5d727e37d38306c Author: Zoltan Arpadffy <zoltan.arpadffy@gmail.com> Date: Tue Dec 19 20:53:07 2023 +0100 patch 9.0.2180: POSIX function name in exarg causes issues Problem: POSIX function name in exarg struct causes issues on OpenVMS Solution: Rename getline member in exarg struct to ea_getline, remove isinf() workaround for VMS There are compilers that do not treat well POSIX functions - like getline - usage in the structs. Older VMS compilers could digest this... but the newer OpenVMS compilers ( like VSI C x86-64 X7.4-843 (GEM 50XB9) ) cannot deal with these structs. This could be limited to getline() that is defined via getdelim() and might not affect all POSIX functions in general - but avoiding POSIX function names usage in the structs is a "safe side" practice without compromising the functionality or the code readability. The previous OpenVMS X86 port used a workaround limiting the compiler capabilities using __CRTL_VER_OVERRIDE=80400000 In order to make the OpenVMS port future proof, this pull request proposes a possible solution. closes: #13704 Signed-off-by: Zoltan Arpadffy <zoltan.arpadffy@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Tue, 19 Dec 2023 21:00:04 +0100
parents 46763b01cd9a
children
line wrap: on
line source

" Vim syntax file
" Language:			ESTEREL
" Maintainer:		Maurizio Tranchero <maurizio.tranchero@polito.it> - <maurizio.tranchero@gmail.com>
" Credits:			Luca Necchi	<luca.necchi@polito.it>, Nikos Andrikos <nick.andrik@gmail.com>
" First Release:	Tue May 17 23:49:39 CEST 2005
" Last Change:		Tue May  6 13:29:56 CEST 2008
" Version:			0.8

" quit when a syntax file was already loaded
if exists("b:current_syntax")
  finish
endif

" case is significant
syn case ignore
" Esterel Regions
syn region esterelModule					start=/module/		end=/end module/	contains=ALLBUT,esterelModule
syn region esterelLoop						start=/loop/		end=/end loop/		contains=ALLBUT,esterelModule
syn region esterelAbort						start=/abort/		end=/when/			contains=ALLBUT,esterelModule
syn region esterelAbort						start=/weak abort/	end=/when/			contains=ALLBUT,esterelModule
syn region esterelEvery						start=/every/		end=/end every/		contains=ALLBUT,esterelModule
syn region esterelIf						start=/if/			end=/end if/		contains=ALLBUT,esterelModule
syn region esterelConcurrent	transparent start=/\[/			end=/\]/			contains=ALLBUT,esterelModule
syn region esterelIfThen					start=/if/			end=/then/			oneline
" Esterel Keywords
syn keyword esterelIO			input output inputoutput constant
syn keyword esterelBoolean		and or not xor xnor nor nand
syn keyword esterelExpressions	mod pre
syn keyword esterelStatement	nothing halt
syn keyword esterelStatement	module signal sensor end
syn keyword esterelStatement	every do loop abort weak
syn keyword esterelStatement	emit present await
syn keyword esterelStatement	pause when immediate
syn keyword esterelStatement	if then else case
syn keyword esterelStatement	var in  run  suspend
syn keyword esterelStatement	repeat times combine with
syn keyword esterelStatement	assert sustain
" check what it is the following
syn keyword esterelStatement	relation						
syn keyword esterelFunctions	function procedure task
syn keyword esterelSysCall		call trap exit exec
" Esterel Types
syn keyword esterelType 		integer float bolean
" Esterel Comment
syn match esterelComment		"%.*$"
" Operators and special characters
syn match esterelSpecial		":"
syn match esterelSpecial		"<="
syn match esterelSpecial		">="
syn match esterelSpecial		"+"
syn match esterelSpecial		"-"
syn match esterelSpecial		"="
syn match esterelSpecial		";"
syn match esterelSpecial		"/"
syn match esterelSpecial		"?"
syn match esterelOperator		"\["
syn match esterelOperator		"\]"
syn match esterelOperator		":="
syn match esterelOperator		"||"
syn match esterelStatement		"\<\(if\|else\)\>"
syn match esterelNone			"\<else\s\+if\>$"
syn match esterelNone			"\<else\s\+if\>\s"

" Class Linking

hi def link esterelStatement		Statement
hi def link esterelType			Type
hi def link esterelComment		Comment
hi def link esterelBoolean		Number
hi def link esterelExpressions	Number
hi def link esterelIO			String
hi def link esterelOperator		Type
hi def link esterelSysCall		Type
hi def link esterelFunctions		Type
hi def link esterelSpecial		Special


let b:current_syntax = "esterel"