]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/languages/tp.js
1 /*! `tp` grammar compiled for Highlight.js 11.11.1 */
3 var hljsGrammar
= (function () {
8 Author: Jay Strybis <jay.strybis@gmail.com>
9 Description: FANUC TP programming language (TPP).
16 begin: '[1-9][0-9]*', /* no leading zeros */
24 className: 'built_in',
25 begin: '(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER|'
26 + 'TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|DIAG_REC)\\[',
35 className: 'built_in',
36 begin: '(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\[',
41 hljs
.QUOTE_STRING_MODE
, /* for pos section at bottom */
139 className: 'keyword',
140 begin: '/(PROG|ATTR|MN|POS|END)\\b'
143 /* this is for cases like ,CALL */
144 className: 'keyword',
145 begin: '(CALL|RUN|POINT_LOGIC|LBL)\\b'
148 /* this is for cases like CNT100 where the default lexemes do not
149 * separate the keyword and the number */
150 className: 'keyword',
151 begin: '\\b(ACC|CNT|Skip|Offset|PSPD|RT_LD|AP_LD|Tool_Offset)'
154 /* to catch numbers that do not have a word boundary on the left */
156 begin: '\\d+(sec|msec|mm/sec|cm/min|inch/min|deg/sec|mm|in|cm)?\\b',
159 hljs
.COMMENT('//', '[;$]'),
160 hljs
.COMMENT('!', '[;$]'),
161 hljs
.COMMENT('--eg:', '$'),
162 hljs
.QUOTE_STRING_MODE
,
170 className: 'variable',
171 begin: '\\$[A-Za-z0-9_]+'
181 hljs
.registerLanguage('tp', hljsGrammar
);