| 
									
										
										
										
											2005-05-20 21:25:31 +00:00
										 |  |  | " Vim syntax file | 
					
						
							| 
									
										
										
										
											2006-04-27 21:47:44 +00:00
										 |  |  | " Language:			ESTEREL | 
					
						
							|  |  |  | " Maintainer:		Maurizio Tranchero <maurizio.tranchero@polito.it> - <maurizio.tranchero@gmail.com> | 
					
						
							| 
									
										
										
										
											2008-06-24 21:56:24 +00:00
										 |  |  | " Credits:			Luca Necchi	<luca.necchi@polito.it>, Nikos Andrikos <nick.andrik@gmail.com> | 
					
						
							| 
									
										
										
										
											2006-04-27 21:47:44 +00:00
										 |  |  | " First Release:	Tue May 17 23:49:39 CEST 2005 | 
					
						
							| 
									
										
										
										
											2008-06-24 21:56:24 +00:00
										 |  |  | " Last Change:		Tue May  6 13:29:56 CEST 2008 | 
					
						
							|  |  |  | " Version:			0.8 | 
					
						
							| 
									
										
										
										
											2005-05-20 21:25:31 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | " For version 5.x: Clear all syntax items | 
					
						
							|  |  |  | " For version 6.x: Quit when a syntax file was already loaded | 
					
						
							|  |  |  | if version < 600 | 
					
						
							|  |  |  |   syntax clear | 
					
						
							|  |  |  | elseif exists("b:current_syntax") | 
					
						
							|  |  |  |   finish | 
					
						
							|  |  |  | endif | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | " case is significant | 
					
						
							|  |  |  | syn case ignore | 
					
						
							|  |  |  | " Esterel Regions | 
					
						
							| 
									
										
										
										
											2006-04-27 21:47:44 +00:00
										 |  |  | 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 | 
					
						
							| 
									
										
										
										
											2005-05-20 21:25:31 +00:00
										 |  |  | " Esterel Keywords | 
					
						
							| 
									
										
										
										
											2006-04-27 21:47:44 +00:00
										 |  |  | syn keyword esterelIO			input output inputoutput constant | 
					
						
							|  |  |  | syn keyword esterelBoolean		and or not xor xnor nor nand | 
					
						
							| 
									
										
										
										
											2008-06-24 21:56:24 +00:00
										 |  |  | syn keyword esterelExpressions	mod pre | 
					
						
							| 
									
										
										
										
											2006-04-27 21:47:44 +00:00
										 |  |  | syn keyword esterelStatement	nothing halt | 
					
						
							|  |  |  | syn keyword esterelStatement	module signal sensor end | 
					
						
							| 
									
										
										
										
											2005-05-20 21:25:31 +00:00
										 |  |  | syn keyword esterelStatement	every do loop abort weak | 
					
						
							|  |  |  | syn keyword esterelStatement	emit present await | 
					
						
							| 
									
										
										
										
											2006-04-27 21:47:44 +00:00
										 |  |  | 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 | 
					
						
							| 
									
										
										
										
											2005-05-20 21:25:31 +00:00
										 |  |  | " Esterel Types | 
					
						
							| 
									
										
										
										
											2008-06-24 21:56:24 +00:00
										 |  |  | syn keyword esterelType 		integer float bolean | 
					
						
							| 
									
										
										
										
											2005-05-20 21:25:31 +00:00
										 |  |  | " Esterel Comment | 
					
						
							| 
									
										
										
										
											2008-06-24 21:56:24 +00:00
										 |  |  | syn match esterelComment		"%.*$" | 
					
						
							| 
									
										
										
										
											2005-05-20 21:25:31 +00:00
										 |  |  | " Operators and special characters | 
					
						
							| 
									
										
										
										
											2008-06-24 21:56:24 +00:00
										 |  |  | 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" | 
					
						
							| 
									
										
										
										
											2005-05-20 21:25:31 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | " Class Linking | 
					
						
							|  |  |  | if version >= 508 || !exists("did_esterel_syntax_inits") | 
					
						
							|  |  |  |   if version < 508 | 
					
						
							|  |  |  |     let did_esterel_syntax_inits = 1 | 
					
						
							|  |  |  |     command -nargs=+ HiLink hi link <args> | 
					
						
							|  |  |  |   else | 
					
						
							|  |  |  |     command -nargs=+ HiLink hi def link <args> | 
					
						
							|  |  |  |   endif | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-04-27 21:47:44 +00:00
										 |  |  | 	HiLink esterelStatement		Statement | 
					
						
							|  |  |  | 	HiLink esterelType			Type | 
					
						
							|  |  |  | 	HiLink esterelComment		Comment | 
					
						
							|  |  |  | 	HiLink esterelBoolean		Number | 
					
						
							|  |  |  | 	HiLink esterelExpressions	Number | 
					
						
							|  |  |  | 	HiLink esterelIO			String | 
					
						
							|  |  |  | 	HiLink esterelOperator		Type | 
					
						
							|  |  |  | 	HiLink esterelSysCall		Type | 
					
						
							|  |  |  | 	HiLink esterelFunctions		Type | 
					
						
							|  |  |  | 	HiLink esterelSpecial		Special | 
					
						
							| 
									
										
										
										
											2005-05-20 21:25:31 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |   delcommand HiLink | 
					
						
							|  |  |  | endif | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | let b:current_syntax = "esterel" |