{"name":"VSCode GCode Syntax","scopeName":"source.gcode","patterns":[{"include":"#comments"},{"include":"#speedsfeeds"},{"include":"#prognumbers"},{"include":"#coords"},{"include":"#tools"},{"include":"#modifiers"},{"include":"#macrovars"},{"include":"#keywords"},{"include":"#operators"}],"repository":{"comments":{"patterns":[{"name":"comment.gcode","match":"(\\(.+\\))"},{"name":"comment.gcode","begin":";","end":"\\n"}]},"coords":{"patterns":[{"name":"string.gcode","match":"([xX])(?=-|\\d|\\[|#|\\.)-?(?:\\d+(?:\\.\\d*)|(?:\\.(?:\\d*))?)?"},{"name":"string.gcode","match":"([yY])(?=-|\\d|\\[|#|\\.)-?(?:\\d+(?:\\.\\d*)|(?:\\.(?:\\d*))?)?"},{"name":"invalid.gcode","match":"([zZ])(?=-|\\d|\\[|#|\\.)-?(?:\\d+(?:\\.\\d*)|(?:\\.(?:\\d*))?)?"},{"name":"constant.character.escape.gcode","match":"([aAbBcC])(?=-|\\d|\\[|#|\\.)-?(?:\\d+(?:\\.\\d*)|(?:\\.(?:\\d*))?)?"}]},"keywords":{"patterns":[{"name":"constant.numeric.gcode","match":"[gG](1)?5[4-9](.1)?\\s?(P[0-9]{1,3})?"},{"name":"constant.numeric.gcode","match":"[gG]1[1-2][0-9]"},{"name":"constant.numeric.gcode","match":"[gG]15\\s?(H[0-9]{1,2})?"},{"name":"markup.bold.gcode","match":"[gG][0-9]{1,3}"},{"name":"keyword.operator.quantifier.regexp.gcode","match":"[mM][0-9]{1,3}"},{"name":"string.gcode","match":"([\\%])"},{"name":"keyword.control.gcode","match":"(GOTO)|(IF)|(EQ)|(NE)|(LT)|(GT)|(LE)|(GE)|(DO)|(WHILE)|(END)|(AND)|(OR)|(XOR)"}]},"macrovars":{"patterns":[{"name":"variable.other.gcode","match":"[#][0-9]+"},{"name":"variable.other.gcode","match":"[#][\\[].+[\\]]"}]},"modifiers":{"patterns":[{"name":"constant.character.escape.gcode","match":"([iIjJkK])(?=-|\\d|\\[|#|\\.)-?(?:\\d+(?:\\.\\d*)|(?:\\.(?:\\d*))?)?"},{"name":"support.constant.math.gcode","match":"([qQrR])(?=-|\\d|\\[|#|\\.)-?(?:\\d+(?:\\.\\d*)|(?:\\.(?:\\d*))?)?"},{"name":"support.constant.math.gcode","match":"([uUwW])(?=-|\\d|\\[|#|\\.)-?(?:\\d+(?:\\.\\d*)|(?:\\.(?:\\d*))?)?"}]},"operators":{"patterns":[{"name":"support.constant.math.gcode","match":"(SIN)|(COS)|(TAN)|(ASIN)|(ACOS)|(ATAN)|(FIX)|(FUP)|(LN)|(ROUND)|(SQRT)"},{"name":"support.constant.math.gcode","match":"(FIX)|(FUP)|(ROUND)|(ABS)|(MOD)"},{"name":"support.constant.math.gcode","match":"(\\+)|(\\*)|(\\/)|(\\*\\*)"},{"name":"invalid.gcode","match":"(\\-)"}]},"prognumbers":{"patterns":[{"name":"constant.numeric.gcode","match":"[nN][0-9]+"},{"name":"string.regexp.gcode","match":"[oO][0-9]{1,5}"},{"name":"string.regexp.gcode","match":"[pP][0-9]{0,5}"}]},"speedsfeeds":{"patterns":[{"name":"constant.language.gcode","match":"([sS])(?=-|\\d|\\[|#)-?(?:\\d+(?:\\.\\d*)?)?"},{"name":"constant.language.gcode","match":"([fF])(?=-|\\d|\\[|#|\\.)-?(?:\\d+(?:\\.\\d*)|(?:\\.(?:\\d*))?)?"},{"name":"constant.language.gcode","match":"([eE])(?=-|\\d|\\[|#|\\.)-?(?:\\d+(?:\\.\\d*)|(?:\\.(?:\\d*))?)?"}]},"tools":{"patterns":[{"name":"constant.character.gcode","match":"([dD])(?=-|\\d|\\[|#|\\.)-?(?:\\d+(?:\\.\\d*)|(?:\\.(?:\\d*))?)?"},{"name":"constant.character.gcode","match":"([hH])(?=-|\\d|\\[|#|\\.)-?(?:\\d+(?:\\.\\d*)|(?:\\.(?:\\d*))?)?"},{"name":"constant.character.gcode","match":"([tT])(?=-|\\d|\\[|#|\\.)-?(?:\\d+(?:\\.\\d*)|(?:\\.(?:\\d*))?)?"}]}}}