class_docstr: Lexer for the DOS/Windows Batch file format.
  
  .. versionadded:: 0.7
class_docstr_tok: ["Lexer","for","the","DOS\/Windows","Batch","file","format",".","..","versionadded",":",":","0.7"]
code: def _make_arithmetic_state(
      compound,
      _nl=_nl,
      _punct=_punct,
      _string=_string,
      _variable=_variable,
      _ws=_ws,
  ):
      op = r"=+\-*/!~"
      state = []
      if compound:
          state.append((r"(?=\))", Text, "#pop"))
      state += [
          (r"0[0-7]+", Number.Oct),
          (r"0x[\da-f]+", Number.Hex),
          (r"\d+", Number.Integer),
          (r"[(),]+", Punctuation),
          (r"([%s]|%%|\^\^)+" % op, Operator),
          (
              r'(%s|%s|(\^[%s]?)?[^()%s%%^"%s%s%s]|\^[%s%s]?%s)+'
              % (
                  _string,
                  _variable,
                  _nl,
                  op,
                  _nl,
                  _punct,
                  _ws,
                  _nl,
                  _ws,
                  r"[^)]" if compound else r"[\w\W]",
              ),
              using(this, state="variable"),
          ),
          (r"(?=[\x00|&])", Text, "#pop"),
          include("follow"),
      ]
      return state
  
imports: import re
  from pygments.lexer import Lexer, RegexLexer, do_insertions, bygroups, include, default, this, using, words
  from pygments.token import Punctuation, Text, Comment, Operator, Keyword, Name, String, Number, Generic
  from pygments.util import shebang_matches
label_desc: Use image node_id 3 for calling the BatchLexer obj's underlying member method code with example usage: obj._make_arithmetic_state(compound, _nl, _punct, _string, _variable, _ws) and returns: state