From c84a9ee66aa568d2b84eb010bd53044b40fe59a1 Mon Sep 17 00:00:00 2001 From: Patrick Meiser-Knosowski Date: Tue, 14 Nov 2017 16:31:18 +0100 Subject: [PATCH 01/12] show error interrupt 5 on et al --- syntax/krl.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/syntax/krl.vim b/syntax/krl.vim index 12e8237..b872a52 100644 --- a/syntax/krl.vim +++ b/syntax/krl.vim @@ -282,6 +282,9 @@ highlight default link krlFunction Function if exists("g:krlShowError") && g:krlShowError==1 " some more or less common typos " + " should be interrupt (on|off) \w+ + syn match krlShowError /\vinterrupt +\w+ +o(n|ff)>/ + " syn match krlError /\v^\s*\zs(elseif>|esle>|endfi>|ednif>|ednwhile>|ednfor>|endfro>|ednloop>)/ " " for bla==5 to 7... From fbf7ad67e058f1c2b9406e51674c98ddf5daaf0d Mon Sep 17 00:00:00 2001 From: Patrick Meiser-Knosowski Date: Wed, 15 Nov 2017 09:25:29 +0100 Subject: [PATCH 02/12] fix show error interrupt 5 on et al --- syntax/krl.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/syntax/krl.vim b/syntax/krl.vim index b872a52..5c769dd 100644 --- a/syntax/krl.vim +++ b/syntax/krl.vim @@ -1,7 +1,7 @@ " Kuka Robot Language syntax file for Vim " Language: Kuka Robot Language " Maintainer: Patrick Meiser-Knosowski -" Version: 1.5.2 +" Version: 1.5.3 " Last Change: 12. Aug 2017 " Credits: Thanks for contributions to this to Michael Jagusch " @@ -283,7 +283,7 @@ if exists("g:krlShowError") && g:krlShowError==1 " some more or less common typos " " should be interrupt (on|off) \w+ - syn match krlShowError /\vinterrupt +\w+ +o(n|ff)>/ + syn match krlError /\vinterrupt +\w+ +o(n|ff)>/ " syn match krlError /\v^\s*\zs(elseif>|esle>|endfi>|ednif>|ednwhile>|ednfor>|endfro>|ednloop>)/ " From ab0a9418727935dd04cb06fe6df91b70238aa990 Mon Sep 17 00:00:00 2001 From: Patrick Meiser-Knosowski Date: Wed, 15 Nov 2017 11:28:16 +0100 Subject: [PATCH 03/12] fix highlight of def in case of global --- syntax/krl.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax/krl.vim b/syntax/krl.vim index 5c769dd..f52ce55 100644 --- a/syntax/krl.vim +++ b/syntax/krl.vim @@ -60,7 +60,7 @@ highlight default link krlGeomOperator Operator " Type " any type (preceded by 'decl') -syn match krlAnyType /\v((decl\s+|struc\s+|enum\s+)|(global\s+)|(const\s+)|(deffct\s+))+\w+>/ contains=krlStorageClass,krlType +syn match krlAnyType /\v((decl\s+|struc\s+|enum\s+)|(global\s+)|(const\s+)|(deffct\s+))+\w+>/ contains=krlStorageClass,krlType,krlTypedef highlight default link krlAnyType Type " Simple data types syn match krlType /\v<(BOOL|CHAR|REAL|INT)>/ containedin=krlAnyType From 79bc3604298b3613e6715fafe4fca8edb232419a Mon Sep 17 00:00:00 2001 From: Patrick Meiser-Knosowski Date: Wed, 15 Nov 2017 15:24:38 +0100 Subject: [PATCH 04/12] linked graeff.de in readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 2fd3d40..5c6cfbb 100644 --- a/README.md +++ b/README.md @@ -151,6 +151,7 @@ think it could be useful if this or that would be different, don't hesitate to email me or even better open an [issue][5]. With a little luck and good timing you may find me on irc://irc.freenode.net/#vim as KnoP if you have any questions. +If you need assistance with your robot project [visit us][9]. [1]: https://github.com/KnoP-01/krl-for-vim/releases/latest [2]: https://github.com/KnoP-01/krl-for-vim#tldr @@ -160,3 +161,4 @@ questions. [5]: https://github.com/KnoP-01/krl-for-vim/issues [7]: https://vim.sourceforge.io/scripts/script.php?script_id=3695 [8]: https://vim.sourceforge.io/scripts/script.php?script_id=39 +[9]: http://www.graeff.de From 88c29f0251c0f08d7b9ec906be7b9836f92a5d4d Mon Sep 17 00:00:00 2001 From: Patrick Meiser-Knosowski Date: Wed, 15 Nov 2017 15:33:32 +0100 Subject: [PATCH 05/12] corrected link to graeff.de --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5c6cfbb..75db5dd 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,7 @@ If you like this plugin please rate it on [vim.org][4]. If you don't but you think it could be useful if this or that would be different, don't hesitate to email me or even better open an [issue][5]. With a little luck and good timing you may find me on irc://irc.freenode.net/#vim as KnoP if you have any -questions. +questions. If you need assistance with your robot project [visit us][9]. [1]: https://github.com/KnoP-01/krl-for-vim/releases/latest From 7b11025a0f2848421d4a85d7673c0d3b10adf468 Mon Sep 17 00:00:00 2001 From: Patrick Meiser-Knosowski Date: Wed, 22 Nov 2017 17:49:20 +0100 Subject: [PATCH 06/12] added set_system_data to krlBuildInFunction --- syntax/krl.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax/krl.vim b/syntax/krl.vim index f52ce55..e209586 100644 --- a/syntax/krl.vim +++ b/syntax/krl.vim @@ -262,7 +262,7 @@ syn keyword krlBuildInFunction contained cClose cOpen cRead cWrite sRead sWrite syn keyword krlBuildInFunction contained forward inverse inv_pos syn keyword krlBuildInFunction contained get_sig_inf GetSysState pulse syn keyword krlBuildInFunction contained StrAdd StrClear StrCopy StrComp StrFind StrLen StrDeclLen StrToBool StrToInt StrToReal StrToString -syn keyword krlBuildInFunction contained Clear_KrlMsg Set_KrlDlg Exists_KrlDlg Set_KrlMsg Exists_KrlMsg +syn keyword krlBuildInFunction contained Clear_KrlMsg SET_SYSTEM_DATA Set_KrlDlg Exists_KrlDlg Set_KrlMsg Exists_KrlMsg syn keyword krlBuildInFunction contained Err_Clear Err_Raise syn keyword krlBuildInFunction contained varstate EK EB LK sync MD_CMD MD_SETSTATE MBX_REC if exists("g:krlNoHighlight") && g:krlNoHighlight==1 From 6a3a9e80e05454b171f85cbf7e81fe36bf019d8f Mon Sep 17 00:00:00 2001 From: Patrick Meiser-Knosowski Date: Wed, 29 Nov 2017 11:36:59 +0100 Subject: [PATCH 07/12] formatting --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 75db5dd..a159dcb 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,8 @@ ## Introduction: -Have a look at [tl:dr][2] to get a very quick overview over the most -important options provided by KRL for Vim. For more details see the [help][3] -file. +Have a look at [tl:dr][2] to get a very quick overview over the most important +options provided by KRL for Vim. For more details see the [help][3] file. KRL for Vim (7.4 or later) is a collection of Vim scripts to help programing KUKA industrial robots. From 472c47db15c01e7651167af9ab98a4b18802e594 Mon Sep 17 00:00:00 2001 From: Patrick Meiser-Knosowski Date: Wed, 29 Nov 2017 11:37:24 +0100 Subject: [PATCH 08/12] kss functions and data types --- syntax/krl.vim | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/syntax/krl.vim b/syntax/krl.vim index e209586..68c68a1 100644 --- a/syntax/krl.vim +++ b/syntax/krl.vim @@ -1,7 +1,7 @@ " Kuka Robot Language syntax file for Vim " Language: Kuka Robot Language " Maintainer: Patrick Meiser-Knosowski -" Version: 1.5.3 +" Version: 1.5.4 " Last Change: 12. Aug 2017 " Credits: Thanks for contributions to this to Michael Jagusch " @@ -128,6 +128,10 @@ highlight default link krlEnumVal Constant " /r1/system/$config.dat as well as " basisTech, gripperTech and spotTech " +" Predefined data types foud in kss functions +syn keyword krlEnum EDIAGSTATE RDC_FS_STATE RET_C_PSYNC_E VAR_TYPE CANCEL_PSYNC_E SYS_VARS +syn keyword krlStructure SIGINF RW_RDC_FILE RW_MAM_FILE DIAGPAR_T ERROR_T STOPMESS CASE_SENSE_T MSGBUF_T E3POS E3AXIS DIAGOPT_T +" " Predefined structures for movement syn keyword krlStructure FRAME E6POS POS E6AXIS AXIS syn keyword krlStructure FDAT LDAT PDAT @@ -257,12 +261,14 @@ highlight default link krlStructVal krlDelimiter " BuildInFunction syn keyword krlBuildInFunction contained abs sin cos acos tan atan atan2 sqrt -syn keyword krlBuildInFunction contained b_not " maybe this one should move to Operator?! It's used like a function: b_not(bool) +" maybe this one should move to Operator?! It's used like a function: b_not(bool) +syn keyword krlBuildInFunction contained b_not syn keyword krlBuildInFunction contained cClose cOpen cRead cWrite sRead sWrite +syn keyword krlBuildInFunction contained DELETE_BACKWARD_BUFFER DIAG_START DIAG_STOP GET_DIAGSTATE IS_KEY_PRESSED GETCYCDEF GET_DECL_PLACE CHECKPIDONRDC PIDTORDC DELETE_PID_ON_RDC CAL_TO_RDC SET_MAM_ON_HD COPY_MAM_HD_TO_RDC CREATE_RDC_ARCHIVE RESTORE_RDC_ARCHIVE DELETE_RDC_CONTENT RDC_FILE_TO_HD CHECK_MAM_ON_RDC GET_RDC_FS_STATE TOOL_ADJ IOCTL CIOCTL WSPACEGIVE WSPACETAKE SYNCCMD CANCELPROGSYNC REMOTECMD REMOTEREAD ISMESSAGESET TIMER_LIMIT SET_KRLDLGANSWER GET_MSGBUFFER STRTOFRAME STRTOPOS STRTOE3POS STRTOE6POS STRTOAXIS STRTOE3AXIS STRTOE6AXIS VARTYPE FRAND GETVARSIZE MAXIMIZE_USEDXROBVERS SET_USEDXROBVERS SET_OPT_FILTER MD_GETSTATE MD_ASGN EB_TEST EO EMI_ENDPOS EMI_STARTPOS EMI_ACTPOS EMI_RECSTATE M_COMMENT syn keyword krlBuildInFunction contained forward inverse inv_pos -syn keyword krlBuildInFunction contained get_sig_inf GetSysState pulse +syn keyword krlBuildInFunction contained get_sig_inf GetSysState pulse GET_SYSTEM_DATA syn keyword krlBuildInFunction contained StrAdd StrClear StrCopy StrComp StrFind StrLen StrDeclLen StrToBool StrToInt StrToReal StrToString -syn keyword krlBuildInFunction contained Clear_KrlMsg SET_SYSTEM_DATA Set_KrlDlg Exists_KrlDlg Set_KrlMsg Exists_KrlMsg +syn keyword krlBuildInFunction contained Clear_KrlMsg SET_SYSTEM_DATA SET_SYSTEM_DATA_DELAYED Set_KrlDlg Exists_KrlDlg Set_KrlMsg Exists_KrlMsg syn keyword krlBuildInFunction contained Err_Clear Err_Raise syn keyword krlBuildInFunction contained varstate EK EB LK sync MD_CMD MD_SETSTATE MBX_REC if exists("g:krlNoHighlight") && g:krlNoHighlight==1 From 3d6a544598c1247193a429b3bc80a243baa37a7f Mon Sep 17 00:00:00 2001 From: Patrick Meiser-Knosowski Date: Thu, 7 Dec 2017 17:09:58 +0100 Subject: [PATCH 09/12] added spline instructions --- syntax/krl.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/syntax/krl.vim b/syntax/krl.vim index 68c68a1..3b82398 100644 --- a/syntax/krl.vim +++ b/syntax/krl.vim @@ -162,7 +162,7 @@ syn keyword krlStructure MSG_T " " Predefined structures and enums found in /r1/system/$config.dat " BasisTech -syn keyword krlStructure DIG_OUT_TYPE CTRL_IN_T CTRL_OUT_T FCT_OUT_T FCT_IN_T ODAT BASIS_SUGG_T OUT_SUGG_T MD_STATE MACHINE_DEF_T MACHINE_TOOL_T MACHINE_FRAME_T TRIGGER_PARA CONSTVEL_PARA CONDSTOP_PARA ADAT TM_SUGG_T TQM_TQDAT_T SPS_PROG_TYPE +syn keyword krlStructure DIG_OUT_TYPE CTRL_IN_T CTRL_OUT_T FCT_OUT_T FCT_IN_T ODAT BASIS_SUGG_T OUT_SUGG_T MD_STATE MACHINE_DEF_T MACHINE_TOOL_T MACHINE_FRAME_T STOP TRIGGER_PARA CONSTVEL_PARA CONDSTOP_PARA ADAT TM_SUGG_T TQM_TQDAT_T SPS_PROG_TYPE syn keyword krlEnum BAS_COMMAND OUT_MODETYPE IPO_M_T APO_MODE_T FUNCT_TYPE P00_COMMAND " " GripperTech @@ -231,7 +231,7 @@ highlight default link krlException Exception " --- " special keywords for movement commands -syn keyword krlMovement PTP LIN CIRC SPL SLIN SCIRC ASYPTP PTP_REL LIN_REL CIRC_REL +syn keyword krlMovement PTP LIN CIRC SPL SPTP SLIN SCIRC ASYPTP PTP_REL LIN_REL CIRC_REL syn keyword krlMovement ASYCANCEL BRAKE BRAKE_F if exists("g:krlNoHighlight") && g:krlNoHighlight==1 \|| exists("g:krlNoHighLink") && g:krlNoHighLink==1 From 8e0095be1e134f5b964f1efb8ba4068fb846c597 Mon Sep 17 00:00:00 2001 From: Patrick Meiser-Knosowski Date: Thu, 7 Dec 2017 17:12:12 +0100 Subject: [PATCH 10/12] correction for spline instructions --- syntax/krl.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/syntax/krl.vim b/syntax/krl.vim index 3b82398..0f4cec2 100644 --- a/syntax/krl.vim +++ b/syntax/krl.vim @@ -162,7 +162,7 @@ syn keyword krlStructure MSG_T " " Predefined structures and enums found in /r1/system/$config.dat " BasisTech -syn keyword krlStructure DIG_OUT_TYPE CTRL_IN_T CTRL_OUT_T FCT_OUT_T FCT_IN_T ODAT BASIS_SUGG_T OUT_SUGG_T MD_STATE MACHINE_DEF_T MACHINE_TOOL_T MACHINE_FRAME_T STOP TRIGGER_PARA CONSTVEL_PARA CONDSTOP_PARA ADAT TM_SUGG_T TQM_TQDAT_T SPS_PROG_TYPE +syn keyword krlStructure DIG_OUT_TYPE CTRL_IN_T CTRL_OUT_T FCT_OUT_T FCT_IN_T ODAT BASIS_SUGG_T OUT_SUGG_T MD_STATE MACHINE_DEF_T MACHINE_TOOL_T MACHINE_FRAME_T TRIGGER_PARA CONSTVEL_PARA CONDSTOP_PARA ADAT TM_SUGG_T TQM_TQDAT_T SPS_PROG_TYPE syn keyword krlEnum BAS_COMMAND OUT_MODETYPE IPO_M_T APO_MODE_T FUNCT_TYPE P00_COMMAND " " GripperTech @@ -209,7 +209,7 @@ endif " Statement " syn match krlStatement /\v^\s*(\s+)?(\s+)?/ contains=krlStorageClass syn match krlStatement /\v(\s+)?(\s+)?/ contains=krlStorageClass -syn keyword krlStatement WAIT SEC ON OFF ENABLE DISABLE TRIGGER WHEN DISTANCE PATH DELAY DO PRIO IMPORT IS MINIMUM MAXIMUM CONFIRM ON_ERROR_PROCEED +syn keyword krlStatement WAIT SEC ON OFF ENABLE DISABLE STOP TRIGGER WITH WHEN DISTANCE PATH DELAY DO PRIO IMPORT IS MINIMUM MAXIMUM CONFIRM ON_ERROR_PROCEED highlight default link krlStatement Statement " Conditional syn keyword krlConditional IF THEN ELSE ENDIF SWITCH CASE DEFAULT ENDSWITCH From 135c536310ef25558be403a305afa9658aba4235 Mon Sep 17 00:00:00 2001 From: Patrick Meiser-Knosowski Date: Fri, 8 Dec 2017 07:40:30 +0100 Subject: [PATCH 11/12] highlight vars or funcs >24 chars as error --- syntax/krl.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/syntax/krl.vim b/syntax/krl.vim index 0f4cec2..2d0e269 100644 --- a/syntax/krl.vim +++ b/syntax/krl.vim @@ -1,7 +1,7 @@ " Kuka Robot Language syntax file for Vim " Language: Kuka Robot Language " Maintainer: Patrick Meiser-Knosowski -" Version: 1.5.4 +" Version: 1.5.5 " Last Change: 12. Aug 2017 " Credits: Thanks for contributions to this to Michael Jagusch " @@ -288,6 +288,9 @@ highlight default link krlFunction Function if exists("g:krlShowError") && g:krlShowError==1 " some more or less common typos " + " vars or funcs >24 chars are not possible in krl. a234567890123456789012345 + syn match krlError /\w\{25,}/ containedin=krlFunction,krlNames + " " should be interrupt (on|off) \w+ syn match krlError /\vinterrupt +\w+ +o(n|ff)>/ " From 59445295c26a730345be19ffd9409bfa79a508bc Mon Sep 17 00:00:00 2001 From: Patrick Meiser-Knosowski Date: Fri, 8 Dec 2017 14:39:38 +0100 Subject: [PATCH 12/12] added kss functions for sptp et al --- syntax/krl.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/syntax/krl.vim b/syntax/krl.vim index 2d0e269..1a858d0 100644 --- a/syntax/krl.vim +++ b/syntax/krl.vim @@ -209,7 +209,7 @@ endif " Statement " syn match krlStatement /\v^\s*(\s+)?(\s+)?/ contains=krlStorageClass syn match krlStatement /\v(\s+)?(\s+)?/ contains=krlStorageClass -syn keyword krlStatement WAIT SEC ON OFF ENABLE DISABLE STOP TRIGGER WITH WHEN DISTANCE PATH DELAY DO PRIO IMPORT IS MINIMUM MAXIMUM CONFIRM ON_ERROR_PROCEED +syn keyword krlStatement WAIT SEC ON OFF ENABLE DISABLE STOP TRIGGER WITH WHEN DISTANCE PATH ONSTART DELAY DO PRIO IMPORT IS MINIMUM MAXIMUM CONFIRM ON_ERROR_PROCEED highlight default link krlStatement Statement " Conditional syn keyword krlConditional IF THEN ELSE ENDIF SWITCH CASE DEFAULT ENDSWITCH @@ -271,6 +271,7 @@ syn keyword krlBuildInFunction contained StrAdd StrClear StrCopy StrComp StrFind syn keyword krlBuildInFunction contained Clear_KrlMsg SET_SYSTEM_DATA SET_SYSTEM_DATA_DELAYED Set_KrlDlg Exists_KrlDlg Set_KrlMsg Exists_KrlMsg syn keyword krlBuildInFunction contained Err_Clear Err_Raise syn keyword krlBuildInFunction contained varstate EK EB LK sync MD_CMD MD_SETSTATE MBX_REC +syn keyword krlBuildInFunction contained SVEL_JOINT STOOL2 SBASE SIPO_MODE SLOAD SACC_JOINT SGEAR_JERK SAPO_PTP SVEL_CP SACC_CP SAPO SORI_TYP SJERK if exists("g:krlNoHighlight") && g:krlNoHighlight==1 \|| exists("g:krlNoHighLink") && g:krlNoHighLink==1 highlight default link krlBuildInFunction BuildInFunction