From 0057deaebb64bd5c463d8eedd893db10715c0eab Mon Sep 17 00:00:00 2001 From: Benjamin Kowarsch Date: Wed, 2 Sep 2020 21:05:45 +0900 Subject: [PATCH] added reference to VIM license --- Vim/filetype-def.vim | 9 +++++++-- Vim/filetype-mod.vim | 14 ++++++++++++-- Vim/m2iso.vim | 5 +++++ Vim/m2pim.vim | 5 +++++ Vim/m2r10.vim | 28 +++++++++++++++------------- Vim/sample-vimrc.vim | 7 ++++++- Vim/syntax-menu.vim | 5 +++++ Vim/vimtest-iso.def | 8 +++++++- Vim/vimtest-pim.def | 7 ++++++- Vim/vimtest-r10.def | 21 +++++++++++++-------- 10 files changed, 81 insertions(+), 28 deletions(-) diff --git a/Vim/filetype-def.vim b/Vim/filetype-def.vim index cf89acf..ca43e72 100644 --- a/Vim/filetype-def.vim +++ b/Vim/filetype-def.vim @@ -1,5 +1,5 @@ " Vim disambiguation function for .def files -" Author: B.Kowarsch +" Author: B.Kowarsch " Last change: 2016 Aug 12 " Installation: @@ -10,6 +10,11 @@ "| au BufNewFile,BufRead *.def setf def " and replace these two lines with the code below: +" ---------------------------------------------------- +" THE FOLLOWING CODE IS LICENSED UNDER THE VIM LICENSE +" see https://github.com/vim/vim/blob/master/LICENSE +" ---------------------------------------------------- + " Microsoft Module Definition or Modula-2 au BufNewFile,BufRead *.def call s:FTdef() @@ -53,4 +58,4 @@ func! s:FTdef() endwhile " no dialect tag and no module header found, default to MSFT setf def -endfunc \ No newline at end of file +endfunc diff --git a/Vim/filetype-mod.vim b/Vim/filetype-mod.vim index 215417f..8d3dabc 100644 --- a/Vim/filetype-mod.vim +++ b/Vim/filetype-mod.vim @@ -1,5 +1,5 @@ " Vim disambiguation function for .mod files -" Author: B.Kowarsch +" Author: B.Kowarsch " Last change: 2016 Aug 12 " Installation: @@ -15,6 +15,11 @@ "| \ endif " and replace it with the code below: +" ---------------------------------------------------- +" THE FOLLOWING CODE IS LICENSED UNDER THE VIM LICENSE +" see https://github.com/vim/vim/blob/master/LICENSE +" ---------------------------------------------------- + " *.mod : LambdaProlog, Modsim III or Modula-2 au BufNewFile,BufRead *.mod call s:FTmod() @@ -64,8 +69,13 @@ endfunc "| Modula 2 ... " and replace the section with the code below: +" ---------------------------------------------------- +" THE FOLLOWING CODE IS LICENSED UNDER THE VIM LICENSE +" see https://github.com/vim/vim/blob/master/LICENSE +" ---------------------------------------------------- + " Classic Modula-2 (.DEF, .MOD) au BufNewFile,BufRead *.DEF,*.MOD setf m2pim " Suffix .def is ambiguous and resolved by function FTdef(). " Suffix .mod is ambiguous and resolved by function FTmod(). -" Suffixes .m2, .md and .mi are non-standard and have been removed. \ No newline at end of file +" Suffixes .m2, .md and .mi are non-standard and have been removed. diff --git a/Vim/m2iso.vim b/Vim/m2iso.vim index 86ee2c5..0a72495 100644 --- a/Vim/m2iso.vim +++ b/Vim/m2iso.vim @@ -3,6 +3,11 @@ " Maintainer: B.Kowarsch " Last Change: 2016 August 22 +" ---------------------------------------------------- +" THIS FILE IS LICENSED UNDER THE VIM LICENSE +" see https://github.com/vim/vim/blob/master/LICENSE +" ---------------------------------------------------- + " Remarks: " Vim Syntax files are available for the following Modula-2 dialects: " * for the PIM dialect : m2pim.vim diff --git a/Vim/m2pim.vim b/Vim/m2pim.vim index d36df2d..5284bca 100644 --- a/Vim/m2pim.vim +++ b/Vim/m2pim.vim @@ -3,6 +3,11 @@ " Maintainer: B.Kowarsch " Last Change: 2016 August 22 +" ---------------------------------------------------- +" THIS FILE IS LICENSED UNDER THE VIM LICENSE +" see https://github.com/vim/vim/blob/master/LICENSE +" ---------------------------------------------------- + " Remarks: " Vim Syntax files are available for the following Modula-2 dialects: " * for the PIM dialect : m2pim.vim (this file) diff --git a/Vim/m2r10.vim b/Vim/m2r10.vim index ce0155d..98908e9 100644 --- a/Vim/m2r10.vim +++ b/Vim/m2r10.vim @@ -3,6 +3,11 @@ " Maintainer: B.Kowarsch " Last Change: 2020 June 18 (moved repository from bb to github) +" ---------------------------------------------------- +" THIS FILE IS LICENSED UNDER THE VIM LICENSE +" see https://github.com/vim/vim/blob/master/LICENSE +" ---------------------------------------------------- + " Remarks: " Vim Syntax files are available for the following Modula-2 dialects: " * for the PIM dialect : m2pim.vim @@ -57,15 +62,15 @@ syn case match " Note: MODULE, PROCEDURE and END are defined separately further below syn keyword m2Resword ALIAS AND ARGLIST ARRAY BEGIN CASE CONST COPY DEFINITION syn keyword m2Resword DIV DO ELSE ELSIF EXIT FOR FROM GENLIB IF IMPLEMENTATION -syn keyword m2Resword IMPORT IN LOOP MOD NEW NOP NOT OCTETSEQ OF OPAQUE OR -syn keyword POINTER READ RECORD RELEASE REPEAT RETAIN RETURN SET THEN TO TYPE +syn keyword m2Resword IMPORT IN LOOP MOD NEW NOT OF OPAQUE OR POINTER READ +syn keyword m2Resword RECORD RELEASE REPEAT RETAIN RETURN SET THEN TO TYPE syn keyword m2Resword UNTIL VAR WHILE WRITE YIELD " ----------------------------------------------------------------------------- " Schroedinger's Tokens " ----------------------------------------------------------------------------- -syn keyword m2SchroedToken COROUTINE LITERAL +syn keyword m2SchroedToken CAPACITY COROUTINE LITERAL " ----------------------------------------------------------------------------- @@ -85,29 +90,26 @@ syn keyword m2TypeIdent CARDINAL LONGCARD INTEGER LONGINT REAL LONGREAL " Builtin Procedure and Function Identifiers " ----------------------------------------------------------------------------- syn keyword m2ProcIdent APPEND INSERT REMOVE SORT SORTNEW -syn keyword m2FuncIdent CHR UCHR ORD COLLATION ODD ABS SGN MIN MAX LOG2 POW2 -syn keyword m2FuncIdent ENTIER PRED SUCC PTR CAPACITY COUNT LENGTH FIRST LAST -syn keyword m2FuncIdent PREV NEXT +syn keyword m2FuncIdent CHR ORD ODD ABS SGN MIN MAX LOG2 POW2 ENTIER +syn keyword m2FuncIdent PRED SUCC PTR COUNT LENGTH " ----------------------------------------------------------------------------- " Builtin Macro Identifiers " ----------------------------------------------------------------------------- -syn keyword m2MacroIdent TMIN TMAX TSIZE TLIMIT +syn keyword m2MacroIdent NOP TMIN TMAX TSIZE TLIMIT " ----------------------------------------------------------------------------- " Builtin Primitives " ----------------------------------------------------------------------------- -syn keyword m2PrimitiveIdent _ATVALUE _KVALUE _ATSTORE _KVSTORE _ATINSERT -syn keyword m2PrimitiveIdent _ATREMOVE _ALLOC _DEALLOC _STDIN _STDOUT -syn keyword m2PrimitiveIdent _NEG _SUBSET _SXF _VAL +syn keyword m2PrimitiveIdent SXF VAL STORE VALUE SEEK SUBSET " ----------------------------------------------------------------------------- " Unsafe Facilities via Pseudo-Module UNSAFE " ----------------------------------------------------------------------------- -syn keyword m2UnsafeIdent UNSAFE ADDRESS BYTE WORD LONGWORD +syn keyword m2UnsafeIdent UNSAFE BYTE WORD LONGWORD OCTETSEQ syn keyword m2UnsafeIdent ADD SUB INC DEC SETBIT HALT syn keyword m2UnsafeIdent ADR CAST BIT SHL SHR BWNOT BWAND BWOR @@ -299,8 +301,8 @@ syn keyword m2ReswordEnd contained END " ----------------------------------------------------------------------------- " !!! this section must be last !!! -" any '`' '~' '$' '%' -syn match m2IllegalChar "[`~$%]" +" any '`' '~' '@' '$' '%' +syn match m2IllegalChar "[`~@$%]" " any solitary sequence of '_' syn match m2IllegalChar "\<_\+\>" diff --git a/Vim/sample-vimrc.vim b/Vim/sample-vimrc.vim index 3079aa3..0fb6f53 100644 --- a/Vim/sample-vimrc.vim +++ b/Vim/sample-vimrc.vim @@ -1,6 +1,11 @@ " Example startup script for Vim " ~/.vimrc on Posix systems, or ~/_vimrc on Windows +" ---------------------------------------------------- +" THIS FILE IS LICENSED UNDER THE VIM LICENSE +" see https://github.com/vim/vim/blob/master/LICENSE +" ---------------------------------------------------- + " *** set appearance parameters *** " show line numbers @@ -32,4 +37,4 @@ let g:m2iso_disallow_octals = 1 let g:m2pim_disallow_synonyms = 1 let g:m2iso_disallow_synonyms = 1 -" END OF FILE \ No newline at end of file +" END OF FILE diff --git a/Vim/syntax-menu.vim b/Vim/syntax-menu.vim index c2623ac..e5c7fe0 100644 --- a/Vim/syntax-menu.vim +++ b/Vim/syntax-menu.vim @@ -5,6 +5,11 @@ "| SynMenu M.Modula\ 2:modula2 " and replace it with the following code: +" ---------------------------------------------------- +" CODE IN THIS FILE IS LICENSED UNDER THE VIM LICENSE +" see https://github.com/vim/vim/blob/master/LICENSE +" ---------------------------------------------------- + SynMenu M.Modula-2.R10\ (2010):m2r10 SynMenu M.Modula-2.ISO\ (1994):m2iso SynMenu M.Modula-2.PIM\ (1985):m2pim diff --git a/Vim/vimtest-iso.def b/Vim/vimtest-iso.def index e3ebd3f..b979ccf 100644 --- a/Vim/vimtest-iso.def +++ b/Vim/vimtest-iso.def @@ -1,5 +1,11 @@ (* Modula-2 ISO Test File for Vim Syntax Colouring *) +(* -------------------------------------------------- + * THIS FILE IS LICENSED UNDER THE VIM LICENSE + * see https://github.com/vim/vim/blob/master/LICENSE + * -------------------------------------------------- *) + + DEFINITION MODULE Foobar; (*!m2iso*) FROM SYSTEM IMPORT LOC, WORD, ADDRESS; @@ -105,4 +111,4 @@ bar__ bar_baz__ bar_baz__bam__ bar_baz__bam_boo__ bar__baz __bar_baz__ __bar__baz__ __ -END Foobar. \ No newline at end of file +END Foobar. diff --git a/Vim/vimtest-pim.def b/Vim/vimtest-pim.def index 0c31f42..e008160 100644 --- a/Vim/vimtest-pim.def +++ b/Vim/vimtest-pim.def @@ -1,5 +1,10 @@ (* Modula-2 PIM Test File for Vim Syntax Colouring *) +(* -------------------------------------------------- + * THIS FILE IS LICENSED UNDER THE VIM LICENSE + * see https://github.com/vim/vim/blob/master/LICENSE + * -------------------------------------------------- *) + DEFINITION MODULE Foobar; (*!m2pim*) FROM SYSTEM IMPORT WORD, ADDRESS; @@ -103,4 +108,4 @@ bar__ bar_baz__ bar_baz__bam__ bar_baz__bam_boo__ bar__baz __bar_baz__ __bar__baz__ __ -END Foobar. \ No newline at end of file +END Foobar. diff --git a/Vim/vimtest-r10.def b/Vim/vimtest-r10.def index 5f2ded7..0872d5d 100644 --- a/Vim/vimtest-r10.def +++ b/Vim/vimtest-r10.def @@ -1,5 +1,10 @@ (* Modula-2 R10 Test File for Vim Syntax Colouring *) +(* -------------------------------------------------- + * THIS FILE IS LICENSED UNDER THE VIM LICENSE + * see https://github.com/vim/vim/blob/master/LICENSE + * -------------------------------------------------- *) + DEFINITION MODULE Foobar; (*!m2r10*) IMPORT UNSAFE ALIAS BYTE, WORD, ADDRESS; @@ -77,9 +82,9 @@ PROCEDURE [+] sum ( a, b : BCD ) : BCD; PROCEDURE [MOD] modulus ( n, m : INT64 ) : INT64; -PROCEDURE [VALUE] valueForKey ( dict : Dict; key : Key ) : Value; +PROCEDURE [RETAIN] Retain ( foo : Foo ); -PROCEDURE [STORE] StoreValueForKey ( dict : Dict; key : Key; value : Value ); +PROCEDURE [LENGTH] length ( str : String ) : LONGCARD; (* procedures *) @@ -96,7 +101,7 @@ END END; PROCEDURE bar ( foo : Foo ) : INTEGER; BEGIN IF foo = NIL THEN - HALT + UNSAFE.HALT ELSE RETURN foo^.bar END (* IF *) @@ -105,12 +110,12 @@ END bar; (* technical debt *) TO DO ( 1234, Weight.Major ) (* foo *) - "redesign foo", 2 * days; - "replace foo", 2 * days; - "test new foo", 1 * days + "redesign foo", 2d; + "replace foo", 2d; + "test new foo", 1d END (* TO DO *); -<*DEPRECATED*> PROCEDURE SetBaba ( n : CARDINAL ); +PROCEDURE SetBaba <*DEPRECATED*> ( n : CARDINAL ); (* disabled code *) @@ -138,4 +143,4 @@ bar__baz __bar_baz__ __bar__baz__ __ (* module end *) -END Foobar. \ No newline at end of file +END Foobar.