{"name":"BC","scopeName":"source.bc","patterns":[{"include":"#main"}],"repository":{"args":{"name":"meta.arguments.bc","begin":"\\G\\(","end":"\\)","patterns":[{"include":"#expression"}],"beginCaptures":{"0":{"name":"punctuation.definition.arguments.begin.bc"}},"endCaptures":{"0":{"name":"punctuation.definition.arguments.end.bc"}}},"arrayAccess":{"name":"meta.item-access.bc","contentName":"meta.subscript.bc","begin":"\\[","end":"\\]","patterns":[{"include":"#expression"}],"beginCaptures":{"0":{"name":"punctuation.section.square.bracket.begin.bc"}},"endCaptures":{"0":{"name":"punctuation.section.square.bracket.end.bc"}}},"assignment":{"name":"meta.assignment.statement.bc","begin":"(?x)\n(?:\n\t\\b\n\t(?:\n\t\t(ibase|obase|scale|history|last)\n\t\t|\n\t\t(?:\n\t\t\t([a-z][a-z_0-9]+)\n\t\t\t|\n\t\t\t([a-z])\n\t\t)\n\t\t(\\s*\\[[^\\[\\]]*\\])?\n\t)\n\t|\n\t(\\.)\n\t|\n\t(?\u003c=\\])\n)\n\\s*\n([-+*/%^]?=)","end":"(?=$|;|,)","patterns":[{"include":"#expression"}],"beginCaptures":{"1":{"name":"variable.language.$1.assignment.bc"},"2":{"name":"variable.assignment.long.bc"},"3":{"name":"variable.assignment.short.bc"},"4":{"patterns":[{"include":"#arrayAccess"}]},"5":{"name":"variable.language.last.assignment.bc"},"6":{"patterns":[{"include":"#operators"}]}}},"auto":{"name":"meta.local-variables.bc","begin":"(?\u003c=\\s|^|\\G|\\*/)\\b(auto)(?=\\s|$)","end":"$|(?=;|#|/\\*)","patterns":[{"name":"variable.local.array.long.bc","match":"\\b[a-z][a-z_0-9]+(\\[\\])","captures":{"1":{"name":"punctuation.definition.variable.array.bc"}}},{"name":"variable.local.array.short.bc","match":"\\b[a-z](\\[\\])","captures":{"1":{"name":"punctuation.definition.variable.array.bc"}}},{"name":"variable.local.scalar.long.bc","match":"\\b[a-z][a-z_0-9]+"},{"name":"variable.local.scalar.short.bc","match":"\\b[a-z]\\b"},{"include":"#lineContinuation"},{"include":"etc#comma"}],"beginCaptures":{"1":{"name":"storage.modifier.auto.bc"}}},"block":{"name":"meta.block.bc","begin":"{","end":"}","patterns":[{"include":"#statement"}],"beginCaptures":{"0":{"name":"punctuation.section.block.curly.bracket.begin.bc"}},"endCaptures":{"0":{"name":"punctuation.section.block.curly.bracket.end.bc"}}},"call":{"patterns":[{"name":"meta.expression.$1-call.bc","begin":"\\b(sqrt|length|scale|read)\\s*(?=\\()","end":"(?\u003c=\\))","patterns":[{"include":"#args"}],"beginCaptures":{"1":{"name":"keyword.operator.expression.$1.bc"}}},{"name":"meta.function-call.bc","begin":"\\b(?:([scalej])|([a-z][a-z_0-9]*))\\s*(?=\\()","end":"(?\u003c=\\))","patterns":[{"include":"#args"}],"beginCaptures":{"1":{"name":"support.function.math-library.bc"},"2":{"name":"entity.name.function.bc"}}}]},"comments":{"patterns":[{"name":"comment.block.bc","begin":"/\\*","end":"\\*/","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.bc"}},"endCaptures":{"0":{"name":"punctuation.definition.comment.end.bc"}}},{"name":"comment.line.number-sign.bc","begin":"#","end":"$","beginCaptures":{"0":{"name":"punctuation.definition.comment.bc"}}}]},"condition":{"name":"meta.condition.expression.bc","begin":"\\G\\(","end":"\\)","patterns":[{"include":"#expression"}],"beginCaptures":{"0":{"name":"punctuation.section.condition.round.bracket.begin.bc"}},"endCaptures":{"0":{"name":"punctuation.section.condition.round.bracket.end.bc"}}},"expression":{"patterns":[{"include":"#comments"},{"include":"#operators"},{"include":"#number"},{"include":"#string"},{"include":"#group"},{"include":"#call"},{"include":"#variable"},{"include":"#arrayAccess"},{"include":"#lineContinuation"},{"include":"etc#comma"}]},"for":{"name":"meta.block.for.loop.bc","begin":"\\b(for)[ \\t]*","end":"(?!\\G)","patterns":[{"begin":"\\G\\(","end":"\\)","patterns":[{"name":"meta.loop.initialisation.bc","begin":"\\G(?!;)","end":"(?=;|\\))","patterns":[{"include":"#expression"}]},{"name":"meta.loop.condition.bc","begin":";","end":";|(?=\\))","patterns":[{"include":"#expression"}],"captures":{"0":{"patterns":[{"include":"etc#semi"}]}}},{"name":"meta.loop.update.bc","begin":"(?\u003c=;)","end":"(?=\\))","patterns":[{"include":"#expression"}]}],"beginCaptures":{"0":{"name":"punctuation.section.condition.round.bracket.begin.bc"}},"endCaptures":{"0":{"name":"punctuation.section.condition.round.bracket.end.bc"}}}],"beginCaptures":{"1":{"name":"keyword.control.flow.loop.for.bc"}}},"function":{"name":"meta.function.definition.bc","begin":"(?\u003c=\\s|^|\\G)(define)(?=\\s|$)","end":"(?\u003c=})","patterns":[{"include":"#functionHead"},{"include":"#functionBody"},{"include":"#comments"}],"beginCaptures":{"1":{"name":"storage.type.function.bc"}}},"functionBody":{"name":"meta.block.function-body.bc","begin":"{","end":"}","patterns":[{"include":"#auto"},{"include":"#main"}],"beginCaptures":{"0":{"name":"punctuation.section.block.curly.bracket.begin.bc"}},"endCaptures":{"0":{"name":"punctuation.section.block.curly.bracket.end.bc"}}},"functionHead":{"begin":"\\G","end":"(?\u003c=\\))|(?={)","patterns":[{"begin":"\\G","end":"(?:(void)\\s+)?([a-z][a-z_0-9]+)|([a-z]\\b)|(?=[^\\sa-z/*#])","endCaptures":{"1":{"name":"storage.modifier.void.gnu.bc"},"2":{"name":"entity.name.function.long.bc"},"3":{"name":"entity.name.function.short.bc"}}},{"begin":"(?\u003c=[a-z_0-9])(?!\\G)\\s*(?=\\()","end":"(?!\\G)","patterns":[{"name":"meta.parameters.bc","begin":"\\G\\(","end":"\\)","patterns":[{"name":"variable.parameter.function.array.long.bc","match":"(\\*)?\\b[a-z][a-z_0-9]+(\\[\\])","captures":{"1":{"name":"storage.modifier.callable.bc"},"2":{"name":"punctuation.definition.variable.array.bc"}}},{"name":"variable.parameter.function.array.short.bc","match":"(\\*)?\\b[a-z](\\[\\])","captures":{"1":{"name":"storage.modifier.callable.bc"},"2":{"name":"punctuation.definition.variable.array.bc"}}},{"name":"variable.parameter.function.long.bc","match":"\\b[a-z][a-z_0-9]+"},{"name":"variable.parameter.function.short.bc","match":"\\b[a-z]\\b"},{"include":"#main"}],"beginCaptures":{"0":{"name":"punctuation.definition.parameters.round.bracket.begin.bc"}},"endCaptures":{"0":{"name":"punctuation.definition.parameters.round.bracket.end.bc"}}}]},{"include":"#comments"}]},"group":{"name":"meta.expression.group.bc","begin":"\\(","end":"\\)","patterns":[{"include":"#expression"}],"beginCaptures":{"0":{"name":"punctuation.section.expression.round.bracket.begin.bc"}},"endCaptures":{"0":{"name":"punctuation.section.expression.round.bracket.end.bc"}}},"if":{"patterns":[{"name":"meta.block.conditional.bc","begin":"\\b(if)[ \\t]*","end":"(?!\\G)","patterns":[{"include":"#condition"},{"include":"#comments"}],"beginCaptures":{"1":{"name":"keyword.control.flow.conditional.if.bc"}}},{"name":"keyword.control.flow.conditional.else.bc","match":"\\b(else)\\b"}]},"keywords":{"patterns":[{"name":"keyword.control.flow.$1.bc","match":"\\b(break|continue|quit)\\b"},{"name":"keyword.control.flow.$1.gnu.bc","match":"\\b(halt)\\b"},{"name":"keyword.operator.$1.gnu.bc","match":"\\b(limits|warranty)\\b"}]},"lineContinuation":{"name":"constant.character.escape.newline.line-continuation.bc","begin":"(\\\\)$\\s*","end":"^","beginCaptures":{"1":{"name":"punctuation.definition.escape.backslash.bc"}}},"main":{"patterns":[{"include":"#comments"},{"include":"#function"},{"include":"#statement"},{"include":"#expression"}]},"number":{"name":"constant.numeric.bc","match":"[-+]?(?:[0-9A-F]+(?:\\.[0-9A-F]*)?|\\.[0-9A-F]*)"},"operators":{"patterns":[{"include":"etc#opFix"},{"match":"[\u003c=\u003e!]=|\u003c|\u003e","captures":{"0":{"patterns":[{"include":"etc#opCmp"}]}}},{"match":"[-+*/%^]?=","captures":{"0":{"patterns":[{"include":"etc#opMathAssign"},{"include":"etc#eql"}]}}},{"match":"[-^*/%+]","captures":{"0":{"patterns":[{"include":"etc#opMath"}]}}},{"match":"!|\u0026\u0026|\\|\\|","captures":{"0":{"patterns":[{"include":"etc#opLog"}]}}}]},"print":{"name":"meta.print.statement.bc","begin":"\\b(print)\\b[ \\t]*","end":"(?=$|;)","patterns":[{"include":"#expression"}],"beginCaptures":{"1":{"name":"keyword.operator.print.bc"}}},"return":{"name":"meta.return.statement.bc","begin":"\\b(return)\\b[ \\t]*","end":"(?=$|;|(?\u003c=\\)))","patterns":[{"include":"#expression"}],"beginCaptures":{"1":{"name":"keyword.control.flow.return.bc"}}},"semi":{"name":"punctuation.terminator.statement.semicolon.bc","match":";"},"statement":{"patterns":[{"include":"#if"},{"include":"#while"},{"include":"#for"},{"include":"#block"},{"include":"#assignment"},{"include":"#keywords"},{"include":"#return"},{"include":"#print"},{"include":"#semi"},{"include":"#expression"}]},"string":{"name":"string.quoted.double.bc","begin":"\"","end":"\"","patterns":[{"name":"constant.character.escape.backslash.bc","match":"(\\\\)[abfnqrt\\\\]","captures":{"1":{"name":"punctuation.definition.escape.backslash.bc"}}},{"name":"invalid.illegal.unknown-escape.bc","match":"\\\\(?:[^\"]|(?=\"))"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.bc"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.bc"}}},"variable":{"patterns":[{"name":"variable.language.$1.dereference.bc","match":"\\b(ibase|obase|scale|history|last)\\b"},{"name":"variable.language.last.dereference.bc","match":"\\.(?![0-9A-F])"},{"name":"variable.dereference.long.bc","match":"\\b[a-z][a-z_0-9]+\\b"},{"name":"variable.dereference.short.bc","match":"\\b[a-z]\\b"}]},"while":{"name":"meta.block.while.loop.bc","begin":"\\b(while)[ \\t]*","end":"(?!\\G)","patterns":[{"include":"#condition"},{"include":"#comments"}],"beginCaptures":{"1":{"name":"keyword.control.flow.loop.while.bc"}}}}}