tp.min.js 1.7 KB

12345678910111213141516171819
  1. /*! `tp` grammar compiled for Highlight.js 11.7.0 */
  2. (()=>{var O=(()=>{"use strict";return O=>{const e={className:"number",
  3. begin:"[1-9][0-9]*",relevance:0},R={className:"symbol",begin:":[^\\]]+"};return{
  4. name:"TP",keywords:{
  5. keyword:["ABORT","ACC","ADJUST","AND","AP_LD","BREAK","CALL","CNT","COL","CONDITION","CONFIG","DA","DB","DIV","DETECT","ELSE","END","ENDFOR","ERR_NUM","ERROR_PROG","FINE","FOR","GP","GUARD","INC","IF","JMP","LINEAR_MAX_SPEED","LOCK","MOD","MONITOR","OFFSET","Offset","OR","OVERRIDE","PAUSE","PREG","PTH","RT_LD","RUN","SELECT","SKIP","Skip","TA","TB","TO","TOOL_OFFSET","Tool_Offset","UF","UT","UFRAME_NUM","UTOOL_NUM","UNLOCK","WAIT","X","Y","Z","W","P","R","STRLEN","SUBSTR","FINDSTR","VOFFSET","PROG","ATTR","MN","POS"],
  6. literal:["ON","OFF","max_speed","LPOS","JPOS","ENABLE","DISABLE","START","STOP","RESET"]
  7. },contains:[{className:"built_in",
  8. begin:"(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER|TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|DIAG_REC)\\[",
  9. end:"\\]",contains:["self",e,R]},{className:"built_in",
  10. begin:"(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\[",end:"\\]",
  11. contains:["self",e,O.QUOTE_STRING_MODE,R]},{className:"keyword",
  12. begin:"/(PROG|ATTR|MN|POS|END)\\b"},{className:"keyword",
  13. begin:"(CALL|RUN|POINT_LOGIC|LBL)\\b"},{className:"keyword",
  14. begin:"\\b(ACC|CNT|Skip|Offset|PSPD|RT_LD|AP_LD|Tool_Offset)"},{
  15. className:"number",
  16. begin:"\\d+(sec|msec|mm/sec|cm/min|inch/min|deg/sec|mm|in|cm)?\\b",relevance:0
  17. },O.COMMENT("//","[;$]"),O.COMMENT("!","[;$]"),O.COMMENT("--eg:","$"),O.QUOTE_STRING_MODE,{
  18. className:"string",begin:"'",end:"'"},O.C_NUMBER_MODE,{className:"variable",
  19. begin:"\\$[A-Za-z0-9_]+"}]}}})();hljs.registerLanguage("tp",O)})();