code: def t_octalValue(t):
      r'[+-]?0[0-9]+'
      # We must match [0-9], and then check the validity of the octal number.
      # If we match [0-7], the invalid octal number "08" would match
      # 'decimalValue' 0 and 'decimalValue' 8.
      if re.search(r'[8-9]', t.value) is not None:
          msg = _format("Invalid octal number {0!A}", t.value)
          t.lexer.last_msg = msg
          t.type = 'error'
          # Setting error causes the value to be automatically skipped
      else:
          t.value = int(t.value, 8)
      return f t_octalValue(t):
      r'[+-]?0[0-9]+'
      # We must match [0-9], and then check the validity of the octal number.
      # If we match [0-7], the invalid octal number "08" would match
      # 'decimalValue' 0 and 'decimalValue' 8.
      if re.search(r'[8-9]', t.value) is not None:
          msg = _format("Invalid octal number {0!A}", t.value)
          t.lexer.last_msg = msg
          t.type = 'error'
          # Setting error causes the value to be automatically skipped
      else:
          t.value = int(t.value, 8)
      return t
docs: r'[+-]?0[0-9]+